home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man3 / putchar.3 < prev    next >
Encoding:
Text File  |  1975-06-26  |  941 b   |  47 lines

  1. .th PUTCHAR III 5/10/73
  2. .sh NAME
  3. putchar, flush \*- write character
  4. .sh SYNOPSIS
  5. .ft B
  6. putchar(ch)
  7. .s3
  8. flush( )
  9. .ft R
  10. .sh DESCRIPTION
  11. .it Putchar
  12. writes out its argument and returns it unchanged.
  13. Only the low-order byte is written, and only if it is non-null.
  14. Unless other arrangements have been made,
  15. .it putchar
  16. writes in
  17. unbuffered fashion on the standard output file.
  18. .s3
  19. Associated with this routine is an external variable
  20. .it fout
  21. which has the
  22. structure of a buffer discussed under putc (III).
  23. If the file descriptor part of this structure (first word)
  24. is greater than 2, output via
  25. .it putchar
  26. is buffered.
  27. To achieve buffered output one may say, for example,
  28. .s3
  29. .nf
  30.     fout = dup(1);        or
  31.     fout = creat(...);
  32. .s3
  33. .fi
  34. In such a case
  35. .it flush
  36. must be called
  37. before the program terminates in order to flush out
  38. the buffered output.
  39. .it Flush
  40. may be called at any time.
  41. .sh "SEE ALSO"
  42. putc (III)
  43. .sh BUGS
  44. The
  45. .it fout
  46. notion is kludgy.
  47.