mirror of
https://github.com/biergaizi/codecrypt
synced 2024-06-25 16:28:15 +00:00
support redirecting to -
just noticed that possibility in the docs...
This commit is contained in:
parent
b3f8f32cb1
commit
abf0ea26b0
@ -315,6 +315,12 @@ int main (int argc, char**argv)
|
||||
|
||||
int exitval = 0;
|
||||
|
||||
//handle the defaults
|
||||
if (input == "-") input = "/dev/stdin";
|
||||
if (output == "-") output = "/dev/stdout";
|
||||
if (err_output == "-") err_output = "/dev/stderr";
|
||||
|
||||
//do the redirections
|
||||
if (input.length() && !redirect_cin (input)) {
|
||||
progerr ("could not open input file");
|
||||
exitval = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user