From be22ae2d0729f68672e3202c91cfe13c9e74cccc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 26 Mar 2004 01:59:35 +0000 Subject: SunOS can rot in hell. --- src/cmd/dict/ahd.c | 23 ++++++++++++++--------- src/cmd/dict/movie.c | 2 +- src/cmd/dict/oed.c | 4 ++-- 3 files changed, 17 insertions(+), 12 deletions(-) (limited to 'src/cmd/dict') diff --git a/src/cmd/dict/ahd.c b/src/cmd/dict/ahd.c index 18a56d00..7f18ad92 100644 --- a/src/cmd/dict/ahd.c +++ b/src/cmd/dict/ahd.c @@ -7,15 +7,19 @@ * American Heritage Dictionary (encrypted) */ -static Rune intab[256] = { - [0x82] 0xe9, - [0x85] 0xe0, - [0x89] 0xeb, - [0x8a] 0xe8, - [0xa4] 0xf1, - [0xf8] 0xb0, - [0xf9] 0xb7, -}; +static Rune intab[256]; + +static void +initintab(void) +{ + intab[0x82] = 0xe9; + intab[0x85] = 0xe0; + intab[0x89] = 0xeb; + intab[0x8a] = 0xe8; + intab[0xa4] = 0xf1; + intab[0xf8] = 0xb0; + intab[0xf9] = 0xb7; +} static char tag[64]; @@ -33,6 +37,7 @@ ahdprintentry(Entry e, int cmd) int c, state = Run; if(!inited){ + initintab(); for(c=0; c<256; c++) if(intab[c] == 0) intab[c] = c; diff --git a/src/cmd/dict/movie.c b/src/cmd/dict/movie.c index b191e140..7e42b93d 100644 --- a/src/cmd/dict/movie.c +++ b/src/cmd/dict/movie.c @@ -67,7 +67,7 @@ inittagtab(void) tagtab[TI]= "TI"; tagtab[TX]= "TX"; tagtab[VD]= "VD"; -}; +} static char *mget(int, char *, char *, char **); #if 0 diff --git a/src/cmd/dict/oed.c b/src/cmd/dict/oed.c index 868eb486..1e1c0c5c 100644 --- a/src/cmd/dict/oed.c +++ b/src/cmd/dict/oed.c @@ -992,7 +992,7 @@ static int naux; static char auxname[Maxaux][Buflen]; static char auxval[Maxaux][Buflen]; static char spec[Buflen]; -static uchar *auxstate[Naux]; /* vals for most recent tag */ +static char *auxstate[Naux]; /* vals for most recent tag */ static Entry curentry; #define cursize (curentry.end-curentry.start) @@ -1154,7 +1154,7 @@ oedprintentry(Entry e, int cmd) outchars(auxstate[Num]); outchars(") "); } else if(t == Sgk) { - i = grtab[auxstate[Num][0]]; + i = grtab[(uchar)auxstate[Num][0]]; if(i != NONE) outrune(i); outchars(". "); -- cgit v1.2.3