Fortune Cookie Program

In order to access the tgz and zip files on this page, you should install Winzip.


Fortune 2.10 Fortune Cookie program. C++ Source (Easily converted to ANSI C) You will need Mylib to compile the fortune sources.

This program requires DPMI services. Suitable DPMI clients include Windows 3.1x and '95. A freeware DPMI client is available on this website. Click to download CWSDPMI.

Use: "fortune /!" to get help to create your own fortune data files. The current version reports that Each quote should begin with [nnnn] nnnn = the quote number. This was changed for version 2.10, but this section of the program was not updated. Since I don't have a C or C++ environment anymore I cannot fix the error and release a new version. So just be aware of it when using the /! option.
Use: "fortune /?" for other help.
Use: "fortune /i" to generate an index!

A fortune data file About 1.2MB Collected from a variety of sources - I did not research these quotes I merely collected quote\fortune source files and then joined, and reformatted them to fit in with my program. I do not own the rights to this file, and unfortunately I have misplaced the names of the people who did collect the original material.

Fortunix This source code can be compiled using the GCC (Maybe CC too) Compiler for Linux/Unix to produce a working version of my fortune program for unix/linux.

Unix/Linux HINT: You can use a soft link to the fortune binary to use a different quote text file. For Example the command:
"ln -s fortune atheist" will allow the use of the atheist.txt file with the same binary: instead of typing "fortune", you type "atheist", the soft link "atheist -> fortune" will then run the fortune binary passing "atheist" as argv[0].

See the fortunix.me file in the distribution for warranty and other details.

The source is contained within a tarred, gzipped Archive. To extract it use:
gzip -d fortunix.tgz; tar xvf fortunix.tar

IF YOU USE THE fortune.txt FILE FROM fortfile.zip OR atheist.txt FROM atheist.zip REMEMBER THAT THESE FILES ARE DOS FORMATTED AND THUS WILL HAVE A ^M AT THE END OF EACH LINE WHEN YOU GO TO USE THEM IN UNIX, REMEMBER TO USE A dos2unix LIKE UTILITY TO GET RID OF THESE ^M BECAUSE fortune -i WILL NOT WORK.

Undos

undos: A small bourne shell script that will remove ^M from a text file in unix.

Java Version of Fortune Cookie Program

Fortune.java A very pedestrian conversion of the unix version of fortune, "fortunix". No longer supports the QFJMP header for the fortune cookie file. Only requires a % to seperate each quote. See Fortune.java for more information.





Return to Programs page


E-mail me


Updated: 8th October 1998 1