--- ray/src/gen/xform.c 2003/06/08 12:03:10 2.26 +++ ray/src/gen/xform.c 2003/07/14 20:02:29 2.30 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: xform.c,v 2.26 2003/06/08 12:03:10 schorsch Exp $"; +static const char RCSid[] = "$Id: xform.c,v 2.30 2003/07/14 20:02:29 schorsch Exp $"; #endif /* * xform.c - program to transform object files. @@ -10,7 +10,6 @@ static const char RCSid[] = "$Id: xform.c,v 2.26 2003/ */ #include -#include #include "standard.h" #include "platform.h" @@ -41,7 +40,7 @@ int nrept = 1; /* number of array repetitions */ int stdinused = 0; /* stdin has been used by -f option? */ -char mainfn[MAXPATH]; /* main file name */ +char mainfn[PATH_MAX]; /* main file name */ FILE *mainfp = NULL; /* main file pointer */ #define progname (xav[0]) @@ -888,8 +887,8 @@ char *fname; openmain(iname) /* open input, changing directory for file */ char *iname; { - static char origdir[MAXPATH]; - static char curfn[MAXPATH]; + static char origdir[PATH_MAX]; + static char curfn[PATH_MAX]; static int diffdir; register char *fpath; @@ -915,7 +914,7 @@ char *iname; return; } if (mainfp == NULL) { /* first call, initialize */ - getwd(origdir); + getcwd(origdir, sizeof(origdir)); } else if (!strcmp(iname, curfn)) { /* just need to rewind? */ rewind(mainfp); return;