Article View: es.comp.os.linux.programacion
Article #16282Re: Preguntillas C y Linux.
From: Ignacio Arenaza
Date: Tue, 02 May 2000 00:00
Date: Tue, 02 May 2000 00:00
39 lines
2017 bytes
2017 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
>>>>> "Santiago" == Santiago Romero <nop@todolinux.org> writes:
Santiago> Una cosa, el primer parametro que se le pasa a regcomp
Santiago> tiene que ser un puntero sin inicializar (que el
Santiago> inicializa), o bien tiene que tener ya memoria? lo digo
Santiago> porque usando lo siguiente me da un Segmentation Fault:
Creo que es mas bien un sitio donde el te va a dejar la direccion del
buffer con la expresion regular compilada. Vamos, que deberias usar
algo del tipo:
regex_t expr;
....
regcomp (&expr, "mi_expr_regular.*$", REG_EXTENDED|REG_ICASE);
como indicas en tu segunda solucion. Internamente el si usa malloc,
pero sobre uno de los campos de la estructura mas que sobre la
estructura en si.
Saludos. I�aki.
- --
Sabias que Benjamin Albi�ana tiene htdig en marcha y va de cine?
Get PGP/GPG Keys at http://personales.jet.es/inaki.arenaza/pgpkey.html
A proud member of GULA - http://gula.jet.es/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.4 and Gnu Privacy Guard
iD8DBQE5Dzo8ZXLnGT1HLgcRAlKXAJ0ewYmelM6XZVs9DS4ydBTrd667cQCfSH6+
5wVX9GktpHOileRcwhLol8M=
=ncMO
-----END PGP SIGNATURE-----
Technical Details
Message-ID:
<87wvlc3dfn.fsf@eb2ebu.ampr.org>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<slrn8goisq.33m.nop@compiler.linux.es> <t8fje8.ie.ln@simpsons4ever> <slrn8gr96s.367.nop@compiler.linux.es> <87em7mm0xe.fsf@eb2ebu.ampr.org> <slrn8gthnn.148.nop@compiler.linux.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,21477be2e2f46d7 X-Google-Attributes: gidf86c8,public From: Ignacio Arenaza <inaki.arenaza@jet.es> Subject: Re: Preguntillas C y Linux. Date: 2000/05/02 Message-ID: <87wvlc3dfn.fsf@eb2ebu.ampr.org> X-Deja-AN: 618857343 Content-Transfer-Encoding: 8bit References: <slrn8goisq.33m.nop@compiler.linux.es> <t8fje8.ie.ln@simpsons4ever> <slrn8gr96s.367.nop@compiler.linux.es> <87em7mm0xe.fsf@eb2ebu.ampr.org> <slrn8gthnn.148.nop@compiler.linux.es> Organization: Servidor NNTP de eb2ebu.ampr.org Content-Type: text/plain; charset=iso-8859-1 User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.3 Mime-Version: 1.0 Newsgroups: es.comp.os.linux.programacion