home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d1xx / d174 / print1.2.lha / Print1.2 / READ_ME < prev    next >
Text File  |  1989-02-04  |  14KB  |  301 lines

  1.  
  2. print
  3.  
  4. CLI PRINT command
  5. Version 1.2
  6.  
  7.  Copyright (c) 1988 by John F. Zacharias, All rights reserved
  8.  
  9. Permission is granted for use by a non-profit, non-commercial user
  10. provided this READ_ME file accompanies the program and the above
  11. copyright notice and these restrictions are included with any copy.
  12. Any for-profit use or use by a commercial enterprise is strictly
  13. forbidden unless proper arrangements are made with the author.
  14.  
  15. NOTE: this product is shareware.  Registered shareware users
  16. will receive notices of any updates to this product (several are
  17. planned - see below).  The minimum shareware donation for
  18. receiving update information is $10.  Register your copy by sending
  19. $10 to:
  20.  
  21.     John F. Zacharias
  22.     10004 Vanguard Drive
  23.     Sacramento, CA 95827
  24.     Phone: (916) 363-9153
  25.  
  26. "print" is a PRINT command for printing out Amiga files and directories
  27. in a formatted display.  Features of the command are:
  28.  
  29.   *  A heading showing the full path name (including the actual name
  30.      of the disk - not DFx) and a page number are printed on each page.
  31.  
  32.   *  Top and bottom margins are standard.  Position your paper on the
  33.      perforation and your heading will print on the fourth line down.
  34.      The body of the print-out will start 2 lines after the heading.
  35.  
  36.   *  Page length and the left and right margins are taken from your
  37.      current Preferences values.
  38.  
  39.   *  The first page of the printout will show inportant information
  40.      about the file (or directory) including:
  41.  
  42.     - The date and time the file or directory was last updated.
  43.  
  44.     - The file size in both bytes and blocks.  For directories
  45.       the number of blocks on the the disk and the size of each
  46.       block is shown instead.
  47.  
  48.     - For directories only, the number of blocks currently in use
  49.       and their percentage of the total available are shown.
  50.  
  51.     - The file protection status (files only - Workbench 1.3 format).
  52.  
  53.     - Any file comments (files only).
  54.  
  55.     - The date and time the file or directory was printed.
  56.  
  57.   *  A directory printout is provided automatically if the file name
  58.      specified in the command line is a directory and not a file.  If
  59.      a directory is chosen, all sub-directories within that directory
  60.      will also be printed.  The directory listing that is printed is
  61.      similar to the LIST command and contains the following information:
  62.  
  63.     - A level indicator that indicates in what level a sub-directory
  64.       and it's files are placed in relation to the current directory
  65.       (the directory specified by the command).  The current directory
  66.       is shown as level 0 and each succeeding level is incremented by
  67.       one.
  68.  
  69.     - The file or sub-directory name, number of bytes and blocks in
  70.       the file, the protection status (Workbench 1.3 format), and the
  71.           file creation (or update) date are shown following the level
  72.           indicator.
  73.  
  74.     - File and directory names are shown in alphabetical order (case
  75.       ignored) with all files at a particular level shown before the
  76.       directories at that level.  All files and sub-directories within
  77.       a directory are shown immediately following the line listing
  78.       that directory.  The level number is used to indicate the relative
  79.       position of the file or sub-directory within the directory
  80.       hierarchy.
  81.  
  82.     - The format options listed below for files have no effect on the
  83.       directory printout.
  84.  
  85.    *  Four formats are provided for printing out files:
  86.  
  87.     - Each line is printed in ASCII text without line numbers.
  88.           Except for line feeds, tabs, backspaces, and form feeds,
  89.           control sequences (ESC, CTL pressed with a letter) and
  90.           binary zeros are stripped from the printout.  If a line
  91.           feed ($0A), tab character ($09), backspace ($08), or form
  92.           feed ($0C) is encountered, the appropriate action will be
  93.           taken (start new line, space over to the next modulo 8,
  94.           backspace over the previous character, or start new page).
  95.           Normally carriage returns ($0D) are ignored unless they are
  96.           not accompanied by a line feed.  In this case, a carriage
  97.           return by itself will be treated as a line feed.  Before
  98.           printing, all characters are converted to true 7-bit ASCII
  99.           (the high order bit is stripped).
  100.  
  101.           If the right margin is reached before a line feed is 
  102.           encountered, the line will be continued on the next line
  103.           of the printout.
  104.  
  105.     - Each line is printed in ASCII text with line numbers.
  106.           Control sequences are handled as indicated above.
  107.           If the right margin is reached before a line feed is 
  108.           encountered, the line will be continued on the next line
  109.           of the printout without a line number.
  110.  
  111.     - The file is printed in ASCII text with all control characters
  112.           shown.  Control sequences are printed with a ^ followed by
  113.           the appropriate letter.  An ESC is printed as ^[.  Except for
  114.           line feeds (not shown as a control sequence) all other control
  115.           sequences will NOT have their appropriate action performed
  116.           (i.e., tab characters will not space over, backspace characters
  117.           will not backspace over the previous character, etc.).
  118.  
  119.     - The file is printed in hexadecimal format.  The hex format
  120.       differs from that used by the AmigaDOS TYPE command in the 
  121.       following manner:
  122.  
  123.         + The file position is 6 hex characters rather than 4.
  124.  
  125.         + Text is grouped by 68000 word size (2 bytes) rather
  126.           than long word size (4 bytes).
  127.  
  128.         + In the printed text display on the right of the line,
  129.           bytes with a $80 zone (2-7 bit on) have the zone
  130.           stripped so that the are printed as ASCII characters.
  131.           This allows you to see characters that use the 2-7
  132.           zone as a special indicator.
  133.  
  134.         + The line feed character ($0A) is printed as a '>' in
  135.           the text display on the right.  This allows you to
  136.           quickly distinguish end of lines if you are printing
  137.           out a text file in hex.  All other control characters
  138.           are printed as '.'.
  139.  
  140. NOTE: "print" is not intended for printing out pre-formatted text files
  141.       with their own headings and page numbers embedded in the text unless
  142.       you want to see the formatting options used in the file.  If such
  143.       a file is printed using OPT S of "print", all of the pre-formatting
  144.       options will be printed as control sequences (^ followed by a letter)
  145.       and you will not get the formatting that was intended.  Without the
  146.       OPT S, the file will be printed with the pre-formatting options
  147.       stripped.  To print such a file and get the intended formatting
  148.       options it is best to use:
  149.  
  150.           copy filename to PRT:
  151.  
  152.  
  153. SPECIAL ENHANCEMENTS ADDED TO V 1.2 OF PRINT:
  154.  
  155.         - The SHOW (S) option was added and the normal printout no longer
  156.           shows control sequences (see description of formats above).
  157.  
  158.     - You can restart a printout at any page number.  This is useful
  159.           if you need to terminate a printout before it is complete.  You
  160.           can then restart the printout at the page number you stopped
  161.           the previous printout on.
  162.  
  163.     - You can force the printer to be re-initialized with the options
  164.       specified in the preferences menu.  This is useful if, for any
  165.           reason, you have to turn your printer off.  Normally this will
  166.           cause the printer to loose any hardware options which your
  167.           AMIGA loaded to the printer when you booted the system.  (Options
  168.           that were provided in your permanent Preferences settings.)
  169.  
  170.     - A bug was corrected that caused "print" to GURU if a file was
  171.           printed following a directory.  You can now combine any number
  172.           of directories and/or file listings in any order without worrying
  173.           about a GURU (I hope!).
  174.  
  175.     - The CONTROL C BREAK option has been enhanced and improved.
  176.  
  177.  
  178. To use "print":
  179.  
  180.   1.  First copy "print" to your "C" directory.
  181.  
  182.   2.  "print" is intended to run ONLY under CLI.  The CLI command line
  183.       syntax is as follows:
  184.  
  185.       print {-i} file-name {rp=n} {...file-name} {OPT H|N|S}
  186.  
  187.       The -i parameter is used to force the printer to be re-loaded with
  188.       the preferences options before printing starts.
  189.  
  190.       Either OPT H, OPT N, or OPT S may be specified.  OPT H indicates
  191.       that the file should be printed in hex, OPT N indicates that the
  192.       file should be printed with line numbers, and OPT S indicates that
  193.       all control sequences should be printed.  No OPT is used if you
  194.       want to print the file as ASCII text without line numbers.  The
  195.       OPT statement has no effect if the file-name is a directory.
  196.  
  197.       More than one file-name (or directory name) can be specified and
  198.       more than one OPT argument can be given.  Any one OPT argument
  199.       will apply to all files that preceed that option operand.
  200.       As an example:
  201.  
  202.       print file-1 opt h file-2 opt n file-3
  203.  
  204.       will print file-1 in hex, file-2 with sequence numbers, and
  205.       file-3 without sequence numbers.  PLEASE NOTE that all files
  206.       that you want printed as ASCII text lines without sequence
  207.       numbers must follow the last OPT argument.
  208.  
  209.       The rp=n parameter may be used to re-start a printout at some
  210.       page number after the first page.  n is the page number that 
  211.       you want restarted on.  The rp= parameter applies ONLY to the 
  212.       filename preceding the parameter.  Both files and directories
  213.       may be restarted.
  214.  
  215.   3.  You may terminate a print-out at any time by pressing CONTROL-C
  216.       (or CONTROL-D).  When you press CONTROL-C a requestor will appear
  217.       which will ask if you want to "Abort Current Print-Out?"  If you
  218.       wish to continue with the print-out simply click on "NO".  If
  219.       you click on "YES" and you are printing more than one file, 
  220.       another requestor will appear which will ask if you want to
  221.       "Go on to next File?".  If you click on "Yes", the first file
  222.       will stop printing, the printer will page change, and you will
  223.       start printing the second file.  If you click on "No", the first
  224.       file will terminate printing, the printer will page change, and
  225.       the "print" command will terminate.  SPECIAL CONSIDERATION:  Many
  226.       printers provide a built in buffer that allows a number of lines
  227.       to be sent to the printer ahead of their actual printing.  For this
  228.       reason, if you abort a printout you may still have several pages
  229.       (depending on the size of the buffer) of printing to complete.
  230.  
  231.       You may restart a printout that you previously terminated and any
  232.       page other than the first page by using the rp= parameter (see above).
  233.  
  234.       NOTE:  The file or directory information section is always printed
  235.       regardless of when you hit CONTROL-C.  A line is also printed which
  236.       says you have terminated the print-out.
  237.  
  238. Known problems with "print":
  239.  
  240.   *  No length check is performed on the path name printed in the
  241.      header.  If the path name is too long, the header line will
  242.      wrap around to the next line.  The maximum size path name that
  243.      will print on one line is your line size minus 15 for files
  244.      and line size minus 20 for directories.
  245.  
  246.   *  No length check is performed on any of the lines printed in the
  247.      file or directory information section on the first page.  If the
  248.      lines are two big they will wrap around to the next line.  This
  249.      may cause the first page of the printout to exceed the allowable
  250.      lines for that page.  With the exception of the file comment
  251.      line, 70 characters are required for the longest line printed
  252.      in the file information section.  Since the file comment can
  253.      be up to 80 characters, it will exceed the printout line if
  254.      it is larger than the line size minus 19.  Not all file comments,
  255.      of course, are that large.  For directories, up to 75 characters
  256.      are required in the information section.  A future release will
  257.      correctly compensate for this problem with proper word-wrap.
  258.  
  259.   *  If this product is used with Workbench 1.3, it cannot be installed
  260.      as a "resident" command.  When "print" was initially designed, it
  261.      was not designed as a re-entrant module.
  262.  
  263.  
  264. DISCLAIMER:  While every attempt has been made to test "print" using a
  265.      variety of options combined with multiple files and directories,
  266.      my desire to get the product in the hands of the user community
  267.      as rapidly as possible precludes the type of testing that will
  268.      guarantee that NO errors exist in this program.  In fact, it is
  269.      through extensive distribution and use of this product that many
  270.      bugs will be detected.  If you discover a bug, I would appreciate
  271.      being informed of said bug.  It would also be helpful if the user
  272.      could describe the circumstances under which the bug occurred, and,
  273.      if possible, send me a copy of the file/directory on which the
  274.      bug was discovered.  I will send a replacement diskette for any
  275.      media so submitted.
  276.  
  277.  
  278. The source provided with this distribution was compiled using Version 4.01
  279. of Lattice C.
  280.  
  281.  
  282. Future enhancements to "print" which are planned include:
  283.  
  284.   *  The ability to use wild cards within file names to allow you to 
  285.      print multiple files with duplicate characters in their names.
  286.  
  287.   *  An option will allow you to print all files contained within a 
  288.      directory along with an index of the files.  With this option
  289.      page numbers will not return to zero with the beginning of each file.
  290.  
  291.   *  An optional "with" argument will allow you to specify a file that
  292.      contains a "file list" of files you want printed.  With this file
  293.      list you will also be able specify whether you want an index and
  294.      whether file page number should be reset between files.
  295.  
  296. If you have any suggestions for any other future enhancements or improvements
  297. in the product, please direct them to me at the address given at the beginning
  298. of this document.
  299.  
  300.                         - John
  301.