basien@pemcom.pem-stuttgart.de (Tillmann A. Basien) (05/03/91)
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@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
urban@cbnewsl.att.com (john.urban) (05/07/91)
In article <1169@pemcom.pem-stuttgart.de> basien@pemcom.pem-stuttgart.de (Tillmann A. Basien) writes: > >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 . FYI - The test program works perfectly on UNIX System V/386 Release 4.0 Version 2.1. you get the correct output of: ret: h444 n: 4 when it's compiled on Standard C Development Environmnet (SCDE) C Issue 5.0 Sincerely, John Urban > > >#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@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