From ecc363ec10dec864dd2c956b478549ff235fb3d6 Mon Sep 17 00:00:00 2001 From: Antti Korpi Date: Thu, 13 Jul 2017 01:15:51 +0100 Subject: Add -p flag to disable writing of cache and temporary files Closes #285. --- options.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'options.c') diff --git a/options.c b/options.c index 258dc37..66cfcc5 100644 --- a/options.c +++ b/options.c @@ -32,7 +32,7 @@ const options_t *options = (const options_t*) &_options; void print_usage(void) { - printf("usage: sxiv [-abcfhioqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] " + printf("usage: sxiv [-abcfhiopqrtvZ] [-A FRAMERATE] [-e WID] [-G GAMMA] " "[-g GEOMETRY] [-N NAME] [-n NUM] [-S DELAY] [-s MODE] [-z ZOOM] " "FILES...\n"); } @@ -72,8 +72,9 @@ void parse_options(int argc, char **argv) _options.quiet = false; _options.thumb_mode = false; _options.clean_cache = false; + _options.private_mode = false; - while ((opt = getopt(argc, argv, "A:abce:fG:g:hin:N:oqrS:s:tvZz:")) != -1) { + while ((opt = getopt(argc, argv, "A:abce:fG:g:hin:N:opqrS:s:tvZz:")) != -1) { switch (opt) { case '?': print_usage(); @@ -129,6 +130,9 @@ void parse_options(int argc, char **argv) case 'o': _options.to_stdout = true; break; + case 'p': + _options.private_mode = true; + break; case 'q': _options.quiet = true; break; -- cgit v1.2.3-70-g09d2