diff options
Diffstat (limited to 'lib/util/nstring.h')
-rw-r--r-- | lib/util/nstring.h | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/lib/util/nstring.h b/lib/util/nstring.h index 53f1e4c0..7238a76e 100644 --- a/lib/util/nstring.h +++ b/lib/util/nstring.h @@ -137,62 +137,68 @@ strncaseeq(const char * const comparand, - The returned string is a const char * instead of a char *. The const is more correct. - - If the function can't get the memory, it returns 'strsol', + - If the function can't get the memory, it returns 'pm_strsol', which is a string that is in static memory that contains text indicating an out of memory failure has occurred, intead of NULL. This makes it much easier for programs to ignore this possibility. strfree() is strictly a Netpbm invention, to allow proper type checking - when freeing storage allocated by the Netpbm asprintfN(). + when freeing storage allocated by the Netpbm pm_asprintf(). */ -extern const char * const strsol; +extern const char * const pm_strsol; int -snprintfN(char * const dest, - size_t const str_m, - const char * const fmt, - ...) PM_GNU_PRINTF_ATTR(3,4); +pm_snprintf(char * const dest, + size_t const str_m, + const char * const fmt, + ...) PM_GNU_PRINTF_ATTR(3,4); void -vsnprintfN(char * const str, - size_t const str_m, - const char * const fmt, - va_list ap, - size_t * const sizeP); +pm_vsnprintf(char * const str, + size_t const str_m, + const char * const fmt, + va_list ap, + size_t * const sizeP); + +const char * +pm_strdup(const char * const arg); void -asprintfN(const char ** const resultP, - const char * const fmt, - ...) PM_GNU_PRINTF_ATTR(2,3); +pm_asprintf(const char ** const resultP, + const char * const fmt, + ...) PM_GNU_PRINTF_ATTR(2,3); void -vasprintfN(const char ** const resultP, - const char * const format, - va_list args); +pm_vasprintf(const char ** const resultP, + const char * const format, + va_list args); + +bool +pm_vasprintf_knows_float(void); void -strfree(const char * const string); +pm_strfree(const char * const string); const char * -strsepN(char ** const stringP, const char * const delim); +pm_strsep(char ** const stringP, const char * const delim); int -stripeq(const char * const comparand, - const char * const comparator); +pm_stripeq(const char * const comparand, + const char * const comparator); const void * -memmemN(const void * const haystackArg, - size_t const haystacklen, - const void * const needleArg, - size_t const needlelen); +pm_memmem(const void * const haystackArg, + size_t const haystacklen, + const void * const needleArg, + size_t const needlelen); bool -strishex(const char * const subject); +pm_strishex(const char * const subject); void -interpret_uint(const char * const string, +pm_interpret_uint(const char * const string, unsigned int * const valueP, const char ** const errorP); |