--- ray/src/common/savqstr.c 2003/02/25 02:47:22 2.4 +++ ray/src/common/savqstr.c 2003/07/27 22:12:01 2.8 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: savqstr.c,v 2.4 2003/02/25 02:47:22 greg Exp $"; +static const char RCSid[] = "$Id: savqstr.c,v 2.8 2003/07/27 22:12:01 schorsch Exp $"; #endif /* * Save unshared strings. @@ -11,9 +11,9 @@ static const char RCSid[] = "$Id: savqstr.c,v 2.4 2003 #include -extern void eputs(); -extern void quit(); +#include "rterror.h" + #if 1 char * @@ -30,7 +30,7 @@ register char *s; eputs("out of memory in savqstr"); quit(1); } - for (cp = newp; *cp++ = *s++; ) /* inline strcpy() */ + for (cp = newp; (*cp++ = *s++); ) /* inline strcpy() */ ; return(newp); /* return new location */ } @@ -40,7 +40,8 @@ void freeqstr(s) /* free a private string */ char *s; { - free((void *)s); + if (s != NULL) + free((void *)s); } #else @@ -50,19 +51,19 @@ char *s; * large blocks to optimize paging in VM environments. */ -#ifdef BIGMEM +#ifdef SMLMEM #ifndef MINBLOCK -#define MINBLOCK (1<<12) /* minimum allocation block size */ +#define MINBLOCK (1<<10) /* minimum allocation block size */ #endif #ifndef MAXBLOCK -#define MAXBLOCK (1<<16) /* maximum allocation block size */ +#define MAXBLOCK (1<<14) /* maximum allocation block size */ #endif #else #ifndef MINBLOCK -#define MINBLOCK (1<<10) /* minimum allocation block size */ +#define MINBLOCK (1<<12) /* minimum allocation block size */ #endif #ifndef MAXBLOCK -#define MAXBLOCK (1<<14) /* maximum allocation block size */ +#define MAXBLOCK (1<<16) /* maximum allocation block size */ #endif #endif