Añado más información que he encontrado: ALIGN(*FULL) example
With ALIGN(*FULL), the regex_t data structure size is 656 bytes, which matches the size of the C regex_t data structure in QSYSINC/H(REGEX). With only the ALIGN keyword with no *FULL parameter, the size is 644 bytes. Depending on how storage is laid out in your module, *calling the regcomp() function with the 644-byte version of regex_t might cause storage corruption in your program*, since the API assumes that the parameter size is 656. dcl-ds regex_t qualified *align(*full)*; re_nsub uns(10); // # of subexpressions in RE pattern re_comp pointer; // compiled RE; freed by regfree() re_cflags int(10); // saved cflags for regexec() re_erroff uns(10); // RE pattern error offset re_len uns(10); // length in bytes of compiled pattern re_ucoll int(10) dim(2); // min/max uniq collating values re_lsub pointer; // start subexp lsub_ar uns(10) dim(16); // default lsub array esub_ar uns(10) dim(16); // default esub array reserved1 pointer; // reserved field re_esub pointer; // end subexp re_specchar pointer; // converted special characters re_phdl pointer; // ptr to collation information comp_spc char(112); // compiled RE space re_map char(256); // maps valid pattern characters re_shift int(5); // Saved shift state re_dbcs int(5); // May start with DBCS character end-ds regex_t; El 16 de febrero de 2017, 13:11, Javier Mora <jm...@musgrave.es> escribió: > Hola a tod@s: > > > > a ver si alguien puede echarme un cable, porque me está ocurriendo “algo” > a lo que no le encuentro una explicación. > > > > Desde hace muchos años que utilizo expresiones regulares con ILE RPG. Uso > el fuente publicado por Scott Klement hace más de una década (REGEX_H) que > definía en RPG los prototipos y estructuras de la biblioteca de funciones > de C. Durante estos años, no he tenido problemas con recomp() y regexec(). > > > > Sin embargo, desde primeros del año pasado, cuando actualicé de versión > 6.1 a 7.2, estas funciones empezaron a hacer cosas raras en algunas > ocasiones (no siempre). Tengo programas que siguen funcionando sin > problemas, pero otros o han dejado de funcionar (no interpretan bien las > expresiones) o actúan de forma errática. > > > > He estado buscando por internet y no encuentro en el “Memo to users” de > las versiones 7.1 o 7.2 nada que haga referencia a algún cambio sobre este > asunto. Sin embargo, hoy se me ha ocurrido mirar en el fuente > QSYSINC/H,REGEX y veo que las estructuras de control han cambiado > (regext_t). > > > > Entiendo que en algún momento ha habido cambios pero, ¿cuándo se han > producido estos cambios? ¿Por el cambio de versión? ¿Alguna PTF? ¿Alguien > sabe algo? > > > > Saludos, > > > > > > Javier Mora > > ____________________________________________________ > Únete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd ) > Forum.Help400 © Publicaciones Help400, S.L. >
____________________________________________________ Únete a Recursos AS400, nuestra Comunidad ( http://bit.ly/db68dd ) Forum.Help400 © Publicaciones Help400, S.L.