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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user