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

Comparing ray/src/common/rtio.h (file contents):
Revision 3.19 by greg, Fri Jun 1 16:38:37 2018 UTC vs.
Revision 3.22 by greg, Wed Aug 14 18:20:02 2019 UTC

# Line 10 | Line 10
10   #include  <sys/types.h>
11   #include  <fcntl.h>
12   #include  <string.h>
13 + #include  <time.h>
14  
15   #ifdef getc_unlocked            /* avoid horrendous overhead of flockfile */
16   #undef getc
# Line 22 | Line 23
23   #define getchar getchar_unlocked
24   #define putc    putc_unlocked
25   #define putchar putchar_unlocked
26 + #ifndef __cplusplus
27   #define feof    feof_unlocked
28   #define ferror  ferror_unlocked
29   #endif
30 + #endif
31  
32   #ifdef __cplusplus
33   extern "C" {
34   #endif
35 +                                        /* identify header lines */
36 + #define  MAXFMTLEN      64
37 + #define  isheadid(s)    headidval(NULL,s)
38 + #define  isformat(s)    formatval(NULL,s)
39 + #define  isdate(s)      dateval(NULL,s)
40 + #define  isgmt(s)       gmtval(NULL,s)
41 +
42 + #define  LATLONSTR      "LATLONG="
43 + #define  LLATLONSTR     8
44 + #define  islatlon(hl)           (!strncmp(hl,LATLONSTR,LLATLONSTR))
45 + #define  latlonval(ll,hl)       sscanf((hl)+LLATLONSTR, "%f %f", \
46 +                                                &(ll)[0],&(ll)[1])
47 + #define  fputlatlon(lat,lon,fp) fprintf(fp,"%s %.6f %.6f\n",LATLONSTR,lat,lon)
48 +                                        /* defined in header.c */
49 + extern void     newheader(const char *t, FILE *fp);
50 + extern int      headidval(char *r, const char *s);
51 + extern int      dateval(time_t *t, const char *s);
52 + extern int      gmtval(time_t *t, const char *s);
53 + extern void     fputdate(time_t t, FILE *fp);
54 + extern void     fputnow(FILE *fp);
55 + extern void     printargs(int ac, char **av, FILE *fp);
56 + extern int      formatval(char fmt[MAXFMTLEN], const char *s);
57 + extern void     fputformat(const char *s, FILE *fp);
58 + extern int      nativebigendian(void);
59 + extern int      isbigendian(const char *s);
60 + extern void     fputendian(FILE *fp);
61 + typedef int gethfunc(char *s, void *p); /* callback to process header lines */
62 + extern int      getheader(FILE *fp, gethfunc *f, void *p);
63 + extern int      globmatch(const char *pat, const char *str);
64 + extern int      checkheader(FILE *fin, char fmt[MAXFMTLEN], FILE *fout);
65                                          /* defined in badarg.c */
66   extern int      badarg(int ac, char **av, char *fl);
67                                          /* defined in expandarg.c */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines