Commit 6206ca48 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Various code fixups

* remove unused variable Im1 in filelist.c
* options are initialised as 0, so only explicitly set those to 0 for which it
  makes sense because of their context
* Make a few warnings about wrong option combinations fatal
parent 6476d7dc
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -462,7 +462,6 @@ gib_list *feh_read_filelist(char *filename)
	FILE *fp;
	gib_list *list = NULL;
	char s[1024], s1[1024];
	Imlib_Image im1;

	if (!filename)
		return(NULL);
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ static void feh_set_parse_kb_partial(fehkey *key, int index, char *ks) {
				mod |= Mod4Mask;
				break;
			default:
				weprintf("keys: invalid modifier %c in %s", cur[0], ks);
				weprintf("keys: invalid modifier %c in \"%s\"", cur[0], ks);
				break;
		}
		cur += 2;
+3 −13
Original line number Diff line number Diff line
@@ -70,8 +70,6 @@ void init_parse_options(int argc, char **argv)
	opt.prev_button = 4;
	opt.next_button = 5;

	opt.draw_actions = 0;

	opt.rotate_button = 2;
	opt.no_rotate_ctrl_mask = 0;
	opt.blur_button = 1;
@@ -80,7 +78,6 @@ void init_parse_options(int argc, char **argv)
	opt.start_list_at = NULL;
	opt.jump_on_resort = 1;

	opt.xinerama = 0;
	opt.screen_clip = 1;
#ifdef HAVE_LIBXINERAMA
	/* if we're using xinerama, then enable it by default */
@@ -823,15 +820,11 @@ static void check_options(void)
	}

	if (opt.full_screen && opt.multiwindow) {
		weprintf("you shouldn't combine multiwindow mode with full-screen mode,\n"
				"   Multiwindow mode has been disabled.");
		opt.multiwindow = 0;
		eprintf("You cannot combine --full-screen with --multiwindow");
	}

	if (opt.list && (opt.multiwindow || opt.index || opt.collage)) {
		weprintf("list mode can't be combined with other processing modes,\n"
				"   list mode disabled.");
		opt.list = 0;
		eprintf("You cannot combine --list with other modes");
	}

	if (opt.sort && opt.randomize) {
@@ -841,10 +834,7 @@ static void check_options(void)
	}

	if (opt.loadables && opt.unloadables) {
		weprintf("You cant show loadables AND unloadables...\n"
				"you might as well use ls ;)\n"
				"loadables only will be shown\n");
		opt.unloadables = 0;
		eprintf("You cannot combine --loadable with --unloadable");
	}

	if (opt.thumb_title && (!opt.thumbs)) {