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

Comparing ray/src/common/header.c (file contents):
Revision 2.13 by greg, Mon Mar 10 17:13:29 2003 UTC vs.
Revision 2.21 by schorsch, Wed Jul 30 10:11:06 2003 UTC

# Line 26 | Line 26 | static const char      RCSid[] = "$Id$";
26  
27   #include "copyright.h"
28  
29 #include  <stdio.h>
30 #include  <string.h>
29   #include  <time.h>
30   #include  <ctype.h>
31  
32 + #include  "rtio.h"
33 + #include  "resolu.h"
34 +
35   #define  MAXLINE        512
36  
37   char  HDRSTR[] = "#?";          /* information header magic number */
# Line 138 | Line 139 | int  ac;
139   char  **av;
140   FILE  *fp;
141   {
141        int  quote;
142
142          while (ac-- > 0) {
143                  fputword(*av++, fp);
144                  fputc(ac ? ' ' : '\n', fp);
# Line 188 | Line 187 | FILE  *fp;
187   int
188   getheader(fp, f, p)             /* get header from file */
189   FILE  *fp;
190 < int  (*f)();
190 > int  (*f)(char *, char *);
191   char  *p;
192   {
193          char  buf[MAXLINE];
# Line 307 | Line 306 | FILE  *fout;
306  
307          cdat.fp = fout;
308          cdat.fs[0] = '\0';
309 <        if (getheader(fin, mycheck, &cdat) < 0)
309 >        if (getheader(fin, mycheck, (char *)&cdat) < 0)
310                  return(-1);
311          if (!cdat.fs[0])
312                  return(0);
313          for (cp = fmt; *cp; cp++)               /* check for globbing */
314 <                if (*cp == '?' | *cp == '*')
314 >                if ((*cp == '?') | (*cp == '*')) {
315                          if (globmatch(fmt, cdat.fs)) {
316                                  strcpy(fmt, cdat.fs);
317                                  return(1);
318                          } else
319                                  return(-1);
320 +                }
321          return(strcmp(fmt, cdat.fs) ? -1 : 1);  /* literal match */
322   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines