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){
42 f->buf=realloc(f->buf, f->bufl+BUFSIZ);
56 else if(f->flags&LINEBUF){
59 if(f->flags&APPEND) seek(f->fd, 0L, 2);
60 if(cnt!=0 && write(f->fd, f->buf, cnt)!=cnt){
69 if(f->flags&APPEND) seek(f->fd, 0L, 2);
70 if(cnt!=0 && write(f->fd, f->buf, cnt)!=cnt){
77 else if(f->buf==f->unbuf){
79 if(f->flags&APPEND) seek(f->fd, 0L, 2);
80 if(write(f->fd, f->buf, 1)!=1){
88 if(f->flags&APPEND) seek(f->fd, 0L, 2);
89 if(cnt!=0 && write(f->fd, f->buf, cnt)!=cnt){
100 * Make sure EOF looks different from putc(-1)
101 * Should be able to cast to unsigned char, but
102 * there's a vc bug preventing that from working