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

Comparing ray/src/meta/plotout.c (file contents):
Revision 1.3 by schorsch, Mon Oct 27 10:28:59 2003 UTC vs.
Revision 1.4 by schorsch, Sat Nov 15 02:13:37 2003 UTC

# Line 17 | Line 17 | static const char      RCSid[] = "$Id$";
17   #endif
18  
19  
20
21
20   #include  <fcntl.h>
21  
22   #include  "rtprocess.h"
23   #include  "meta.h"
24 + #include  "plot.h"
25 + #include  "lib4014/lib4014.h"
26  
27  
28
29
28   char  *progname;
29  
30   static short  newpage = TRUE;
# Line 41 | Line 39 | static char  lmode[4][16] = {"solid", "shortdashed",
39  
40   static PRIMITIVE  nextp;
41  
42 + static void doglobal(PRIMITIVE  *g);
43 + static void doprim(register PRIMITIVE  *p);
44  
45  
46 < main(argc, argv)
47 <
48 < int  argc;
49 < char  **argv;
50 <
46 > int
47 > main(
48 >        int  argc,
49 >        char  **argv
50 > )
51   {
52   FILE  *fp;
53   char  comargs[200], command[300];
# Line 107 | Line 107 | char  **argv;
107  
108  
109  
110 <
111 <
112 < plot(infp)              /* plot meta-file */
113 <
114 < FILE  *infp;
115 <
110 > void
111 > plot(           /* plot meta-file */
112 >        FILE  *infp
113 > )
114   {
115  
116      openpl();
# Line 135 | Line 133 | FILE  *infp;
133  
134  
135  
136 <
137 <
138 < doglobal(g)                     /* execute a global command */
139 <
142 < PRIMITIVE  *g;
143 <
136 > void
137 > doglobal(                       /* execute a global command */
138 >        PRIMITIVE  *g
139 > )
140   {
141      int  tty;
142      char  c;
# Line 185 | Line 181 | PRIMITIVE  *g;
181  
182  
183  
184 <
185 < doprim(p)               /* plot primitive */
186 <
187 < register PRIMITIVE  *p;
192 <
184 > void
185 > doprim(         /* plot primitive */
186 >        register PRIMITIVE  *p
187 > )
188   {
189  
190      if (newpage) {
# Line 217 | Line 212 | register PRIMITIVE  *p;
212  
213  
214  
215 <
216 <
217 <
218 < printstr(p)             /* output a string */
224 <
225 < register PRIMITIVE  *p;
226 <
215 > void
216 > printstr(               /* output a string */
217 >        register PRIMITIVE  *p
218 > )
219   {
220  
221      move(p->xy[XMN], p->xy[YMX]);
# Line 234 | Line 226 | register PRIMITIVE  *p;
226   }
227  
228  
229 <
230 <
231 <
232 < plotlseg(p)             /* plot a line segment */
241 <
242 < register PRIMITIVE  *p;
243 <
229 > void
230 > plotlseg(               /* plot a line segment */
231 >        register PRIMITIVE  *p
232 > )
233   {
234      static short  right = FALSE;
235      int  y1, y2;
# Line 267 | Line 256 | register PRIMITIVE  *p;
256          cont(p->xy[XMN], y1);
257          curx = p->xy[XMN];
258          cury = y1;
259 <    } else if (right = !right) {
259 >    } else if ((right = !right)) {
260          line(p->xy[XMN], y1, p->xy[XMX], y2);
261          curx = p->xy[XMX];
262          cury = y2;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines