.\" (C) 2002 Ian Gulliver .TH firestring_snprintf 3 2003-05-15 .SH NAME firestring_snprintf \- .BR snprintf (3) provided as a replacement so programs can maintain ANSI C compliance .SH SYNOPSIS .B #include .br .B -lfirestring .LP .BI "long firestring_snprintf(char * " "out" ", const size_t " "size" ", const char * const " "format" ", " "..." ")" .SH DESCRIPTION firestring_snprintf() writes a maximum of .I size bytes to .I out based on the formatting rules specified in .I format and the further arguments provided. .LP As .BR snprintf (3) is not a ANSI C function, firestring_snprintf() is provided as a replacement for programs wishing to maintain ANSI C compliance. It acts much like .BR snprintf (3), except that it only uses single-letter format tags, and only supports a subset of the common formats. .HP Formats supported: .br %s - char * .br %d - int .br %l - long .br %u - unsigned int .br %y - unsigned long .br %g - signed long long .br %o - unsigned long long .br %f - double .br %t - time_t (printed in ISO format) .br %e - struct firestring_estr_t * .LP The %s type handles NULL values by displaying the string "(null)". All numeric types support zero padding through the standard %02d format. .SH RETURN VALUE Returns the number of bytes written to .I out not including the trailing nil. .SH AUTHOR Ian Gulliver .SH SEE ALSO .BR libfirestring (3)