data.c 480 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * data.c - this is the initialization for the standard streams
  3. */
  4. /* $Id$ */
  5. #include <stdio.h>
  6. struct __iobuf __stdin = {
  7. 0, 0, _IOREAD, 0,
  8. (unsigned char *)NULL, (unsigned char *)NULL,
  9. };
  10. struct __iobuf __stdout = {
  11. 0, 1, _IOWRITE, 0,
  12. (unsigned char *)NULL, (unsigned char *)NULL,
  13. };
  14. struct __iobuf __stderr = {
  15. 0, 2, _IOWRITE | _IOLBF, 0,
  16. (unsigned char *)NULL, (unsigned char *)NULL,
  17. };
  18. FILE *__iotab[FOPEN_MAX] = {
  19. &__stdin,
  20. &__stdout,
  21. &__stderr,
  22. 0
  23. };