Commit ca2b4ee5 authored by Andrew Potter's avatar Andrew Potter
Browse files

Add libcurl option -{

parent 0a315286
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;
+6 −1
Original line number Diff line number Diff line
@@ -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;
+1 −0
Original line number Diff line number Diff line
@@ -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;