Add -p flag to disable writing of cache and temporary files

Closes #285.
This commit is contained in:
Antti Korpi
2017-07-13 01:15:51 +01:00
committed by Bert Münnich
parent 20009c240b
commit ecc363ec10
4 changed files with 16 additions and 4 deletions

View File

@ -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;