🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #16207

Re: Preguntillas C y Linux.

#16207
From: Santiago Romero
Date: Mon, 01 May 2000 00:00
50 lines
2319 bytes
El Mon, 01 May 2000 06:32:58 GMT, batsman escribi�:
>man regcomp
>
>regcomp(3)                     GNU                     regcomp(3)

 a ver si esto esta bien.
 tengo esto:

struct Filters
{
   int     num_rules;
   struct regex_t **rules;
};

 y luego esto:

  if(GetFirstWord( where+strlen("from"), 255, word ))
  {
      // add the filter
      filters->num_rules++;
      realloc( filters->rules,
               filters->num_rules*sizeof(struct regex_t **) );
      regcomp( filters->rules[filters->num_rules-1], word, 0 );
      regfree( filters->rules[filters->num_rules-1]);
      printf("%s\n", word );
   }

 Pero la compilaci�n me dice esto:

gcc -o checkmail popsockets.c serverwork.c cfgfile.c checkmail.c
cfgfile.c: In function `ParseFilterFile':
cfgfile.c:371: warning: passing arg 1 of `regcomp' 
                        from incompatible pointer type
cfgfile.c:372: warning: passing arg 1 of `regfree' 
                        from incompatible pointer type

 �Alguna idea?
 CU!
-- 
Telefonica -> (N., sin acento) D�cese de la compa��a de tel�fonos que
usando las l�neas pagadas por todos los espa�oles nos estafa cada d�a
con precios abusivos y conexiones dignas de pa�ses del tercer mundo.
Ver tambi�n: monopolio, gobierno, PP, Az-nar y retraso tecnol�gico.

 _-----------------------------------------------------_
|  NoP / Compiler          --       nop @ todolinux.org |
|-------------------------------------------------------|
|  POWERED BY - Linux RedHat 6.0  -  Reg. User #74.821  |
|             http://www.ctv.es/USERS/sromero           |
 ~-----------------------------------------------------~
Technical Details
Message-ID: <slrn8gr96s.367.nop@compiler.linux.es>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8goisq.33m.nop@compiler.linux.es> <t8fje8.ie.ln@simpsons4ever>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,21477be2e2f46d7
X-Google-Attributes: gidf86c8,public
From: nop@todolinux.org (Santiago Romero)
Subject: Re: Preguntillas C y Linux.
Date: 2000/05/01
Message-ID: <slrn8gr96s.367.nop@compiler.linux.es>
X-Deja-AN: 617895865
Content-Transfer-Encoding: 8bit
References: <slrn8goisq.33m.nop@compiler.linux.es> <t8fje8.ie.ln@simpsons4ever>
Content-Type: text/plain; charset=iso-8859-1
Organization: Telefonica Transmision de Datos
Mime-Version: 1.0
User-Agent: slrn/0.9.6.2 (Linux)
Reply-To: nop@todolinux.org
Newsgroups: es.comp.os.linux.programacion