home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
games
/
volume2
/
advsys
/
part03
/
newadv.pch
< prev
next >
Wrap
Internet Message Format
|
1987-10-23
|
2KB
Date: 22 Sep 1987 09:35 EDT
From: Marc Russell Pawliger <mp1w+@andrew.cmu.edu>
To: Bill Randle <billr%tekred.tek.com@relay.cs.net>
Subject: Re: advcom submission
In-Reply-To: <8709211623.AA29413@tekred.TEK.COM>
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[] = {