Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!unido!pemcom!basien From: basien@pemcom.pem-stuttgart.de (Tillmann A. Basien) Newsgroups: comp.unix.questions Subject: Bug in SCO UNIX DEV 3.2.2 on regcmp() nad regex() ? Message-ID: <1169@pemcom.pem-stuttgart.de> Date: 3 May 91 08:26:19 GMT Organization: PEM GmbH, Stuttgart Lines: 71 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 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@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