From ca2b4ee55dc548d86fcc4c8aae07c62fbc0bc676 Mon Sep 17 00:00:00 2001 From: Andrew Potter Date: Tue, 15 Feb 2011 14:15:25 -0800 Subject: Add libcurl option -{ --- src/imlib.c | 3 +++ src/options.c | 7 ++++++- src/options.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/imlib.c b/src/imlib.c index b251cac..0d2a1dd 100644 --- a/src/imlib.c +++ b/src/imlib.c @@ -34,6 +34,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include +#include Display *disp = NULL; Visual *vis = NULL; @@ -439,6 +440,8 @@ char *feh_http_load_image(char *url) } /* while read */ close(sockno); fclose(fp); + } else if (opt.libcurl_http) { + } else { int pid; int status; diff --git a/src/options.c b/src/options.c index caa9aa4..32cdb41 100644 --- a/src/options.c +++ b/src/options.c @@ -82,6 +82,7 @@ void init_parse_options(int argc, char **argv) opt.jump_on_resort = 1; opt.builtin_http = 0; + opt.libcurl_http = 0; opt.xinerama = 0; opt.screen_clip = 1; @@ -325,7 +326,7 @@ static void feh_parse_option_array(int argc, char **argv) { static char stropts[] = "a:A:b:B:cC:dD:e:E:f:Fg:GhH:iIj:J:kK:lL:mM:nNo:O:pPqQrR:sS:tT:uUvVwW:xXy:YzZ" - "0:1:2:4:5:8:9:.@:^:~:):|:+:"; + "0:1:2:4:5:8:9:.@:^:~:):|:+:{"; /* (*name, has_arg, *flag, val) See: struct option in getopts.h */ static struct option lopts[] = { @@ -356,6 +357,7 @@ static void feh_parse_option_array(int argc, char **argv) {"reverse" , 0, 0, 'n'}, {"thumbnails" , 0, 0, 't'}, {"builtin" , 0, 0, 'Q'}, + {"libcurl" , 0, 0, '{'}, {"scale-down" , 0, 0, '.'}, {"no-jump-on-resort", 0, 0, 220}, {"hide-pointer" , 0, 0, 'Y'}, @@ -473,6 +475,9 @@ static void feh_parse_option_array(int argc, char **argv) case 'Q': opt.builtin_http = 1; break; + case '{': + opt.libcurl_http = 1; + break; case 'L': opt.customlist = estrdup(optarg); opt.display = 0; diff --git a/src/options.h b/src/options.h index 283cf10..427c62c 100644 --- a/src/options.h +++ b/src/options.h @@ -64,6 +64,7 @@ struct __fehoptions { unsigned char no_menus; unsigned char scale_down; unsigned char builtin_http; + unsigned char libcurl_http; unsigned char bgmode; unsigned char xinerama; unsigned char screen_clip; -- cgit v1.2.3