__stdout_write.c 277 字节
Newer Older
C
c00346986 已提交
1 2 3 4 5
#include "stdio_impl.h"
#include <sys/ioctl.h>

size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
{
M
mamingshuai 已提交
6 7 8 9 10
    struct winsize wsz;
    if (!(f->flags & F_SVB) && ioctl(f->fd, TIOCGWINSZ, &wsz)) {
        f->lbf = EOF;
    }
    return __stdio_write(f, buf, len);
C
c00346986 已提交
11
}