.\" (C) 2002 Ian Gulliver .TH firestring_strdup 3 2002-03-31 .SH NAME firestring_strdup \- .BR strdup (3) with internal result checking .SH SYNOPSIS .B #include .br .B -lfirestring .LP .BI "char *firestring_strdup(const char * const " "input" ")" .SH DESCRIPTION firestring_strdup() acts exactly like .BR strdup (3) except that it detects malloc failures, prints an error and .BR exit (3) with exit status EXIT_FAILURE. In most programs, malloc failures are unrecoverable, and this is the preferred behaviour. .SH RETURN VALUE If firestring_strdup() returns, it .B always returns a copy of the string .IR input . It .B never returns .IR NULL . .SH AUTHOR Ian Gulliver .SH SEE ALSO .BR libfirestring (3)