diff options
author | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-02-11 13:05:34 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@rei2.9hal> | 2012-02-11 13:05:34 +0100 |
commit | f51aa49bb0d93e23cd290c8f6335ff0fa6e9ea73 (patch) | |
tree | 721999db7f31442350d2afcebf46f16f9c09520d /sys/src/cmd/acid/lex.c | |
parent | 784d811c3ac3f57cd78acf6757d65f61a0dcfddd (diff) |
acid: fix format string bugs and comment line counting (from eriks patch/acid-nits patch)
Diffstat (limited to 'sys/src/cmd/acid/lex.c')
-rw-r--r-- | sys/src/cmd/acid/lex.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sys/src/cmd/acid/lex.c b/sys/src/cmd/acid/lex.c index ca28548c1..0092978fa 100644 --- a/sys/src/cmd/acid/lex.c +++ b/sys/src/cmd/acid/lex.c @@ -329,6 +329,14 @@ loop: case '\t': goto loop; + case '/': + c = lexc(); + if(c != '/'){ + unlexc(c); + return '/'; + } + eatnl(); + case '\n': line++; if(interactive == 0) @@ -391,15 +399,6 @@ loop: unlexc(c); return '+'; - case '/': - c = lexc(); - if(c == '/') { - eatnl(); - goto loop; - } - unlexc(c); - return '/'; - case '\'': c = lexc(); if(c == '\\') |