aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dict
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-26 01:59:35 +0000
committerrsc <devnull@localhost>2004-03-26 01:59:35 +0000
commitbe22ae2d0729f68672e3202c91cfe13c9e74cccc (patch)
treeb7bc9f9c1e8d3b221adc82f055f8be19ef25d0e6 /src/cmd/dict
parent4e3a2cc1f96f4479f951958f9ca1860f57a0771b (diff)
downloadplan9port-be22ae2d0729f68672e3202c91cfe13c9e74cccc.tar.gz
plan9port-be22ae2d0729f68672e3202c91cfe13c9e74cccc.tar.bz2
plan9port-be22ae2d0729f68672e3202c91cfe13c9e74cccc.zip
SunOS can rot in hell.
Diffstat (limited to 'src/cmd/dict')
-rw-r--r--src/cmd/dict/ahd.c23
-rw-r--r--src/cmd/dict/movie.c2
-rw-r--r--src/cmd/dict/oed.c4
3 files changed, 17 insertions, 12 deletions
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(". ");