aboutsummaryrefslogtreecommitdiff
path: root/bpeg.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-28 22:22:05 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-28 22:22:05 -0700
commitf2f10586bb446cf3c6a3d7cc0965005e94dfcc81 (patch)
tree6ce6d6647fc3c1d24ffe4c0825bef4460eaa574d /bpeg.c
parentf7430e443a8882021d619ecf51f95ee682e5d27d (diff)
Bugfixes
Diffstat (limited to 'bpeg.c')
-rw-r--r--bpeg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bpeg.c b/bpeg.c
index 651577e..e1b603f 100644
--- a/bpeg.c
+++ b/bpeg.c
@@ -180,10 +180,11 @@ int main(int argc, char *argv[])
}
if (isatty(STDOUT_FILENO)) {
- file_t *is_tty_file = spoof_file("<is-tty>", flag);
- vm_op_t *p = bpeg_pattern(is_tty_file, "''");
+ char *epsilon = "''";
+ file_t *is_tty_file = spoof_file("<is-tty>", epsilon);
+ vm_op_t *p = bpeg_pattern(is_tty_file, epsilon);
check(p, "Failed to compile is-tty");
- add_def(g, is_tty_file, "''", "is-tty", p);
+ add_def(g, is_tty_file, epsilon, "is-tty", p);
}
vm_op_t *pattern = lookup(g, rule);