aboutsummaryrefslogtreecommitdiff
path: root/lib/roken/ecalloc.cat3
diff options
context:
space:
mode:
Diffstat (limited to 'lib/roken/ecalloc.cat3')
-rw-r--r--lib/roken/ecalloc.cat347
1 files changed, 23 insertions, 24 deletions
diff --git a/lib/roken/ecalloc.cat3 b/lib/roken/ecalloc.cat3
index 550cf3f223cd..c22a85444539 100644
--- a/lib/roken/ecalloc.cat3
+++ b/lib/roken/ecalloc.cat3
@@ -1,46 +1,45 @@
-
ECALLOC(3) BSD Library Functions Manual ECALLOC(3)
-NNAAMMEE
- eeccaalllloocc, eemmaalllloocc, eerreeaadd, eerreeaalllloocc, eesseetteennvv, eessttrrdduupp, eewwrriittee -- exit-on-
+NAME
+ ecalloc, emalloc, eread, erealloc, esetenv, estrdup, ewrite -- exit-on-
failure wrapper functions
-LLIIBBRRAARRYY
+LIBRARY
The roken library (libroken, -lroken)
-SSYYNNOOPPSSIISS
- ##iinncclluuddee <<rrookkeenn..hh>>
+SYNOPSIS
+ #include <roken.h>
- _v_o_i_d _*
- eeccaalllloocc(_s_i_z_e___t _n_u_m_b_e_r, _s_i_z_e___t _s_i_z_e);
+ void *
+ ecalloc(size_t number, size_t size);
- _v_o_i_d _*
- eemmaalllloocc(_s_i_z_e___t _s_z);
+ void *
+ emalloc(size_t sz);
- _s_s_i_z_e___t
- eerreeaadd(_i_n_t _f_d, _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s);
+ ssize_t
+ eread(int fd, void *buf, size_t nbytes);
- _v_o_i_d _*
- eerreeaalllloocc(_v_o_i_d _*_p_t_r, _s_i_z_e___t _s_z);
+ void *
+ erealloc(void *ptr, size_t sz);
- _v_o_i_d
- eesseetteennvv(_c_o_n_s_t _c_h_a_r _*_v_a_r, _c_o_n_s_t _c_h_a_r _*_v_a_l, _i_n_t _r_e_w_r_i_t_e);
+ void
+ esetenv(const char *var, const char *val, int rewrite);
- _c_h_a_r _*
- eessttrrdduupp(_c_o_n_s_t _c_h_a_r _*_s_t_r);
+ char *
+ estrdup(const char *str);
- _s_s_i_z_e___t
- eewwrriittee(_i_n_t _f_d, _c_o_n_s_t _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s);
+ ssize_t
+ ewrite(int fd, const void *buf, size_t nbytes);
-DDEESSCCRRIIPPTTIIOONN
- These functions do the same as the ones without the ``e'' prefix, but if
+DESCRIPTION
+ These functions do the same as the ones without the "e" prefix, but if
there is an error they will print a message with errx(3), and exit. For
- eerreeaadd and eewwrriittee this is also true for partial data.
+ eread and ewrite this is also true for partial data.
This is useful in applications when there is no need for a more advanced
failure mode.
-SSEEEE AALLSSOO
+SEE ALSO
read(2), write(2), calloc(3), errx(3), malloc(3), realloc(3), setenv(3),
strdup(3)