tTreat "-" as stdin for infile - scribo - Email-based phlog generator
(HTM) git clone git://git.z3bra.org/scribo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 2bafa2f5b10f99646935f537dddc9e629af89192
(DIR) parent 1000e3db9d904c8eddc576737f82e559d00ae9de
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Tue, 8 Sep 2020 13:39:12 +0200
Treat "-" as stdin for infile
Diffstat:
M scribo.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/scribo.c b/scribo.c
t@@ -187,7 +187,7 @@ main(int argc, char *argv[])
struct headers headers;
infile = NULL;
- outfile = "index.gph";
+ outfile = NULL;
ARGBEGIN {
case 'b':
t@@ -204,7 +204,7 @@ main(int argc, char *argv[])
exit(1);
} ARGEND;
- if (infile)
+ if (infile && strcmp(infile, "-"))
in = fopen(infile, "r");
if (!in) {