getln2(3) getln2(3) NNAAMMEE getln2 - read one line of data SSYYNNTTAAXX ##iinncclluuddee <> int ggeettllnn22(&_s_s,&_s_a,&_c_o_n_t,&_c_l_e_n,_s_e_p); substdio _s_s; stralloc _s_a; char *_c_o_n_t; unsigned int _c_l_e_n; int _s_e_p; DDEESSCCRRIIPPTTIIOONN ggeettllnn22 reads a line of characters, terminated by a _s_e_p character, from _s_s. The line is returned in two pieces. The first piece is stored in _s_a. The second piece is _c_o_n_t, a pointer to _c_l_e_n characters inside the _s_s buffer. The second piece must be copied somewhere else before _s_s is used again. If ggeettllnn22 sees end-of-input before it sees _s_e_p, it sets _c_l_e_n to 0 and does not set _c_o_n_t. It puts the partial line into _s_a. ggeettllnn22 normally returns 0. If it runs out of memory, or encounters an error from _s_s, it returns -1, setting eerrrrnnoo appropriately. SSEEEE AALLSSOO stralloc(3), substdio(3), getln(3) getln2(3)