From: <enl...@li...> - 2000-10-26 13:04:36
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: feh.1 feh.spec.in Log Message: Gah. Bloody hell. The rpm spec file said feh had a GPL license and the manpage still included the bloody advertising clause. I suck ;-) =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/feh.1,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- feh.1 2000/10/22 01:02:23 1.29 +++ feh.1 2000/10/26 13:04:35 1.30 @@ -507,9 +507,9 @@ furnished to do so, subject to the following conditions: .PP The above copyright notice and this permission notice shall be included in -all copies of the Software, its documentation and marketing & publicity -materials, and acknowledgment shall be given in the documentation, materials -and software packages that this Software was used. +all copies of the Software and its documentation and acknowledgment shall be +given in the documentation and software packages that this Software was +used. .PP THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, @@ -520,4 +520,4 @@ .PP Email bugs and feature requests to .br -.B <gil...@li...> +.B <feh...@li...> =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/feh.spec.in,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- feh.spec.in 2000/08/23 20:53:30 1.8 +++ feh.spec.in 2000/10/26 13:04:35 1.9 @@ -8,7 +8,7 @@ Summary: Image viewer using Imlib 2 Version: %ver Release: %rel -Copyright: GPL +Copyright: BSD Group: Applications/Graphics Source: %{name}-%{ver}.tar.gz Url: http://www.linuxbrit.co.uk |
From: <enl...@li...> - 2000-10-28 22:32:27
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: Makefile.am imlib.c Log Message: Sat Oct 28 23:32:11 2000 Tom Gilbert <gil...@li...> * Better check for imlib2. * Only create files in current dir if keeping http images. Ones that will be deleted on exit go in /tmp. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/Makefile.am,v retrieving revision 1.35 retrieving revision 1.36 diff -u -3 -r1.35 -r1.36 --- Makefile.am 2000/06/22 21:31:54 1.35 +++ Makefile.am 2000/10/28 22:32:26 1.36 @@ -4,7 +4,7 @@ LDFLAGS = -L/usr/X11R6/lib INCLUDES = -I/usr/X11R6/include \ $(X_CFLAGS) -I$(prefix)/include -I$(includedir) -I. \ --DPREFIX=\""$(prefix)"\" +-DPREFIX=\""$(prefix)"\" @IMLIB_CFLAGS@ LIBOBJS = @LIBOBJS@ bin_PROGRAMS = feh @@ -14,7 +14,7 @@ utils.c utils.h keyevents.c timers.c timers.h list.c collage.c debug.h \ events.c events.h feh_imlib2.h feh_imlib2.c support.c support.h \ thumbnail.c thumbnail.h feh_list.c feh_list.h -feh_LDADD = -lX11 +feh_LDADD = -lX11 @IMLIB_LIBS@ images_DATA = about.png menubg.png menubg_chrome.png menubg_brushed.png \ menubg_pastel.png menubg_aluminium.png menubg_aqua.png \ =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/imlib.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -3 -r1.112 -r1.113 --- imlib.c 2000/10/21 22:22:36 1.112 +++ imlib.c 2000/10/28 22:32:26 1.113 @@ -359,7 +359,9 @@ do { snprintf(num, sizeof(num), "%06ld", i++); - tmpname = estrjoin("", "feh_", num, "_", strrchr(url, '/') + 1, NULL); + tmpname = + estrjoin("", opt.keep_http ? "feh_" : "/tmp/feh_", num, "_", + strrchr(url, '/') + 1, NULL); } while (stat(tmpname, &st) == 0); |
From: <enl...@li...> - 2000-10-28 22:32:57
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: ChangeLog configure.in feh.spec.in Added Files: acsite.m4 Log Message: Sat Oct 28 23:32:11 2000 Tom Gilbert <gil...@li...> * Better check for imlib2. * Only create files in current dir if keeping http images. Ones that will be deleted on exit go in /tmp. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/ChangeLog,v retrieving revision 1.198 retrieving revision 1.199 diff -u -3 -r1.198 -r1.199 --- ChangeLog 2000/10/22 01:02:23 1.198 +++ ChangeLog 2000/10/28 22:32:26 1.199 @@ -1,3 +1,9 @@ +Sat Oct 28 23:32:11 2000 Tom Gilbert <gil...@li...> + + * Better check for imlib2. + * Only create files in current dir if keeping http images. Ones + that will be deleted on exit go in /tmp. + Sun Oct 22 02:01:33 2000 Tom Gilbert <gil...@li...> * Swapped the default right mouse button config. You now hold =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/configure.in,v retrieving revision 1.29 retrieving revision 1.30 diff -u -3 -r1.29 -r1.30 --- configure.in 2000/06/27 15:57:23 1.29 +++ configure.in 2000/10/28 22:32:26 1.30 @@ -18,9 +18,14 @@ [CFLAGS="$CFLAGS -I$withval/include" LIBS="-L$withval/lib $LIBS"]) -AC_CHECK_LIB(Imlib2, imlib_load_image, , [ -echo "ERROR: You need libImlib2 to build feh."; - AC_MSG_ERROR([Fatal: libImlib2 not found.])], -lm) +AC_PATH_GENERIC(imlib2, 1.0.0, [ + AC_SUBST(IMLIB_LIBS) + AC_SUBST(IMLIB_CFLAGS) ], + AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?) ) +IMLIB_LIBS=`imlib2-config --libs` +IMLIB_CFLAGS=`imlib2-config --cflags` +AC_SUBST(IMLIB_LIBS) +AC_SUBST(IMLIB_CFLAGS) LIBS="$LIBS -lm" AC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"]) =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/feh.spec.in,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- feh.spec.in 2000/10/26 13:04:35 1.9 +++ feh.spec.in 2000/10/28 22:32:26 1.10 @@ -1,6 +1,6 @@ %define name @PACKAGE@ %define ver @VERSION@ -%define RELEASE 2 +%define RELEASE 3 #%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} %define prefix /usr |
From: <enl...@li...> - 2000-10-29 23:41:40
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: support.c Log Message: *sigh =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/support.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- support.c 2000/09/24 16:08:22 1.9 +++ support.c 2000/10/29 23:41:39 1.10 @@ -46,6 +46,8 @@ if (fil == NULL) { snprintf(bgfil, sizeof(bgfil), "%s/.%s.png", getenv("HOME"), bgname); + imlib_context_set_image(im); + imlib_image_set_format("png"); feh_imlib_save_image(im, bgfil); D(3,("bg saved as %s\n", bgfil)); fil = bgfil; |
From: <enl...@li...> - 2000-10-29 23:50:06
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: feh_imlib2.c Log Message: *sigh =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/feh_imlib2.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- feh_imlib2.c 2000/09/24 16:08:21 1.15 +++ feh_imlib2.c 2000/10/29 23:50:05 1.16 @@ -214,8 +214,7 @@ imlib_get_text_size(text, w, h); } -Imlib_Image -feh_imlib_clone_image(Imlib_Image im) +Imlib_Image feh_imlib_clone_image(Imlib_Image im) { imlib_context_set_image(im); return imlib_clone_image(); @@ -266,9 +265,9 @@ dh = 0; } -Imlib_Image -feh_imlib_create_cropped_scaled_image(Imlib_Image im, int sx, int sy, int sw, - int sh, int dw, int dh, char alias) +Imlib_Image feh_imlib_create_cropped_scaled_image(Imlib_Image im, int sx, + int sy, int sw, int sh, + int dw, int dh, char alias) { imlib_context_set_image(im); imlib_context_set_anti_alias(alias); @@ -301,7 +300,12 @@ void feh_imlib_save_image(Imlib_Image im, char *file) { + char *tmp; + imlib_context_set_image(im); + tmp = strrchr(file, '.'); + if (tmp) + imlib_set_format(tmp + 1); imlib_save_image(file); } @@ -321,8 +325,7 @@ imlib_image_draw_line(x1, y1, x2, y2, make_updates); } -Imlib_Image -feh_imlib_create_rotated_image(Imlib_Image im, double angle) +Imlib_Image feh_imlib_create_rotated_image(Imlib_Image im, double angle) { imlib_context_set_image(im); return (imlib_create_rotated_image(angle)); |
From: <enl...@li...> - 2000-10-29 23:59:15
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: feh_imlib2.c Log Message: grrr =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/feh_imlib2.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- feh_imlib2.c 2000/10/29 23:50:05 1.16 +++ feh_imlib2.c 2000/10/29 23:59:14 1.17 @@ -305,7 +305,7 @@ imlib_context_set_image(im); tmp = strrchr(file, '.'); if (tmp) - imlib_set_format(tmp + 1); + imlib_image_set_format(tmp + 1); imlib_save_image(file); } |
From: <enl...@li...> - 2000-10-31 15:55:52
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: filelist.c Log Message: ARG - stupid bug =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/filelist.c,v retrieving revision 1.64 retrieving revision 1.65 diff -u -3 -r1.64 -r1.65 --- filelist.c 2000/09/24 16:08:21 1.64 +++ filelist.c 2000/10/31 15:55:50 1.65 @@ -344,7 +344,7 @@ else if (!feh_load_image(&im1, file, NULL)) D_RETURN(4, 1); - if (!im) + if (!im1) D_RETURN(4, 1); file->info = feh_file_info_new(); @@ -362,7 +362,6 @@ if (need_free && im1) feh_imlib_free_image_and_decache(im1); - D_RETURN(4, 0); } |
From: <enl...@li...> - 2000-11-12 13:31:36
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: options.c Log Message: more fun =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -3 -r1.109 -r1.110 --- options.c 2000/10/22 01:02:23 1.109 +++ options.c 2000/11/12 13:31:36 1.110 @@ -377,7 +377,7 @@ D_ENTER(4); /* Now to pass some optionarinos */ - while ((optch = getopt_long(argc, argv, stropts, lopts, &cmdx)) != EOF) + while ((optch = getopt_long_only(argc, argv, stropts, lopts, &cmdx)) != EOF) { D(5,("Got option, getopt calls it %d, or %c\n", optch, optch)); switch (optch) |
From: <enl...@li...> - 2000-11-14 19:33:17
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: copyright Log Message: *ahem* =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/debian/copyright,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- copyright 2000/11/14 15:35:09 1.2 +++ copyright 2000/11/14 19:33:16 1.3 @@ -1,7 +1,7 @@ This package was debianized by laurence john lane <lj...@de...> on Sat, 28 Oct 2000 13:05:32 -0400 -It was downloaded from the enlightenmet CVS tree: +It was downloaded from the enlightenment CVS tree: http://sourceforge.net/cvs/?group_id=2 |
From: <enl...@li...> - 2000-11-19 20:27:45
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: options.c Log Message: that was dumb of me. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -3 -r1.110 -r1.111 --- options.c 2000/11/12 13:31:36 1.110 +++ options.c 2000/11/19 20:27:43 1.111 @@ -659,16 +659,6 @@ opt.progressive = 0; } - if (opt.index) - { - if (opt.font || opt.title_font) - { - weprintf("you can't use fonts without montage or index mode.\n" - " The fonts you specified will be ignored"); - opt.font = opt.title_font = NULL; - } - } - if (opt.full_screen && opt.multiwindow) { weprintf |
From: <enl...@li...> - 2000-11-20 20:41:17
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: menu.c Log Message: Patch from Alexander Riesen <ar...@tr...> Don't allow deletion of feh generated images. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/menu.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- menu.c 2000/09/24 16:08:21 1.33 +++ menu.c 2000/11/20 20:41:13 1.34 @@ -49,6 +49,7 @@ static void feh_menu_cb_remove(feh_menu * m, feh_menu_item * i, void *data); static void feh_menu_cb_delete(feh_menu * m, feh_menu_item * i, void *data); static void feh_menu_cb_reset(feh_menu * m, feh_menu_item * i, void *data); + /* FIXME if someone can tell me which option is causing indent to be braindead here, I will buy them a beer */ static void feh_menu_cb_remove_thumb(feh_menu * m, feh_menu_item * i, @@ -162,7 +163,7 @@ if (bg) m->bg = feh_imlib_clone_image(bg); - D_RETURN(4,m); + D_RETURN(4, m); } void @@ -220,14 +221,14 @@ D_ENTER(4); - D(5,("menu %p\n", m)); + D(5, ("menu %p\n", m)); for (i = m->items; i; i = i->next) { if (MENU_ITEM_IS_SELECTED(i)) - D_RETURN(4,i); + D_RETURN(4, i); } - D_RETURN(4,NULL); + D_RETURN(4, NULL); } feh_menu_item * @@ -236,17 +237,17 @@ feh_menu_item *i; D_ENTER(4); - D(4,("looking for menu item at %d,%d\n", x, y)); + D(4, ("looking for menu item at %d,%d\n", x, y)); for (i = m->items; i; i = i->next) { if (XY_IN_RECT(x, y, i->x, i->y, i->w, i->h)) { - D(4,("Found an item\n")); - D_RETURN(4,i); + D(4, ("Found an item\n")); + D_RETURN(4, i); } } - D(4,("didn't find an item\n")); - D_RETURN(4,NULL); + D(4, ("didn't find an item\n")); + D_RETURN(4, NULL); } void @@ -262,7 +263,7 @@ i = feh_menu_find_selected(m); if (i) { - D(4,("found a selected menu, deselecting it\n")); + D(4, ("found a selected menu, deselecting it\n")); MENU_ITEM_SET_NORMAL(i); m->updates = imlib_update_append_rect(m->updates, i->x, i->y, i->w, i->h); @@ -307,7 +308,7 @@ { XSetWindowAttributes attr; - D(4,("creating menu cover window\n")); + D(4, ("creating menu cover window\n")); attr.override_redirect = True; attr.do_not_propagate_mask = True; menu_cover = @@ -413,7 +414,7 @@ { if (menu_cover) { - D(4,("DESTROYING menu cover\n")); + D(4, ("DESTROYING menu cover\n")); XDestroyWindow(disp, menu_cover); menu_cover = 0; } @@ -471,7 +472,7 @@ } } m->calc = 1; - D_RETURN(4,mi); + D_RETURN(4, mi); } @@ -596,7 +597,7 @@ XResizeWindow(disp, m->win, m->w, m->h); m->updates = imlib_update_append_rect(m->updates, 0, 0, m->w, m->h); } - D(4,("menu size calculated. w=%d h=%d\n", m->w, m->h)); + D(4, ("menu size calculated. w=%d h=%d\n", m->w, m->h)); /* Make sure bg is same size */ if (m->bg) @@ -610,7 +611,7 @@ { Imlib_Image newim = imlib_create_image(m->w, m->h); - D(3,("resizing bg to %dx%d\n", m->w, m->h)); + D(3, ("resizing bg to %dx%d\n", m->w, m->h)); feh_imlib_blend_image_onto_image(newim, m->bg, 0, 0, 0, bg_w, bg_h, 0, 0, m->w, m->h, 0, 0, 1); @@ -636,19 +637,19 @@ if (i->text) { - D(5,("text item\n")); + D(5, ("text item\n")); fn = imlib_load_font(opt.menu_font); if (fn) { if (MENU_ITEM_IS_SELECTED(i)) { - D(5,("selected item\n")); + D(5, ("selected item\n")); /* draw selected image */ feh_menu_item_draw_at(i->x, i->y, i->w, i->h, im, ox, oy, 1); } else { - D(5,("unselected item\n")); + D(5, ("unselected item\n")); /* draw unselected image */ feh_menu_item_draw_at(i->x, i->y, i->w, i->h, im, ox, oy, 0); } @@ -672,7 +673,7 @@ { Imlib_Image im2; - D(5,("icon item\n")); + D(5, ("icon item\n")); im2 = i->icon; if (im2) @@ -697,8 +698,8 @@ feh_imlib_blend_image_onto_image(im, im2, 0, 0, 0, iw, ih, i->x + i->icon_x - ox, i->y + FEH_MENUITEM_PAD_TOP + - (((i-> - h - FEH_MENUITEM_PAD_TOP - + (((i->h + - FEH_MENUITEM_PAD_TOP - FEH_MENUITEM_PAD_BOTTOM) - oh) / 2) - oy, ow, oh, 1, 1, 1); @@ -707,14 +708,14 @@ } if (i->submenu) { - D(5,("submenu item\n")); + D(5, ("submenu item\n")); if (MENU_ITEM_IS_SELECTED(i)) { - D(5,("selected item\n")); + D(5, ("selected item\n")); feh_menu_draw_submenu_at(i->x + i->sub_x, i->y + FEH_MENUITEM_PAD_TOP + - ((i-> - h - FEH_MENUITEM_PAD_TOP - + ((i->h + - FEH_MENUITEM_PAD_TOP - FEH_MENUITEM_PAD_BOTTOM - FEH_MENU_SUBMENU_H) / 2), FEH_MENU_SUBMENU_W, FEH_MENU_SUBMENU_H, @@ -722,11 +723,11 @@ } else { - D(5,("unselected item\n")); + D(5, ("unselected item\n")); feh_menu_draw_submenu_at(i->x + i->sub_x, i->y + FEH_MENUITEM_PAD_TOP + - ((i-> - h - FEH_MENUITEM_PAD_TOP - + ((i->h + - FEH_MENUITEM_PAD_TOP - FEH_MENUITEM_PAD_BOTTOM - FEH_MENU_SUBMENU_H) / 2), FEH_MENU_SUBMENU_W, FEH_MENU_SUBMENU_H, @@ -736,7 +737,7 @@ } else { - D(5,("separator item\n")); + D(5, ("separator item\n")); feh_menu_draw_separator_at(i->x, i->y, i->w, i->h, im, ox, oy); } D_RETURN_(5); @@ -761,14 +762,14 @@ m->updates = NULL; if (u) { - D(5,("I have updates to render\n")); + D(5, ("I have updates to render\n")); for (uu = u; u; u = imlib_updates_get_next(u)) { int x, y, w, h; Imlib_Image im; imlib_updates_get_coordinates(u, &x, &y, &w, &h); - D(5,("update coords %d,%d %d*%d\n", x, y, w, h)); + D(5, ("update coords %d,%d %d*%d\n", x, y, w, h)); im = imlib_create_image(w, h); feh_imlib_image_fill_rectangle(im, 0, 0, w, h, 0, 0, 0, 0); if (im) @@ -793,9 +794,9 @@ for (l = menus; l; l = l->next) { if ((l->menu->name) && (!strcmp(l->menu->name, name))) - D_RETURN(4,l->menu); + D_RETURN(4, l->menu); } - D_RETURN(4,NULL); + D_RETURN(4, NULL); } void @@ -921,8 +922,8 @@ D_ENTER(5); for (l = menus; l; l = l->next) if (l->menu->win == win) - D_RETURN(5,l->menu); - D_RETURN(5,NULL); + D_RETURN(5, l->menu); + D_RETURN(5, NULL); } void @@ -1148,9 +1149,12 @@ feh_menu_add_entry(m, "Reset", NULL, NULL, feh_menu_cb_reset, NULL, NULL); feh_menu_add_entry(m, "Reload", NULL, NULL, feh_menu_cb_reload, NULL, NULL); - feh_menu_add_entry(m, "Remove from filelist", NULL, NULL, - feh_menu_cb_remove, NULL, NULL); - feh_menu_add_entry(m, "Delete", NULL, "CONFIRM", NULL, NULL, NULL); + if (opt.multiwindow || opt.slideshow) + { + feh_menu_add_entry(m, "Remove from filelist", NULL, NULL, + feh_menu_cb_remove, NULL, NULL); + feh_menu_add_entry(m, "Delete", NULL, "CONFIRM", NULL, NULL, NULL); + } feh_menu_add_entry(m, "Background", NULL, "BACKGROUND", NULL, NULL, NULL); mi = @@ -1520,7 +1524,7 @@ feh_menu_add_entry(mm, FEH_FILE(l->data)->name, NULL, NULL, feh_menu_cb_jump_to, l, NULL); } - D_RETURN(4,mm); + D_RETURN(4, mm); m = NULL; i = NULL; data = NULL; @@ -1537,12 +1541,12 @@ D_ENTER(4); if (!m->fehwin->file) - D_RETURN(4,NULL); + D_RETURN(4, NULL); file = FEH_FILE(m->fehwin->file->data); im = m->fehwin->im; if (!im) - D_RETURN(4,NULL); + D_RETURN(4, NULL); mm = feh_menu_new(); mm->name = estrdup("INFO"); @@ -1568,7 +1572,7 @@ mm->func_free = feh_menu_func_free_info; - D_RETURN(4,mm); + D_RETURN(4, mm); i = NULL; data = NULL; } |
From: <enl...@li...> - 2000-11-21 20:35:00
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: Makefile.am Added Files: README_CAM_MENU gen_cam_menu.sh Log Message: sweet utility script from pabs =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/cam/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Makefile.am 2000/06/24 20:04:36 1.3 +++ Makefile.am 2000/11/21 20:34:59 1.4 @@ -8,4 +8,4 @@ EXTRA_DIST = README cam_bookmarks cam camdir = $(bindir) -cam_SCRIPTS = cam +cam_SCRIPTS = cam gen_cam_menu.sh |
From: <enl...@li...> - 2000-11-28 00:43:10
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: options.c options.h slideshow.c Log Message: Tue Nov 28 00:45:38 2000 Tom Gilbert <gil...@li...> * Added support for --slideshow-delay as a float. -D0.25 for example. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.c,v retrieving revision 1.111 retrieving revision 1.112 diff -u -3 -r1.111 -r1.112 --- options.c 2000/11/19 20:27:43 1.111 +++ options.c 2000/11/28 00:43:08 1.112 @@ -52,7 +52,7 @@ opt.display = 1; opt.aspect = 1; opt.progressive = 1; - opt.slideshow_delay = -1; + opt.slideshow_delay = -1.0; opt.thumb_w = 60; opt.thumb_h = 60; opt.progress_gran = 10; @@ -566,7 +566,7 @@ opt.menu_bg = estrdup(optarg); break; case 'D': - opt.slideshow_delay = atoi(optarg); + opt.slideshow_delay = atof(optarg); break; case 'R': opt.reload = atoi(optarg); @@ -776,8 +776,9 @@ " (default 10).\n" " -d, --draw-filename Draw the filename at the top-left of the image.\n" " --title TITLE Use TITLE as the window title in slideshow mode.\n" - " -D, --slideshow-delay NUM For slideshow mode, specifies time delay (seconds)\n" - " between automatically changing slides.\n" + " -D, --slideshow-delay NUM For slideshow mode, specifies time delay (seconds,\n" + " can be a decimal) between automatically changing\n" + " slides.\n" " -R, --reload NUM Use this option to tell feh to reload an image\n" " after NUM seconds. Useful for viewing webcams\n" " via http, or even on your local machine.\n" =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -3 -r1.22 -r1.23 --- options.h 2000/10/22 01:02:23 1.22 +++ options.h 2000/11/28 00:43:08 1.23 @@ -94,7 +94,6 @@ int thumb_h; int limit_w; int limit_h; - int slideshow_delay; int reload; int sort; int debug_level; @@ -102,6 +101,8 @@ unsigned int start_list_at; unsigned char mode; + + double slideshow_delay; }; void init_parse_options(int argc, char **argv); =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/slideshow.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -3 -r1.65 -r1.66 --- slideshow.c 2000/09/24 16:08:21 1.65 +++ slideshow.c 2000/11/28 00:43:08 1.66 @@ -65,7 +65,7 @@ if (opt.draw_filename) feh_draw_filename(w); winwidget_show(w); - if (opt.slideshow_delay >= 0) + if (opt.slideshow_delay >= 0.0) feh_add_timer(cb_slide_timer, w, opt.slideshow_delay, "SLIDE_CHANGE"); else if (opt.reload > 0) @@ -289,7 +289,7 @@ was deleted? */ eprintf("No more slides in show"); } - if (opt.slideshow_delay >= 0) + if (opt.slideshow_delay >= 0.0) feh_add_timer(cb_slide_timer, winwid, opt.slideshow_delay, "SLIDE_CHANGE"); D_RETURN_(4); |
From: <enl...@li...> - 2000-11-28 00:43:42
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: ChangeLog feh.1 Log Message: Tue Nov 28 00:45:38 2000 Tom Gilbert <gil...@li...> * Added support for --slideshow-delay as a float. -D0.25 for example. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/ChangeLog,v retrieving revision 1.199 retrieving revision 1.200 diff -u -3 -r1.199 -r1.200 --- ChangeLog 2000/10/28 22:32:26 1.199 +++ ChangeLog 2000/11/28 00:43:08 1.200 @@ -1,3 +1,8 @@ +Tue Nov 28 00:45:38 2000 Tom Gilbert <gil...@li...> + + * Added support for --slideshow-delay as a float. -D0.25 for + example. + Sat Oct 28 23:32:11 2000 Tom Gilbert <gil...@li...> * Better check for imlib2. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/feh.1,v retrieving revision 1.30 retrieving revision 1.31 diff -u -3 -r1.30 -r1.31 --- feh.1 2000/10/26 13:04:35 1.30 +++ feh.1 2000/11/28 00:43:08 1.31 @@ -149,7 +149,7 @@ Draw the filename at the top-left of the image .TP 5 .B -D, --slideshow-delay NUM -For slideshow mode, specifies time delay (seconds) between automatically +For slideshow mode, specifies time delay (seconds, can be a decimal) between automatically changing slides. Great for presentations. .TP 5 .B -R, --reload NUM |
From: <enl...@li...> - 2000-12-11 19:24:28
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: ChangeLog feh.1 Log Message: Mon Dec 11 19:25:10 2000 Tom Gilbert <gil...@li...> * Added a super-sweet patch from Benjamin Elijah Griffin <bgr...@cd...> to actually implement the builtin http collection I started ages ago. I screwed with it only slightly, it's a great patch. So now we can grab http images without spawning a subprocess, and I have to say here it seems a little faster too ;-) * Added -Q, --wget option to use wget to grab http data just in case you need to use a proxy, or something else stops the builtin stuff from working... * Misc tidyups etc.. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/ChangeLog,v retrieving revision 1.200 retrieving revision 1.201 diff -u -3 -r1.200 -r1.201 --- ChangeLog 2000/11/28 00:43:08 1.200 +++ ChangeLog 2000/12/11 19:23:38 1.201 @@ -1,3 +1,17 @@ +Mon Dec 11 19:25:10 2000 Tom Gilbert <gil...@li...> + + * Added a super-sweet patch from Benjamin Elijah Griffin + <bgr...@cd...> to actually implement the builtin http + collection I started ages ago. I screwed with it only slightly, + it's a great patch. So now we can grab http images without + spawning a subprocess, and I have to say here it seems a little + faster too ;-) + * Added -Q, --wget option to use wget to grab http data just in + case you need to use a proxy, or something else stops the builtin + stuff from working... + * Misc tidyups etc.. + + Tue Nov 28 00:45:38 2000 Tom Gilbert <gil...@li...> * Added support for --slideshow-delay as a float. -D0.25 for =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/feh.1,v retrieving revision 1.31 retrieving revision 1.32 diff -u -3 -r1.31 -r1.32 --- feh.1 2000/11/28 00:43:08 1.31 +++ feh.1 2000/12/11 19:23:38 1.32 @@ -153,7 +153,7 @@ changing slides. Great for presentations. .TP 5 .B -R, --reload NUM -Use this option to tell +Use this option to tell .B feh to reload an image after NUM seconds. Useful for viewing webcams via http, or even on your local machine. @@ -163,6 +163,10 @@ viewing, or, if caching, on exit. This option prevents this so that you get to keep the local copies. They will be in /tmp with "feh" in the name. .TP 5 +.B -Q, --wget +Use wget to grab remote files instead of builtin mechanism, useful if you +need to use a proxy or something. +.TP 5 .B -l, --list Don't display images. Analyse them and display an 'ls'-style listing. Useful in scripts hunt out images of a certain size/resolution/type etc. @@ -188,7 +192,7 @@ .TP 5 .B -n, --reverse Reverse the sort order. Use this to invert the order of the filelist. Eg -to sort in reverse width order, use +to sort in reverse width order, use .B -nSwidth .TP 5 .B -A, --action ACTION @@ -371,9 +375,9 @@ will not be printed .SH CONFIG FILE SYNTAX The feh config file allows the naming of option groups, or themes. -If +If .B $HOME/.fehrc -exists, or if not, but +exists, or if not, but .B /etc/fehrc exists, feh will look in it for theme name/options pairs. If neither $HOME/.fehrc or /etc/fehrc exist, feh will create a default one in ~/.fehrc. @@ -381,7 +385,7 @@ .br .B imagemap -rVq --thumb-width 40 --thumb-height 30 .br -You can then use this theme in two ways. Either +You can then use this theme in two ways. Either .br .B feh --theme imagemap *.jpg .br @@ -390,7 +394,7 @@ .br .B ln -s `which feh` ~/bin/imagemap .br -Now I just run +Now I just run .B imagemap *.jpg to use those options. A cooler example is .br |
From: <enl...@li...> - 2000-12-11 19:23:39
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: feh_imlib2.h imlib.c options.c options.h Log Message: Mon Dec 11 19:25:10 2000 Tom Gilbert <gil...@li...> * Added a super-sweet patch from Benjamin Elijah Griffin <bgr...@cd...> to actually implement the builtin http collection I started ages ago. I screwed with it only slightly, it's a great patch. So now we can grab http images without spawning a subprocess, and I have to say here it seems a little faster too ;-) * Added -Q, --wget option to use wget to grab http data just in case you need to use a proxy, or something else stops the builtin stuff from working... * Misc tidyups etc.. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/feh_imlib2.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- feh_imlib2.h 2000/09/24 16:08:21 1.9 +++ feh_imlib2.h 2000/12/11 19:23:38 1.10 @@ -28,6 +28,7 @@ #include <X11/Xlib.h> #include <Imlib2.h> #include <stdarg.h> +#include <string.h> int feh_imlib_image_get_width(Imlib_Image im); int feh_imlib_image_get_height(Imlib_Image im); =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/imlib.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -3 -r1.113 -r1.114 --- imlib.c 2000/10/28 22:32:26 1.113 +++ imlib.c 2000/12/11 19:23:38 1.114 @@ -23,21 +23,18 @@ */ -#ifdef BUILTIN_HTTP -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h> -#endif - - #include "feh.h" #include "feh_list.h" #include "filelist.h" #include "winwidget.h" #include "options.h" +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> +#include <netdb.h> + Display *disp = NULL; Visual *vis = NULL; Screen *scr = NULL; @@ -369,23 +366,48 @@ snprintf(randnum, sizeof(randnum), "%d", rnum); newurl = estrjoin("?", url, randnum, NULL); D(3, ("newurl: %s\n", newurl)); - -#ifdef BUILTIN_HTTP +if(opt.builtin_http) { + /* state for HTTP header parser */ +#define SAW_NONE 1 +#define SAW_ONE_CM 2 +#define SAW_ONE_CJ 3 +#define SAW_TWO_CM 4 +#define IN_BODY 5 + +#define OUR_BUF_SIZE 1024 +#define EOL "\015\012" + int sockno = 0; + int size; + int body = SAW_NONE; struct sockaddr_in addr; struct hostent *hptr; char *hostname; char *get_string; + char *host_string; + char *query_string; char *get_url; - - D(3, ("using builtin http collection\n")); + static char buf[OUR_BUF_SIZE]; + char ua_string[] = "User-Agent: feh image viewer"; + char accept_string[] = "Accept: image/*"; + FILE *fp; + + printf("using builtin http collection\n"); + fp = fopen(tmpname, "w"); + if (!fp) + { + weprintf("couldn't write to file %s:", tmpname); + free(tmpname); + D_RETURN(4, NULL); + } hostname = feh_strip_hostname(newurl); if (!hostname) { weprintf("couldn't work out hostname from %s:", newurl); + free(tmpname); D_RETURN(4, NULL); } @@ -394,6 +416,7 @@ if (!(hptr = feh_gethostbyname(hostname))) { weprintf("error resolving host %s:", hostname); + free(tmpname); D_RETURN(4, NULL); } @@ -407,31 +430,154 @@ if ((sockno = socket(PF_INET, SOCK_STREAM, 0)) == -1) { weprintf("error opening socket:"); + free(tmpname); D_RETURN(4, NULL); } if (connect(sockno, (struct sockaddr *) &addr, sizeof(addr)) == -1) { weprintf("error connecting socket:"); + free(tmpname); D_RETURN(4, NULL); } get_url = strchr(newurl, '/') + 1; get_url = strchr(get_url, '/') + 1; - get_url = strchr(get_url, '/') + 1; + /* Need initial / here, so no +1 this time. */ + get_url = strchr(get_url, '/'); - get_string = estrjoin(" ", "GET", get_url, NULL); - if ((send(sockno, get_string, strlen(get_string), 0)) == -1) + get_string = estrjoin(" ", "GET", get_url, "HTTP/1.0", NULL); + host_string = estrjoin(" ", "Host:", hostname, NULL); + query_string = + estrjoin(EOL, get_string, host_string, accept_string, ua_string, "", + "", NULL); + /* At this point query_string looks something like + ** + ** GET /dir/foo.jpg?123456 HTTP/1.0^M^J + ** Host: www.example.com^M^J + ** Accept: image/ *^M^J + ** User-Agent: feh image viewer^M^J + ** ^M^J + ** + ** Host: is required by HTTP/1.1 and very important for some sites, + ** even with HTTP/1.0 + ** + ** -- BEG + */ + if ((send(sockno, query_string, strlen(query_string), 0)) == -1) { free(get_string); + free(host_string); + free(query_string); + free(tmpname); weprintf("error sending over socket:"); D_RETURN(4, NULL); } free(get_string); + free(host_string); + free(query_string); + while ((size = read(sockno, &buf, OUR_BUF_SIZE))) + { + if (body == IN_BODY) + { + fwrite(buf, 1, size, fp); + } + else + { + int i; - } + for (i = 0; i < size; i++) + { + /* We are looking for ^M^J^M^J, but will accept + ** ^J^J from broken servers. Stray ^Ms will be + ** ignored. + ** + ** TODO: + ** Checking the headers for a + ** Content-Type: image/ * + ** header would help detect problems with results. + ** Maybe look at the response code too? But there is + ** no fundamental reason why a 4xx or 5xx response + ** could not return an image, it is just the 3xx + ** series we need to worry about. + ** + ** Also, grabbing the size from the Content-Length + ** header and killing the connection after that + ** many bytes where read would speed up closing the + ** socket. + ** -- BEG + */ + + switch (body) + { + + case IN_BODY: + fwrite(buf + i, 1, size - i, fp); + i = size; + break; + + case SAW_ONE_CM: + if (buf[i] == '\012') + { + body = SAW_ONE_CJ; + } + else + { + body = SAW_NONE; + } + break; + + case SAW_ONE_CJ: + if (buf[i] == '\015') + { + body = SAW_TWO_CM; + } + else + { + if (buf[i] == '\012') + { + body = IN_BODY; + } + else + { + body = SAW_NONE; + } + } + break; + + case SAW_TWO_CM: + if (buf[i] == '\012') + { + body = IN_BODY; + } + else + { + body = SAW_NONE; + } + break; + + case SAW_NONE: + if (buf[i] == '\015') + { + body = SAW_ONE_CM; + } + else + { + if (buf[i] == '\012') + { + body = SAW_ONE_CJ; + } + } + break; -#else + } /* switch */ + } /* for i */ + } + } /* while read */ + close(sockno); + fclose(fp); + } + else { int pid; int status; @@ -467,13 +613,11 @@ } } } -#endif free(newurl); D_RETURN(4, tmpname); } -#ifdef BUILTIN_HTTP struct hostent * feh_gethostbyname(const char *name) { @@ -488,7 +632,6 @@ hp = gethostbyname(name); D_RETURN(3, hp); } -#endif char * feh_strip_hostname(char *url) =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.c,v retrieving revision 1.112 retrieving revision 1.113 diff -u -3 -r1.112 -r1.113 --- options.c 2000/11/28 00:43:08 1.112 +++ options.c 2000/12/11 19:23:38 1.113 @@ -71,15 +71,17 @@ opt.blur_button = 1; opt.no_blur_ctrl_mask = 0; - D(3,("About to parse env options (if any)\n")); + opt.builtin_http = 1; + + D(3, ("About to parse env options (if any)\n")); /* Check for and parse any options in FEH_OPTIONS */ feh_parse_environment_options(); - D(3,("About to parse commandline options\n")); + D(3, ("About to parse commandline options\n")); /* Parse the cmdline args */ feh_parse_option_array(argc, argv); - D(3,("About to check for theme configuration\n")); + D(3, ("About to check for theme configuration\n")); feh_check_theme_options(argc, argv); /* If we have a filelist to read, do it now */ @@ -88,11 +90,11 @@ /* joining two reverse-sorted lists in this manner works nicely for us here, as files specified on the commandline end up at the *end* of the combined filelist, in the specified order. */ - D(3,("About to load filelist from file\n")); + D(3, ("About to load filelist from file\n")); filelist = feh_list_cat(filelist, feh_read_filelist(opt.filelistfile)); } - D(4,("Options parsed\n")); + D(4, ("Options parsed\n")); if (feh_list_length(filelist) == 0) show_mini_usage(); @@ -117,7 +119,7 @@ else theme = estrdup(argv[0]); } - D(3,("Theme name is %s\n", theme)); + D(3, ("Theme name is %s\n", theme)); feh_load_options_for_theme(theme); @@ -151,7 +153,7 @@ eprintf("D'oh! Please define HOME in your environment!" "It would really help me out...\n"); rcpath = estrjoin("/", home, ".fehrc", NULL); - D(3,("Trying %s for config\n", rcpath)); + D(3, ("Trying %s for config\n", rcpath)); fp = fopen(rcpath, "r"); if (!fp && ((fp = fopen("/etc/fehrc", "r")) == NULL)) @@ -173,10 +175,10 @@ sscanf(s, "%s %[^\n]\n", (char *) &s1, (char *) &s2); if (!(*s1) || (!*s2) || (*s1 == '\n') || (*s1 == '#')) continue; - D(5,("Got theme/options pair %s/%s\n", s1, s2)); + D(5, ("Got theme/options pair %s/%s\n", s1, s2)); if (!strcmp(s1, theme)) { - D(4,("A match. Using options %s\n", s2)); + D(4, ("A match. Using options %s\n", s2)); feh_parse_options_from_string(s2); break; } @@ -269,7 +271,7 @@ char last = 0; D_ENTER(4); - D(4,("normalizing %s\n", str)); + D(4, ("normalizing %s\n", str)); ret[0] = '\0'; for (s = str;; s++) @@ -291,9 +293,9 @@ ret[i - 1] = '\0'; else ret[i] = '\0'; - D(4,("normalized to %s\n", ret)); + D(4, ("normalized to %s\n", ret)); - D_RETURN(4,estrdup(ret)); + D_RETURN(4, estrdup(ret)); } static void @@ -301,7 +303,7 @@ { static char stropts[] = - "a:A:b:BcC:dD:e:f:Fg:hH:iIklL:mM:nNo:O:pPqrR:sS:tT:uUvVwW:xXy:zZ1:2:3:4:56:78:90:"; + "a:A:b:BcC:dD:e:f:Fg:hH:iIklL:mM:nNo:O:pPqQrR:sS:tT:uUvVwW:xXy:zZ1:2:3:4:56:78:90:"; static struct option lopts[] = { /* actions */ {"help", 0, 0, 'h'}, /* okay */ @@ -331,8 +333,9 @@ {"preload", 0, 0, 'p'}, {"reverse", 0, 0, 'n'}, {"thumbnails", 0, 0, 't'}, - {"menu-ctrl-mask", 0, 0, '5'}, /* okay */ - {"scale-down", 0, 0, '.'}, /* okay */ + {"wget", 0, 0, 'Q'}, + {"menu-ctrl-mask", 0, 0, '5'}, /* okay */ + {"scale-down", 0, 0, '.'}, /* okay */ /* options with values */ {"output", 1, 0, 'o'}, /* okay */ {"output-only", 1, 0, 'O'}, /* okay */ @@ -352,7 +355,7 @@ {"font", 1, 0, 'e'}, {"title-font", 1, 0, '@'}, {"title", 1, 0, '^'}, - {"thumb-title", 1, 0, '~'}, + {"thumb-title", 1, 0, '~'}, {"bg", 1, 0, 'b'}, {"fontpath", 1, 0, 'C'}, {"progress-gran", 1, 0, '('}, @@ -366,7 +369,7 @@ {"blur-button", 1, 0, '8'}, {"no-blur-ctrl-mask", 0, 0, '9'}, {"no-pan-ctrl-mask", 0, 0, '$'}, - {"reload-button", 1, 0, '0'}, + {"reload-button", 1, 0, '0'}, {"start-at", 1, 0, '|'}, {"rcfile", 1, 0, '_'}, {"debug-level", 1, 0, '+'}, @@ -377,9 +380,10 @@ D_ENTER(4); /* Now to pass some optionarinos */ - while ((optch = getopt_long_only(argc, argv, stropts, lopts, &cmdx)) != EOF) + while ((optch = getopt_long_only(argc, argv, stropts, lopts, &cmdx)) != + EOF) { - D(5,("Got option, getopt calls it %d, or %c\n", optch, optch)); + D(5, ("Got option, getopt calls it %d, or %c\n", optch, optch)); switch (optch) { case 0: @@ -417,6 +421,9 @@ case 'l': opt.list = 1; break; + case 'Q': + opt.builtin_http = 0; + break; case 'L': opt.customlist = estrdup(optarg); break; @@ -530,10 +537,10 @@ break; case '^': opt.title = estrdup(optarg); + break; + case '~': + opt.thumb_title = estrdup(optarg); break; - case '~': - opt.thumb_title = estrdup(optarg); - break; case 'b': opt.bg = 1; opt.bg_file = estrdup(optarg); @@ -612,8 +619,8 @@ opt.start_list_at = atoi(optarg); break; case '0': - opt.reload_button = atoi(optarg); - break; + opt.reload_button = atoi(optarg); + break; case 't': opt.thumbs = 1; opt.index_show_name = 1; @@ -653,12 +660,13 @@ opt.collage = 0; } - if(opt.scale_down && opt.progressive) + if (opt.scale_down && opt.progressive) { - weprintf("currently, --scale-down only works without progressive loading"); + weprintf + ("currently, --scale-down only works without progressive loading"); opt.progressive = 0; } - + if (opt.full_screen && opt.multiwindow) { weprintf @@ -691,10 +699,10 @@ if (opt.thumb_title && (!opt.thumbs)) { - weprintf("Doesn't make sense to set thumbnail title when not in\n" - "thumbnail mode.\n"); - free(opt.thumb_title); - opt.thumb_title = NULL; + weprintf("Doesn't make sense to set thumbnail title when not in\n" + "thumbnail mode.\n"); + free(opt.thumb_title); + opt.thumb_title = NULL; } D_RETURN_(4); } @@ -782,6 +790,9 @@ " -R, --reload NUM Use this option to tell feh to reload an image\n" " after NUM seconds. Useful for viewing webcams\n" " via http, or even on your local machine.\n" + " -Q, --wget Use wget to grab remote files instead of builtin\n" + " mechanism, useful if you need to use a proxy or\n" + " something.\n" " -k, --keep-http When viewing files using http, feh normally\n" " deletes the local copies after viewing, or,\n" " if caching, on exit. This option prevents this\n" @@ -938,8 +949,7 @@ " button 3 activates the context-sensitive menu. Buttons can be redefined\n" " with the -1 through -9 (or --*-button) cmdline flags. All you people\n" " with million button mice can remove the ctrl mask with the --no-*-ctrl-mask\n" - " options.\n" - "\n" "See 'man feh' for more detailed information\n" + " options.\n" "\n" "See 'man feh' for more detailed information\n" "\n" "This program is free software see the file COPYING for licensing info.\n" "Copyright Tom Gilbert (and various contributors) 1999, 2000\n" =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- options.h 2000/11/28 00:43:08 1.23 +++ options.h 2000/12/11 19:23:38 1.24 @@ -62,6 +62,7 @@ unsigned char no_menus; unsigned char progress_gran; unsigned char scale_down; + unsigned char builtin_http; char *output_file; char *bg_file; |
From: <enl...@li...> - 2000-12-11 20:51:18
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: imlib.c Log Message: make http quieter =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/imlib.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -3 -r1.114 -r1.115 --- imlib.c 2000/12/11 19:23:38 1.114 +++ imlib.c 2000/12/11 20:51:17 1.115 @@ -300,24 +300,10 @@ } if (progwin->has_rotated) - feh_imlib_render_image_part_on_drawable_at_size_with_rotation(progwin-> - bg_pmap, - im, - update_x, - update_y, - update_w, - update_h, - dest_x + - update_x, - dest_y + - update_y, - update_w, - update_h, - progwin-> - im_angle, - 1, - feh_imlib_image_has_alpha - (im), 0); + feh_imlib_render_image_part_on_drawable_at_size_with_rotation + (progwin->bg_pmap, im, update_x, update_y, update_w, update_h, + dest_x + update_x, dest_y + update_y, update_w, update_h, + progwin->im_angle, 1, feh_imlib_image_has_alpha(im), 0); else feh_imlib_render_image_part_on_drawable_at_size(progwin->bg_pmap, im, update_x, update_y, @@ -367,7 +353,7 @@ newurl = estrjoin("?", url, randnum, NULL); D(3, ("newurl: %s\n", newurl)); -if(opt.builtin_http) + if (opt.builtin_http) { /* state for HTTP header parser */ #define SAW_NONE 1 @@ -394,7 +380,7 @@ char accept_string[] = "Accept: image/*"; FILE *fp; - printf("using builtin http collection\n"); + D(4, ("using builtin http collection\n")); fp = fopen(tmpname, "w"); if (!fp) { @@ -411,7 +397,7 @@ D_RETURN(4, NULL); } - printf("trying hostname %s\n", hostname); + D(4, ("trying hostname %s\n", hostname)); if (!(hptr = feh_gethostbyname(hostname))) { @@ -512,7 +498,7 @@ { case IN_BODY: - fwrite(buf + i, 1, size - i, fp); + fwrite(buf + i, 1, size - i, fp); i = size; break; |
From: <enl...@li...> - 2000-12-12 20:15:15
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Modified Files: AUTHORS Log Message: oops =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/AUTHORS,v retrieving revision 1.14 retrieving revision 1.15 diff -u -3 -r1.14 -r1.15 --- AUTHORS 2000/06/24 11:02:52 1.14 +++ AUTHORS 2000/12/12 20:15:11 1.15 @@ -7,6 +7,9 @@ Richard Lowe (richlowe) <ric...@bt...> - background setting code, thumbnail patches. +Benjamin Elijah Griffin <bgr...@cd...> + - made builtin http work. + Mrinal Kalakrishnan <mr...@in...> - auto-zoom mode. |
From: <enl...@li...> - 2000-12-17 20:28:38
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh/src Modified Files: imlib.c Log Message: I suck. This fixes reloading using builtin http =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/imlib.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -3 -r1.115 -r1.116 --- imlib.c 2000/12/11 20:51:17 1.115 +++ imlib.c 2000/12/17 20:28:37 1.116 @@ -402,6 +402,7 @@ if (!(hptr = feh_gethostbyname(hostname))) { weprintf("error resolving host %s:", hostname); + free(hostname); free(tmpname); D_RETURN(4, NULL); } @@ -417,12 +418,14 @@ { weprintf("error opening socket:"); free(tmpname); + free(hostname); D_RETURN(4, NULL); } if (connect(sockno, (struct sockaddr *) &addr, sizeof(addr)) == -1) { weprintf("error connecting socket:"); free(tmpname); + free(hostname); D_RETURN(4, NULL); } @@ -455,12 +458,14 @@ free(host_string); free(query_string); free(tmpname); + free(hostname); weprintf("error sending over socket:"); D_RETURN(4, NULL); } free(get_string); free(host_string); free(query_string); + free(hostname); while ((size = read(sockno, &buf, OUR_BUF_SIZE))) { @@ -643,8 +648,8 @@ ret = emalloc(len + 1); strncpy(ret, start, len); + ret[len] = '\0'; D_RETURN(3, ret); - } void |
From: <enl...@so...> - 2001-01-17 20:35:22
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh/src Modified Files: options.c Log Message: Wed Jan 17 20:33:31 2001 Tom Gilbert <gil...@li...> * Reverted to using wget by default - the builtin stuff isn't quite so tolerant about hangups and stuff, it kinda just blocks a lot. Needs more work before replacing use of wget, which "just works". =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.c,v retrieving revision 1.113 retrieving revision 1.114 diff -u -3 -r1.113 -r1.114 --- options.c 2000/12/11 19:23:38 1.113 +++ options.c 2001/01/17 20:35:23 1.114 @@ -71,7 +71,7 @@ opt.blur_button = 1; opt.no_blur_ctrl_mask = 0; - opt.builtin_http = 1; + opt.builtin_http = 0; D(3, ("About to parse env options (if any)\n")); /* Check for and parse any options in FEH_OPTIONS */ @@ -333,7 +333,7 @@ {"preload", 0, 0, 'p'}, {"reverse", 0, 0, 'n'}, {"thumbnails", 0, 0, 't'}, - {"wget", 0, 0, 'Q'}, + {"builtin", 0, 0, 'Q'}, {"menu-ctrl-mask", 0, 0, '5'}, /* okay */ {"scale-down", 0, 0, '.'}, /* okay */ /* options with values */ @@ -422,7 +422,7 @@ opt.list = 1; break; case 'Q': - opt.builtin_http = 0; + opt.builtin_http = 1; break; case 'L': opt.customlist = estrdup(optarg); @@ -790,7 +790,8 @@ " -R, --reload NUM Use this option to tell feh to reload an image\n" " after NUM seconds. Useful for viewing webcams\n" " via http, or even on your local machine.\n" - " -Q, --wget Use wget to grab remote files instead of builtin\n" + " -Q, --builtin Use builtin http grabber to grab remote files\n" + " instead of wget.\n" " mechanism, useful if you need to use a proxy or\n" " something.\n" " -k, --keep-http When viewing files using http, feh normally\n" |
From: <enl...@so...> - 2001-01-17 20:35:52
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh Modified Files: ChangeLog Log Message: Wed Jan 17 20:33:31 2001 Tom Gilbert <gil...@li...> * Reverted to using wget by default - the builtin stuff isn't quite so tolerant about hangups and stuff, it kinda just blocks a lot. Needs more work before replacing use of wget, which "just works". =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/ChangeLog,v retrieving revision 1.201 retrieving revision 1.202 diff -u -3 -r1.201 -r1.202 --- ChangeLog 2000/12/11 19:23:38 1.201 +++ ChangeLog 2001/01/17 20:35:23 1.202 @@ -1,3 +1,10 @@ +Wed Jan 17 20:33:31 2001 Tom Gilbert <gil...@li...> + + * Reverted to using wget by default - the builtin stuff isn't + quite so tolerant about hangups and stuff, it kinda just blocks a + lot. Needs more work before replacing use of wget, which "just + works". + Mon Dec 11 19:25:10 2000 Tom Gilbert <gil...@li...> * Added a super-sweet patch from Benjamin Elijah Griffin |
From: <enl...@so...> - 2001-01-28 14:46:43
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh/src Modified Files: imlib.c options.c options.h Log Message: Sun Jan 28 13:20:45 2001 Tom Gilbert <gil...@li...> * cam was using -Cwebcam, should be -Twebcam * default generated ~/.fehrc used --keep-http in webcam mode, this is probably not what most people want for the default, so I removed it. Either blow away your ~/.fehrc or make this change yourself to get it.... * Maybe fixed a memleak. I hope so, but it will take 3 days of running cam to find out :-) * After an idea and partial patch from KainX, added -G, --wget-timestamp to use wget timestamping when downloading http images. Useful when watching webcams, the idea is that wget only downloads the webcam if it has changed since the last time. Nice bandwidth saver. However, there is currently a bug in wget that prevents this from working. KainX found it and I think he reported it, so the next version should contain a fix. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/imlib.c,v retrieving revision 1.116 retrieving revision 1.117 diff -u -3 -r1.116 -r1.117 --- imlib.c 2000/12/17 20:28:37 1.116 +++ imlib.c 2001/01/28 14:46:35 1.117 @@ -300,10 +300,24 @@ } if (progwin->has_rotated) - feh_imlib_render_image_part_on_drawable_at_size_with_rotation - (progwin->bg_pmap, im, update_x, update_y, update_w, update_h, - dest_x + update_x, dest_y + update_y, update_w, update_h, - progwin->im_angle, 1, feh_imlib_image_has_alpha(im), 0); + feh_imlib_render_image_part_on_drawable_at_size_with_rotation(progwin-> + bg_pmap, + im, + update_x, + update_y, + update_w, + update_h, + dest_x + + update_x, + dest_y + + update_y, + update_w, + update_h, + progwin-> + im_angle, + 1, + feh_imlib_image_has_alpha + (im), 0); else feh_imlib_render_image_part_on_drawable_at_size(progwin->bg_pmap, im, update_x, update_y, @@ -326,6 +340,8 @@ { char *tmp; char *tmpname; + char *tmpname_timestamper = NULL; + char *basename; char num[10]; static long int i = 1; char *newurl = NULL; @@ -342,15 +358,26 @@ do { snprintf(num, sizeof(num), "%06ld", i++); + basename = strrchr(url, '/') + 1; tmpname = estrjoin("", opt.keep_http ? "feh_" : "/tmp/feh_", num, "_", - strrchr(url, '/') + 1, NULL); + basename, NULL); } while (stat(tmpname, &st) == 0); - rnum = rand(); - snprintf(randnum, sizeof(randnum), "%d", rnum); - newurl = estrjoin("?", url, randnum, NULL); + if (opt.wget_timestamp) + tmpname_timestamper = estrjoin("", "/tmp/feh_", basename, NULL); + + if (opt.wget_timestamp) + { + newurl = estrdup(url); + } + else + { + rnum = rand(); + snprintf(randnum, sizeof(randnum), "%d", rnum); + newurl = estrjoin("?", url, randnum, NULL); + } D(3, ("newurl: %s\n", newurl)); if (opt.builtin_http) @@ -394,6 +421,7 @@ { weprintf("couldn't work out hostname from %s:", newurl); free(tmpname); + free(newurl); D_RETURN(4, NULL); } @@ -404,6 +432,7 @@ weprintf("error resolving host %s:", hostname); free(hostname); free(tmpname); + free(newurl); D_RETURN(4, NULL); } @@ -419,6 +448,7 @@ weprintf("error opening socket:"); free(tmpname); free(hostname); + free(newurl); D_RETURN(4, NULL); } if (connect(sockno, (struct sockaddr *) &addr, sizeof(addr)) == -1) @@ -426,12 +456,11 @@ weprintf("error connecting socket:"); free(tmpname); free(hostname); + free(newurl); D_RETURN(4, NULL); } - get_url = strchr(newurl, '/') + 1; - get_url = strchr(get_url, '/') + 1; - /* Need initial / here, so no +1 this time. */ + get_url = strchr(newurl, '/') + 2; get_url = strchr(get_url, '/'); get_string = estrjoin(" ", "GET", get_url, "HTTP/1.0", NULL); @@ -459,6 +488,7 @@ free(query_string); free(tmpname); free(hostname); + free(newurl); weprintf("error sending over socket:"); D_RETURN(4, NULL); } @@ -466,6 +496,7 @@ free(host_string); free(query_string); free(hostname); + free(newurl); while ((size = read(sockno, &buf, OUR_BUF_SIZE))) { @@ -577,18 +608,26 @@ { weprintf("open url: fork failed:"); free(tmpname); + free(newurl); D_RETURN(4, NULL); } else if (pid == 0) { - if (opt.verbose) - execlp("wget", "wget", "--cache", "0", newurl, "-O", tmpname, - NULL); + char *quiet = NULL; + + if (!opt.verbose) + quiet = estrdup("-q"); + + if (opt.wget_timestamp) + { + execlp("wget", "wget", "-N", "-O", tmpname_timestamper, newurl, + quiet, NULL); + } else - execlp("wget", "wget", "-q", "--cache", "0", newurl, "-O", - tmpname, NULL); - execlp("wget", "wget", "-q", "--cache", "0", newurl, "-O", tmpname, - NULL); + { + execlp("wget", "wget", "--cache", "0", newurl, "-O", tmpname, + quiet, NULL); + } eprintf("url: exec failed: wget:"); } else @@ -601,6 +640,14 @@ free(tmpname); free(newurl); D_RETURN(4, NULL); + } + if (opt.wget_timestamp) + { + char cmd[2048]; + + snprintf(cmd, sizeof(cmd), "/bin/cp %s %s", tmpname_timestamper, + tmpname); + system(cmd); } } } =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -3 -r1.114 -r1.115 --- options.c 2001/01/17 20:35:23 1.114 +++ options.c 2001/01/28 14:46:35 1.115 @@ -303,7 +303,7 @@ { static char stropts[] = - "a:A:b:BcC:dD:e:f:Fg:hH:iIklL:mM:nNo:O:pPqQrR:sS:tT:uUvVwW:xXy:zZ1:2:3:4:56:78:90:"; + "a:A:b:BcC:dD:e:f:Fg:GhH:iIklL:mM:nNo:O:pPqQrR:sS:tT:uUvVwW:xXy:zZ1:2:3:4:56:78:90:"; static struct option lopts[] = { /* actions */ {"help", 0, 0, 'h'}, /* okay */ @@ -333,6 +333,7 @@ {"preload", 0, 0, 'p'}, {"reverse", 0, 0, 'n'}, {"thumbnails", 0, 0, 't'}, + {"wget-timestamp", 0, 0, 'G'}, {"builtin", 0, 0, 'Q'}, {"menu-ctrl-mask", 0, 0, '5'}, /* okay */ {"scale-down", 0, 0, '.'}, /* okay */ @@ -421,6 +422,9 @@ case 'l': opt.list = 1; break; + case 'G': + opt.wget_timestamp = 1; + break; case 'Q': opt.builtin_http = 1; break; @@ -799,6 +803,9 @@ " if caching, on exit. This option prevents this\n" " so that you get to keep the local copies.\n" " They will be in /tmp with \"feh\" in the name.\n" + " -G, --wget-timestamp When viewing http images with reload set (eg\n" + " webcams), try to only reload the image if the\n" + " remote file has changed.\n" " -l, --list Don't display images. Analyse them and display an\n" " 'ls' style listing. Useful in scripts hunt out\n" " images of a certain size/resolution/type etc.\n" @@ -993,7 +1000,7 @@ "# ================================================\n" "\n" "# Webcam mode, simply specify the url(s).\n" "# e.g. feh -Cwebcam http://cam1 http://cam2\n" - "webcam --multiwindow --keep-http --reload 30\n" "\n" + "webcam --multiwindow --reload 20\n" "\n" "# Create an index of the current directory. This version uses . as the\n" "# current dir, so you don't even need any commandline arguments.\n" "mkindex -iVO index.jpg .\n" "\n" "# More ambitious version...\n" =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/src/options.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- options.h 2000/12/11 19:23:38 1.24 +++ options.h 2001/01/28 14:46:35 1.25 @@ -63,6 +63,7 @@ unsigned char progress_gran; unsigned char scale_down; unsigned char builtin_http; + unsigned char wget_timestamp; char *output_file; char *bg_file; |
From: <enl...@so...> - 2001-01-28 14:47:13
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh/cam Modified Files: cam Log Message: Sun Jan 28 13:20:45 2001 Tom Gilbert <gil...@li...> * cam was using -Cwebcam, should be -Twebcam * default generated ~/.fehrc used --keep-http in webcam mode, this is probably not what most people want for the default, so I removed it. Either blow away your ~/.fehrc or make this change yourself to get it.... * Maybe fixed a memleak. I hope so, but it will take 3 days of running cam to find out :-) * After an idea and partial patch from KainX, added -G, --wget-timestamp to use wget timestamping when downloading http images. Useful when watching webcams, the idea is that wget only downloads the webcam if it has changed since the last time. Nice bandwidth saver. However, there is currently a bug in wget that prevents this from working. KainX found it and I think he reported it, so the next version should contain a fix. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/cam/cam,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- cam 2000/11/18 21:23:51 1.11 +++ cam 2001/01/28 14:46:35 1.12 @@ -9,7 +9,7 @@ my $feh = "feh"; # additional feh cmdline options -my $PRE = " -q -w -Cwebcam -1 0 -0 1 "; +my $PRE = " -q -w -Twebcam -1 0 -0 1 "; my $POST = ""; ############################################# ############################################# |
From: <enl...@so...> - 2001-01-28 14:47:13
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh Modified Files: ChangeLog Log Message: Sun Jan 28 13:20:45 2001 Tom Gilbert <gil...@li...> * cam was using -Cwebcam, should be -Twebcam * default generated ~/.fehrc used --keep-http in webcam mode, this is probably not what most people want for the default, so I removed it. Either blow away your ~/.fehrc or make this change yourself to get it.... * Maybe fixed a memleak. I hope so, but it will take 3 days of running cam to find out :-) * After an idea and partial patch from KainX, added -G, --wget-timestamp to use wget timestamping when downloading http images. Useful when watching webcams, the idea is that wget only downloads the webcam if it has changed since the last time. Nice bandwidth saver. However, there is currently a bug in wget that prevents this from working. KainX found it and I think he reported it, so the next version should contain a fix. =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/ChangeLog,v retrieving revision 1.202 retrieving revision 1.203 diff -u -3 -r1.202 -r1.203 --- ChangeLog 2001/01/17 20:35:23 1.202 +++ ChangeLog 2001/01/28 14:46:34 1.203 @@ -1,3 +1,20 @@ +Sun Jan 28 13:20:45 2001 Tom Gilbert <gil...@li...> + + * cam was using -Cwebcam, should be -Twebcam + * default generated ~/.fehrc used --keep-http in webcam mode, this + is probably not what most people want for the default, so I + removed it. Either blow away your ~/.fehrc or make this change + yourself to get it.... + * Maybe fixed a memleak. I hope so, but it will take 3 days of + running cam to find out :-) + * After an idea and partial patch from KainX, added -G, + --wget-timestamp to use wget timestamping when downloading http + images. Useful when watching webcams, the idea is that wget only + downloads the webcam if it has changed since the last time. Nice + bandwidth saver. However, there is currently a bug in wget that + prevents this from working. KainX found it and I think he reported + it, so the next version should contain a fix. + Wed Jan 17 20:33:31 2001 Tom Gilbert <gil...@li...> * Reverted to using wget by default - the builtin stuff isn't |
From: <enl...@so...> - 2001-01-28 15:34:37
|
Enlightenment CVS committal Author : gilbertt Project : misc Module : feh Dir : misc/feh/cam Modified Files: cam Log Message: shouldn't do any harm for cam to use this =================================================================== RCS file: /cvsroot/enlightenment/misc/feh/cam/cam,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- cam 2001/01/28 14:46:35 1.12 +++ cam 2001/01/28 15:34:29 1.13 @@ -9,7 +9,7 @@ my $feh = "feh"; # additional feh cmdline options -my $PRE = " -q -w -Twebcam -1 0 -0 1 "; +my $PRE = " -q -G -w -Twebcam -1 0 -0 1 "; my $POST = ""; ############################################# ############################################# |