home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume41 / ungeek / patch02 / ungeek.patches < prev   
Encoding:
Text File  |  1994-03-24  |  8.4 KB  |  393 lines

  1. cd /home/rlm/src/ungeek/
  2. diff -c /home/rlm/src/ungeek/ungeek1.1 /home/rlm/src/ungeek/ungeek
  3. *** /home/rlm/src/ungeek/ungeek1.1    Tue Feb  1 05:55:15 1994
  4. --- /home/rlm/src/ungeek/ungeek    Tue Feb  1 05:55:02 1994
  5. ***************
  6. *** 7,13 ****
  7.   # Send comments, corrections, and bugs to <rlm@helen.surfcty.com> or
  8.   # <rlm@netcom.com>.
  9.   #
  10. ! # This is version 1 of ungeek for v1.0.1 of the Geek code.
  11.   #
  12.   #
  13.   # Abstract:
  14. --- 7,13 ----
  15.   # Send comments, corrections, and bugs to <rlm@helen.surfcty.com> or
  16.   # <rlm@netcom.com>.
  17.   #
  18. ! # This is $Revision: 1.2 $ of ungeek for v1.0.1 of the Geek code.
  19.   #
  20.   #
  21.   # Abstract:
  22. ***************
  23. *** 66,72 ****
  24. --- 66,83 ----
  25.   # tastes.
  26.   # 
  27.   #
  28. + # Revisions:
  29.   #
  30. + # $Log: ungeek,v $
  31. + # Revision 1.2  1994/02/01  13:55:02  rlm
  32. + # Make slash forms with null right hand sides pass valid_code.  Minor
  33. + # fixes.  Support null geek code ranges (forms like !d(), for instance).
  34. + # Fix a bug in the dress attribute that confused dress_strength into
  35. + # thinking that -d+ was really d+++... off to infinity.  Add RCS
  36. + # headers.
  37. + #
  38. + #
  39. + #
  40.   # Copyright notice:
  41.   #
  42.   # The Geek Code is copyright 1993 by Robert A. Hayden.  All rights reserved. 
  43. ***************
  44. *** 81,90 ****
  45.   sub computer_strength
  46.   {
  47.       $_=$_[0];
  48. !     if($_ eq "no modifier")
  49.       {
  50.       print "
  51. !     Computers are a tool, nothing more.  I use it when it serves
  52.       my purpose.\n";
  53.       }
  54.       elsif ($_ eq "+")
  55. --- 92,101 ----
  56.   sub computer_strength
  57.   {
  58.       $_=$_[0];
  59. !     if($_ eq "")
  60.       {
  61.       print "
  62. !     Computers are a tool, nothing more.  I use one when it serves
  63.       my purpose.\n";
  64.       }
  65.       elsif ($_ eq "+")
  66. ***************
  67. *** 159,164 ****
  68. --- 170,192 ----
  69.       print "
  70.       I dress a lot like those in WalMart ads.\n";
  71.       }
  72. +     elsif ($_ eq "d?")
  73. +     {
  74. +     print "
  75. +     I have no idea what I am wearing right now, let alone
  76. +     what I wore yesterday.\n";
  77. +     }
  78. +     elsif ($_ eq "!d")
  79. +     {
  80. +     print "
  81. +     No clothing.  Quite a fashion statement, don't you think?\n";
  82. +     }
  83. +     elsif ($_ eq "-d+")
  84. +     {
  85. +     print "
  86. +     I wear the same clothes all the time, no matter the
  87. +     occasion, often forgetting to do laundry between wearings.\n";
  88. +     }
  89.       elsif ($_ eq "+")
  90.       {
  91.       print "
  92. ***************
  93. *** 201,223 ****
  94.       the last time I washed them.  Fortunately, all the management here
  95.       smokes, and they can't find what they can't smell.\n";
  96.       }
  97. -     elsif ($_ eq "d?")
  98. -     {
  99. -     print "
  100. -     I have no idea what I am wearing right now, let alone
  101. -     what I wore yesterday.\n";
  102. -     }
  103. -     elsif ($_ eq "!d")
  104. -     {
  105. -     print "
  106. -     No clothing.  Quite a fashion statement, don't you think?\n";
  107. -     }
  108. -     elsif ($_ eq "-d+")
  109. -     {
  110. -     print "
  111. -     I wear the same clothes all the time, no matter the
  112. -     occasion, often forgetting to do laundry between wearings.\n";
  113. -     }
  114.       else
  115.       {
  116.       print "
  117. --- 229,234 ----
  118. ***************
  119. *** 347,353 ****
  120.       print "
  121.         I *think* I have friends.\n";
  122.       }
  123. !     elsif ($_ eq "f*")
  124.       {
  125.       print "
  126.        Everyone is my friend.\n";
  127. --- 358,364 ----
  128.       print "
  129.         I *think* I have friends.\n";
  130.       }
  131. !     elsif ($_ eq "*")
  132.       {
  133.       print "
  134.        Everyone is my friend.\n";
  135. ***************
  136. *** 599,605 ****
  137.       {
  138.       print "
  139.        I eat only the cheap things - even with artificial meat and
  140. !     vegetables.";
  141.       }
  142.       elsif ($_ eq "---")
  143.       {
  144. --- 610,616 ----
  145.       {
  146.       print "
  147.        I eat only the cheap things - even with artificial meat and
  148. !     vegetables.\n";
  149.       }
  150.       elsif ($_ eq "---")
  151.       {
  152. ***************
  153. *** 615,621 ****
  154.   sub nutrition_parse
  155.   {
  156.       $_ = $_[0];
  157. !     if (/n(\++|-+|\*|)/o)    { &nutrition_strength($1);}
  158.       elsif (/!n/)        { &nutrition_strength("!n");}
  159.       else            { &nutrition_strength("huh?");}
  160.   }
  161. --- 626,632 ----
  162.   sub nutrition_parse
  163.   {
  164.       $_ = $_[0];
  165. !     if (/n(\++|-+|\*)/o)    { &nutrition_strength($1);}
  166.       elsif (/!n/)        { &nutrition_strength("!n");}
  167.       else            { &nutrition_strength("huh?");}
  168.   }
  169. ***************
  170. *** 703,709 ****
  171.       elsif ($_ eq "+++")
  172.       {
  173.       print "
  174. !     I worship E. Gary Gygax.\n";
  175.       }
  176.       elsif ($_ eq "-")
  177.       {
  178. --- 714,720 ----
  179.       elsif ($_ eq "+++")
  180.       {
  181.       print "
  182. !     I worship E. Gary Gygax.\n";
  183.       }
  184.       elsif ($_ eq "-")
  185.       {
  186. ***************
  187. *** 731,737 ****
  188.   sub height_strength
  189.   {
  190.       $_ = $_[0];
  191. !     if ($_ eq "+")
  192.       {
  193.       print "
  194.       I'm a little taller than most.\n";
  195. --- 742,753 ----
  196.   sub height_strength
  197.   {
  198.       $_ = $_[0];
  199. !     if ($_ eq "")
  200. !     {
  201. !     print "
  202. !     I'm a geek of about average height.\n";
  203. !     }
  204. !     elsif ($_ eq "+")
  205.       {
  206.       print "
  207.       I'm a little taller than most.\n";
  208. ***************
  209. *** 772,778 ****
  210.   sub width_strength
  211.   {
  212.       $_ = $_[0];
  213. !     if ($_ eq "+")
  214.       {
  215.       print "
  216.       I'm a little rounder than most.\n";
  217. --- 788,799 ----
  218.   sub width_strength
  219.   {
  220.       $_ = $_[0];
  221. !     if ($_ eq "")
  222. !     {
  223. !     print "
  224. !     I'm a geek of average weight.\n";
  225. !     }
  226. !     elsif ($_ eq "+")
  227.       {
  228.       print "
  229.       I'm a little rounder than most.\n";
  230. ***************
  231. *** 813,829 ****
  232.   {
  233.       $_ = $_[0];
  234.       s/s//;
  235. !     if ($_ eq "")
  236. !     {
  237. !     print "
  238. !     I'm an average geek.\n";
  239. !     }
  240. !     else
  241. !     {
  242. !     @s=split(/\//o);
  243. !     &height_strength($s[0]);
  244. !     &width_strength($s[1]);
  245. !     }
  246.   }
  247.   
  248.   sub star_trek_strength
  249. --- 834,842 ----
  250.   {
  251.       $_ = $_[0];
  252.       s/s//;
  253. !     @s=split(/\//o);
  254. !     &height_strength($s[0]);
  255. !     &width_strength($s[1]);
  256.   }
  257.   
  258.   sub star_trek_strength
  259. ***************
  260. *** 861,867 ****
  261.       print "
  262.       Maybe it is just me, but I have no idea what the big deal
  263.       with Star Trek is.  Perhaps I'm missing something but I just
  264. !     think it is bad drama.";
  265.       }
  266.       elsif ($_ eq "--")
  267.       {
  268. --- 874,880 ----
  269.       print "
  270.       Maybe it is just me, but I have no idea what the big deal
  271.       with Star Trek is.  Perhaps I'm missing something but I just
  272. !     think it is bad drama.\n";
  273.       }
  274.       elsif ($_ eq "--")
  275.       {
  276. ***************
  277. *** 1113,1122 ****
  278.   sub sex_parse
  279.   {
  280.       $_ = $_[0];
  281. !     if (/[xy](\++|-+|\*+|)/o)    { &sex_strength($1);}
  282. !     elsif (/![xy]/)        { &sex_strength("!x");}
  283. !     elsif (/[xy]?/)        { &sex_strength("x?");}
  284. !     else            { &sex_strength("huh?");}
  285.   }
  286.   
  287.   sub valid_code
  288. --- 1126,1135 ----
  289.   sub sex_parse
  290.   {
  291.       $_ = $_[0];
  292. !     if (/![xy]/)            { &sex_strength("!x");}
  293. !     elsif (/[xy]\?/)            { &sex_strength("x?");}
  294. !     elsif (/^[xy](\++|-+|\*+)/o)    { &sex_strength($1);}
  295. !     else                { &sex_strength("huh?");}
  296.   }
  297.   
  298.   sub valid_code
  299. ***************
  300. *** 1151,1158 ****
  301.           #
  302.           # still have leftovers, so try to eat right hand forms
  303.           #
  304. !         s/^(\/[-*+]+)+//;
  305. !         s/^\([-*+]+\)//;
  306.           s/^@//;
  307.           #
  308.           # anything left over means invalid form
  309. --- 1164,1171 ----
  310.           #
  311.           # still have leftovers, so try to eat right hand forms
  312.           #
  313. !         s/^(\/[-*+]*)+//;
  314. !         s/^\([-*+]*\)//;
  315.           s/^@//;
  316.           #
  317.           # anything left over means invalid form
  318. ***************
  319. *** 1173,1179 ****
  320.       $_=$_[0];
  321.       if (&valid_code($_))
  322.       {
  323. - #    print "after regexp, \$_ = '$_'\n";
  324.       $original_code=$_;
  325.       if (/c/o)
  326.       {
  327. --- 1186,1191 ----
  328. ***************
  329. *** 1413,1419 ****
  330.           print "\tI range from...\n";
  331.           &shape_parse($_);
  332.           print ("\n\t... to ...\n");
  333. !         &shape_strength($1);
  334.           }
  335.           else
  336.           {
  337. --- 1425,1431 ----
  338.           print "\tI range from...\n";
  339.           &shape_parse($_);
  340.           print ("\n\t... to ...\n");
  341. !         &shape_parse($1);
  342.           }
  343.           else
  344.           {
  345. ***************
  346. *** 1561,1567 ****
  347.               {
  348.                   print " and of ";
  349.               }
  350. !             if ($_ eq "at")    { print "all trades" ;}
  351.               elsif ($_ eq "b")    { print "business"; }
  352.               elsif ($_ eq "cs")    { print "computer science"; }
  353.               elsif ($_ eq "m")    { print "math";}
  354. --- 1573,1579 ----
  355.               {
  356.                   print " and of ";
  357.               }
  358. !             if ($_ eq "at")        { print "all trades" ;}
  359.               elsif ($_ eq "b")    { print "business"; }
  360.               elsif ($_ eq "cs")    { print "computer science"; }
  361.               elsif ($_ eq "m")    { print "math";}
  362. ***************
  363. *** 1571,1577 ****
  364.               elsif ($_ eq "t")    { print "theater";}
  365.               elsif ($_ eq "o")    { print "other";}
  366.               elsif ($_ eq "u")    { print "undecided";}
  367. !             else        { print "unknown";}
  368.               $first = 0;
  369.               }
  370.               print ".\n\n";
  371. --- 1583,1589 ----
  372.               elsif ($_ eq "t")    { print "theater";}
  373.               elsif ($_ eq "o")    { print "other";}
  374.               elsif ($_ eq "u")    { print "undecided";}
  375. !             else            { print "unknown";}
  376.               $first = 0;
  377.               }
  378.               print ".\n\n";
  379. ***************
  380. *** 1602,1604 ****
  381. --- 1614,1621 ----
  382.       }
  383.   }
  384.   
  385. + #
  386. + # local variables:
  387. + # mode: perl
  388. + # end:
  389. + #
  390.  
  391. Diff exited abnormally with code 1 at Tue Feb  1 05:55:45
  392.  
  393.