• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "stdio_impl.h"
2 #include <sys/ioctl.h>
3 
__stdout_write(FILE * f,const unsigned char * buf,size_t len)4 size_t __stdout_write(FILE *f, const unsigned char *buf, size_t len)
5 {
6 	struct winsize wsz;
7 	f->write = __stdio_write;
8 	if (!(f->flags & F_SVB) && __syscall(SYS_ioctl, f->fd, TIOCGWINSZ, &wsz))
9 		f->lbf = -1;
10 	return __stdio_write(f, buf, len);
11 }
12