diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-04-06 11:22:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-04-06 11:22:19 +0200 |
commit | 9e8eea062a081d4ff5b7897e3fcd7b2633cc4785 (patch) | |
tree | 85743b8f83d99458bf036275be83e32f2b264a3c | |
parent | 79e0f0b7381b0a48207558783888aa857be92433 (diff) |
--max-dimension: ignore width/height limit of 0 pixels
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | man/feh.pre | 4 | ||||
-rw-r--r-- | src/options.c | 4 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,7 @@ +git HEAD + + * --max-dimension: ignore width/height limit of 0 pixels + Thu, 15 May 2014 23:41:07 +0200 Daniel Friesel <derf+feh@finalrewind.org> * Releasev v2.12 diff --git a/man/feh.pre b/man/feh.pre index e95ece5..787cdb9 100644 --- a/man/feh.pre +++ b/man/feh.pre @@ -420,8 +420,8 @@ Only show images with width <= .Ar width and height <= .Ar height . -If you only care about one parameter, set the other to either something large -or -1. +If you only care about one parameter, set the other to 0 +.Pq or a negative value . . .It Cm -M , --menu-font Ar font . diff --git a/src/options.c b/src/options.c index 8fbdbfb..7e7adee 100644 --- a/src/options.c +++ b/src/options.c @@ -421,6 +421,10 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) break; case '<': XParseGeometry(optarg, &discard, &discard, &opt.max_width, &opt.max_height); + if (opt.max_width == 0) + opt.max_width = UINT_MAX; + if (opt.max_height == 0) + opt.max_height = UINT_MAX; break; case '>': XParseGeometry(optarg, &discard, &discard, &opt.min_width, &opt.min_height); |