QuoteGiver v1.02 by Omar Siddique for the Amiga computer August 25, 1994 WHAT IS QUOTEGIVER AND WHAT GOOD IS IT? QuoteGiver is a fortune cookie program. That is, it randomly selects a quote from a list and displays it. There are other, similar, programs already available for the Amiga, but I think this one is a nice implementation of the idea. I use it myself. :-) Besides, I needed the programming experience. QuoteGiver includes a sampling of my favorite quotes that I've collected over time -- 225 of them. HOW TO USE QUOTEGIVER QuoteGiver is simple to use. Simply type: QuoteGiver with the pathname being the directory where your .quoteslist is located. If no pathname is provided, QuoteGiver will check the current directory and then the s: directory. It works well to include QuoteGiver in your shell-startup file. HOW TO ADD QUOTES TO THE LIST Adding quotes is simplicity itself. Simply fire up your favorite text editor and edit .quoteslist. The three things to keep in mind are: 1) The quotation (and attribution if any) MUST be enclosed in quotation marks. If you need to quote something inside the quotation, use single quotes. 2) The quotation being added MUST be preceded by a number and period. The number has to be one more than the previous quote. So, if the last quote was number 225, the next quote should look like this: 226. "This is my quotation" 3) The first line at the beginning of the .quoteslist file MUST be NUMQUOTES=x (all caps, no spaces), with x being the actual number of quotes in the list. The NUMQUOTES figure should correspond to the last quote number, if all is well. And that's all! QuoteGiver will then use your new quotes. Make sure you update the NUMQUOTES figure, or QuoteGiver won't know you've added new ones. COMPATIBILITY, BUGS, AND LIMITATIONS QuoteGiver was tested on an Amiga 3000/25 with 5 megs of RAM, KS 2.04, and Workbench 2.1. It should run without any problems on any Amiga. There are no known bugs. The only possible problem that may arise is if QuoteGiver is called twice within one second, it will produce the same quote twice. This is the result of using the number of seconds past the minute (among other things) to generate the random seed. The only limitation is that a quote may not be any longer than 2000 characters. Since a quote this size would scroll off the screen on a 80 characters by 24 lines display, I'm assuming this is sufficient for most people. If you find this to be a problem, please let me know. CONTACTING THE AUTHOR Feel free to send any comments, question, complaints, flames, bug-reports, requests, your favorite quotes, and whatever else to me at: Internet: osiddi1@umbc.edu o.siddique2@genie.geis.com GEnie: O.Siddique2 Or if you prefer to use slower means (or wish to send presents, money, a new SGI Indy, etc): Snail Mail: Omar Siddique P.O. Box 451 Perry Hall, MD 21128 DISTRIBUTION AND DISCLAIMER QuoteGiver is freely distributable. However, it must be distributed in its intact, original archive, which includes this document, the executable, and the .quoteslist file. While QuoteGiver has proven stable and problem free, the standard disclaimer applies; this program should work just fine, be harmless entertainment, and so forth, but if it causes your computer to achieve sentience and take over the world, or you get jailed for bombing somebody after reading the "There are few personal problems that can't be solved by a suitable application of high explosives", the author is not responsible or liable for any damage or claims that result. :-) OTHER FINE WORKS BY THE AUTHOR QuoteGiver for UNIX. Quoter, a utility to, at a set interval (or immediately), change the quote in your UNIX .signature file. VERSION NOTES 1.00 Initial Release 1.01 Increased maximum quote size to 2000 chars -- this should be more than enough for our purposes. Fixed a minor bug which could cause an infinite loop if the user had for some reason deleted a number quote that was within the range of NUMQUESTS without replacing it, and QuoteGiver tried to access that quote. Minor source and documentation revisions. 1.02 Slight improvement to random quote selector. Fixed a potential bug if the path to .quoteslist exceeded 120 chars. Added a slightly lengthier .quoteslist to the standard distribution (with 20 additional quotes).