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

Comparing ray/src/common/resolu.h (file contents):
Revision 2.12 by greg, Wed May 10 18:02:08 2017 UTC vs.
Revision 2.16 by greg, Thu Mar 3 03:55:13 2022 UTC

# Line 16 | Line 16
16   #ifndef _RAD_RESOLU_H_
17   #define _RAD_RESOLU_H_
18  
19 #include <time.h>
20
21
19   #ifdef __cplusplus
20   extern "C" {
21   #endif
# Line 30 | Line 27 | extern "C" {
27  
28                          /* standard scanline ordering */
29   #define  PIXSTANDARD            (YMAJOR|YDECR)
30 < #define  PIXSTDFMT              "-Y %d +X %d\n"
30 > #define  PIXSTDFMT              "-Y %8d +X %8d\n"
31  
32                          /* structure for image dimensions */
33   typedef struct {
# Line 53 | Line 50 | extern char  resolu_buf[RESOLU_BUFLEN];
50  
51                          /* reading/writing of standard ordering */
52   #define  fprtresolu(sl,ns,fp)   fprintf(fp,PIXSTDFMT,ns,sl)
53 < #define  fscnresolu(sl,ns,fp)   (fscanf(fp,PIXSTDFMT,ns,sl)==2)
53 > #define  fscnresolu(sl,ns,fp)   (fgetresolu(sl,ns,fp)==PIXSTANDARD)
54  
55 <                        /* identify header lines */
59 < #define  isheadid(s)    headidval(NULL,s)
60 < #define  isformat(s)    formatval(NULL,s)
61 < #define  isdate(s)      dateval(NULL,s)
62 < #define  isgmt(s)       gmtval(NULL,s)
63 <
64 < #define  LATLONSTR      "LATLONG="
65 < #define  LLATLONSTR     8
66 < #define  islatlon(hl)           (!strncmp(hl,LATLONSTR,LLATLONSTR))
67 < #define  latlonval(ll,hl)       sscanf((hl)+LLATLONSTR, "%f %f", \
68 <                                                &(ll)[0],&(ll)[1])
69 < #define  fputlatlon(lat,lon,fp) fprintf(fp,"%s %.6f %.6f\n",LATLONSTR,lat,lon)
70 <
71 <                                        /* defined in resolu.c */
55 >                        /* defined in resolu.c */
56   extern void     fputresolu(int ord, int sl, int ns, FILE *fp);
57   extern int      fgetresolu(int *sl, int *ns, FILE *fp);
58   extern char *   resolu2str(char *buf, RESOLU *rp);
59   extern int      str2resolu(RESOLU *rp, char *buf);
76                                        /* defined in header.c */
77 extern void     newheader(const char *t, FILE *fp);
78 extern int      headidval(char *r, const char *s);
79 extern int      dateval(time_t *t, const char *s);
80 extern int      gmtval(time_t *t, const char *s);
81 extern void     fputdate(time_t t, FILE *fp);
82 extern void     fputnow(FILE *fp);
83 extern void     printargs(int ac, char **av, FILE *fp);
84 extern int      formatval(char *r, const char *s);
85 extern void     fputformat(const char *s, FILE *fp);
86 typedef int gethfunc(char *s, void *p); /* callback to process header lines */
87 extern int      getheader(FILE *fp, gethfunc *f, void *p);
88 extern int      globmatch(const char *pat, const char *str);
89 extern int      checkheader(FILE *fin, char *fmt, FILE *fout);
60  
61   #ifdef __cplusplus
62   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines