aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acid/lex.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-04-20 01:42:20 +0000
committerrsc <devnull@localhost>2004-04-20 01:42:20 +0000
commite637c944febf271252e59742aa108d6e0a527eb7 (patch)
treee4ace5415b3b978ceca3685d2ea3eebe855a9b76 /src/cmd/acid/lex.c
parenta196bf0577767d97165f01186b32b0913430a1fe (diff)
downloadplan9port-e637c944febf271252e59742aa108d6e0a527eb7.tar.gz
plan9port-e637c944febf271252e59742aa108d6e0a527eb7.tar.bz2
plan9port-e637c944febf271252e59742aa108d6e0a527eb7.zip
i hate []
Diffstat (limited to 'src/cmd/acid/lex.c')
-rw-r--r--src/cmd/acid/lex.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/cmd/acid/lex.c b/src/cmd/acid/lex.c
index 40f6400e..db11eb1c 100644
--- a/src/cmd/acid/lex.c
+++ b/src/cmd/acid/lex.c
@@ -37,25 +37,30 @@ keywds[] =
0, 0
};
-char cmap[256] =
+char cmap[256];
+
+void
+initcmap(void)
{
- ['0'] '\0'+1,
- ['n'] '\n'+1,
- ['r'] '\r'+1,
- ['t'] '\t'+1,
- ['b'] '\b'+1,
- ['f'] '\f'+1,
- ['a'] '\a'+1,
- ['v'] '\v'+1,
- ['\\'] '\\'+1,
- ['"'] '"'+1,
+ cmap['0']= '\0'+1;
+ cmap['n']= '\n'+1;
+ cmap['r']= '\r'+1;
+ cmap['t']= '\t'+1;
+ cmap['b']= '\b'+1;
+ cmap['f']= '\f'+1;
+ cmap['a']= '\a'+1;
+ cmap['v']= '\v'+1;
+ cmap['\\']= '\\'+1;
+ cmap['"']= '"'+1;
};
void
kinit(void)
{
int i;
-
+
+ initcmap();
+
for(i = 0; keywds[i].name; i++)
enter(keywds[i].name, keywds[i].terminal);
}