home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / FC20C.ZIP / FORTUNE.C < prev    next >
C/C++ Source or Header  |  1990-08-20  |  11KB  |  218 lines

  1. /*
  2.  * A "fortune" cookie, every time you run it you get a different "quote".
  3.  *
  4.  * Copyright 1985,1990 Dave Dunfield
  5.  * All rights reserved.
  6.  */
  7. #include \mc\stdio.h
  8.  
  9. #define NUM_MSGS 188
  10.  
  11.     static char *msgs[] = {
  12.         "He who has imagination without learning has wings but no feet",
  13.         "Everyone needs to believe in something; I believe I'll have another beer",
  14.         "God helps those who help themselves.",
  15.         "Every absurdity has a champion to defend it",
  16.         "Flee at once, all is discovered",
  17.         "Everyone is enthuastic about your work",
  18.         "Do not underestimate the power of FORCE",
  19.         "Don't tell me what you dreamt last nite for I've been reading Freud",
  20.         "Death: To suddenly stop sinning",
  21.         "Do not merely believe in miracles; rely on them",
  22.         "retupmoc eht edisni deppart ma I - PLEH",
  23.         "A stitch in time saves nine",
  24.         "The programmers cheer:\nShift it to the left...\nShift it to the right...\nPOP up PUSH down...\nBYTE BYTE .. BYTE!!!",
  25.         "On a clear disk you can seek forever...",
  26.         "Beam me up Scottie.... There in no intelligent life down here!",
  27.         "Don't be humble... You're not that great",
  28.         "Be security conscious -- National defence is at stake!",
  29.         "A good memory does not equal pale ink",
  30.         "Age and treachery will always overcome youth and skill",
  31.         "Your buisness will go though a period of considerable expansion",
  32.         "A king's castle is his home",
  33.         "A hermit is a deserter from the army of humanity",
  34.         "You will be hungry within the hour",
  35.         "Volcano: A mountain with hiccups",
  36.         "You don't know what I know",
  37.         "Too men looking though the same bars; one sees mud, the other one stars",
  38.         "Time is nature's way of preventing everything from happening at once",
  39.         "Within a computer, natural language in unnatural",
  40.         "Those of you who think you know everything are annoying those of us who do!",
  41.         "You always have a chance for winning - The others might lose",
  42.         "There is no time like the pleasant",
  43.         "Use GOTO's only to implement a fundamental structure",
  44.         "The plural of spouse is spice",
  45.         "Toto, I have a feeling we're not in Kansas any more!",
  46.         "The future isn't what it used to be",
  47.         "Those who in quarrels interpose must often wipe a bloody nose",
  48.         "Sturgeon's Law: Ninety percent of everything is crud",
  49.         "The end justifys the means",
  50.         "The important thing is not to stop questioning",
  51.         "Save yourself!!! - Reboot in 5 seconds",
  52.         "QUACK!!!",
  53.         "Someone is unenthusiastic about your work",
  54.         "Passwords are implemented as a result of insecurity",
  55.         "Never insult an alligator until you have crossed the river",
  56.         "Like winter snow on summer lawn, time past is time gone",
  57.         "It's a poor workman who blames his tools",
  58.         "Liar: one who tells an unpleasant truth",
  59.         "It's easier to write a bad program than to understand a good one",
  60.         "It's easier to write a good program than to understand a bad one",
  61.         "It is a poor judge who cannot award a prize",
  62.         "If you want a fortune, go to a chinese restaurant",
  63.         "Modesty is a vastly overrated virtue",
  64.         "Mistakes are oft the stepping stones to failure",
  65.         "Many are cold, but few are frozen",
  66.         "It is a wise bird who builds his nest in a tree",
  67.         "Logic is like a little bird, sitting in a tree, that smells AWFUL",
  68.         "Ignorance is when you don't know anything, and someone finds out",
  69.         "If at first you don't succeed, try again, then quit - no sense being a fool",
  70.         "Hell is empty and all the devils are here",
  71.         "Is there a pilot on board?",
  72.         "She walks as if balancing the family tree on her nose",
  73.         "God does not play dice",
  74.         "Every purchase has its price",
  75.         "He who speak with forked tongue, not need chopsticks",
  76.         "A plucked goose won't lay golden eggs",
  77.         "There is no heavier burden than a great potential",
  78.         "Satire does not look pretty upon a tombstone",
  79.         "Some programming languages manage to absorb change, but withstand progress",
  80.         "Paranoia doesn't mean the whole world really isn't out to get you",
  81.         "No civilized person ever goes to bed the same day he gets up",
  82.         "Marriage: A three ring circus - Engagement ring, Wedding ring, Suffering",
  83.         "Make sure your comments and code agree",
  84.         "It's better to burn out that to rust out",
  85.         "Laugh, and the world ignores you. Crying doesn't help either",
  86.         "It's better to burn out than to fade away",
  87.         "God is not dead; He's only swapped out",
  88.         "General notions are generally wrong",
  89.         "Good intentions are far more difficult to deal with than malicious behavior",
  90.         "Facts do not cease to exist because they are ignored",
  91.         "Don't look now, but the man in the moon is laughing at you",
  92.         "Anything worth doing is worth asking someone else to do",
  93.         "A truly wise man never plays leapfrog with a Unicorn",
  94.         "A bird in the bush can't make a mess in your hand",
  95.         "To iterate is human, to recurse, divine",
  96.         "Those who can, do. Those who can't, simulate",
  97.         "Some men are discovered, others are found out",
  98.         "Only those who attempt the absurd achieve the impossible",
  99.         "Mind your own business Spock, I'm sick of your half-breed interference",
  100.         "Of all forms of caution, caution in love is the most fatal",
  101.         "Live a clean happy life, and you will soon die of boredom",
  102.         "It's easier to fight for one's principles than to live up to them",
  103.         "Every creature has within itself a weird uncontrollable urge to punt",
  104.         "Don't force it, use a bigger hammer",
  105.         "There is so much to say, but your eyes keep interrupting me",
  106.         "He who makes no mistakes usually makes nothing",
  107.         "Tact is the art of making a point without making an enemy",
  108.         "There are more old drunkards than old doctors",
  109.         "Last guys don't finish nice",
  110.         "I must have slipped a disk, my pack hurts",
  111.         "If it doesn't feel good, don't do it",
  112.         "God must love the common man, he made so many of them",
  113.         "I am not arguing with you -- Im telling you",
  114.         "Today is the first day of the rest of your life",
  115.         "Today is the last day of your life so far",
  116.         "Now and then an innocent man is sent to the legislature",
  117.         "Let not the sands of time get in your lunch",
  118.         "Never settle with words what you can accomplish with a flame thrower",
  119.         "Many pages make a thick book",
  120.         "Its a good thing we don't get all the government we pay for",
  121.         "Every silver lining has a cloud inside it",
  122.         "Due to lack of interest, today has been canceled",
  123.         "Even the smallest candle burnes brighter in the dark",
  124.         "If you keep burning the candle at both ends, you will soon run out of wax",
  125.         "Don't take life too seriously, you will never get out of it alive",
  126.         "LISP: To call a spade a thpade.",
  127.         "Life as we know it dosn't exist",
  128.         "Haste make waste - So do printers",
  129.         "Drawing on my fine command of language, I said nothing",
  130.         "Better to light one candle than to curse the darkness",
  131.         "Avoid temporary variables",
  132.         "A hen is only an egg's way of making another egg",
  133.         "Lack of leadership is no substitute for inaction",
  134.         "A journey of a thousand miles begins with a cash advance",
  135.         "Time for lunch!",
  136.         "To laugh at men of sense is the privilege of fools",
  137.         "The best prophet of the future is the past",
  138.         "That must be wonderful, I don't understand it at all",
  139.         "Out of sight is out of mind",
  140.         "Nothing dispells enthusiam like a small admission fee",
  141.         "Integrity has no need for rules",
  142.         "Let a fool hold his tongue and he will pass for a sage",
  143.         "Tis better to die on your feet than live on your knees",
  144.         "Everything should be made as simple as possible, but not simpler",
  145.         "All great ideas are controversial, or have been at one time",
  146.         "Blessed are they who run around in circles, for they shall be known as wheels",
  147.         "Words must be weighed, not counted",
  148.         "What sin has not been committed in the name of efficiency",    
  149.         "Without adventure, civilization is in full decay",
  150.         "If Noah had been truly wise... He'd have swatted those two little flys",
  151.         "Avoid the fortran arithmetic IF",
  152.         "A fanatic is one who can't change his mind, and won't change the subject",
  153.         "Bad command or file name",
  154.         "A bird in the hand is worth two in the bush",
  155.         "10.0 times 0.1 is hardly ever 1.0",
  156.         "Watch out for off-by-one errors",
  157.         "Writing free verse is like playing tennis with the net down",
  158.         "Time is but the stream I go a-fishing in",
  159.         "The program is absolutely right; therefore the computer is wrong",
  160.         "No one can feel as helpless as the owner of a sick goldfish",
  161.         "Observation, not old age, brings wisdom",
  162.         "Old MacDonald had an agricultural real estate tax abatement ",
  163.         "Nature teaches beasts to know their friends",
  164.         "Many receive advice, few profit from it",
  165.         "It is easier to change the specification to fit the program than vice versa",
  166.         "If you pick up a starving dog and make him prosperous, he will not bite you.\nThis is the principal difference between a dog and a man",
  167.         "I hate quotations.  -- Ralph Waldo Emerson",
  168.         "God may be subtle, but he isn't plain mean",
  169.         "Discretion is the better part of valor",
  170.         "Anybody can win - If there is no second entry",
  171.         "An optimist belives this to be the best of all possible worlds.\nA pessimist fears this to be true",
  172.         "Better living a beggar than buried a king",
  173.         "Alimony and bribes will engage a large share of your wealth",
  174.         "About the only thing on a farm that has an easy time is the dog",
  175.         "A straw vote only shows which way the hot air blows",
  176.         "Login:",
  177.         "You cannot kill time without injuring eternity",
  178.         "You have mail",
  179.         "We learn from history that we do not learn anything from history",
  180.         "Time flies when you don't know what you're doing",
  181.         "Quit work and play for once",
  182.         "The attacker must vanquish; the defender need only survive",
  183.         "People will buy anything thats one to a customer",
  184.         "Make it right before you make it faster",
  185.         "Most people eat as if they were fattening themselves for market",
  186.         "Man's horizons are bounded by his vision",
  187.         "Do not adjust your set",
  188.         "It seems to make an auto driver mad if he misses you",
  189.         "Good intentions randomize behaviour",
  190.         "Where theres a will... There are greedy relatives",
  191.         "People who live in glass houses.. Don't take baths",
  192.         "You can't turn back the clock... But you can wind it up again",
  193.         "Macho does not prove mucho",
  194.         "The cure for boredom is curiosity. There is no cure for curiosity",
  195.         "Nothing confirms suspicion more quickly than an official denial",
  196.         "The mills of the gods grind slowly, but they grind exceedingly fine",
  197.         "What a strange game... It seems the only winning move is not to play!",
  198.         "Any sufficiently advanced technology is indistinguishable from magic",
  199.         "Pandora's rule: Never open a box you didn't close"
  200.         } ;
  201.  
  202. main()
  203. {
  204.     unsigned hour, minite, second;
  205.     register char *ptr;
  206.  
  207.     get_time(&hour, &minite, &second);
  208.     ptr = msgs[((minite*60)+second) % NUM_MSGS];
  209.  
  210.     while(*ptr)
  211.         putc(*ptr++, stdout);
  212.  
  213.     if('@' < *(ptr-1))
  214.         putc('.', stdout);
  215.  
  216.     putc('\n',stdout);
  217. }
  218.