2 * pANS stdio -- _IO_putc, _IO_cleanup
5 void _IO_cleanup(void){
9 * Look this over for simplification
11 int _IO_putc(int c, FILE *f){
43 char *t = realloc(f->buf, f->bufl+BUFSIZ);
59 else if(f->flags&LINEBUF){
62 if(f->flags&APPEND) seek(f->fd, 0L, 2);
63 if(cnt!=0 && write(f->fd, f->buf, cnt)!=cnt){
72 if(f->flags&APPEND) seek(f->fd, 0L, 2);
73 if(cnt!=0 && write(f->fd, f->buf, cnt)!=cnt){
80 else if(f->buf==f->unbuf){
82 if(f->flags&APPEND) seek(f->fd, 0L, 2);
83 if(write(f->fd, f->buf, 1)!=1){
91 if(f->flags&APPEND) seek(f->fd, 0L, 2);
92 if(cnt!=0 && write(f->fd, f->buf, cnt)!=cnt){
103 * Make sure EOF looks different from putc(-1)
104 * Should be able to cast to unsigned char, but
105 * there's a vc bug preventing that from working