Description of externally used routines: (Not including routines in RITS.C) file I/O: Files are represented by integers or pointers, returned by the various open routines. These routines must return the constant OPENLOSS when a file cannot be opened. cputc (c, f) output the character c; '\n' implies end of line c = cgetc (f) input a character; '\n' implies end of line; and negative or zero must be returned on end-of-file b = ceof (f) return TRUE iff end-of-file (last character read by cgetc was negative or zero) gets (buffer) read a line of characters from standard input into the buffer, terminated by NUL ungetc (c, f) push back character onto input stream; capacity of 1 character is required cclose (f) close file cisfd (f) return nonzero if f looks like it is a file descriptor setprompt (s) make string s the default prompt for terminal input (optional, of course) Standard files: cin standard input (used for terminal input) cout standard output (used for messages) cerr standard error (used for some fatal errors) String routines: n = slen (s) return length of string b = stcmp (s1, s2) compare for equality of strings stcpy (s, d) copy string from s to d Storage allocation: *i = salloc (n) return n integers [check for storage full] *c = calloc (n) return n characters [check for storage full] sfree (*i) return integers allocated by salloc cfree (*c) return characters allocated by calloc n = alocstat (*p, *q) return number of free words of storage set *p to size of free space (in words) and *q to the number of free blocks return -1 if no stats available Miscellaneous: stkdmp (f) dump stack frames on file for debugging (optional) i = cputm () return cpu time in 1/60 sec