diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/getopt.c | 1 | ||||
| -rw-r--r-- | src/options.c | 12 | ||||
| -rw-r--r-- | src/options.h | 2 | 
3 files changed, 8 insertions, 7 deletions
| diff --git a/src/getopt.c b/src/getopt.c index d212b3a..eaae3f7 100644 --- a/src/getopt.c +++ b/src/getopt.c @@ -36,6 +36,7 @@  #endif  #include <stdio.h> +#include <string.h>  /* Comment out all this code if we are using the GNU C Library, and are not     actually compiling the library itself.  This code is part of the GNU C diff --git a/src/options.c b/src/options.c index 1a89d5b..a77c163 100644 --- a/src/options.c +++ b/src/options.c @@ -395,7 +395,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)  		{"bg-center"     , 0, 0, OPTION_bg_center},  		{"bg-scale"      , 0, 0, OPTION_bg_scale},  		{"zoom"          , 1, 0, OPTION_zoom}, -		{"zoom-rate"     , 1, 0, OPTION_zoom_rate}, +		{"zoom-step"     , 1, 0, OPTION_zoom_step},  		{"no-screen-clip", 0, 0, OPTION_no_screen_clip},  		{"index-info"    , 1, 0, OPTION_index_info},  		{"magick-timeout", 1, 0, OPTION_magick_timeout}, @@ -840,13 +840,13 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)  		case OPTION_window_id:  			opt.x11_windowid = atol(optarg);  			break; -		case OPTION_zoom_rate: +		case OPTION_zoom_step:  			opt.zoom_rate = atof(optarg); -			if ((opt.zoom_rate <= 0.0) || (opt.zoom_rate == 1.0)) { -				weprintf("Zooming disabled due to --zoom-rate=%f", opt.zoom_rate); +			if ((opt.zoom_rate <= 0)) { +				weprintf("Zooming disabled due to --zoom-step=%f", opt.zoom_rate);  				opt.zoom_rate = 1.0; -			} else if (opt.zoom_rate < 1.0) { -				opt.zoom_rate = 1.0 / opt.zoom_rate; +			} else { +				opt.zoom_rate = 1 + ((float)opt.zoom_rate / 100);  			}  			break;  		default: diff --git a/src/options.h b/src/options.h index ea76b24..6441e8b 100644 --- a/src/options.h +++ b/src/options.h @@ -216,7 +216,7 @@ OPTION_bg_scale,  OPTION_bg_fill,  OPTION_bg_max,  OPTION_zoom, -OPTION_zoom_rate, +OPTION_zoom_step,  OPTION_zoom_in_rate,  OPTION_zoom_out_rate,  OPTION_keep_zoom_vp, | 
