QUOTE, copyright 1985 by Mark E. Mallett, is a program which randomly selects a quote from a quote database and prints it. Permission is given to distribute this program indiscriminately. This file is an informal and brief description of the quote program. Basic usage of this program is simply to give the command QUOTE and you'll get a cute message. Read on if you want to know more than that. Please note that specifics mentioned here (such as data widths and defaults) apply to the CP/M implementation compiled with the Aztec C compiler from Manx. QUOTE uses two files in looking up something to print: - A quote index file. (this file may be constructed by the quote program from a properly formatted quote database). - A quote database (text file) The quote index file is of the form: first) A line of ASCII text, ending with newline, identifying the name of the quote file that the index file was made from. second) A binary number, of size "int" to the C language (16 bits here), which is the number of quote reflected in this index. last) For each quote indexed, a binary number of size "long" (32 bits here), which is the file position in the quote file of the corresponding quote. The quote database (text file) is of the form: For each quote, first) a single line of keywords indicating the class of the quote. The class keyword is something that you just make up, there are no built-in classes. The keywords may be separated by any nonalphanumeric character. If the quote is not to be tagged with any keywords, this line should contain some printing character such as a colon. second) The body of the quote, as many lines as it takes. third) The end-of-quote signal, which is a line beginning with a right angle bracket (">"). (Don't ask why. Ok, it is for historical reasons.) it might be noted that in between quotes, blank lines may appear anywhere, as may lines beginning with an exclamation mark, which lines are ignored. The general command line to the quote program is: QUOTE [options] An option is, of course, optional, and specifies some non-default action to take or information to use. Options are signaled by a hyphen, and are as follows: -c Create an index file instead of printing a quote. -e rest-of-line The rest of the line is to be used as the next operating system command when this program exits. It provides a way of secure chaining for CP/M systems (my BBS, in particular). -i name Use this as the name of the index file, instead of the default (which is QUOTE.INX). -n list When creating an index, do NOT include quotes with class keywords which are in this list. The list may not contain spaces or tabs, but should be a group of names separated by commas. -o list When creating an index, include ONLY the quotes with class keywords which are in this list. -q name Use this as the name of the quote file, instead of the default. The default is the name which is contained in the index file, or if creating an index file, the default is QUOTE.TXT. -r nn Repeat factor (print nn quotes). Default is 1. -s Suppress the copyright notice when the program starts. It should be noted that the "-o" and the "-n" may not both be used, as they are conflicting options. If neither of these options are used, then all quotes are included (when creating an index file). For example, you might create an index this way: QUOTE -c -i goodstuf.inx -n llong,dune This says "create an index called goodstuf.inx from the file quote.txt which does not include quotes tagged with either 'llong' or 'dune'". You would then use this index as: QUOTE -i goodstuf.inx For CP/M systems, the quote program and databases (databii?) should probably be put on user 0, and marked with the SYSTEM attribute, to allow the program to be invoked (and work) from any user number. Mark Mallett 20 Jeff Lane March 29, 1985 Manchester NH 03103 Voice: 603 424 8129 BBS: 603 424 8124 (1200 baud; wait for boot).