aboutsummaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorBert Münnich <be.muennich@gmail.com>2013-03-19 21:11:29 +0100
committerBert Münnich <be.muennich@gmail.com>2013-03-19 21:14:58 +0100
commit6f05e777280cd36a8ccaf20182c4e8a0554bb563 (patch)
tree07029d49c352d9a2fd26ff810a551ebfae9afe23 /commands.c
parent447bc1c784cc358078f4ffbbac0c63ee74a069c8 (diff)
downloadnsxiv-6f05e777280cd36a8ccaf20182c4e8a0554bb563.tar.zst
New options: -[io], read/write files from/to stdin/out
Fixes issue #84
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/commands.c b/commands.c
index 3e108a4..0ab1944 100644
--- a/commands.c
+++ b/commands.c
@@ -26,6 +26,7 @@
#include "commands.h"
#include "image.h"
+#include "options.h"
#include "thumbs.h"
#include "util.h"
#include "config.h"
@@ -57,6 +58,12 @@ const int ss_delays[] = {
bool it_quit(arg_t a)
{
+ unsigned int i;
+
+ if (options->to_stdout) {
+ for (i = 0; i < filecnt; i++)
+ printf("%s\n", files[i].name);
+ }
cleanup();
exit(EXIT_SUCCESS);
}