substdio_out(3) substdio_out(3) NNAAMMEE substdio_out - substdio output routines SSYYNNTTAAXX ##iinncclluuddee <> int ssuubbssttddiioo__ppuutt(&_s,_f_r_o_m,_l_e_n); int ssuubbssttddiioo__ppuuttss(&_s,_f_r_o_m); int ssuubbssttddiioo__bbppuutt(&_s,_f_r_o_m,_l_e_n); int ssuubbssttddiioo__bbppuuttss(&_s,_f_r_o_m); int ssuubbssttddiioo__fflluusshh(&_s); int ssuubbssttddiioo__ppuuttfflluusshh(&_s,_f_r_o_m,_l_e_n); int ssuubbssttddiioo__ppuuttssfflluusshh(&_s,_f_r_o_m); substdio _s; char *_f_r_o_m; int _l_e_n; DDEESSCCRRIIPPTTIIOONN ssuubbssttddiioo__ppuutt writes _l_e_n characters to _s out of the character array _f_r_o_m. It returns 0 on success, -1 on error. ssuubbssttddiioo__bbppuutt has the same function as ssuubbssttddiioo__ppuutt. The difference is how the buffer is flushed when there isn’t enough room for _l_e_n charac- ters: ssuubbssttddiioo__ppuutt flushes the buffered data before copying the new data, whereas ssuubbssttddiioo__bbppuutt fills the buffer with new data before flushing. ssuubbssttddiioo__fflluusshh forces all data to be written from the internal buffer. It returns 0 on success, -1 on error. ssuubbssttddiioo__ppuuttfflluusshh is similar to ssuubbssttddiioo__ppuutt followed by ssuubbsstt-- ddiioo__fflluusshh, but it avoids all internal copies. ssuubbssttddiioo__ppuuttss, ssuubbssttddiioo__bbppuuttss, and ssuubbssttddiioo__ppuuttssfflluusshh are the same as ssuubbssttddiioo__ppuutt, ssuubbssttddiioo__bbppuutt, and ssuubbssttddiioo__ppuuttfflluusshh except that _f_r_o_m must be a 0-terminated string of characters. The string, not including the 0, is written. The SSUUBBSSTTDDIIOO__OOUUTTSSIIZZEE macro is defined as a reasonably large output buffer size for ssuubbssttddiioo__ffddbbuuff. IINNTTEERRNNAALLSS When a ssuubbssttddiioo variable _s is used for output, data is buffered from _s..xx to _s..xx + _s..pp; there is free buffer space from to _s..xx + _s..pp to _s..xx + _s..nn; the total buffer length is _s..nn. SSEEEE AALLSSOO substdio(3) substdio_out(3)