STRSAVE - save a string.

(Not in the ANSI standard)

Usage:

#include <sdgstd.h>
s2 = strsave(s1);
s2 = _strsave(s1);

Where:

char *s1;
points to the string to be saved.
char *s2;
points to the new copy of the string.

Description:

"strsave" allocates memory (via "malloc") and creates a copy of the string "s1". If the memory request is denied, the program is aborted.

"_strsave" works exactly like "strsave". It is included as a "safe" name that can be used, even if programs define their own versions of "strsave" (without the underscore).

See Also:

expl c lib malloc

Copyright © 1996, Thinkage Ltd.