File:  [DVB] / dietlibc / libstdio / stdout.c
Revision 1.9: download - view: text, annotated - select for diffs
Sat May 15 16:38:21 2010 UTC (14 years ago) by leitner
Branches: MAIN
CVS tags: HEAD
  finally add stdout tty detection and turn off linewise buffering if !tty

#include <dietstdio.h>

static char __stdout_buf[BUFSIZE];
static FILE __stdout = {
  .fd=1,
  .flags=BUFLINEWISE|STATICBUF|CANWRITE|CHECKLINEWISE,
  .bs=0, .bm=0,
  .buflen=BUFSIZE,
  .buf=__stdout_buf,
  .next=0,
  .popen_kludge=0,
  .ungetbuf=0,
  .ungotten=0,
#ifdef WANT_THREAD_SAFE
  .m=PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
#endif
};

FILE *stdout=&__stdout;

int __fflush_stdout(void) {
  return fflush(stdout);
}

LinuxTV legacy CVS <linuxtv.org/cvs>