--- ray/src/meta/misc.c 2003/07/14 16:05:45 1.3 +++ ray/src/meta/misc.c 2003/11/15 02:13:37 1.4 @@ -1,11 +1,12 @@ #ifndef lint -static const char RCSid[] = "$Id: misc.c,v 1.3 2003/07/14 16:05:45 greg Exp $"; +static const char RCSid[] = "$Id: misc.c,v 1.4 2003/11/15 02:13:37 schorsch Exp $"; #endif /* * Miscellaneous functions for meta-files */ +#include "rtio.h" #include "meta.h" @@ -16,10 +17,10 @@ char errmsg[128]; int -comndx(c) /* return index for command */ +comndx( /* return index for command */ + register int c +) -register int c; - { register char *cp; @@ -39,10 +40,10 @@ register int c; PRIMITIVE * -pop(pl) /* pop top off plist */ +pop( /* pop top off plist */ + register PLIST *pl +) -register PLIST *pl; - { register PRIMITIVE *p; @@ -57,12 +58,12 @@ register PLIST *pl; +void +push( /* push primitive onto plist */ + register PRIMITIVE *p, + register PLIST *pl +) -push(p, pl) /* push primitive onto plist */ - -register PRIMITIVE *p; -register PLIST *pl; - { if ((p->pnext = pl->ptop) == NULL) @@ -73,12 +74,11 @@ register PLIST *pl; - -add(p, pl) /* add primitive to plist */ - -register PRIMITIVE *p; -register PLIST *pl; - +void +add( /* add primitive to plist */ + register PRIMITIVE *p, + register PLIST *pl +) { if (pl->ptop == NULL) @@ -92,11 +92,12 @@ register PLIST *pl; +void +append( /* append pl1 to the end of pl2 */ + register PLIST *pl1, + register PLIST *pl2 +) -append(pl1, pl2) /* append pl1 to the end of pl2 */ - -register PLIST *pl1, *pl2; - { if (pl1->ptop != NULL) { @@ -111,11 +112,11 @@ register PLIST *pl1, *pl2; +void +fargs( /* free any arguments p has */ +register PRIMITIVE *p +) -fargs(p) /* free any arguments p has */ - -register PRIMITIVE *p; - { if (p->args != NULL) { @@ -128,12 +129,12 @@ register PRIMITIVE *p; char * -nextscan(start, format, result) /* scan and advance through string */ +nextscan( /* scan and advance through string */ + register char *start, + char *format, + char *result +) -register char *start; -char *format; -char *result; - { if (start == NULL) return(NULL); @@ -148,11 +149,12 @@ char *result; } - -mcopy(p1, p2, n) /* copy p2 into p1 size n */ - -register char *p1, *p2; -register int n; +void +mcopy( /* copy p2 into p1 size n */ +register char *p1, +register char *p2, +register int n +) {