ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/gen/xform.c
(Generate patch)

Comparing ray/src/gen/xform.c (file contents):
Revision 2.27 by greg, Fri Jun 27 22:27:45 2003 UTC vs.
Revision 2.29 by schorsch, Thu Jul 3 22:41:44 2003 UTC

# Line 10 | Line 10 | static const char RCSid[] = "$Id$";
10   */
11  
12   #include  <ctype.h>
13 + #ifndef _WIN32
14 +  #include  <unistd.h>
15 + #endif
16  
17   #include  "standard.h"
18   #include  "platform.h"
# Line 40 | Line 43 | int  nrept = 1;                                /* number of array repetitions */
43  
44   int stdinused = 0;                      /* stdin has been used by -f option? */
45  
46 < char  mainfn[MAXPATH];                  /* main file name */
46 > char  mainfn[PATH_MAX];                 /* main file name */
47   FILE  *mainfp = NULL;                   /* main file pointer */
48  
49   #define  progname  (xav[0])
# Line 887 | Line 890 | char  *fname;
890   openmain(iname)         /* open input, changing directory for file */
891   char  *iname;
892   {
893 <        static char  origdir[MAXPATH];
894 <        static char  curfn[MAXPATH];
893 >        static char  origdir[PATH_MAX];
894 >        static char  curfn[PATH_MAX];
895          static int  diffdir;
896          register char  *fpath;
897  
# Line 914 | Line 917 | char  *iname;
917                  return;
918          }
919          if (mainfp == NULL) {                   /* first call, initialize */
920 <                getwd(origdir);
920 >                getcwd(origdir, sizeof(origdir));
921          } else if (!strcmp(iname, curfn)) {     /* just need to rewind? */
922                  rewind(mainfp);
923                  return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines