diff options
author | Ori Bernstein <ori@eigenstate.org> | 2021-06-22 23:40:11 +0000 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2021-06-22 23:40:11 +0000 |
commit | 577033228209f28350dc3f75ef9d4ce88dfdf190 (patch) | |
tree | 7540037c6ffd83810da4209abbdd6879a484e075 /sys/src/cmd/rc/exec.h | |
parent | ce73821f3575921e24f839b21c7be60520a9dc42 (diff) |
rc: correct line numbers
When loading a file using ".", we could
end up with our line numbers thrown off
due to the mutation of lexline. Putting
lexline into the runq beside the file
that we're reading from causes it to get
pushed and popped correctly, so that we
no longer lose track of our location.
Diffstat (limited to 'sys/src/cmd/rc/exec.h')
-rw-r--r-- | sys/src/cmd/rc/exec.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/rc/exec.h b/sys/src/cmd/rc/exec.h index 7975596bd..1d07b58d5 100644 --- a/sys/src/cmd/rc/exec.h +++ b/sys/src/cmd/rc/exec.h @@ -49,6 +49,7 @@ struct thread{ var *local; /* list of local variables */ char *cmdfile; /* file name in Xrdcmd */ io *cmdfd; /* file descriptor for Xrdcmd */ + int lexline; /* file descriptor line */ int iflast; /* static `if not' checking */ int eof; /* is cmdfd at eof? */ int iflag; /* interactive? */ |