6 |
|
*/ |
7 |
|
|
8 |
|
|
9 |
+ |
#include "rtio.h" |
10 |
|
#include "meta.h" |
10 |
– |
|
11 |
|
#include "plot.h" |
12 |
|
|
13 |
|
|
104 |
|
|
105 |
|
static struct setting *sets[0200]; |
106 |
|
|
107 |
+ |
static void spop(int attrib); |
108 |
+ |
static int spat(int pat, char *patval); |
109 |
|
|
110 |
< |
|
111 |
< |
|
112 |
< |
set(attrib, value) /* set attribute to value */ |
113 |
< |
|
114 |
< |
int attrib; |
113 |
< |
char *value; |
114 |
< |
|
110 |
> |
void |
111 |
> |
set( /* set attribute to value */ |
112 |
> |
int attrib, |
113 |
> |
char *value |
114 |
> |
) |
115 |
|
{ |
116 |
|
struct setting *newset; |
117 |
|
|
143 |
|
|
144 |
|
|
145 |
|
|
146 |
< |
|
147 |
< |
unset(attrib) /* return attribute to previous setting */ |
148 |
< |
|
149 |
< |
int attrib; |
150 |
< |
|
146 |
> |
void |
147 |
> |
unset( /* return attribute to previous setting */ |
148 |
> |
int attrib |
149 |
> |
) |
150 |
|
{ |
151 |
|
register int i; |
152 |
|
|
181 |
|
|
182 |
|
|
183 |
|
|
184 |
< |
|
185 |
< |
|
186 |
< |
reset(attrib) /* return attribute to default setting */ |
187 |
< |
|
189 |
< |
int attrib; |
190 |
< |
|
184 |
> |
void |
185 |
> |
reset( /* return attribute to default setting */ |
186 |
> |
int attrib |
187 |
> |
) |
188 |
|
{ |
189 |
|
switch (attrib) { |
190 |
|
case SALL: |
217 |
|
|
218 |
|
|
219 |
|
|
220 |
< |
|
221 |
< |
static |
222 |
< |
spop(attrib) /* pop top off attrib settings list */ |
223 |
< |
|
227 |
< |
int attrib; |
228 |
< |
|
220 |
> |
static void |
221 |
> |
spop( /* pop top off attrib settings list */ |
222 |
> |
int attrib |
223 |
> |
) |
224 |
|
{ |
225 |
|
|
226 |
|
if (sets[attrib] != NULL) { |
234 |
|
|
235 |
|
|
236 |
|
|
242 |
– |
|
237 |
|
static int |
238 |
< |
spat(pat, patval) /* set a pattern */ |
239 |
< |
|
240 |
< |
int pat; |
241 |
< |
char *patval; |
248 |
< |
|
238 |
> |
spat( /* set a pattern */ |
239 |
> |
int pat, |
240 |
> |
char *patval |
241 |
> |
) |
242 |
|
{ |
243 |
|
int n, i, j, v; |
251 |
– |
char *nextscan(); |
244 |
|
register char *cp; |
245 |
|
|
246 |
|
if (patval == NULL) return(FALSE); |
247 |
|
|
248 |
|
if (patval[0] == 'P' || patval[0] == 'p') { |
249 |
< |
if (nextscan(patval+1, "%d", &n) == NULL || n < 0 || n >= NPATS) |
249 |
> |
if (nextscan(patval+1, "%d", (char*)&n) == NULL || n < 0 || n >= NPATS) |
250 |
|
return(FALSE); |
251 |
|
} else { |
252 |
|
n = NPATS + pat - SPAT0; |
253 |
|
cp = patval; |
254 |
|
for (i = 0; i < PATSIZE>>3; i++) |
255 |
|
for (j = 0; j < PATSIZE; j++) { |
256 |
< |
if ((cp = nextscan(cp, "%o", &v)) == NULL || v < 0 || v > 0377) |
256 |
> |
if ((cp = nextscan(cp, "%o", (char*)&v)) == NULL || v < 0 || v > 0377) |
257 |
|
return(FALSE); |
258 |
|
pattern[n][i][j] = v; |
259 |
|
} |