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.15 by greg, Tue Mar 20 18:45:04 2018 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 */
# Line 92 | 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