summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-04-08 14:44:00 +0200
committerBert <ber.t@gmx.com>2011-04-08 14:44:00 +0200
commitdc54981a68589c719937c82c36eeb9247d915a81 (patch)
treef163939891a0bb27029c209eaa01aff805272c88 /options.c
parenteee921efe0959251daec3d23e652b4f3a924df92 (diff)
downloadnsxiv-dc54981a68589c719937c82c36eeb9247d915a81.tar.zst
New option: -C, clean thumbnail cache
Diffstat (limited to 'options.c')
-rw-r--r--options.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/options.c b/options.c
index f5066f4..8105485 100644
--- a/options.c
+++ b/options.c
@@ -31,7 +31,7 @@ options_t _options;
const options_t *options = (const options_t*) &_options;
void print_usage() {
- printf("usage: sxiv [-adFfhpqrstvZ] [-g GEOMETRY] [-z ZOOM] FILES...\n");
+ printf("usage: sxiv [-aCdFfhpqrstvZ] [-g GEOMETRY] [-z ZOOM] FILES...\n");
}
void print_version() {
@@ -53,9 +53,10 @@ void parse_options(int argc, char **argv) {
_options.all = 0;
_options.quiet = 0;
+ _options.clean_cache = 0;
_options.recursive = 0;
- while ((opt = getopt(argc, argv, "adFfg:hpqrstvZz:")) != -1) {
+ while ((opt = getopt(argc, argv, "aCdFfg:hpqrstvZz:")) != -1) {
switch (opt) {
case '?':
print_usage();
@@ -63,6 +64,9 @@ void parse_options(int argc, char **argv) {
case 'a':
_options.all = 1;
break;
+ case 'C':
+ _options.clean_cache = 1;
+ break;
case 'd':
_options.scalemode = SCALE_DOWN;
break;