home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / games / volume2 / advsys / part03 / newadv.pch < prev    next >
Internet Message Format  |  1987-10-23  |  2KB

  1. Date: 22 Sep 1987 09:35 EDT
  2. From: Marc Russell Pawliger <mp1w+@andrew.cmu.edu>
  3. To: Bill Randle <billr%tekred.tek.com@relay.cs.net>
  4. Subject: Re: advcom submission
  5. In-Reply-To: <8709211623.AA29413@tekred.TEK.COM>
  6.  
  7. OK, some of our enhancements haven't really been acid tested, so I'll
  8. send you the tame one that is nice, but not wizzo fantastic.  It adds a
  9. new class called smarticles, for smart articles, that makes `a` and
  10. `an` work correctly for nouns.  Not great, but it did get us into the
  11. code for a start.
  12.  
  13. *** /cmu/misc/cl0x/src/test/advexe.c    Tue Sep 22 09:26:26 1987
  14. --- /cmu/misc/cl0x/src/advsys/advexe.c    Tue Jul 28 13:32:00 1987
  15. ***************
  16. *** 253,258 ****
  17. --- 253,263 ----
  18.           setrand(time(0L));
  19.           *sp = NIL;
  20.           break;
  21. +     case OP_VOWEL:
  22. +         *sp = vowel(*sp);
  23. +         break;
  24.       default:
  25.           if (opcode >= OP_XVAR && opcode < OP_XSET)
  26.           *sp = getvalue(opcode - OP_XVAR);
  27. ***************
  28. *** 293,298 ****
  29. --- 298,320 ----
  30.       msg_open(msg);
  31.       while (ch = msg_byte())
  32.       trm_chr(ch);
  33. + }
  34. + /* vowel - check for vowel */
  35. + vowel(msg)
  36. +   int msg;
  37. + {
  38. +     int ch,r;
  39. +     msg_open(msg);
  40. +     ch = msg_byte();
  41. +     if (ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
  42. +     r = T;
  43. +     else
  44. +     r = NIL;
  45. +     while (ch)
  46. +     ch = msg_byte();
  47. +     return (r);
  48.   }
  49.   
  50.   /* pnumber - print a number */
  51. diff -c /cmu/misc/cl0x/src/test/advexp.c /cmu/misc/cl0x/src/advsys/advexp.c
  52. *** /cmu/misc/cl0x/src/test/advexp.c    Tue Sep 22 09:25:53 1987
  53. --- /cmu/misc/cl0x/src/advsys/advexp.c    Tue Jul 28 13:32:06 1987
  54. ***************
  55. *** 54,59 ****
  56. --- 54,60 ----
  57.       "yes-or-no",    OP_YORN,    0,
  58.       "rand",        OP_RAND,    1,
  59.       "randomize",    OP_RNDMIZE,    0,
  60. +     "vowel",    OP_VOWEL,    1,
  61.       0
  62.   };
  63.   static struct { char *ft_name; int (*ft_fcn)(); } *fptr,ftab[] = {
  64.  
  65.  
  66.