summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-08-06 23:31:33 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-08-06 23:31:33 -0700
commitc870cb387621f6f6cf12c312133a18473d5e785f (patch)
tree98f2f4b3df646be3a5e2795eb21fe52dfdad42b9 /lib.h
parent7e1b36e8985f2dd88646049661080eac065d36f9 (diff)
downloadtxr-c870cb387621f6f6cf12c312133a18473d5e785f.tar.gz
txr-c870cb387621f6f6cf12c312133a18473d5e785f.tar.bz2
txr-c870cb387621f6f6cf12c312133a18473d5e785f.zip
scanner: use batch mode; nuke isatty calls.
The flex-generated scanner wastefully calls isatty(0) whenever it is initialized, even though we don't read from a stdio stream. Even (read "abc") will call isatty(0), which is unacceptable. Moreover, this happens even if Flex is told to operate in batch mode rather than interactive. With the following change, the isatty calls are gone. Let's switch Flex to batch mode, too. * parser.l: Remove <unistd.h> inclusion. Define isatty as a macro that returns zero. Add the batch option to the scanner.
Diffstat (limited to 'lib.h')
0 files changed, 0 insertions, 0 deletions