DOS executable is included in this package. If you want to run fortune in UNIX, you'll have to recompile. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Usage: Cookies must be less than 81 characters long. fortune to use the internal array of fortune cookies fortune filename to use your own file of fortune cookies fortune ? to identify program Notes: The Classic Fortune Algorithm... Traditionally, this is how a cookie is selected: First, cookie #1 is named The Cookie. Then, using a random number generator, cookie #2 is given a 1/2 chance of replacing The Cookie. And so on, with cookie #n having a 1/n chance of becoming The Cookie. If you do the math, you find that all cookies have an equal chance to be The Cookie! To give a cookie a greater probability, duplicate it. After all cookies have been read, The Cookie is printed. This program has been compiled with... MSDOS & Micro C cc fortune.c -fop MSDOS & Pacific C pacc fortune.c MSDOS & MSC 6.0 cl fortune.c UNIX System V/386 Release 3.2 & its standard compiler cc -ofortune fortune.c HPUX 10.20 & its standard compiler cc -ofortune fortune.c GNU/Linux & its standard compiler gcc -ofortune fortune.c Micro C handles function pointers in a nonstandard fashion. I also had to tweak the program a bit for the random numbers. Micro C can handle fewer cookies than the others. That's why I have ifdefed some cookies out if _MICROC_ is not defined. But I haven't kept up with that limitation, so if you ever recompile with Micro C, you may have to remove some more, or you may have room to add more.