version 1.1, 2002/03/01 22:01:11 |
version 1.2, 2002/03/02 16:20:33 |
|
|
int VCe(char *, char *, char *, int); |
int VCe(char *, char *, char *, int); |
char *lookuppref(char **, char *); |
char *lookuppref(char **, char *); |
char *skipv(char *); |
char *skipv(char *); |
|
char *estrdup(const char *); |
void ise(void); |
void ise(void); |
void print_word(FILE *); |
void print_word(FILE *); |
void ztos(char *); |
void ztos(char *); |
|
|
int look(unsigned char *, unsigned char *, unsigned char *); |
int look(unsigned char *, unsigned char *, unsigned char *); |
|
|
struct suftab { |
struct suftab { |
char *suf; /* XXX - needs to be writable for ise() */ |
char *suf; |
int (*p1)(); /* XXX - variable args */ |
int (*p1)(); /* XXX - variable args */ |
int n1; |
int n1; |
char *d1; |
char *d1; |
|
|
else if ((found = fopen(outfile, "w")) == NULL) |
else if ((found = fopen(outfile, "w")) == NULL) |
err(1, "cannot open %s", outfile); |
err(1, "cannot open %s", outfile); |
|
|
/* XXX - this fprintf is for loop abuse */ |
|
for (;; print_word(file)) { |
for (;; print_word(file)) { |
affix[0] = '\0'; |
affix[0] = '\0'; |
file = found; |
file = found; |
|
|
void |
void |
ise(void) |
ise(void) |
{ |
{ |
struct suftab *p; |
struct suftab *tab; |
|
|
for (p = suftab; p->suf; p++) { |
for (tab = suftab; tab->suf; tab++) { |
ztos(p->suf); |
/* Assume that suffix will contain 'z' if a1 or d1 do */ |
ztos(p->d1); |
if (strchr(tab->suf, 'z')) { |
ztos(p->a1); |
tab->suf = estrdup(tab->suf); |
|
ztos(tab->suf); |
|
if (strchr(tab->d1, 'z')) { |
|
tab->d1 = estrdup(tab->d1); |
|
ztos(tab->d1); |
|
} |
|
if (strchr(tab->a1, 'z')) { |
|
tab->a1 = estrdup(tab->a1); |
|
ztos(tab->a1); |
|
} |
|
} |
} |
} |
} |
} |
|
|
|
|
for (; *s; s++) |
for (; *s; s++) |
if (*s == 'z') |
if (*s == 'z') |
*s = 's'; |
*s = 's'; |
|
} |
|
|
|
char * |
|
estrdup(const char *s) |
|
{ |
|
char *d; |
|
|
|
if ((d = strdup(s)) == NULL) |
|
err(1, "strdup"); |
|
return(d); |
} |
} |
|
|
/* |
/* |