1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
|
#include <config.h>
#include "proto.h"
#include <stdio.h>
#include <ctype.h>
#include <useconfig.h>
#include "dict.h"
#include "phones.h"
#include "getargs.h"
static void show PROTO((char *s));
static void
show(s)
char *s;
{
unsigned char *p = dict_find(s, strlen(s));
printf("%s", s);
if (p)
{
int l = strlen((char *)p);
int i;
for (i = 0; i < l; i++)
printf(" %s", ph_name[(unsigned) (p[i])]);
printf(" [");
for (i = 0; i < l; i++)
printf("%s", dialect[(unsigned) (p[i])]);
printf("]\n");
free(p);
}
else
printf(" ???\n");
}
int main PROTO((int argc, char *argv[], char *env[]));
int
main(argc, argv, envp)
int argc;
char *argv[];
char *envp[];
{
argc = dict_init(argc, argv);
if (help_only)
{
fprintf(stderr,"Usage: %s [options as above] words to lookup\n",argv[0]);
}
else
{
if (dict)
{
int i;
for (i=1; i < argc; i++)
{
show(argv[i]);
}
dict_term();
}
}
return 0;
}
|