--- ray/src/meta/plot.c 2003/02/22 02:07:26 1.1 +++ ray/src/meta/plot.c 2003/11/15 02:13:37 1.3 @@ -1,13 +1,13 @@ #ifndef lint -static const char RCSid[] = "$Id: plot.c,v 1.1 2003/02/22 02:07:26 greg Exp $"; +static const char RCSid[] = "$Id: plot.c,v 1.3 2003/11/15 02:13:37 schorsch Exp $"; #endif /* * Plotting routines for meta-files */ +#include "rtio.h" #include "meta.h" - #include "plot.h" @@ -104,14 +104,14 @@ struct setting { static struct setting *sets[0200]; +static void spop(int attrib); +static int spat(int pat, char *patval); - - -set(attrib, value) /* set attribute to value */ - -int attrib; -char *value; - +void +set( /* set attribute to value */ +int attrib, +char *value +) { struct setting *newset; @@ -143,11 +143,10 @@ char *value; - -unset(attrib) /* return attribute to previous setting */ - -int attrib; - +void +unset( /* return attribute to previous setting */ +int attrib +) { register int i; @@ -182,12 +181,10 @@ int attrib; - - -reset(attrib) /* return attribute to default setting */ - -int attrib; - +void +reset( /* return attribute to default setting */ +int attrib +) { switch (attrib) { case SALL: @@ -220,12 +217,10 @@ int attrib; - -static -spop(attrib) /* pop top off attrib settings list */ - -int attrib; - +static void +spop( /* pop top off attrib settings list */ +int attrib +) { if (sets[attrib] != NULL) { @@ -239,29 +234,26 @@ int attrib; - static int -spat(pat, patval) /* set a pattern */ - -int pat; -char *patval; - +spat( /* set a pattern */ +int pat, +char *patval +) { int n, i, j, v; - char *nextscan(); register char *cp; if (patval == NULL) return(FALSE); if (patval[0] == 'P' || patval[0] == 'p') { - if (nextscan(patval+1, "%d", &n) == NULL || n < 0 || n >= NPATS) + if (nextscan(patval+1, "%d", (char*)&n) == NULL || n < 0 || n >= NPATS) return(FALSE); } else { n = NPATS + pat - SPAT0; cp = patval; for (i = 0; i < PATSIZE>>3; i++) for (j = 0; j < PATSIZE; j++) { - if ((cp = nextscan(cp, "%o", &v)) == NULL || v < 0 || v > 0377) + if ((cp = nextscan(cp, "%o", (char*)&v)) == NULL || v < 0 || v > 0377) return(FALSE); pattern[n][i][j] = v; }