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.5 by schorsch, Fri Jun 6 16:38:47 2003 UTC vs.
Revision 2.11 by greg, Thu May 21 18:08:43 2009 UTC

# Line 2 | Line 2
2   /*
3   * Definitions for resolution line in image file.
4   *
5 < * Include after <stdio.h>, <string.h>, and <time.h>
5 > * Include after <stdio.h>
6   *
7   * True image orientation is defined by an xy coordinate system
8   * whose origin is at the lower left corner of the image, with
# Line 15 | Line 15
15   */
16   #ifndef _RAD_RESOLU_H_
17   #define _RAD_RESOLU_H_
18 +
19 + #include <time.h>
20 +
21 +
22   #ifdef __cplusplus
23   extern "C" {
24   #endif
25  
22 #include "copyright.h"
23
26                          /* flags for scanline ordering */
27   #define  XDECR                  1
28   #define  YDECR                  2
# Line 53 | Line 55 | extern char  resolu_buf[RESOLU_BUFLEN];
55   #define  fprtresolu(sl,ns,fp)   fprintf(fp,PIXSTDFMT,ns,sl)
56   #define  fscnresolu(sl,ns,fp)   (fscanf(fp,PIXSTDFMT,ns,sl)==2)
57  
58 +                        /* 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 */
72   extern void     fputresolu(int ord, int sl, int ns, FILE *fp);
73   extern int      fgetresolu(int *sl, int *ns, FILE *fp);
# Line 60 | Line 75 | extern char *  resolu2str(char *buf, RESOLU *rp);
75   extern int      str2resolu(RESOLU *rp, char *buf);
76                                          /* defined in header.c */
77   extern void     newheader(char *t, FILE *fp);
63 extern int      isheadid(char *s);
78   extern int      headidval(char *r, char *s);
79   extern int      dateval(time_t *t, char *s);
80 < extern int      isdate(char *s);
80 > extern int      gmtval(time_t *t, 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);
70 extern int      isformat(char *s);
84   extern int      formatval(char *r, char *s);
85   extern void     fputformat(char *s, FILE *fp);
86 < extern int      getheader(FILE *fp, int (*f)(), char *p);
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(char *pat, char *str);
89   extern int      checkheader(FILE *fin, char *fmt, FILE *fout);
76
90  
91   #ifdef __cplusplus
92   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines