Bug in SCO UNIX DEV 3.2.2 on regcmp() nad regex() ?
Tillmann A. Basien
basien at pemcom.pem-stuttgart.de
Fri May 3 18:26:19 AEST 1991
Hy netlanders,
please help me.
Compiling a programm with the -xenix option I got problems
with the regex and regcmp functions .
This functions didn't work when compiled with the xenix option.
I use a SCO/UNIX Version 3.2.2 .
I took the following program for testing the phenomena .
#include <stdio.h>
char *regcmp(char *,char *);
char *regex(char *,char *,char *);
main(argc,argv)
int argc;
char *argv[];
{
char ret[15];
char *m,*n;
/* test if the name has an l or h at the beginning followed by a */
/* number */
m = regcmp("\([lh][0-9]\{0,3\}\)$0",0);
n = regex(m,argv[1],ret);
/* show the the found part and the rest */
printf("\n ret: %s n: %s \n",ret,n);
} /* end main */
I got these results :
=====================
1)
cc -xenix -Zi -Od -o t_xenix t.c
-rwxr-xr-x 1 owner group 29445 Apr 24 09:14 t_xenix
input/output: t_xenix h4444 -> ret: n: (null)
2)
cc -xout -Zi -Od -o t_xout t.c
-rwxr-xr-x 1 owner group 29461 Apr 24 09:18 t_xout
input/output: t_xout h4444 -> ret: n: (null)
3)
cc -x2.3 -Zi -Od -o t_x2.3 t.c
-rwxr-xr-x 1 owner group 29445 Apr 24 09:17 t_x2.3
input/output: t_x2.3 h4444 -> ret: n: (null)
The result shout be:
====================
input/output: t_x2.3 h4444 -> ret: h444 n: 4
Does anybody know about the problem and know how to solve it ?
--
basien at PEM-Stuttgart.de
Dipl.-Ing. Tillmann A. Basien PEM Programmentwicklungsgesellschaft
Vaihinger Str.49, PostBox 810165 fuer Microcomputer mbH
FRG 7000 Stuttgart 80 voice: +49-711-713045 fax: +49-711-713047
More information about the Comp.unix.questions
mailing list