diff options
Diffstat (limited to 'lib/roken/ecalloc.cat3')
| -rw-r--r-- | lib/roken/ecalloc.cat3 | 47 |
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- +[1mNAME[0m + [1mecalloc[22m, [1memalloc[22m, [1meread[22m, [1merealloc[22m, [1mesetenv[22m, [1mestrdup[22m, [1mewrite [22m-- exit-on- failure wrapper functions -LLIIBBRRAARRYY +[1mLIBRARY[0m The roken library (libroken, -lroken) -SSYYNNOOPPSSIISS - ##iinncclluuddee <<rrookkeenn..hh>> +[1mSYNOPSIS[0m + [1m#include <roken.h>[0m - _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); + [4mvoid[24m [4m*[0m + [1mecalloc[22m([4msize_t[24m [4mnumber[24m, [4msize_t[24m [4msize[24m); - _v_o_i_d _* - eemmaalllloocc(_s_i_z_e___t _s_z); + [4mvoid[24m [4m*[0m + [1memalloc[22m([4msize_t[24m [4msz[24m); - _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); + [4mssize_t[0m + [1meread[22m([4mint[24m [4mfd[24m, [4mvoid[24m [4m*buf[24m, [4msize_t[24m [4mnbytes[24m); - _v_o_i_d _* - eerreeaalllloocc(_v_o_i_d _*_p_t_r, _s_i_z_e___t _s_z); + [4mvoid[24m [4m*[0m + [1merealloc[22m([4mvoid[24m [4m*ptr[24m, [4msize_t[24m [4msz[24m); - _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); + [4mvoid[0m + [1mesetenv[22m([4mconst[24m [4mchar[24m [4m*var[24m, [4mconst[24m [4mchar[24m [4m*val[24m, [4mint[24m [4mrewrite[24m); - _c_h_a_r _* - eessttrrdduupp(_c_o_n_s_t _c_h_a_r _*_s_t_r); + [4mchar[24m [4m*[0m + [1mestrdup[22m([4mconst[24m [4mchar[24m [4m*str[24m); - _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); + [4mssize_t[0m + [1mewrite[22m([4mint[24m [4mfd[24m, [4mconst[24m [4mvoid[24m [4m*buf[24m, [4msize_t[24m [4mnbytes[24m); -DDEESSCCRRIIPPTTIIOONN - These functions do the same as the ones without the ``e'' prefix, but if +[1mDESCRIPTION[0m + 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. + [1meread [22mand [1mewrite [22mthis is also true for partial data. This is useful in applications when there is no need for a more advanced failure mode. -SSEEEE AALLSSOO +[1mSEE ALSO[0m read(2), write(2), calloc(3), errx(3), malloc(3), realloc(3), setenv(3), strdup(3) |
