verb agreement

add and use new APIs, Tobjnam, otense and vtense, is_plural
to determine tense/form of verbs and a few pronouns as well
This commit is contained in:
cohrs
2002-02-09 00:16:35 +00:00
parent 5a8cf1c4c1
commit cf37a7bac0
9 changed files with 121 additions and 138 deletions

View File

@@ -336,39 +336,14 @@ struct entity *etmp;
const char *verb;
{
static char wholebuf[80];
char verbbuf[30];
Strcpy(wholebuf, is_u(etmp) ? "You" : Monnam(etmp->emon));
if (!*verb)
return(wholebuf);
if (!*verb) return(wholebuf);
Strcat(wholebuf, " ");
verbbuf[0] = '\0';
if (is_u(etmp))
Strcpy(verbbuf, verb);
else {
if (!strcmp(verb, "are"))
Strcpy(verbbuf, "is");
if (!strcmp(verb, "have"))
Strcpy(verbbuf, "has");
if (!verbbuf[0]) {
Strcpy(verbbuf, verb);
switch (verbbuf[strlen(verbbuf) - 1]) {
case 'y':
verbbuf[strlen(verbbuf) - 1] = '\0';
Strcat(verbbuf, "ies");
break;
case 'h':
case 'o':
case 's':
Strcat(verbbuf, "es");
break;
default:
Strcat(verbbuf, "s");
break;
}
}
}
Strcat(wholebuf, verbbuf);
Strcat(wholebuf, verb);
else
Strcat(wholebuf, vtense((char *)0, verb));
return(wholebuf);
}