*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: efopen | Section: 3 | Source: MINIX | File: efopen.3
EFUN(3) FreeBSD Library Functions Manual EFUN(3) NAME esetfunc, easprintf, efopen, emalloc, ecalloc, erealloc, ereallocarr, estrdup, estrndup, estrlcat, estrlcpy, estrtoi, estrtou, evasprintf - error-checked utility functions LIBRARY System Utilities Library (libutil, -lutil) SYNOPSIS #include <util.h> void (*)(int, const char *, ...) esetfunc(void (*)(int, const char *, ...)); int easprintf(char ** restrict str, const char * restrict fmt, ...); FILE * efopen(const char *p, const char *m); void * ecalloc(size_t n, size_t s); void * emalloc(size_t n); void * erealloc(void *p, size_t n); void ereallocarr(void *p, size_t n, size_t s); char * estrdup(const char *s); char * estrndup(const char *s, size_t len); size_t estrlcat(char *dst, const char *src, size_t len); size_t estrlcpy(char *dst, const char *src, size_t len); intmax_t estrtoi(const char * nptr, int base, intmax_t lo, intmax_t hi); uintmax_t estrtou(const char * nptr, int base, uintmax_t lo, uintmax_t hi); int evasprintf(char ** restrict str, const char * restrict fmt, ...); DESCRIPTION The easprintf(), efopen(), ecalloc(), emalloc(), erealloc(), ereallocarr(), estrdup(), estrndup(), estrlcat(), estrlcpy(), estrtoi(), estrtou(), 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). SEE ALSO asprintf(3), calloc(3), err(3), exit(3), fopen(3), malloc(3), realloc(3), reallocarr(3), strdup(3), strlcat(3), strlcpy(3), strndup(3), strtoi(3), strtou(3), vasprintf(3) HISTORY The estrtoi(), estrtou() and ereallocarr() functions were added in NetBSD 8. FreeBSD 14.1-RELEASE-p8 July 26, 2015 FreeBSD 14.1-RELEASE-p8

Navigation Options