Return to util.c CVS log | Up to [local] / src / usr.bin / patch |
version 1.37, 2014/11/22 15:49:28 | version 1.38, 2014/12/13 10:31:07 | ||
---|---|---|---|
|
|
||
} | } | ||
/* | /* | ||
* Allocate a unique area for a string. Call fatal if out of memory. | |||
*/ | |||
char * | |||
xstrdup(const char *s) | |||
{ | |||
char *rv; | |||
if (!s) | |||
s = "Oops"; | |||
rv = strdup(s); | |||
if (rv == NULL) | |||
fatal("out of memory\n"); | |||
return rv; | |||
} | |||
/* | |||
* Vanilla terminal output (buffered). | * Vanilla terminal output (buffered). | ||
*/ | */ | ||
void | void |