home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume36
/
formes
/
part02
/
verb.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-01
|
3KB
|
96 lines
/*
* Copyright (C) 1992-1993 Jeffrey Chilton
*
* Permission is granted to anyone to make or distribute copies of
* this program, in any medium, provided that the copyright notice
* and permission notice are preserved, and that the distributor
* grants the recipient permission for further redistribution as
* permitted by this notice.
*
* Author's E-mail address: 172-9221@mcimail.com
*
*/
/* static char *whatstring = "@(#)verb.h 2.6 JWC"; */
#ifndef VERB_H
#define VERB_H
/*
* Verb - A verb
*/
typedef struct Verb Verb;
#include "collect.h"
#include "exstr.h"
#include "form.h"
/* I know, some of these are ``moods'' and not tenses... */
#define TENSE_INFINITIVE 0 /* infinitive [x] */
#define TENSE_PRESENT 1 /* present indicative [x] */
#define TENSE_IMPERFECT 2 /* imperfect indicative [x] */
#define TENSE_PASTSIMP 3 /* simple past [ ] */
#define TENSE_FUTURE 4 /* future [x] */
#define TENSE_CONDITION 5 /* conditional [x] */
#define TENSE_SUBJUNCT 6 /* present subjunctive [x] */
#define TENSE_IMPSUBJ 7 /* imperfect subjunctive [ ] */
#define TENSE_PASTCOMP 8 /* compound past [x] */
#define TENSE_PLUPERFECT 9 /* pluperfect [x] */
#define TENSE_PASTANT 10 /* past anterior [ ] */
#define TENSE_FUTUREANT 11 /* future anterior [ ] */
#define TENSE_CONDPERF 12 /* conditional perfect [ ] */
#define TENSE_PASTSUBJ 13 /* past subjunctive [x] */
#define TENSE_PLUPSUBJ 14 /* pluperfect subjunctive [ ] */
#define TENSE_IMPERATIVE 15 /* imperative [x] */
#define N_OF_TENSES 16
#define AUX_AVOIR 0
#define AUX_ETRE 1
struct Verb
{
int conjugationClass;
int thirdPersonOnly;
int auxiliary;
ExtendString *infinitive;
ExtendString *presIndStem;
ExtendString *presSubjStem;
ExtendString *imperativeStem;
ExtendString *imperfectStem;
ExtendString *futureStem;
ExtendString *presentParticipal;
ExtendString *pastParticipal;
ExtendString *presIndEndings[N_OF_PERSON][N_OF_PLURAL];
ExtendString *imperfectEndings[N_OF_PERSON][N_OF_PLURAL];
ExtendString *presSubjEndings[N_OF_PERSON][N_OF_PLURAL];
ExtendString *imperativeEndings[N_OF_PLURAL + 1];
};
#if __STDC__
extern Verb *Verb_new(char *infinitive);
extern Verb *Verb_newFromFile(char *infinitive, FILE *stream);
extern ExtendString *Verb_conjugate(Verb *self, Form *form, int tense);
extern void Verb_printOn(Verb *self, FILE *stream);
extern void Verb_destroy(Verb *self);
#else
extern Verb *Verb_new();
extern Verb *Verb_newFromFile();
extern ExtendString *Verb_conjugate();
extern void Verb_printOn();
extern void Verb_destroy();
#endif
#define Verb_setConjugationClass(s, n) (s)->conjugationClass = n
#define Verb_getConjugationClass(s) ((s)->conjugationClass)
#define Verb_infinitive(s) ((s)->infinitive)
#endif