Subject: Re: advcom submission
From: Marc Russell Pawliger <[email-masked]>
To: Bill Randle <[email-masked]>
Date: 22 Sep 1987 09:35 EDT

OK, some of our enhancements haven't really been acid tested, so I'll
send you the tame one that is nice, but not wizzo fantastic.  It adds a
new class called smarticles, for smart articles, that makes `a` and
`an` work correctly for nouns.  Not great, but it did get us into the
code for a start.

*** /cmu/misc/cl0x/src/test/advexe.c	Tue Sep 22 09:26:26 1987
--- /cmu/misc/cl0x/src/advsys/advexe.c	Tue Jul 28 13:32:00 1987
***************
*** 253,258 ****
--- 253,263 ----
  		setrand(time(0L));
  		*sp = NIL;
  		break;
+ 
+     case OP_VOWEL:
+ 		*sp = vowel(*sp);
+ 		break;
+ 
      default:
  	    if (opcode >= OP_XVAR && opcode < OP_XSET)
  		*sp = getvalue(opcode - OP_XVAR);
***************
*** 293,298 ****
--- 298,320 ----
      msg_open(msg);
      while (ch = msg_byte())
  	trm_chr(ch);
+ }
+ 
+ /* vowel - check for vowel */
+ vowel(msg)
+   int msg;
+ {
+     int ch,r;
+ 
+     msg_open(msg);
+     ch = msg_byte();
+     if (ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
+ 	r = T;
+     else
+ 	r = NIL;
+     while (ch)
+ 	ch = msg_byte();
+     return (r);
  }
  
  /* pnumber - print a number */
diff -c /cmu/misc/cl0x/src/test/advexp.c /cmu/misc/cl0x/src/advsys/advexp.c
*** /cmu/misc/cl0x/src/test/advexp.c	Tue Sep 22 09:25:53 1987
--- /cmu/misc/cl0x/src/advsys/advexp.c	Tue Jul 28 13:32:06 1987
***************
*** 54,59 ****
--- 54,60 ----
  	"yes-or-no",	OP_YORN,	0,
  	"rand",		OP_RAND,	1,
  	"randomize",	OP_RNDMIZE,	0,
+ 	"vowel",	OP_VOWEL,	1,
  	0
  };
  static struct { char *ft_name; int (*ft_fcn)(); } *fptr,ftab[] = {