return (ptr);
}
-char* xstrdup(const char* s)
-{
- char* ptr = strdup(s);
- if (ptr == NULL) {
- fprintf(stderr, "Out of memory!\n");
- exit(EXIT_FAILURE);
- }
- return (ptr);
-}
-
void packed_to_token(long packed, char token[6])
{
// Unpack and map back to ASCII.
size--;
} else {
long arg = va_arg(ap, long);
+ if (arg == -1)
+ arg = 0;
i++;
// Integer specifier. In order to accommodate the fact that PARMS can have both legitimate integers *and* packed tokens, stringify everything. Future work may eliminate the need for this.
if (msg[i] == 'd') {