summaryrefslogtreecommitdiffstats
path: root/src/depfile_parser.cc
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2011-12-29 20:48:25 (GMT)
committerEvan Martin <martine@danga.com>2011-12-29 20:48:25 (GMT)
commitad7d9f43f1bd8e04321d8fdb07ebf7b96ab525a1 (patch)
tree35bfce6a5a437fc08ec322ea056790f1fefcdc35 /src/depfile_parser.cc
parent47ba90bd530cfd269f40e61e5d41e87298812ddb (diff)
downloadNinja-ad7d9f43f1bd8e04321d8fdb07ebf7b96ab525a1.zip
Ninja-ad7d9f43f1bd8e04321d8fdb07ebf7b96ab525a1.tar.gz
Ninja-ad7d9f43f1bd8e04321d8fdb07ebf7b96ab525a1.tar.bz2
minor re2c cleanups
Diffstat (limited to 'src/depfile_parser.cc')
-rw-r--r--src/depfile_parser.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/depfile_parser.cc b/src/depfile_parser.cc
index 4e842f8..8f8f9fe 100644
--- a/src/depfile_parser.cc
+++ b/src/depfile_parser.cc
@@ -43,9 +43,9 @@ bool DepfileParser::Parse(string* content, string* err) {
for (;;) {
// start: beginning of the current parsed span.
const char* start = in;
- char yych;
{
+ char yych;
static const unsigned char yybm[] = {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
@@ -136,8 +136,9 @@ yy4:
goto yy10;
yy5:
{
- // Got a span of plain text. Copy it to out if necessary.
+ // Got a span of plain text.
int len = in - start;
+ // Need to shift it over if we're overwriting backslashes.
if (out < start)
memmove(out, start, len);
out += len;