home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / cug / softt-3.lbr / GETCH.DQC / GETCH.DOC
Text File  |  1984-07-05  |  1KB  |  65 lines

  1. .bp 1
  2. .in 0
  3. .he 'GETCH (2)'11/10/78'GETCH (2)'
  4. .fo ''-#-''
  5. .fi
  6. .in 7
  7. .ti -7
  8. NAME
  9. .br
  10. getch - read character from file
  11. .br
  12. .sp
  13. .ti -7
  14. SYNOPSIS
  15. .br
  16. c = getch (c, fd)
  17. .sp
  18. .nf
  19. character c
  20. filedes fd
  21. .fi
  22. .br
  23. .sp 1
  24. .ti -7
  25. DESCRIPTION
  26. .br
  27. Getch
  28. reads the next character from the file specified by
  29. fd.
  30. The character is returned in ascii format both as the functional
  31. return and in the parameter
  32. c.
  33. If the end of a line has been encountered, NEWLINE is returned.
  34. If the end of the file has been encountered, EOF is returned.
  35. .sp 1
  36. .ti -7
  37. IMPLEMENTATION
  38. .br
  39. Interspersed calls to
  40. getch and getlin
  41. work properly.
  42. A common implementation is to have
  43. getlin
  44. work by repeated calls to
  45. getch.
  46.  
  47. If the input file is not ascii, characters are mapped
  48. into their corresponding ascii format via
  49. a routine called "inmap".
  50.  
  51. Getch
  52. is able to recognize an end-of-file marker from either
  53. a terminal or a file.
  54.  
  55. .sp 1
  56. .ti -7
  57. SEE ALSO
  58. .br
  59. getc, getlin, putch, putlin, readf, writef
  60. .sp 1
  61. .ti -7
  62. DIAGNOSTICS
  63. .br
  64. None
  65.