summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Potter <agpotter@gmail.com>2011-02-15 14:15:25 -0800
committerAndrew Potter <agpotter@gmail.com>2011-02-15 14:15:25 -0800
commitca2b4ee55dc548d86fcc4c8aae07c62fbc0bc676 (patch)
tree8fedc15d577f813f3ab576d22cc5f2c3a4d54e20
parent0a31528663cafafc9382b602d7f9e08c1bf6bf84 (diff)
Add libcurl option -{
-rw-r--r--src/imlib.c3
-rw-r--r--src/options.c7
-rw-r--r--src/options.h1
3 files changed, 10 insertions, 1 deletions
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 <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <curl/curl.h>
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;