1 |
|
---|
2 | ECALLOC(3) BSD Library Functions Manual ECALLOC(3)
|
---|
3 |
|
---|
4 | NNAAMMEE
|
---|
5 | eeccaalllloocc, eemmaalllloocc, eerreeaadd, eerreeaalllloocc, eesseetteennvv, eessttrrdduupp, eewwrriittee -- exit-on-
|
---|
6 | failure wrapper functions
|
---|
7 |
|
---|
8 | LLIIBBRRAARRYY
|
---|
9 | The roken library (libroken, -lroken)
|
---|
10 |
|
---|
11 | SSYYNNOOPPSSIISS
|
---|
12 | ##iinncclluuddee <<rrookkeenn..hh>>
|
---|
13 |
|
---|
14 | _v_o_i_d _*
|
---|
15 | eeccaalllloocc(_s_i_z_e___t _n_u_m_b_e_r, _s_i_z_e___t _s_i_z_e);
|
---|
16 |
|
---|
17 | _v_o_i_d _*
|
---|
18 | eemmaalllloocc(_s_i_z_e___t _s_z);
|
---|
19 |
|
---|
20 | _s_s_i_z_e___t
|
---|
21 | eerreeaadd(_i_n_t _f_d, _v_o_i_d _*_b_u_f, _s_i_z_e___t _n_b_y_t_e_s);
|
---|
22 |
|
---|
23 | _v_o_i_d _*
|
---|
24 | eerreeaalllloocc(_v_o_i_d _*_p_t_r, _s_i_z_e___t _s_z);
|
---|
25 |
|
---|
26 | _v_o_i_d
|
---|
27 | 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);
|
---|
28 |
|
---|
29 | _c_h_a_r _*
|
---|
30 | eessttrrdduupp(_c_o_n_s_t _c_h_a_r _*_s_t_r);
|
---|
31 |
|
---|
32 | _s_s_i_z_e___t
|
---|
33 | 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);
|
---|
34 |
|
---|
35 | DDEESSCCRRIIPPTTIIOONN
|
---|
36 | These functions do the same as the ones without the ``e'' prefix, but if
|
---|
37 | there is an error they will print a message with errx(3), and exit. For
|
---|
38 | eerreeaadd and eewwrriittee this is also true for partial data.
|
---|
39 |
|
---|
40 | This is useful in applications when there is no need for a more advanced
|
---|
41 | failure mode.
|
---|
42 |
|
---|
43 | SSEEEE AALLSSOO
|
---|
44 | read(2), write(2), calloc(3), errx(3), malloc(3), realloc(3), setenv(3),
|
---|
45 | strdup(3)
|
---|
46 |
|
---|
47 | HEIMDAL August 14, 2003 HEIMDAL
|
---|