fprintf(stderr,"0x%lx: (%05d) malloc %ld bytes\n",(unsigned long)ptr,
an++,(long)size);
#endif
- if (ptr != Nullch)
+ if (ptr != NULL)
return ptr;
else {
fputs(nomem,stdout) FLUSH;
fprintf(stderr,"0x%lx: (%05d) realloc %ld bytes\n",(unsigned long)ptr,an++,(long)size);
}
#endif
- if (ptr != Nullch)
+ if (ptr != NULL)
return ptr;
else {
fputs(nomem,stdout) FLUSH;
/* return ptr to little string in big string, NULL if not found */
char *
-instr(char *big, char *little)
+instr(char *big, const char *little)
{
- register char *t, *s, *x;
+ register char *t, *x;
+ register const char *s;
for (t = big; *t; t++) {
for (x=t,s=little; *s; x++,s++) {
if (!*x)
- return Nullch;
+ return NULL;
if (*s != *x)
break;
}
if (!*s)
return t;
}
- return Nullch;
+ return NULL;
}
/* copy a string to a safe spot */
char *
-savestr(char *str)
+savestr(const char *str)
{
register char * const newaddr = (char *) safemalloc((MEM_SIZE)(strlen(str)+1));