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.25 by greg, Tue May 13 17:58:32 2003 UTC vs.
Revision 2.29 by schorsch, Thu Jul 3 22:41:44 2003 UTC

# Line 9 | Line 9 | static const char RCSid[] = "$Id$";
9   *     11/6/86          Finally added error checking!
10   */
11  
12 #include  "standard.h"
13
14 #include  "paths.h"
15
12   #include  <ctype.h>
13 + #ifndef _WIN32
14 +  #include  <unistd.h>
15 + #endif
16  
17 + #include  "standard.h"
18 + #include  "platform.h"
19 + #include  "paths.h"
20   #include  "object.h"
19
21   #include  "otypes.h"
22  
23   int  xac;                               /* global xform argument count */
# Line 42 | 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 889 | 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 916 | 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