From: Stephen D. <sd...@gm...> - 2005-06-27 03:48:26
|
On 6/24/05, abe-t <it...@us...> wrote: > Update of /cvsroot/naviserver/naviserver/nsd > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16462/nsd >=20 > Modified Files: > nsmain.c > Log Message: > Corrected normalizing the home path on Windows. >=20 >=20 > Index: nsmain.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvsroot/naviserver/naviserver/nsd/nsmain.c,v > retrieving revision 1.13 > retrieving revision 1.14 > diff -C2 -d -r1.13 -r1.14 > *** nsmain.c 11 Jun 2005 10:03:56 -0000 1.13 > --- nsmain.c 24 Jun 2005 08:38:27 -0000 1.14 > *************** > *** 111,115 **** > int i, fd, sig, optind, cmdargc; > char **cmdargv; > ! char *config; > Ns_Time timeout; >=20 > --- 111,115 ---- > int i, fd, sig, optind, cmdargc; > char **cmdargv; > ! char *config, *tcp; > Ns_Time timeout; >=20 > *************** > *** 592,596 **** > */ >=20 > ! nsconf.home =3D getcwd(buf, sizeof(buf)); > if (nsconf.home =3D=3D NULL) { > Ns_Fatal("nsmain: getcwd failed: '%s'", strerror(errno)); > --- 592,597 ---- > */ >=20 > ! tcp =3D > ! nsconf.home =3D getcwd(NULL, _MAX_PATH); > if (nsconf.home =3D=3D NULL) { > Ns_Fatal("nsmain: getcwd failed: '%s'", strerror(errno)); > *************** > *** 604,608 **** > ++nsconf.home; > } > ! nsconf.home =3D buf; >=20 > /* > --- 605,609 ---- > ++nsconf.home; > } > ! nsconf.home =3D tcp; >=20 > /* What does 'tcp' stand for? How about 'cwd': nsconf.home =3D getcwd(NULL, _MAX_PATH); if (nsconf.home =3D=3D NULL) { Ns_Fatal("nsmain: getcwd failed: '%s'", strerror(errno)); } for (cwd =3D nsconf.home; *cwd !=3D '\0'; cwd++) { if (*cwd =3D=3D '\\') { *cwd =3D '/'; } else if (isupper(*cwd)) { *cwd =3D tolower(*cwd); } } |