/***********************************************************************   (C) Copyright, 1990 by Dean Rubine, Carnegie Mellon University    Permission to use this code for noncommercial purposes is hereby granted.    Permission to copy and distribute this code is hereby granted provided    this copyright notice is retained.  All other rights reserved. **********************************************************************//*LINTLIBRARY*/#ifdef MAC#include <Types.h>#include <Memory.h>#endif#include <stdio.h>#include <ctype.h>#include "util.h"/* * Function used by allocation macro */char*myalloc (int nitems, int itemsize, char* typename){	register unsigned int bytes = nitems * itemsize;	register char *p = (char*) NewPtr (bytes); /* malloc(bytes); */	if(p == NULL)	  error ("Can't get mem for %d %s's (each %d bytes, %d total bytes)",		 nitems, typename, itemsize, bytes);	return p;}/* * Return a copy of a string */char*scopy (char* s){	register char *p = allocate(strlen(s) + 1, char);	char *strcpy();	(void) strcpy(p, s);	return p;}/* * Print an error message, a newline, and then exit *//*VARARGS1*/voiderror (a, b, c, d, e, f, g)char* a;{	/* fprintf(stderr, a, b, c, d, e, f, g);	fprintf(stderr, "\n"); 	exit(1); */	Debugger ();}/* * print a message if DebugFlag is non-zero *//* int	DebugFlag = 1; */voiddebug (a, b, c, d, e, f, g)char* a;{	/* if(DebugFlag)		fprintf(stderr, a, b, c, d, e, f, g); */}#define	upper(c)	(islower(c) ? toupper(c) : (c))intucstrcmp(s1, s2)register char *s1, *s2;{	register i;	for(; *s1 && *s2; s1++, s2++)		if( (i = (upper(*s1) - upper(*s2))) != 0)			return i;	return (upper(*s1) - upper(*s2));}#ifndef MAC#define NSTRINGS 3char*tempstring(){	static char strings[NSTRINGS][100];	static int index;	if(index >= NSTRINGS) index = 0;	return strings[index++];}#endif