ref: b8000382729ed52aee1a0b083bc670000093afec
parent: 562adf5d3532821830c972d3b3eaaae5b158c716
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 19 17:24:57 EST 2025
rc: count split line numbers correctly When we split a line with \, we would forget to increment the line number. As a result, the line number printed in error messages was incorrect. Fix it.
--- a/sys/src/cmd/rc/lex.c
+++ b/sys/src/cmd/rc/lex.c
@@ -81,6 +81,7 @@
if(c=='\\' && !lex->inquote){
c = rchr(lex->input);
if(c=='\n' && !lex->incomm){ /* don't continue a comment */
+ lex->line++;
doprompt = 1;
c=' ';
}
--
⑨