From cdd07058705eaef11fcfe4a8fe75e32da6aa5b24 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 20 Jun 2017 16:25:18 +0200 Subject: lr: support @file to read file names from file --- lr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lr.c') diff --git a/lr.c b/lr.c index 29463a4..bf7590d 100644 --- a/lr.c +++ b/lr.c @@ -1868,6 +1868,15 @@ traverse(const char *path) if (path[0] == '-' && !path[1]) return traverse_file(stdin); + if (path[0] == '@') { + FILE *f = fopen(path + 1, "r"); + if (!f) + parse_error("can't open input file '%s'", path + 1); + int r = traverse_file(f); + fclose(f); + return r; + } + prefixl = strlen(path); while (path[prefixl-1] == '/') prefixl--; -- cgit 1.4.1