home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / AZTEC-C / QUOTE.ARK / QUOTE.DOC < prev    next >
Text File  |  1986-06-19  |  4KB  |  131 lines

  1.     QUOTE, copyright 1985 by Mark E. Mallett, is a program which
  2. randomly selects a quote from a quote database and prints it.  Permission
  3. is given to distribute this program indiscriminately.
  4.  
  5. This file is an informal and brief description of the quote program.
  6.  
  7. Basic usage of this program is simply to give the command
  8.  
  9.     QUOTE
  10.  
  11. and you'll get a cute message.  Read on if you want to know more
  12. than that.
  13.  
  14. Please note that specifics mentioned here (such as data widths and defaults)
  15. apply to the CP/M implementation compiled with the Aztec C compiler from Manx.
  16.  
  17.  
  18. QUOTE uses two files in looking up something to print:
  19.  
  20.     - A quote index file.  (this file may be constructed by the
  21.       quote program from a properly formatted quote database).
  22.     - A quote database (text file)
  23.  
  24. The quote index file is of the form:
  25.  
  26.     first) A line of ASCII text, ending with newline, identifying
  27.         the name of the quote file that the index file was made
  28.         from.
  29.  
  30.     second) A binary number, of size "int" to the C language (16
  31.         bits here), which is the number of quote reflected in
  32.         this index.
  33.  
  34.     last)  For each quote indexed, a binary number of size "long"
  35.         (32 bits here), which is the file position in the quote
  36.         file of the corresponding quote.
  37.  
  38.  
  39. The quote database (text file) is of the form:
  40.  
  41.     For each quote,
  42.  
  43.         first) a single line of keywords indicating the class of
  44.             the quote.  The class keyword is something that you
  45.             just make up, there are no built-in classes.  The
  46.             keywords may be separated by any nonalphanumeric
  47.             character.
  48.             If the quote is not to be tagged with any keywords,
  49.             this line should contain some printing character
  50.             such as a colon.
  51.  
  52.         second) The body of the quote, as many lines as it takes.
  53.  
  54.         third)  The end-of-quote signal, which is a line beginning
  55.             with a right angle bracket (">").  (Don't ask why.
  56.             Ok, it is for historical reasons.)
  57.  
  58.     it might be noted that in between quotes, blank lines may appear
  59.     anywhere, as may lines beginning with an exclamation mark, which
  60.     lines are ignored.
  61.  
  62.  
  63. The general command line to the quote program is:
  64.  
  65.     QUOTE [options]
  66.  
  67. An option is, of course, optional, and specifies some non-default action
  68. to take or information to use.  Options are signaled by a hyphen, and
  69. are as follows:
  70.  
  71.     -c        Create an index file instead of printing a quote.
  72.  
  73.     -e rest-of-line    The rest of the line is to be used as the next
  74.             operating system command when this program exits.
  75.             It provides a way of secure chaining for CP/M
  76.             systems (my BBS, in particular).
  77.  
  78.     -i name        Use this as the name of the index file, instead of
  79.             the default (which is QUOTE.INX).
  80.  
  81.     -n list        When creating an index, do NOT include quotes with
  82.             class keywords which are in this list.  The list
  83.             may not contain spaces or tabs, but should be a
  84.             group of names separated by commas.
  85.  
  86.     -o list        When creating an index, include ONLY the quotes
  87.             with class keywords which are in this list.
  88.  
  89.     -q name        Use this as the name of the quote file, instead of
  90.             the default.  The default is the name which is
  91.             contained in the index file, or if creating an
  92.             index file, the default is QUOTE.TXT.
  93.  
  94.     -r nn        Repeat factor (print nn quotes).  Default is 1.
  95.  
  96.     -s        Suppress the copyright notice when the program
  97.             starts.
  98.  
  99.  
  100.  
  101.  
  102. It should be noted that the "-o" and the "-n" may not both be used, as
  103. they are conflicting options.  If neither of these options are used, then
  104. all quotes are included (when creating an index file).
  105.  
  106.  
  107. For example, you might create an index this way:
  108.  
  109.     QUOTE -c -i goodstuf.inx -n llong,dune
  110.  
  111. This says "create an index called goodstuf.inx from the file quote.txt
  112. which does not include quotes tagged with either 'llong' or 'dune'".
  113. You would then use this index as:
  114.  
  115.     QUOTE -i goodstuf.inx
  116.  
  117. For CP/M systems, the quote program and databases (databii?) should probably
  118. be put on user 0, and marked with the SYSTEM attribute, to allow the program to
  119. be invoked (and work) from any user number.
  120.  
  121.  
  122.                         Mark Mallett
  123.                         20 Jeff Lane
  124. March 29, 1985                    Manchester NH 03103
  125.                         Voice: 603 424 8129
  126.                         BBS:   603 424 8124
  127.                           (1200 baud; wait for boot).
  128. h 29, 1985                    Manchester NH 03103
  129.                         Voice: 603 424 8129
  130.                         BBS:   603 424 8124
  131.                           (1200 baud; wa