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

Comparing ray/src/meta/mx80.c (file contents):
Revision 1.1 by greg, Sat Feb 22 02:07:26 2003 UTC vs.
Revision 1.4 by schorsch, Sat Nov 15 02:13:37 2003 UTC

# Line 36 | Line 36 | static const char      RCSid[] = "$Id$";
36  
37  
38  
39 <
40 <
39 > #include  "rtprocess.h"
40   #include  "meta.h"
42
41   #include  "plot.h"
44
42   #include  "span.h"
43  
44  
48
49
45   char  *progname;
46  
47   struct span  outspan;
# Line 67 | Line 62 | static short  condonly = FALSE,
62                conditioned = FALSE;
63  
64  
65 < main(argc, argv)
66 <
67 < int  argc;
68 < char  **argv;
69 <
65 > int
66 > main(
67 >        int  argc,
68 >        char  **argv
69 > )
70   {
71   FILE  *fp;
77 #ifdef  UNIX
78 FILE  *popen();
79 #endif
72   char  comargs[200], command[300];
73  
82 #ifdef  CPM
83 fixargs("mx80", &argc, &argv);
84 #endif
85
74   progname = *argv++;
75   argc--;
76  
77   condonly = FALSE;
90 #ifdef  CPM
91 conditioned = TRUE;
92 #else
78   conditioned = FALSE;
94 #endif
79  
80   while (argc && **argv == '-')  {
81      switch (*(*argv+1))  {
98 #ifdef  UNIX
82         case 'c':
83            condonly = TRUE;
84            break;
85         case 'r':
86            conditioned = TRUE;
87            break;
105 #endif
88         default:
89            error(WARNING, "unknown option");
90            break;
# Line 133 | Line 115 | char  **argv;
115         argc--;
116         }
117      sprintf(command, XCOM, comargs);
136 #ifdef  UNIX
118      if (condonly)
119         return(system(command));
120      else  {
# Line 144 | Line 125 | char  **argv;
125         pclose(fp);
126         fputs(PUNINIT, stdout);
127         }
147 #endif
128      }
129  
130   return(0);
131   }
132  
133  
134 <
135 <
156 <
157 <
158 <
159 < thispage()              /* rewind and initialize current page */
160 <
134 > void
135 > thispage(void)          /* rewind and initialize current page */
136   {
162
137      if (lineno)
138          error(USER, "cannot restart page in thispage");
165
139   }
140  
141  
142 <
143 <
171 < nextpage()              /* advance to next page */
172 <
142 > void
143 > nextpage(void)          /* advance to next page */
144   {
174
145      fputs("\f\r", stdout);
146  
147      lineno = 0;
178
148   }
149  
150  
151 <
152 <
184 < contpage()              /* continue new plot on current page */
185 <
151 > void
152 > contpage(void)          /* continue new plot on current page */
153   {
187
154      while (lineno++ < NLINES)
155          putc('\n', stdout);
156      
157      lineno = 0;
192    
158   }
159  
160  
161 <
162 < printspan()             /* output span to printer */
198 <
161 > void
162 > printspan(void)         /* output span to printer */
163   {
164      register int  k;
165  
# Line 223 | Line 187 | printspan()            /* output span to printer */
187   }
188  
189  
190 <
191 <
192 <
193 < printstr(p)             /* output a string to the printer */
230 <
231 < PRIMITIVE  *p;
190 > void
191 > printstr(               /* output a string to the printer */
192 >        PRIMITIVE  *p
193 > )
194  
195   {
196      int  i;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines