diff options
author | Mattias Andrée <maandree@kth.se> | 2018-02-19 19:24:37 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2018-02-19 19:24:37 +0100 |
commit | dc0349df102935554f453a5d68a60f27fe38a09b (patch) | |
tree | 2983385577b8d97c0d0969d581907dfa70cdcbd9 /loc.c | |
parent | Add readme and loc.1 (diff) | |
download | loc-dc0349df102935554f453a5d68a60f27fe38a09b.tar.gz loc-dc0349df102935554f453a5d68a60f27fe38a09b.tar.bz2 loc-dc0349df102935554f453a5d68a60f27fe38a09b.tar.xz |
Add tests1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'loc.c')
-rw-r--r-- | loc.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -52,6 +52,7 @@ count(int fd, const char *fname) ret += (ssize_t)!beginning; beginning = 1; escaped = 0; + continue; } else if (escaped) { escaped = 0; } else if (buf[i] == quote) { @@ -59,6 +60,7 @@ count(int fd, const char *fname) } else if (buf[i] == '\\') { escaped = 1; } + beginning = 0; } else if (c_comment) { if (buf[i] == '\n') { ret += (ssize_t)!beginning; |