ECALLOC(3) BSD Library Functions Manual ECALLOC(3) NNAAMMEE eeccaalllloocc, eemmaalllloocc, eerreeaadd, eerreeaalllloocc, eesseetteennvv, eessttrrdduupp, eewwrriittee -- exit-on- failure wrapper functions LLIIBBRRAARRYY The roken library (libroken, -lroken) SSYYNNOOPPSSIISS ##iinncclluuddee <> _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); _v_o_i_d _* eemmaalllloocc(_s_i_z_e___t _s_z); _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); _v_o_i_d _* eerreeaalllloocc(_v_o_i_d _*_p_t_r, _s_i_z_e___t _s_z); _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); _c_h_a_r _* eessttrrdduupp(_c_o_n_s_t _c_h_a_r _*_s_t_r); _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); DDEESSCCRRIIPPTTIIOONN 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. This is useful in applications when there is no need for a more advanced failure mode. SSEEEE AALLSSOO read(2), write(2), calloc(3), errx(3), malloc(3), realloc(3), setenv(3), strdup(3) HEIMDAL August 14, 2003 HEIMDAL