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

Comparing ray/src/meta/meta.h (file contents):
Revision 1.1 by greg, Sat Feb 22 02:07:26 2003 UTC vs.
Revision 1.6 by schorsch, Mon Jul 14 22:24:00 2003 UTC

# Line 2 | Line 2
2   /*
3   *   Standard meta-file definitions and limits
4   */
5 + #ifndef _RAD_META_H_
6 + #define _RAD_META_H_
7  
8 + #include "copyright.h"
9  
10   #include  <stdio.h>
11 <
11 > #include  <stdlib.h>
12   #include  <ctype.h>
13  
14 + #include  "rterror.h"
15  
16 + #ifdef __cplusplus
17 + extern "C" {
18 + #endif
19 +
20   #define  TRUE  1
21   #define  FALSE  0
22  
23   #define  PEOF  'F'              /* end of file global */
24   #define  PEOP  'E'              /* end of page global */
25 < #define  PPAUSE  'P'            /* pause global */
25 > #define  PPAUS  'P'             /* pause global */
26   #define  PDRAW  'D'             /* draw global */
27   #define  POPEN  'O'             /* open segment */
28   #define  PCLOSE  'C'            /* close segment */
# Line 46 | Line 54
54   #define  SPAT2  06              /* set pattern 2 */
55   #define  SPAT3  07              /* set pattern 3 */
56  
49 #define  SYSTEM  0              /* system error, internal, fatal */
50 #define  USER  1                /* user error, fatal */
51 #define  WARNING  2             /* user error, not fatal */
52
57   #ifdef  UNIX
58   #define  TDIR  "/tmp/"          /* directory for temporary files */
59   #ifndef  MDIR
# Line 70 | Line 74
74   #define  TTY  "CON:"            /* console name */
75   #endif
76  
77 + #ifdef  _WIN32  /* XXX */
78 + #define MDIR "c\\tmp\\" /* XXX we just need something to compile for now */
79 + #define TTY "CON:"   /* XXX this probably doesn't work */
80 + #endif  /* XXX */
81 +
82   #define  MAXFNAME  64           /* maximum file name length */
83  
84   #define  XYSIZE  (1<<14)        /* metafile coordinate size */
85  
86 + #ifndef max
87   #define  max(x, y)  ((x) > (y) ? (x) : (y))
88 + #endif
89 + #ifndef min
90   #define  min(x, y)  ((x) < (y) ? (x) : (y))
91 + #endif
92  
93   #define  abs(x)  ((x) < 0 ? -(x) : (x))
94  
# Line 118 | Line 131 | typedef struct plist  PLIST;
131   *   External declarations
132   */
133  
134 < char  *malloc(), *savestr();
134 > char  *savestr();
135  
136 < PRIMITIVE  *palloc(), *pop();
136 > PRIMITIVE *pop();
137  
138   FILE  *efopen(), *mfopen();
139  
140   extern char  coms[];
128
141   extern char  errmsg[];
130
142   extern char  *progname;
143 +
144 +        /* expand.c */
145 + extern void expand(FILE *infp, short *exlist);
146 +        /* palloc.c */
147 + extern PRIMITIVE *palloc(void);
148 + extern void pfree(register PRIMITIVE *p);
149 + extern void plfree(register PLIST *pl);
150 +        /* sort.c */
151 + extern void sort(FILE *infp, int (*pcmp)());
152 + extern void pmergesort(FILE *fi[], int nf, PLIST *pl, int (*pcmp)(), FILE *ofp);
153 +        /* metacalls.c */
154 + extern void mdraw(int x, int y);
155 + extern void msegment(int xmin, int ymin, int xmax, int ymax, char *sname,
156 +                int d, int thick, int color);
157 + extern void mvstr(int xmin, int ymin, int xmax, int ymax, char *s,
158 +                int d, int thick, int color);
159 + extern void mtext(int x, int y, char *s, int cpi, int color);
160 + extern void mpoly(int x, int y, int border, int pat, int color);
161 + extern void mtriangle(int xmin, int ymin, int xmax, int ymax,
162 +                int d, int pat, int color);
163 + extern void mrectangle(int xmin, int ymin, int xmax, int ymax,
164 +                int pat, int color);
165 + extern void mline(int x, int y, int type, int thick, int color);
166 + extern void mcloseseg(void);
167 + extern void mopenseg(char *sname);
168 + extern void msetpat(int pn, char *pat);
169 + extern void minclude(char *fname);
170 + extern void mdone(void);
171 + extern void mendpage(void);
172 +
173 +
174 + #ifdef __cplusplus
175 + }
176 + #endif
177 + #endif /* _RAD_META_H_ */
178 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines