Unix/Linux Go Back    

NetBSD 6.1.5 - man page for erealloc (netbsd section 3)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

EFUN(3) 			   BSD Library Functions Manual 			  EFUN(3)

     esetfunc, easprintf, efopen, emalloc, ecalloc, erealloc, estrdup, estrndup, estrlcat,
     estrlcpy, evasprintf -- error-checked utility functions

     System Utilities Library (libutil, -lutil)

     #include <util.h>

     void (*)(int, const char *, ...)
     esetfunc(void (*)(int, const char *, ...));

     easprintf(char ** restrict str, const char * restrict fmt, ...);

     FILE *
     efopen(const char *p, const char *m);

     void *
     ecalloc(size_t n, size_t c);

     void *
     emalloc(size_t n);

     void *
     erealloc(void *p, size_t n);

     char *
     estrdup(const char *s);

     char *
     estrndup(const char *s, size_t len);

     estrlcat(char *dst, const char *src, size_t len);

     estrlcpy(char *dst, const char *src, size_t len);

     evasprintf(char ** restrict str, const char * restrict fmt, ...);

     The easprintf(), efopen(), ecalloc(), emalloc(), erealloc(), estrdup(), estrndup(),
     estrlcat(), estrlcpy(), and evasprintf() functions operate exactly as the corresponding
     functions that do not start with an 'e' except that in case of an error, they call the
     installed error handler that can be configured with esetfunc().

     For the string handling functions, it is an error when the destination buffer is not large
     enough to hold the complete string.  For functions that allocate memory or open a file, it
     is an error when they would return a null pointer.  The default error handler is err(3).
     The function esetfunc() returns the previous error handler function.  A NULL error handler
     will just call exit(3).

     asprintf(3), calloc(3), err(3), exit(3), fopen(3), malloc(3), realloc(3), strdup(3),
     strlcat(3), strlcpy(3), strndup(3), vasprintf(3)

BSD					   May 3, 2010					      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 10:16 PM.