--- ray/src/meta/hfio.c 2003/02/22 02:07:26 1.1 +++ ray/src/meta/hfio.c 2003/11/15 02:13:37 1.4 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: hfio.c,v 1.1 2003/02/22 02:07:26 greg Exp $"; +static const char RCSid[] = "$Id: hfio.c,v 1.4 2003/11/15 02:13:37 schorsch Exp $"; #endif /* * Human-readable file I/O @@ -10,20 +10,14 @@ static const char RCSid[] = "$Id: hfio.c,v 1.1 2003/02 -#if CPM || MAC -#define getc agetc -#define putc aputc -#endif +static PRIMITIVE peof = {PEOF, 0200, {-1, -1, -1, -1}, NULL, NULL}; -static PRIMITIVE peof = {PEOF, 0200, -1, -1, -1, -1, NULL}; - - -readp(p, fp) /* get human-readable primitive */ - -PRIMITIVE *p; -FILE *fp; - +int +readp( /* get human-readable primitive */ + PRIMITIVE *p, + FILE *fp +) { char inbuf[MAXARGS]; register int c, nargs; @@ -82,12 +76,12 @@ FILE *fp; +void +writep( /* print primitive in human-readable form */ + register PRIMITIVE *p, + FILE *fp +) -writep(p, fp) /* print primitive in human-readable form */ - -register PRIMITIVE *p; -FILE *fp; - { if (fp == NULL) fp = stdout; @@ -117,13 +111,14 @@ FILE *fp; +void +writeof( /* write end of file command to fp */ + FILE *fp +) -writeof(fp) /* write end of file command to fp */ - -FILE *fp; - { writep(&peof, fp); - } +} +