Strgetf.c (202B)
1 #include "std.h" 2 3 void 4 Strgetf(String *p, int fd) 5 { 6 ulong n; 7 8 Strzero(p); 9 do { 10 n = read(fd, p->s + p->n, p->size - p->n); 11 p->n += n; 12 Strinsure(p, p->n + 1); 13 } while (n); 14 p->s[p->n] = '\0'; 15 }
![]() | plan9portfork of plan9port with libvec, libstr and libsdb |
Log | Files | Refs | README | LICENSE |