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.12 by greg, Mon Mar 21 19:06:08 2016 UTC vs.
Revision 3.20 by greg, Fri Jul 19 17:37:56 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
17 + #undef getchar
18   #undef putc
19 + #undef putchar
20 + #undef feof
21 + #undef ferror
22   #define getc    getc_unlocked
23 + #define getchar getchar_unlocked
24   #define putc    putc_unlocked
25 + #define putchar putchar_unlocked
26 + #define feof    feof_unlocked
27 + #define ferror  ferror_unlocked
28   #endif
29  
30   #ifdef __cplusplus
31   extern "C" {
32   #endif
33 +                                        /* identify header lines */
34 + #define  MAXFMTLEN      64
35 + #define  isheadid(s)    headidval(NULL,s)
36 + #define  isformat(s)    formatval(NULL,s)
37 + #define  isdate(s)      dateval(NULL,s)
38 + #define  isgmt(s)       gmtval(NULL,s)
39 +
40 + #define  LATLONSTR      "LATLONG="
41 + #define  LLATLONSTR     8
42 + #define  islatlon(hl)           (!strncmp(hl,LATLONSTR,LLATLONSTR))
43 + #define  latlonval(ll,hl)       sscanf((hl)+LLATLONSTR, "%f %f", \
44 +                                                &(ll)[0],&(ll)[1])
45 + #define  fputlatlon(lat,lon,fp) fprintf(fp,"%s %.6f %.6f\n",LATLONSTR,lat,lon)
46 +                                        /* defined in header.c */
47 + extern void     newheader(const char *t, FILE *fp);
48 + extern int      headidval(char *r, const char *s);
49 + extern int      dateval(time_t *t, const char *s);
50 + extern int      gmtval(time_t *t, const char *s);
51 + extern void     fputdate(time_t t, FILE *fp);
52 + extern void     fputnow(FILE *fp);
53 + extern void     printargs(int ac, char **av, FILE *fp);
54 + extern int      formatval(char fmt[MAXFMTLEN], const char *s);
55 + extern void     fputformat(const char *s, FILE *fp);
56 + typedef int gethfunc(char *s, void *p); /* callback to process header lines */
57 + extern int      getheader(FILE *fp, gethfunc *f, void *p);
58 + extern int      globmatch(const char *pat, const char *str);
59 + extern int      checkheader(FILE *fin, char fmt[MAXFMTLEN], FILE *fout);
60                                          /* defined in badarg.c */
61   extern int      badarg(int ac, char **av, char *fl);
62                                          /* defined in expandarg.c */
63 + extern int      envexpchr, filexpchr;
64   extern int      expandarg(int *acp, char ***avp, int n);
65                                          /* defined in fdate.c */
66   extern time_t   fdate(char *fname);
# Line 52 | Line 89 | extern void    swap64(char *wp, int n);
89   extern void     putstr(char *s, FILE *fp);
90   extern void     putint(long i, int siz, FILE *fp);
91   extern void     putflt(double f, FILE *fp);
92 < extern int      putbinary(char *s, int elsiz, int nel, FILE *fp);
92 > extern int      putbinary(const void *s, int elsiz, int nel, FILE *fp);
93   extern char     *getstr(char *s, FILE *fp);
94   extern long     getint(int siz, FILE *fp);
95   extern double   getflt(FILE *fp);
96 < extern int      getbinary(char *s, int elsiz, int nel, FILE *fp);
96 > extern int      getbinary(void *s, int elsiz, int nel, FILE *fp);
97                                          /* defined in rexpr.c */
98   extern int      ecompile(char *sp, int iflg, int wflag);
99   extern char     *expsave(void);
# Line 87 | Line 124 | extern int     isfltd(char *s, char *ds);
124   extern float *  matchlamp(char *s);
125   extern int      loadlamps(char *file);
126   extern void     freelamps(void);
127 +
128 + #ifndef strlcpy                         /* defined in option strlcpy.c */
129 + extern size_t   strlcpy(char *dst, const char *src, size_t siz);
130 + extern size_t   strlcat(char *dst, const char *src, size_t siz);
131 + #endif
132  
133   #ifdef __cplusplus
134   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines