home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / cug / softt-12.lbr / PAGE.DQC / PAGE.DOC
Text File  |  1984-07-05  |  2KB  |  87 lines

  1. .he 'PAGE'05/01/80'PAGE'
  2. NAME
  3. .sp
  4. page - display file on CRT terminal a page at a time
  5. .sp 2
  6. SYNOPSIS
  7. .sp
  8. .nf
  9. subroutine page (fd, prompt, eprompt, lines)
  10. file_des fd
  11. character prompt (ARB), eprompt (ARB)
  12. integer lines
  13. .fi
  14. .sp 2
  15. DESCRIPTION
  16. .sp
  17. 'Page' is used to display the contents of a disk file
  18. on a CRT terminal, one screenful at a time.
  19. In addition, it gives the user the ability to review or skip
  20. any part of the file if desired.
  21. .sp
  22. The first argument is the file descriptor of a disk file to
  23. be displayed.
  24. The second argument is a format string (c.f. 'print', 'encode')
  25. to be used for prompting the user after each screen.
  26. If this format string contains a format code for an integer
  27. (e.g. "*i") then the current page number will replace it in
  28. the actual prompt.
  29. The third argument is a format string to be used for prompting
  30. the user when end-of-file is reached;
  31. it may also contain a format code for the current page number.
  32. The final argument is the number of lines on the CRT screen
  33. being used;
  34. if the value 0 is supplied, no pagination will be performed.
  35. .sp
  36. 'Page' prompts the user after each screenful of output, then
  37. awaits a command.
  38. The following commands may be entered.
  39. (Note that alphabetic commands may be entered in upper or lower
  40. case.)
  41. .sp
  42. .in +15
  43. .ta 11
  44. .tc \
  45. .ti -10
  46. n\Exit immediately.
  47. .ti -10
  48. q\Exit immediately.
  49. .ti -10
  50. ctrl-c\Exit immediately.
  51. .ti -10
  52. y\Advance to the next page.
  53. .ti -10
  54. newline\Advance to the next page.
  55. .ti -10
  56. l<lines>\Set screen size to specified number of lines.
  57. "l" or "l0" causes paging to end and continuous listing to
  58. begin.
  59. .ti -10
  60. .\Redisplay current page.
  61. .ti -10
  62. ^\Redisplay previous page.
  63. .ti -10
  64. <page>\Display specified page number.
  65. .ti -10
  66. +<pages>\Advance given number of pages (default 1).
  67. .ti -10
  68. -<pages>\Back up given number of pages (default 1).
  69. .sp
  70. .in -15
  71. 'Page' handles long lines correctly and does
  72. not generate multiple prompts for files whose lengths are
  73. integral multiples of the screen size.
  74. .sp 2
  75. CALLS
  76. .sp
  77. open, getlin, print, ctoi, putlin, rewind, close
  78. .sp 2
  79. BUGS
  80. .sp
  81. There is no easy way to change the page alignment, or to
  82. scan for the first page containing a given pattern.
  83. .sp 2
  84. SEE ALSO
  85. .sp
  86. pg (1)
  87.