home *** CD-ROM | disk | FTP | other *** search
- Kfortune: Kenji's "fortune" clone
- Version 1.0: May 20, 1989
- Written by Kenji Rikitake
- Copyright (c) 1989 by Kenji Rikitake
- All Rights Reserved.
- The author allows this program to be used for any purposes.
-
- Kfortune is a very simple clone of Ken Arnold's "fortune" program,
- contained within 4.xBSD UNIX games. I have entirely rewritten
- whole codes, and they will not violate copyrights of AT&T or UCB.
-
- You should compile all programs with Microsoft C 5.1.
- I have made this program solely for myself, so I don't care about
- Turbo C, Zortech C, or whatever. :-)
-
- Kfortune uses 2 files.
- TXTFILE is a database text in which contains the strings
- chosen and displayed by Kfortune programs.
- TPFILE is a database pointer file of TXTFILE in which contains
- the number of strings and the pointers to each string in TXTFILE.
-
- You have to modify kfortune.c's TPFILE and TXTFILE macros
- if you want to change the names of Kfortune files.
- Defaults are:
- TPFILE = "a:\\usr\\games\\lib\\kfortune.tp",
- TXTFILE = "a:\\usr\\games\\lib\\kfortune.txt".
- (My machine has a hard disk drive on drive A.)
-
- Kfortune has 3 programs.
-
- kfscan.c :Scan TXTFILE and make TPFILE
- kfhash.c :Hash TPFILE and ramdomize it
- kfortune.c :Pick a string from TXTFILE pointed by TPFILE
-
- Each of TXTFILE strings are terminated by ^L (0x0c).
- You can easily make your own TXTFILE.
-
- I have included a tiny set of TPFILE and TXTFILE, extracted from
- 4.3BSD fortune. This database is not of my copyright, and
- Ken Arnold, the editor, writes a warning as follows:
-
- Warning: The fortunes contained in the fortune database have
- been collected haphazardly from a caphony of sources,
- in number so huge it boggles the mind. It is
- impossible to do any meaningful quality control on
- attributions, or lack thereof, or exactness of the
- quote. Since this database is not used for profit, and
- since entire works are not published, it falls under
- fair use, as we understand it. However, if any
- half-assed idiot decides to make a profit off of this,
- they will need to double check it all, and nobody not
- involved of such an effort makes any warranty that
- anything in here bears any relation to the real world
- of literature, law, or other bizzarrity.
-
- Well, I quoted only 10 items from Ken's database. I think this will
- not violate his copyright.
-
- Anyway, enjoy yourself with this simple fortune.
-