projects
/
u
/
mdw
/
catacomb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd6eca4
)
dsig.c: Accept `-' to mean stdin/stdout in arguments to `-f' and `-o'.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 22 Jan 2012 13:12:14 +0000
(13:12 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 22 Jan 2012 13:12:14 +0000
(13:12 +0000)
dsig.c
patch
|
blob
|
blame
|
history
diff --git
a/dsig.c
b/dsig.c
index
d09b675
..
9468054
100644
(file)
--- a/
dsig.c
+++ b/
dsig.c
@@
-768,14
+768,14
@@
static int sign(int argc, char *argv[])
/* --- Open files --- */
- if (!ifile)
+ if (!ifile
|| strcmp(ifile, "-") == 0
)
ifp = stdin;
else if ((ifp = fopen(ifile, (f & f_raw) ? "rb" : "r")) == 0) {
die(EXIT_FAILURE, "couldn't open input file `%s': %s",
ifile, strerror(errno));
}
- if (!ofile)
+ if (!ofile
|| strcmp(ofile, "-") == 0
)
ofp = stdout;
else if ((ofp = fopen(ofile, (f & f_bin) ? "wb" : "w")) == 0) {
die(EXIT_FAILURE, "couldn't open output file `%s': %s",