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

Comparing ray/src/meta/mt160l.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 41 | Line 41 | static const char      RCSid[] = "$Id$";
41   #define  XCOM  "pexpand +vOCIsp %s | psort -Y +x"
42  
43  
44 <
45 <
44 > #include  "rtprocess.h"
45   #include  "meta.h"
47
46   #include  "plot.h"
49
47   #include  "span.h"
48  
49  
53
54
50   char  *progname;
51  
52   struct span  outspan;
# Line 91 | Line 86 | static short  condonly = FALSE,
86                conditioned = FALSE;
87  
88  
89 < main(argc, argv)
90 <
91 < int  argc;
92 < char  **argv;
93 <
89 > int
90 > main(
91 >        int  argc,
92 >        char  **argv
93 > )
94   {
95   FILE  *fp;
101 #ifdef  UNIX
102 FILE  *popen();
103 #endif
96   char  comargs[200], command[300];
97  
106 #ifdef  CPM
107 fixargs("mt160l", &argc, &argv);
108 #endif
109
98   progname = *argv++;
99   argc--;
100  
101   condonly = FALSE;
114 #ifdef  CPM
115 conditioned = TRUE;
116 #else
102   conditioned = FALSE;
118 #endif
103  
104   while (argc && **argv == '-')  {
105      switch (*(*argv+1))  {
122 #ifdef  UNIX
106         case 'c':
107            condonly = TRUE;
108            break;
109         case 'r':
110            conditioned = TRUE;
111            break;
129 #endif
112         default:
113            error(WARNING, "unknown option");
114            break;
# Line 159 | Line 141 | char  **argv;
141         argc--;
142         }
143      sprintf(command, XCOM, comargs);
162 #ifdef  UNIX
144      if (condonly)
145         return(system(command));
146      else  {
# Line 172 | Line 153 | char  **argv;
153            nextpage();
154         fputs(PUNINIT, stdout);
155         }
175 #endif
156      }
177
157   return(0);
158 < }
158 > }
159  
160  
161 <
162 <
184 <
185 <
186 <
187 < thispage()              /* rewind and initialize current page */
188 <
161 > void
162 > thispage(void)          /* rewind and initialize current page */
163   {
190
164      if (lineno)
165          error(USER, "cannot restart page in thispage");
193
166   }
167  
168  
169 <
170 <
199 < nextpage()              /* advance to next page */
200 <
169 > void
170 > nextpage(void)          /* advance to next page */
171   {
202
172      fputs("\f\r", stdout);
173  
174      lineno = 0;
206
175   }
176  
177  
178 <
179 <
212 < contpage()              /* continue new plot on current page */
213 <
178 > void
179 > contpage(void)          /* continue new plot on current page */
180   {
181  
182      while (lineno++ < NLINES)
183          putc('\n', stdout);
184      
185      lineno = 0;
220    
186   }
187  
188  
189 <
190 < printspan()             /* output span to printer */
226 <
189 > void
190 > printspan(void)         /* output span to printer */
191   {
192      register unsigned shiftreg;
193      unsigned short  outc;
194 <    register  k;
194 >    register int k;
195      unsigned short offset, mask;
196      int  i,j;
197  
# Line 269 | Line 233 | printspan()            /* output span to printer */
233          }
234      putc('\n', stdout);
235      lineno++;
272
236   }
237  
238  
239 <
240 <
241 <
242 < printstr(p)             /* output a string to the printer */
280 <
281 < PRIMITIVE  *p;
282 <
239 > void
240 > printstr(               /* output a string to the printer */
241 >        PRIMITIVE  *p
242 > )
243   {
244      int  i;
245  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines