home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1995 December / SOFM_Dec1995.bin / pc / dos / utility / isam / ready.doc < prev    next >
Text File  |  1995-10-31  |  18KB  |  409 lines

  1. READY.DOC                            1                         Revised: 09/09/95
  2.  
  3. Program written by:
  4.                         Bruce Guthrie
  5.                         Room H-4885
  6.                         U.S. Dept of Commerce/ESA/STAT-USA
  7.                         Washington, DC 20230
  8.  
  9.                         (202) 482-3234
  10.  
  11. You may freely copy and re-distribute this program; however, the U.S. Department
  12. of Commerce neither guarantees nor assures compatibility of the program with all
  13. computer software or hardware.
  14.  
  15. Foreign users:  Please provide an Internet e-mail address in all  correspondence
  16. or and just e-mail your problems to me at bgu@cu.nih.gov
  17.  
  18.  
  19. The READY.EXE program is a text file viewer and offers most of the functions  of
  20. the similar READ.EXE program.  It is, however, a stripped-down version  of  READ
  21. and it processes files in a totally different  way  so  it  has  some  different
  22. features.
  23.  
  24.  
  25. Features of the READY program:
  26.   * Handles files of an unlimited number of lines.
  27.   * Handles DOS text files (lines end with CR/LF), Mac text files (lines end
  28.     with CR), or Unix text files (lines end with LF).
  29.   * Allows text to be blocked and copied or printed.
  30.   * Allows a user-specified string after partial or full text is printed.
  31.   * Supports 43/50-line mode under EGA and VGA.
  32.   * Allows jumping to DOS as well as allowing you to turn off this feature
  33.     (useful for public-use terminals).
  34.   * Allows case-insensitive text searching within the file.
  35.   * Shows a ruler line if desired.
  36.   * Shows the file before it has finished loading so you can start reading
  37.     sooner.
  38.   * Provides the ability to show line numbers on the screen.
  39.   * Expands tabs for display.
  40.   * Allows lines over 80 characters to be either truncated, wrapped, or split so
  41.     they fit on one screen.
  42.   * Allows specified words to be highlighted throughout the text so they can be
  43.     identified more easily.  (This is different from the typical "Find"
  44.     feature.)
  45.   * Can Ctrl-PgUp/Ctrl-PgDn among up to 100 files.
  46.   * Allows the user to adjust terminal colors.
  47.  
  48.  
  49.  
  50. READY.DOC                            2                         Revised: 09/09/95
  51.  
  52. READY's advantages over READ:
  53.   * It can handle files of unlimited line counts.
  54.   * It can be very quick processing files the second time they are viewed.
  55.   * It takes up much less memory than READ requires.
  56.   * It provides the ability to show line numbers on the screen.
  57.   * Expands tabs for display (READ displays them as little circles).
  58.   * Wraps or splits up long lines for display.
  59.   * Allows word highlighting throughout a document.
  60.   * Allows the user to specify a range of lines to read.
  61.  
  62.  
  63. READY's disadvantages over READ:
  64.   * It handles files by rewriting them out to (by default) your C drive.  So a
  65.     large file will take up considerable disk space.
  66.   * Any lines that are wider than 80 characters are truncated, wrapped, or
  67.     split up instead of being able to view them all.
  68.   * It does not support some of the special functions that READ handles.
  69.     Specifically, forget all of the following (although they could be added if
  70.     people really demanded them):
  71.       Ctrl-P         Printer formfeed
  72.       /              Case-sensitive search (only non-sensitive searches work)
  73.       #line          Skip to a specified line number
  74.       -line          Move backward x-number of lines
  75.       +line          Move forward x-number of lines
  76.   * It does not provide any printer setup options.
  77.   * It does not provide any mouse support.
  78.  
  79. However, in many cases, this is a very useful command.
  80.  
  81.  
  82.  
  83. READY.DOC                            3                         Revised: 09/09/95
  84.  
  85. Temporary file:
  86.  
  87. The program writes out a random-access file as (by default) C:\READY.TMP.   This
  88. file contains one 80-character record for every line in your original file.   In
  89. general, this file will be much  larger  than  your  original  file.   When  the
  90. program finishes, by default it deletes the temporary file.
  91.  
  92. The process of reading and writing the file can  take  awhile  for  large  files
  93. although it's fairly quick for small files.
  94.  
  95. You can retain the temporary file if you'd like and the file can be written to a
  96. networked drive if desired.  This makes secondary reads quicker.
  97.  
  98. If the temporary file is retained, the program is smart enough  to  compare  the
  99. file date and time of the original file with the file stored  in  the  temporary
  100. file.  If the original file has been updated  or  is  different  from  the  file
  101. stored in the temporary file,  the  program  will  reprocess  the  source  file.
  102. Otherwise, it will just read the temporary file.
  103.  
  104. For example, if you run the program with this command:
  105.  
  106.         READY J:\EBBNEW\DATA\BULL12.TXT /TJ:\EBBNEW\BULL12.TMP /KEEP
  107.  
  108. the  first  time  the  program  is  run,  it  will  create  the  temporary  file
  109. (BULL12.TMP) based on BULL12.TXT and then will keep  the  temporary  file.   The
  110. next time you (or someone) issues the same command,  it  will  notice  that  the
  111. BULL12.TXT file hasn't been  updated  so  it  will  immediately  work  with  the
  112. temporary file.  If the source file (BULL12.TXT) gets updated, the program  will
  113. notice it's been updated and reprocess the file.
  114.  
  115.  
  116.  
  117. READY.DOC                            4                         Revised: 09/09/95
  118.  
  119. Specifying parameters:
  120.  
  121. Parameters for this program can be set in the following ways.  The last  setting
  122. encountered always wins:
  123.   - Read from an *.INI file (see below),
  124.   - Through the use of an environmental variable (SET READ=whatever), or
  125.   - From the command line (see "Syntax" below)
  126.  
  127. Note that the READY program allows you to provide the same  parameters  accepted
  128. by the READ program.  READY just ignores any parameters that it does not in fact
  129. support.  It even reads the READ.INI file by default.
  130.  
  131.  
  132. The READ.INI file:
  133.  
  134. READY will read a READ.INI file if one is found.  (You can specify  a  different
  135. file name if desired.) The file is an  ASCII  text  file  that  can  be  created
  136. maintained by hand.  The file can consist or one or more command line parameters
  137. (only those that begin with a "/"), one statement per line.  For example:
  138.         /MONO
  139.         /-DOS
  140.         /COLOR=123 134 145 156
  141.  
  142. The file can also contain comments which are blank lines or any  line  beginning
  143. with:
  144.         ;    (semi-colon)
  145.         :    (colon)
  146.         '    (quote)
  147.  
  148. READ looks for the initialization file in your default subdirectory  first.   It
  149. then searches for it in the subdirectory where the executable was and then  goes
  150. through your DOS path.
  151.  
  152. Passing in "/-I" or "/INULL" skips  loading  the  INI  file.   This  saves  some
  153. execution time as the program does not need to search your path for the file.
  154.  
  155. You can combine *.INI files from this and other routines I have out there.  This
  156. is useful if you're tired of having a lot of *.INI files out there.  To do this,
  157. make a single *.INI file (such as  ALL.INI)  and  include  blocks  in  it.   The
  158. routine will look for the block that's the name of the  core  routine  (in  this
  159. case, "[READ]") and only processes the records within that block.  For example,
  160.  
  161.         ; ALL.INI -- contains all of the INI statements
  162.         [DATES]
  163.         /SORT
  164.         [FILL]
  165.         /ON
  166.         /SPLIT
  167.         [READ]
  168.         /MONO
  169.  
  170. You can either pass in the name of the INI file  ("/IALL.INI")  or  the  routine
  171. will use a "SET  BG=filename"  (e.g.  "SET  BG=ALL.INI")  parameter  if  one  is
  172. provided.
  173.  
  174.  
  175.  
  176. READY.DOC                            5                         Revised: 09/09/95
  177.  
  178. Syntax:
  179.  
  180.     READY { filename | /Tfilename } [ /KEEP | /-KEEP ]
  181.       [ /TRUNCATE | /SPLIT | /WRAP ] [ /INDENT=n ] [ /H word [ word ]... ]
  182.       [ /DATE | /-DATE ] [ /TIME | /-TIME ] [ /DOS | /-DOS ]
  183.       [ /PORT=port ] [ /AFTERP=string ] [ /AFTERF=string ]
  184.       [ /Iinitfile | /-I ] [ /MONO | /COLOR ] [ /EGA | /VGA ]
  185.       [ /COLOR=nnn nnn nnn nnn nnn ] [ /n | /n1-n2 | /n1+n2 | -n ] [ /? ]
  186.  
  187. where:
  188.  
  189. "filename" is the input file to be processed.  Note that either an input file or
  190. a temporary file has to be provided; if neither is provided, you'll be  prompted
  191. for the file name to view.  You can specify  both  if  you'd  like.   Full  path
  192. specifications work fine and wildcards are supported.
  193.  
  194. "/Tfilename" specifies the name of the temporary file.  The  file  will  contain
  195. one 80-character record for each line in the source file plus one line which  is
  196. used to identify the input file.  The temporary file is  stored  by  default  as
  197. C:\READY.TMP so "/TC:\READY.TMP"  is  the  default  value  for  this  parameter.
  198. Wildcards are not allowed for the temporary file name.
  199.  
  200. "/KEEP" says to keep the temporary file around after you leave the command.   By
  201. default, the temporary file is saved if a temporary file is explicitly provided.
  202.  
  203. "/-KEEP" says to delete the temporary file no matter what.
  204.  
  205. "/TRUNCATE" says to truncate any line over 80 characters  (any  text  after  the
  206. 80th character are deleted).  This is initially the default.
  207.  
  208. "/SPLIT" says, for display purposes, to truncate any  line  over  80  characters
  209. (any text  after  the  80th  character  is  wrapped  to  the  next  line).   The
  210. continuation lines are indented  by  the  number  of  spaces  specified  in  the
  211. /INDENT=n parameter.  Line counts shown will be the number of wrapped lines, not
  212. the original number of lines.  Note that if you print or copy to disk  the  file
  213. from within READY, it will write out the lines as  split  lines,  not  in  their
  214. original format.
  215.  
  216. "/WRAP" says, for display purposes, to split any lines  over  80  characters  by
  217. looking for the last full word before 80 characters and  wrapping  the  line  at
  218. that point.  The continuation lines are trimmed of leading spaces and  are  then
  219. indented by the number of spaces specified in the /INDENT=n parameter.  See  the
  220. "/SPLIT" parameter above for additional caveats.
  221.  
  222. "/INDENT=n" specifies that n-spaces are  to  be  added  to  the  start  of  each
  223. continued line.  Defaults to "/INDENT=3".  If you don't want any indentation  at
  224. all, specify "/INDENT=0".
  225.  
  226.  
  227. READY.DOC                            6                         Revised: 09/09/95
  228.  
  229. "/H word..." highlights up to 10 words throughout  the  text.   Highlighting  is
  230. done on a word-by-word basis; not by phrase.  So the words to highlight  do  not
  231. have to appear together in the text to be found.  You can also ask for or change
  232. the words to be highlighted by using "H" within the program.
  233.  
  234. "/DATE" displays the file date and time on the status line; this is the default.
  235.  
  236. "/-DATE" skips displaying the file date and time on the  status  line.   If  you
  237. want to display the file time but not the date, specify /-DATE before /TIME.
  238.  
  239. "/TIME" displays the file  time  on  the  status  line;  this  is  the  default.
  240. Specifying "/-DATE" will turn off the time display by default.
  241.  
  242. "/-TIME" skips displaying the file time on the status line.   Specifying  "/DATE
  243. will turn on the time display by default.
  244.  
  245. "/DOS" allows the user to say Alt-J to  jump  to  DOS.   Initially  defaults  to
  246. "/DOS".
  247.  
  248. "/-DOS" prohibits jumping to DOS.
  249.  
  250. "/PORT=port" specifies the printer port to use  for  printing.   This  typically
  251. defaults to /PORT=LPT1:.
  252.  
  253. "/AFTERP=string" specifies the string to  print  after  a  partial  document  is
  254. printed.  This string can include a page eject character ("\012") or any printer
  255. reset codes ("\012\027E") you want.  Initially defaults to "/AFTERP=\012".
  256.  
  257. "/AFTERF=string" specifies the string to print after a full document is printed.
  258. See "/AFTERP=string" description.  Defaults to "/AFTERF=\012".
  259.  
  260. "/Iinitfile" says to read an initialization file with the file name  "initfile".
  261. The file specification *must* contain a period.  If no drive or path information
  262. is specified, the program will search for initfile  beginning  in  your  default
  263. subdirectory  and  then  going  throughout  your  DOS  path.   The  use  of   an
  264. initialization file is optional.  Initially defaults to "/IREAD.INI".
  265.  
  266. "/-I" (or "/INULL") says to skip loading the initialization file.
  267.  
  268. "/MONO" (or "/-COLOR") forces the system into monochrome mode.
  269.  
  270. "/COLOR" or "/-MONO" forces the system into color mode.  This is  typically  the
  271. default.
  272.  
  273. "/EGA" or "/VGA" will put you in 43/50-line mode if your monitor supports  this.
  274. The two options are actually  synonymous  (you'll  get  the  best  your  monitor
  275. supports).  You can also switch to and from 25-line and 43/50-line  mode  within
  276. the program by using Alt-E.
  277.  
  278.  
  279. READY.DOC                            7                         Revised: 09/09/95
  280.  
  281. "/COLOR=nnn nnn nnn nnn nnn" specifies the color settings to use for (in  order)
  282. (1) regular text, (2) the status line, (3) marked text, (4) found text, and  (5)
  283. highlighted words.  Each setting must consist of three  digits,  the  first  two
  284. being the foreground color  and  the  last  being  the  background  color.   The
  285. foreground color should be padded on the left with a 0 if it is only  one  digit
  286. in length.  Defaults to "/COLOR=150 151 157 143 127".  You  can  stop  providing
  287. numbers at any point after the first if you're willing  to  accept  the  default
  288. colors.
  289.  
  290. Foreground colors:
  291.  
  292.         Low intensity           High intensity
  293.  
  294.         0 = black                8 = dark grey
  295.         1 = blue                 9 = light blue
  296.         2 = green               10 = light green
  297.         3 = cyan                11 = light cyan
  298.         4 = red                 12 = light red
  299.         5 = magenta             13 = light magenta
  300.         6 = brown               14 = light yellow
  301.         7 = white               15 = bright white
  302.  
  303. Adding 16 to any color will make the text blink.  Background colors can  consist
  304. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  305.  
  306. "/n" says to process lines beginning with line n.  For example, "/1000" says  to
  307. read the file beginning with line 1000.
  308.  
  309. "/n1-n2" says to process lines n1 through  n2.   For  example,  "/500-700"  will
  310. process lines 500 to 700.
  311.  
  312. "/n1+n2" says to  process  n2  lines  beginning  with  line  n1.   For  example,
  313. "/500+500" will process lines 500 to 999.
  314.  
  315. "/-n" (or "/+n") says to stop after processing the first n lines.  For  example,
  316. "/+100" says to process only the first 100 lines of the file.
  317.  
  318. "/?" or "/HELP" shows you the syntax for the command.
  319.  
  320.  
  321.  
  322. READY.DOC                            8                         Revised: 09/09/95
  323.  
  324. Viewing options:
  325.  
  326. While you're viewing a  document  with  the  READY  command,  you  can  use  the
  327. following keys.  These are a subset of the commands  available  in  the  regular
  328. READ command:
  329.  
  330. Cursor movement keys (up/down):
  331.  
  332.      Up                moves up one line
  333.      Down              moves down one line
  334.      Home              moves to the top line of the document
  335.      End               moves to the bottom line of the document
  336.      PgUp              moves up one screen's worth
  337.      PgDn              moves down one screen's worth
  338.  
  339. Search for text:
  340.  
  341.      \ or F or f or /  search for text within the document
  342.                        (the search is case-insensitive; "/COMMERCE" will find
  343.                        "Commerce", "commerce", and "COMMERCE")
  344.      F3                search for the next occurrence of that text
  345.      F9                search for the previous occurrence of that text
  346.      H or h            highlights up to 10 words throughout your text;
  347.                        highlighting is done on a word-by-word basis, not by
  348.                        phrase, so the words do not have appear near each other
  349.                        to be highlighted (the search for text option, above, on
  350.                        the other hand, looks for phrases, not words)
  351.  
  352. Marking lines:
  353.  
  354.      Alt-M             mark top line for copy or print
  355.      Alt-B             mark bottom line for copy or print
  356.      Alt-U             unmark all lines
  357.  
  358. Copying and printing lines (if lines are marked, the program  copies/prints  the
  359. marked lines; if no lines are  marked,  the  program  copies/prints  the  entire
  360. file):
  361.  
  362.      Alt-C or Alt-D    copy (duplicate) lines to a file
  363.      Alt-P             print lines
  364.  
  365. Next/previous documents:
  366.  
  367.      Ctrl-PgUp         go to the previous file viewed
  368.      Ctrl-PgDn         go to the next file specified on the input line
  369.  
  370. Miscellaneous:
  371.  
  372.      Alt-E             toggles between 25-line and 43-/50-line mode (if your
  373.                        system supports EGA and VGA respectively)
  374.      Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  375.                        this feature can be turned off using the /-DOS switch
  376.      Alt-R             shows ruler at the top of the listing
  377.      Alt-N             shows line numbers on the left side of the screen
  378.      F1                show key help screen
  379.      Esc               leave READY program
  380.  
  381.  
  382. READY.DOC                            9                         Revised: 09/09/95
  383.  
  384. Marking and copying/printing text:
  385.  
  386. If you need to copy/print a portion of your file, you  will  typically  want  to
  387. mark sections of the text first.  This is done using the mark functions:   Alt-M
  388. marks the top line on the screen and Alt-B marks the bottom line on the screen.
  389.  
  390. For example, you might decide that you have a 2,000-line document and  you  want
  391. to print 50 lines of it.  Go to the first line you want to print  (you  can  use
  392. the search options if you want to).  Get that line at  either  the  top  of  the
  393. screen or the bottom of the screen.  If it's the bottom line,  press  Alt-B;  if
  394. it's the top line, press Alt-M.
  395.  
  396. Now go to the last line you want to print.  Again, get that line at  either  the
  397. top of the screen or  the  bottom  of  the  screen  and  press  Alt-B  or  Alt-M
  398. appropriately.  Having marked two lines, the program tags those  lines  and  all
  399. those lines between them.
  400.  
  401. Now press Alt-P to print them.  All marked lines will be printed.
  402.  
  403. Copying works similarly.  Use Alt-C (or Alt-D) to copy the lines to a file.
  404.  
  405. Note that the program truncates any lines over 80 characters so those  will  not
  406. be printed or copied.
  407.  
  408. 
  409.