Hello community,
here is the log from the commit of package fbi
checked in at Thu Jun 15 20:55:50 CEST 2006.
--------
--- fbi/fbi.changes 2006-01-25 21:35:49.000000000 +0100
+++ fbi/fbi.changes 2006-06-15 17:42:08.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Jun 15 17:40:37 CEST 2006 - kraxel@suse.de
+
+- update to version 2.04
+ * bugfix release, closes #168728
+
+-------------------------------------------------------------------
Old:
----
fbida-2.03.tar.bz2
New:
----
fbida-2.04.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ fbi.spec ++++++
--- /var/tmp/diff_new_pack.MLNvJG/_old 2006-06-15 20:55:30.000000000 +0200
+++ /var/tmp/diff_new_pack.MLNvJG/_new 2006-06-15 20:55:30.000000000 +0200
@@ -1,33 +1,35 @@
#
-# spec file for package fbi (Version 2.03)
+# spec file for package fbi (Version 2.04)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
-# Please submit bugfixes or comments via http://bugs.opensuse.org
+# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: fbi
-BuildRequires: curl-devel ed freetype2-devel giflib-devel libexif libpcd-devel libpng-devel libtiff-devel openmotif openmotif-devel pkgconfig update-desktop-files
License: GPL
Group: Productivity/Graphics/Viewers
Autoreqprov: on
-Version: 2.03
-Release: 5
-Summary: image viewer for the linux framebuffer console
+Version: 2.04
+Release: 1
+Summary: Image Viewer for the Linux Framebuffer Console
Source0: fbida-%{version}.tar.bz2
Source1: %name.png
Patch0: %name-desktop.patch
+BuildRequires: pkgconfig update-desktop-files
+BuildRequires: curl-devel freetype2-devel libexif openmotif-devel
+BuildRequires: giflib-devel libpcd-devel libpng-devel libtiff-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
-This is a image viewer for linux framebuffer devices. It has PhotoCD,
-jpeg, ppm, gif, tiff, xwd, bmp and png support built-in. Unknown
-formats are piped throuth convert (ImageMagick), which hopefully can
-handle it...
+This is a image viewer for Linux framebuffer devices. It has PhotoCD,
+jpeg, ppm, gif, tiff, xwd, bmp, and png support built-in. Unknown
+formats are piped through convert (ImageMagick), which hopefully can
+handle it.
@@ -109,6 +111,9 @@
/usr/X11R6/lib/X11/app-defaults/Ida
%changelog -n fbi
+* Thu Jun 15 2006 - kraxel@suse.de
+- update to version 2.04
+ * bugfix release, closes #168728
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Jan 13 2006 - schwab@suse.de
++++++ fbida-2.03.tar.bz2 -> fbida-2.04.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/GNUmakefile new/fbida-2.04/GNUmakefile
--- old/fbida-2.03/GNUmakefile 2004-06-30 15:41:54.000000000 +0200
+++ new/fbida-2.04/GNUmakefile 2006-06-13 15:35:48.000000000 +0200
@@ -8,6 +8,7 @@
# fixup flags
CFLAGS += -DVERSION='"$(VERSION)"' -I$(srcdir)
+CFLAGS += -Wno-pointer-sign
# default target
all: build
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/INSTALL new/fbida-2.04/INSTALL
--- old/fbida-2.03/INSTALL 2004-03-28 13:31:57.000000000 +0200
+++ new/fbida-2.04/INSTALL 2006-03-17 13:46:41.000000000 +0100
@@ -56,4 +56,4 @@
Gerd
--
-Gerd Knorr
+Gerd Hoffmann
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/VERSION new/fbida-2.04/VERSION
--- old/fbida-2.03/VERSION 2004-11-25 16:06:05.000000000 +0100
+++ new/fbida-2.04/VERSION 2006-06-15 16:17:00.000000000 +0200
@@ -1 +1 @@
-2.03
+2.04
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/browser.c new/fbida-2.04/browser.c
--- old/fbida-2.03/browser.c 2004-03-28 13:32:03.000000000 +0200
+++ new/fbida-2.04/browser.c 2006-06-13 14:47:24.000000000 +0200
@@ -1,6 +1,6 @@
/*
* simple file browser
- * (c) 2001-03 Gerd Knorr
+ * (c) 2001-03 Gerd Hoffmann
*
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/desktop.c new/fbida-2.04/desktop.c
--- old/fbida-2.03/desktop.c 2004-03-28 13:32:23.000000000 +0200
+++ new/fbida-2.04/desktop.c 2006-06-13 14:47:24.000000000 +0200
@@ -6,7 +6,7 @@
* no caching, no other clever tricks ...
* ida + fbi only use the Comment= entry of .directory files.
*
- * (c) 2004 Gerd Knorr
+ * (c) 2004 Gerd Hoffmann
*
*/
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/exiftran.c new/fbida-2.04/exiftran.c
--- old/fbida-2.03/exiftran.c 2004-06-30 15:41:54.000000000 +0200
+++ new/fbida-2.04/exiftran.c 2006-06-13 14:47:24.000000000 +0200
@@ -105,7 +105,7 @@
" -p preserve timestamps (with -i)\n"
"\n"
"-- \n"
- "Gerd Knorr [SUSE Labs]\n",
+ "Gerd Hoffmann [SUSE Labs]\n",
name);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fb-gui.c new/fbida-2.04/fb-gui.c
--- old/fbida-2.03/fb-gui.c 2004-08-17 13:47:30.000000000 +0200
+++ new/fbida-2.04/fb-gui.c 2006-06-14 17:09:51.000000000 +0200
@@ -3,6 +3,7 @@
#include
#include
#include
+#include
#include
#include
@@ -26,7 +27,7 @@
static unsigned short p_red[256], p_green[256], p_blue[256];
static struct fb_cmap p_cmap = { 0, 256, p_red, p_green, p_blue };
-static int32_t s_lut_red[256], s_lut_green[256], s_lut_blue[256];
+static int32_t s_lut_transp[256], s_lut_red[256], s_lut_green[256], s_lut_blue[256];
static unsigned char **shadow;
static unsigned int *sdirty,swidth,sheight;
@@ -47,14 +48,19 @@
size = 256 >> (8 - r);
for (i = 0; i < size; i++)
p_red[i] = calc_gamma(i,size);
+ p_cmap.len = size;
size = 256 >> (8 - g);
for (i = 0; i < size; i++)
p_green[i] = calc_gamma(i,size);
+ if (p_cmap.len < size)
+ p_cmap.len = size;
size = 256 >> (8 - b);
for (i = 0; i < size; i++)
p_blue[i] = calc_gamma(i,size);
+ if (p_cmap.len < size)
+ p_cmap.len = size;
}
static void
@@ -70,6 +76,7 @@
p_green[i] = calc_gamma(gs * ((i / b) % g), 255);
p_blue[i] = calc_gamma(bs * ((i) % b), 255);
}
+ p_cmap.len = 256;
}
static void shadow_lut_init_one(int32_t *lut, int bits, int shift)
@@ -90,6 +97,7 @@
fb_var.green.length &&
fb_var.blue.length) {
/* fb_var.{red|green|blue} looks sane, use it */
+ shadow_lut_init_one(s_lut_transp, fb_var.transp.length, fb_var.transp.offset);
shadow_lut_init_one(s_lut_red, fb_var.red.length, fb_var.red.offset);
shadow_lut_init_one(s_lut_green, fb_var.green.length, fb_var.green.offset);
shadow_lut_init_one(s_lut_blue, fb_var.blue.length, fb_var.blue.offset);
@@ -111,6 +119,10 @@
s_lut_blue[i] = (i & 0xf8) >> 3; /* bits -------- ---bbbbb */
}
break;
+ case 32:
+ for (i = 0; i < 256; i++) {
+ s_lut_transp[i] = i << 24; /* byte a--- */
+ }
case 24:
for (i = 0; i < 256; i++) {
s_lut_red[i] = i << 16; /* byte -r-- */
@@ -124,9 +136,9 @@
static void shadow_render_line(int line, unsigned char *dest, char unsigned *buffer)
{
- unsigned char *ptr = (void*)dest;
- unsigned short *ptr2 = (void*)dest;
- unsigned long *ptr4 = (void*)dest;
+ uint8_t *ptr = (void*)dest;
+ uint16_t *ptr2 = (void*)dest;
+ uint32_t *ptr4 = (void*)dest;
int x;
switch (fb_var.bits_per_pixel) {
@@ -150,7 +162,8 @@
break;
case 32:
for (x = 0; x < swidth; x++) {
- ptr4[x] = s_lut_red[buffer[x*3]] |
+ ptr4[x] = s_lut_transp[255] |
+ s_lut_red[buffer[x*3]] |
s_lut_green[buffer[x*3+1]] |
s_lut_blue[buffer[x*3+2]];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fbgs new/fbida-2.04/fbgs
--- old/fbida-2.03/fbgs 2004-11-08 14:09:20.000000000 +0100
+++ new/fbida-2.04/fbgs 2006-04-10 09:43:01.000000000 +0200
@@ -1,8 +1,8 @@
#!/bin/bash
# tmp dir
-DIR="${TMPDIR-/var/tmp}/fbps-$$"
-mkdir -p $DIR || exit 1
+DIR="$(mktemp -dtp ${TMPDIR-/var/tmp} fbgs-XXXXXX)"
+test -d "$DIR" || exit 1
trap "rm -rf $DIR" EXIT
# parse options
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fbi.c new/fbida-2.04/fbi.c
--- old/fbida-2.03/fbi.c 2004-12-02 13:27:11.000000000 +0100
+++ new/fbida-2.04/fbi.c 2006-06-13 15:35:48.000000000 +0200
@@ -1,7 +1,7 @@
/*
* image viewer, for framebuffer devices
*
- * (c) 1998-2004 Gerd Knorr
+ * (c) 1998-2004 Gerd Hoffmann
*
*/
@@ -120,6 +120,7 @@
/* Command line options. */
int autodown;
int autoup;
+int autofirst;
int comments;
int transparency = 40;
@@ -134,7 +135,7 @@
{
fprintf(stderr,
"fbi version " VERSION ", compiled on %s\n"
- "(c) 1999-2004 Gerd Knorr [SUSE Labs]\n",
+ "(c) 1999-2004 Gerd Hoffmann [SUSE Labs]\n",
__DATE__ );
}
@@ -155,8 +156,8 @@
"\n",
name);
- cfg_help_cmdline(fbi_cmd,4,20,0);
- cfg_help_cmdline(fbi_cfg,4,20,40);
+ cfg_help_cmdline(stderr,fbi_cmd,4,20,0);
+ cfg_help_cmdline(stderr,fbi_cfg,4,20,40);
fprintf(stderr,
"\n"
@@ -706,7 +707,7 @@
static int
svga_show(struct ida_image *img, int timeout, char *desc, char *info, int *nr)
{
- static int paused = 0;
+ static int paused = 0, skip = KEY_SPACE;
int exif = 0, help = 0;
int rc;
char key[11];
@@ -717,7 +718,7 @@
*nr = 0;
if (NULL == img)
- return KEY_SPACE; /* skip */
+ return skip;
if (new_image) {
/* start with centered image, if larger than screen */
@@ -820,6 +821,7 @@
redraw = 1;
top += text_steps;
} else {
+ skip = KEY_SPACE;
return KEY_SPACE;
}
@@ -849,6 +851,7 @@
redraw = 1;
top -= text_steps;
} else {
+ skip = KEY_PGUP;
return KEY_PGUP;
}
@@ -861,6 +864,7 @@
redraw = 1;
top += text_steps;
} else {
+ skip = KEY_PGDN;
return KEY_PGDN;
}
@@ -1121,7 +1125,7 @@
static void cleanup_and_exit(int code)
{
shadow_fini();
- fb_clear_mem();
+ fb_clear_screen();
tty_restore();
fb_cleanup();
flist_print_tagged(stdout);
@@ -1181,6 +1185,7 @@
once = GET_ONCE();
autoup = GET_AUTO_UP();
autodown = GET_AUTO_DOWN();
+ autofirst = GET_AUTO_FIRST();
fitwidth = GET_FIT_WIDTH();
statusline = GET_VERBOSE();
textreading = GET_TEXT_MODE();
@@ -1259,6 +1264,8 @@
scale = 1;
if (scale > 1 && !autoup)
scale = 1;
+ if (autofirst)
+ autoup = autodown = 0;
}
if (scale != 1) {
snprintf(linebuffer, sizeof(linebuffer),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fbi.man new/fbida-2.04/fbi.man
--- old/fbida-2.03/fbi.man 2004-12-02 13:27:11.000000000 +0100
+++ new/fbida-2.04/fbi.man 2006-04-10 09:43:01.000000000 +0200
@@ -96,6 +96,7 @@
H display textbox with brief help
I display textbox with some EXIF info
<number>g jump to image #<number>
+<number>s set zoom to <number>%
.fi
.P
The Return vs. Space key thing can be used to create a file list while
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fbiconfig.c new/fbida-2.04/fbiconfig.c
--- old/fbida-2.03/fbiconfig.c 2004-10-19 10:35:03.000000000 +0200
+++ new/fbida-2.04/fbiconfig.c 2006-04-10 09:43:01.000000000 +0200
@@ -61,6 +61,11 @@
.yesno = 1,
.desc = " like the above, but downscale only",
},{
+ .cmdline = "autofirst",
+ .option = { O_AUTO_FIRST },
+ .yesno = 1,
+ .desc = " autoscale first image only",
+ },{
.cmdline = "fitwidth",
.option = { O_FIT_WIDTH },
.yesno = 1,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fbiconfig.h new/fbida-2.04/fbiconfig.h
--- old/fbida-2.03/fbiconfig.h 2004-10-19 10:35:03.000000000 +0200
+++ new/fbida-2.04/fbiconfig.h 2006-04-10 09:43:01.000000000 +0200
@@ -12,6 +12,7 @@
#define O_AUTO_UP O_OPTIONS, "auto-up"
#define O_AUTO_DOWN O_OPTIONS, "auto-down"
+#define O_AUTO_FIRST O_OPTIONS, "auto-first"
#define O_FIT_WIDTH O_OPTIONS, "fit-width"
#define O_QUIET O_OPTIONS, "quiet"
#define O_VERBOSE O_OPTIONS, "verbose"
@@ -41,6 +42,7 @@
#define GET_AUTO_UP() cfg_get_bool(O_AUTO_UP, 0)
#define GET_AUTO_DOWN() cfg_get_bool(O_AUTO_DOWN, 0)
+#define GET_AUTO_FIRST() cfg_get_bool(O_AUTO_DOWN, 0)
#define GET_FIT_WIDTH() cfg_get_bool(O_FIT_WIDTH, 0)
#define GET_QUIET() cfg_get_bool(O_QUIET, 0)
#define GET_VERBOSE() cfg_get_bool(O_VERBOSE, 1)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/fbtools.c new/fbida-2.04/fbtools.c
--- old/fbida-2.03/fbtools.c 2004-11-08 14:09:20.000000000 +0100
+++ new/fbida-2.04/fbtools.c 2006-06-15 16:08:30.000000000 +0200
@@ -323,6 +323,7 @@
{
char fbdev[16];
struct vt_stat vts;
+ unsigned long page_mask;
dev_init();
tty = 0;
@@ -424,15 +425,14 @@
goto err;
}
#endif
- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK);
+ page_mask = getpagesize()-1;
+ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & page_mask;
fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset,
PROT_READ|PROT_WRITE,MAP_SHARED,fb,0);
if (-1L == (long)fb_mem) {
perror("mmap");
goto err;
}
-// fprintf(stderr,"fb_mem = %p\n",fb_mem);
-
/* move viewport to upper left corner */
if (fb_var.xoffset != 0 || fb_var.yoffset != 0) {
fb_var.xoffset = 0;
@@ -449,7 +449,7 @@
fb_activate_current(tty);
/* cls */
- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len);
+ fb_memset(fb_mem+fb_mem_offset, 0, fb_fix.line_length * fb_var.yres);
return fb;
err:
@@ -461,6 +461,8 @@
fb_cleanup(void)
{
/* restore console */
+ if (-1 == ioctl(tty,KDSETMODE, kd_mode))
+ perror("ioctl KDSETMODE");
if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_ovar))
perror("ioctl FBIOPUT_VSCREENINFO");
if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix))
@@ -472,8 +474,6 @@
}
close(fb);
- if (-1 == ioctl(tty,KDSETMODE, kd_mode))
- perror("ioctl KDSETMODE");
if (-1 == ioctl(tty,VT_SETMODE, &vt_omode))
perror("ioctl VT_SETMODE");
if (orig_vt_no && -1 == ioctl(tty, VT_ACTIVATE, orig_vt_no))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/filelist.c new/fbida-2.04/filelist.c
--- old/fbida-2.03/filelist.c 2004-03-28 13:32:15.000000000 +0200
+++ new/fbida-2.04/filelist.c 2006-06-13 14:47:24.000000000 +0200
@@ -1,6 +1,6 @@
/*
* file list management ("virtual photo album").
- * (c) 2003 Gerd Knorr
+ * (c) 2003 Gerd Hoffmann
*
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/genthumbnail.c new/fbida-2.04/genthumbnail.c
--- old/fbida-2.03/genthumbnail.c 2004-03-28 13:32:23.000000000 +0200
+++ new/fbida-2.04/genthumbnail.c 2006-06-13 15:35:48.000000000 +0200
@@ -152,7 +152,7 @@
/* ---------------------------------------------------------------------- */
-int create_thumbnail(char *filename, char *dest, int max)
+int create_thumbnail(char *filename, unsigned char *dest, int max)
{
struct ida_image *img,*thumb;
int size;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/genthumbnail.h new/fbida-2.04/genthumbnail.h
--- old/fbida-2.03/genthumbnail.h 2004-03-28 13:32:23.000000000 +0200
+++ new/fbida-2.04/genthumbnail.h 2006-06-13 15:35:48.000000000 +0200
@@ -1 +1 @@
-int create_thumbnail(char *filename, char *dest, int max);
+int create_thumbnail(char *filename, unsigned char *dest, int max);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/hex.c new/fbida-2.04/hex.c
--- old/fbida-2.03/hex.c 2004-03-28 13:32:07.000000000 +0200
+++ new/fbida-2.04/hex.c 2006-06-13 14:47:24.000000000 +0200
@@ -2,7 +2,7 @@
* file viewer (hex dump)
* quick & dirty for now, handling xxl files doesn't work very well ...
*
- * (c) 2001 Gerd Knorr
+ * (c) 2001 Gerd Hoffmann
*
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/jpegtools.c new/fbida-2.04/jpegtools.c
--- old/fbida-2.03/jpegtools.c 2004-11-25 16:06:05.000000000 +0100
+++ new/fbida-2.04/jpegtools.c 2006-06-13 14:47:24.000000000 +0200
@@ -5,7 +5,7 @@
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
- * plenty of changes by Gerd Knorr , with focus on
+ * plenty of changes by Gerd Hoffmann , with focus on
* digital image processing and sane exif handling:
*
* - does transformations only (flip/rotate/transpose/transverse).
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/man.c new/fbida-2.04/man.c
--- old/fbida-2.03/man.c 2004-03-28 13:32:09.000000000 +0200
+++ new/fbida-2.04/man.c 2006-06-13 14:47:24.000000000 +0200
@@ -1,6 +1,6 @@
/*
* motif-based man page renderer
- * (c) 2001 Gerd Knorr
+ * (c) 2001 Gerd Hoffmann
*
*/
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/mk/Autoconf.mk new/fbida-2.04/mk/Autoconf.mk
--- old/fbida-2.03/mk/Autoconf.mk 2004-03-28 13:32:28.000000000 +0200
+++ new/fbida-2.04/mk/Autoconf.mk 2006-03-17 13:46:41.000000000 +0100
@@ -1,7 +1,7 @@
#
# simple autoconf system for GNU make
#
-# (c) 2002-2004 Gerd Knorr
+# (c) 2002-2006 Gerd Hoffmann
#
# credits for creating this one go to the autotools people because
# they managed it to annoy lots of developers and users (including
@@ -110,6 +110,13 @@
echo "/etc/X11" || echo "/usr/X11R6/lib/X11");\
$(call ac_fini))
+# check if package is installed, via pkg-config
+# args: pkg name
+ac_pkg_config = $(shell \
+ $(call ac_init,for $(1) (using pkg-config));\
+ $(call ac_b_cmd, pkg-config $(1));\
+ $(call ac_fini))
+
########################################################################
# build Make.config
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/mk/Compile.mk new/fbida-2.04/mk/Compile.mk
--- old/fbida-2.03/mk/Compile.mk 2004-03-28 13:32:28.000000000 +0200
+++ new/fbida-2.04/mk/Compile.mk 2006-03-17 13:46:41.000000000 +0100
@@ -1,7 +1,7 @@
#
# some rules to compile stuff ...
#
-# (c) 2002-2004 Gerd Knorr
+# (c) 2002-2006 Gerd Hoffmann
#
# main features:
# * autodependencies via "cpp -MD"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/mk/Maintainer.mk new/fbida-2.04/mk/Maintainer.mk
--- old/fbida-2.03/mk/Maintainer.mk 2004-03-28 13:32:28.000000000 +0200
+++ new/fbida-2.04/mk/Maintainer.mk 2006-03-17 13:46:41.000000000 +0100
@@ -1,7 +1,7 @@
# just some maintainer stuff for me ...
########################################################################
-make-sync-dir = $(HOME)/src/gnu-make
+make-sync-dir = $(HOME)/projects/gnu-makefiles
.PHONY: sync
sync:: distclean
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/mk/Variables.mk new/fbida-2.04/mk/Variables.mk
--- old/fbida-2.03/mk/Variables.mk 2004-03-28 13:32:28.000000000 +0200
+++ new/fbida-2.04/mk/Variables.mk 2006-03-17 13:46:41.000000000 +0100
@@ -29,9 +29,11 @@
INSTALL_DIR := $(INSTALL) -d
# cflags
-CFLAGS ?= -g -O2
-CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \
- -Wpointer-arith -Wunused
+CFLAGS ?= -g -O2
+CXXFLAGS ?= $(CFLAGS)
+CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+ -Wpointer-arith -Wunused
+CXXFLAGS += -Wall -Wpointer-arith -Wunused
# add /usr/local to the search path if something is in there ...
ifneq ($(wildcard /usr/local/include/*.h),)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/mk/utf8.tmp new/fbida-2.04/mk/utf8.tmp
--- old/fbida-2.03/mk/utf8.tmp 2004-03-28 13:32:28.000000000 +0200
+++ new/fbida-2.04/mk/utf8.tmp 1970-01-01 01:00:00.000000000 +0100
@@ -1,25 +0,0 @@
-utf8.o: utf8.c /usr/include/stdio.h /usr/include/features.h \
- /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
- /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/include/stddef.h \
- /usr/include/bits/types.h /usr/include/bits/wordsize.h \
- /usr/include/bits/typesizes.h /usr/include/libio.h \
- /usr/include/_G_config.h /usr/include/wchar.h /usr/include/bits/wchar.h \
- /usr/include/gconv.h \
- /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/include/stdarg.h \
- /usr/include/bits/stdio_lim.h /usr/include/bits/sys_errlist.h \
- /usr/include/bits/stdio.h /usr/include/stdlib.h \
- /usr/include/bits/waitflags.h /usr/include/bits/waitstatus.h \
- /usr/include/endian.h /usr/include/bits/endian.h /usr/include/xlocale.h \
- /usr/include/sys/types.h /usr/include/time.h /usr/include/sys/select.h \
- /usr/include/bits/select.h /usr/include/bits/sigset.h \
- /usr/include/bits/time.h /usr/include/sys/sysmacros.h \
- /usr/include/bits/pthreadtypes.h /usr/include/bits/sched.h \
- /usr/include/alloca.h /usr/include/unistd.h \
- /usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
- /usr/include/bits/confname.h /usr/include/getopt.h \
- /usr/include/string.h /usr/include/bits/string.h \
- /usr/include/bits/string2.h /usr/include/errno.h \
- /usr/include/bits/errno.h /usr/include/linux/errno.h \
- /usr/include/asm/errno.h /usr/include/asm-x86_64/errno.h \
- /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
- /usr/include/iconv.h list.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/parseconfig.c new/fbida-2.04/parseconfig.c
--- old/fbida-2.03/parseconfig.c 2004-06-10 09:31:54.000000000 +0200
+++ new/fbida-2.04/parseconfig.c 2006-03-17 13:46:41.000000000 +0100
@@ -3,6 +3,8 @@
*
*/
+#include "config.h"
+
#include
#include
#include
@@ -13,6 +15,7 @@
#include
#include "list.h"
+#include "misc.h"
#include "parseconfig.h"
struct cfg_entry {
@@ -38,23 +41,6 @@
LIST_HEAD(domains);
/* ------------------------------------------------------------------------ */
-/* prehistoric libc ;) */
-
-#ifndef HAVE_STRCASESTR
-char* strcasestr(char *haystack, char *needle)
-{
- int hlen = strlen(haystack);
- int nlen = strlen(needle);
- int offset;
-
- for (offset = 0; offset <= hlen - nlen; offset++)
- if (0 == strncasecmp(haystack+offset,needle,nlen))
- return haystack+offset;
- return NULL;
-}
-#endif
-
-/* ------------------------------------------------------------------------ */
/* internal stuff */
static struct cfg_domain *d_last;
@@ -270,10 +256,14 @@
{
struct cfg_domain *domain = NULL;
struct cfg_section *section = NULL;
-
- domain = cfg_get_domain(dname);
- section = cfg_get_section(domain,sname);
- cfg_set_entry(section,ename,value);
+
+ if (NULL == value) {
+ cfg_del_entry(dname, sname, ename);
+ } else {
+ domain = cfg_get_domain(dname);
+ section = cfg_get_section(domain,sname);
+ cfg_set_entry(section,ename,value);
+ }
}
void
@@ -451,41 +441,41 @@
}
void
-cfg_help_cmdline(struct cfg_cmdline *opt, int w1, int w2, int w3)
+cfg_help_cmdline(FILE *fp, struct cfg_cmdline *opt, int w1, int w2, int w3)
{
char *val;
int o,len;
for (o = 0; opt[o].cmdline != NULL; o++) {
- fprintf(stderr,"%*s",w1,"");
+ fprintf(fp,"%*s",w1,"");
if (opt[o].letter) {
- fprintf(stderr,"-%c ",opt[o].letter);
+ fprintf(fp,"-%c ",opt[o].letter);
} else {
- fprintf(stderr," ");
+ fprintf(fp," ");
}
if (opt[o].yesno) {
- len = fprintf(stderr,"-(no)%s ",opt[o].cmdline);
+ len = fprintf(fp,"-(no)%s ",opt[o].cmdline);
} else if (opt[o].needsarg) {
- len = fprintf(stderr,"-%s <arg> ",opt[o].cmdline);
+ len = fprintf(fp,"-%s <arg> ",opt[o].cmdline);
} else {
- len = fprintf(stderr,"-%s ",opt[o].cmdline);
+ len = fprintf(fp,"-%s ",opt[o].cmdline);
}
if (len < w2)
- fprintf(stderr,"%*s",w2-len,"");
+ fprintf(fp,"%*s",w2-len,"");
- len = fprintf(stderr,"%s ",opt[o].desc);
+ len = fprintf(fp,"%s ",opt[o].desc);
if (w3) {
if (len < w3)
- fprintf(stderr,"%*s",w3-len,"");
+ fprintf(fp,"%*s",w3-len,"");
val = cfg_get_str(opt[o].option.domain,
opt[o].option.section,
opt[o].option.entry);
if (val)
- fprintf(stderr,"[%s]",val);
+ fprintf(fp,"[%s]",val);
}
- fprintf(stderr,"\n");
+ fprintf(fp,"\n");
}
}
@@ -637,7 +627,7 @@
return section->name;
}
-int cfg_sections_count(char *dname)
+unsigned int cfg_sections_count(char *dname)
{
struct list_head *item;
struct cfg_domain *domain;
@@ -736,7 +726,7 @@
return entry->name;
}
-int cfg_entries_count(char *dname, char *sname)
+unsigned int cfg_entries_count(char *dname, char *sname)
{
struct list_head *item;
struct cfg_section *section;
@@ -812,8 +802,8 @@
return entry->value;
}
-int
-cfg_get_int(char *dname, char *sname, char *ename, int def)
+unsigned int
+cfg_get_int(char *dname, char *sname, char *ename, unsigned int def)
{
char *val;
@@ -823,8 +813,8 @@
return atoi(val);
}
-int
-cfg_get_signed_int(char *dname, char *sname, char *ename, unsigned int def)
+signed int
+cfg_get_signed_int(char *dname, char *sname, char *ename, signed int def)
{
char *val;
@@ -865,7 +855,7 @@
/* ------------------------------------------------------------------------ */
/* get/set flags */
-int cfg_get_sflags(char *dname, char *sname)
+unsigned int cfg_get_sflags(char *dname, char *sname)
{
struct cfg_section *section;
@@ -875,7 +865,7 @@
return section->flags;
}
-int cfg_get_eflags(char *dname, char *sname, char *ename)
+unsigned int cfg_get_eflags(char *dname, char *sname, char *ename)
{
struct cfg_entry *entry;
@@ -885,8 +875,8 @@
return entry->flags;
}
-int cfg_set_sflags(char *dname, char *sname,
- unsigned int mask, unsigned int bits)
+unsigned int cfg_set_sflags(char *dname, char *sname,
+ unsigned int mask, unsigned int bits)
{
struct cfg_section *section;
@@ -898,8 +888,8 @@
return section->flags;
}
-int cfg_set_eflags(char *dname, char *sname, char *ename,
- unsigned int mask, unsigned int bits)
+unsigned int cfg_set_eflags(char *dname, char *sname, char *ename,
+ unsigned int mask, unsigned int bits)
{
struct cfg_entry *entry;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/parseconfig.h new/fbida-2.04/parseconfig.h
--- old/fbida-2.03/parseconfig.h 2004-06-08 10:36:57.000000000 +0200
+++ new/fbida-2.04/parseconfig.h 2006-03-17 13:46:41.000000000 +0100
@@ -18,14 +18,15 @@
int yesno:1;
};
void cfg_parse_cmdline(int *argc, char **argv, struct cfg_cmdline *opt);
-void cfg_help_cmdline(struct cfg_cmdline *opt, int w1, int w2, int w3);
+void cfg_help_cmdline(FILE *fp, struct cfg_cmdline *opt, int w1, int w2, int w3);
/* file I/O */
int cfg_parse_file(char *dname, char *filename);
int cfg_write_file(char *dname, char *filename);
/* update */
-void cfg_set_str(char *dname, char *sname, char *ename, const char *value);
+void cfg_set_str(char *dname, char *sname, char *ename,
+ const char *value);
void cfg_set_int(char *dname, char *sname, char *ename, int value);
void cfg_set_bool(char *dname, char *sname, char *ename, int value);
@@ -36,14 +37,14 @@
char* cfg_sections_first(char *dname);
char* cfg_sections_next(char *dname, char *current);
char* cfg_sections_prev(char *dname, char *current);
-int cfg_sections_count(char *dname);
char* cfg_sections_index(char *dname, int i);
+unsigned int cfg_sections_count(char *dname);
char* cfg_entries_first(char *dname, char *sname);
char* cfg_entries_next(char *dname, char *sname, char *current);
char* cfg_entries_prev(char *dname, char *sname, char *current);
-int cfg_entries_count(char *dname, char *sname);
char* cfg_entries_index(char *dname, char *sname, int i);
+unsigned int cfg_entries_count(char *dname, char *sname);
#define cfg_sections_for_each(dname, item) \
for (item = cfg_sections_first(dname); NULL != item; \
@@ -53,18 +54,16 @@
/* read */
char* cfg_get_str(char *dname, char *sname, char *ename);
-int cfg_get_int(char *dname, char *sname, char *ename,
- int def);
-int cfg_get_signed_int(char *dname, char *sname, char *ename,
- unsigned int def);
-float cfg_get_float(char *dname, char *sname, char *ename,
- float def);
-int cfg_get_bool(char *dname, char *sname, char *ename,
- int def);
-
-int cfg_get_sflags(char *dname, char *sname);
-int cfg_get_eflags(char *dname, char *sname, char *ename);
-int cfg_set_sflags(char *dname, char *sname,
- unsigned int mask, unsigned int bits);
-int cfg_set_eflags(char *dname, char *sname, char *ename,
- unsigned int mask, unsigned int bits);
+unsigned int cfg_get_int(char *dname, char *sname,
+ char *ename, unsigned int def);
+signed int cfg_get_signed_int(char *dname, char *sname,
+ char *ename, signed int def);
+float cfg_get_float(char *dname, char *sname, char *ename, float def);
+int cfg_get_bool(char *dname, char *sname, char *ename, int def);
+
+unsigned int cfg_get_sflags(char *dname, char *sname);
+unsigned int cfg_get_eflags(char *dname, char *sname, char *ename);
+unsigned int cfg_set_sflags(char *dname, char *sname,
+ unsigned int mask, unsigned int bits);
+unsigned int cfg_set_eflags(char *dname, char *sname, char *ename,
+ unsigned int mask, unsigned int bits);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/rd/read-jpeg.c new/fbida-2.04/rd/read-jpeg.c
--- old/fbida-2.03/rd/read-jpeg.c 2004-03-28 13:32:25.000000000 +0200
+++ new/fbida-2.04/rd/read-jpeg.c 2006-06-13 15:35:48.000000000 +0200
@@ -4,6 +4,7 @@
#include
#include
#include
+#include
#include
@@ -18,6 +19,7 @@
struct jpeg_decompress_struct cinfo;
struct jpeg_error_mgr jerr;
+ jmp_buf errjump;
JSAMPARRAY buffer; /* Output row buffer */
int row_stride,linelength; /* physical row width in output buffer */
unsigned char *image,*ptr;
@@ -65,6 +67,16 @@
/* ---------------------------------------------------------------------- */
/* jpeg loader */
+static void jerror_exit(j_common_ptr info)
+{
+ struct jpeg_decompress_struct *cinfo = (struct jpeg_decompress_struct *)info;
+ struct jpeg_state *h = container_of(cinfo, struct jpeg_state, cinfo);
+ cinfo->err->output_message(info);
+ longjmp(h->errjump, 1);
+ jpeg_destroy_decompress(cinfo);
+ exit(1);
+}
+
static void*
jpeg_init(FILE *fp, char *filename, unsigned int page,
struct ida_image_info *i, int thumbnail)
@@ -77,6 +89,10 @@
h->infile = fp;
h->cinfo.err = jpeg_std_error(&h->jerr);
+ h->cinfo.err->error_exit = jerror_exit;
+ if(setjmp(h->errjump))
+ return 0;
+
jpeg_create_decompress(&h->cinfo);
jpeg_save_markers(&h->cinfo, JPEG_COM, 0xffff); /* comment */
jpeg_save_markers(&h->cinfo, JPEG_APP0+1, 0xffff); /* EXIF */
@@ -156,6 +172,9 @@
{
struct jpeg_state *h = data;
JSAMPROW row = dst;
+
+ if(setjmp(h->errjump))
+ return;
jpeg_read_scanlines(&h->cinfo, &row, 1);
}
@@ -163,6 +182,9 @@
jpeg_done(void *data)
{
struct jpeg_state *h = data;
+
+ if (setjmp(h->errjump))
+ return;
jpeg_destroy_decompress(&h->cinfo);
if (h->infile)
fclose(h->infile);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/sane.c new/fbida-2.04/sane.c
--- old/fbida-2.03/sane.c 2004-03-28 13:32:08.000000000 +0200
+++ new/fbida-2.04/sane.c 2006-03-17 13:46:41.000000000 +0100
@@ -37,7 +37,7 @@
XtNnumChildren,&nchildren,
NULL);
wlist = malloc(sizeof(Widget*)*nchildren);
- memcpy(list,children,sizeof(Widget*)*nchildren);
+ memcpy(wlist,children,sizeof(Widget*)*nchildren);
for (i = 0; i < nchildren; i++)
XtDestroyWidget(wlist[i]);
free(wlist);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/thumbnail.cgi.c new/fbida-2.04/thumbnail.cgi.c
--- old/fbida-2.03/thumbnail.cgi.c 2004-03-28 13:32:19.000000000 +0200
+++ new/fbida-2.04/thumbnail.cgi.c 2006-06-13 14:47:24.000000000 +0200
@@ -34,7 +34,7 @@
"deliver thumbnails for any JPEG image below below your document root which\n"
"it is allowed to open by unix file permissions.\n"
"\n"
- "(c) 2004 Gerd Knorr [SUSE Labs]\n"
+ "(c) 2004 Gerd Hoffmann [SUSE Labs]\n"
"\n";
/* -------------------------------------------------------------------------- */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/fbida-2.03/x11.c new/fbida-2.04/x11.c
--- old/fbida-2.03/x11.c 2004-03-28 13:32:13.000000000 +0200
+++ new/fbida-2.04/x11.c 2006-06-13 14:47:24.000000000 +0200
@@ -1,7 +1,7 @@
/*
* some X11 ximage / pixmaps rotines
*
- * (c) 1996 Gerd Knorr
+ * (c) 1996 Gerd Hoffmann
*
* basic usage:
* 1) call x11_color_init()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org