From 1427897c69805fb8ee41335e8e46791364bc7759 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 27 Nov 2012 16:35:52 -0500 Subject: [PATCH 01/38] fix PNG support --- xloadimage-4.1-png-1.5.patch | 39 ++ xloadimage-4.1-png-pkg-config.patch | 722 ++++++++++++++-------------- xloadimage.spec | 11 +- 3 files changed, 408 insertions(+), 364 deletions(-) create mode 100644 xloadimage-4.1-png-1.5.patch diff --git a/xloadimage-4.1-png-1.5.patch b/xloadimage-4.1-png-1.5.patch new file mode 100644 index 0000000..f02c459 --- /dev/null +++ b/xloadimage-4.1-png-1.5.patch @@ -0,0 +1,39 @@ +diff -up xloadimage.4.1/png.c.png15 xloadimage.4.1/png.c +--- xloadimage.4.1/png.c.png15 2012-11-27 16:24:36.512125771 -0500 ++++ xloadimage.4.1/png.c 2012-11-27 16:28:15.216129052 -0500 +@@ -75,7 +75,7 @@ static void output_error(png_structp png + { + debug(" #error "); + output_warn( png_ptr, str); +- longjmp(png_ptr->jmpbuf, 1); /* return control to outer routine */ ++ longjmp(png_jmpbuf(png_ptr), 1); /* return control to outer routine */ + } + + +@@ -164,7 +164,7 @@ static int pngHeader(png_structpp png_pp + png_destroy_read_struct(png_pp, info_pp, end_pp); + return 0; + } +- if (setjmp((*png_pp)->jmpbuf)) { ++ if (setjmp(png_jmpbuf(*png_pp))) { + /* On error */ + png_destroy_read_struct(png_pp, info_pp, end_pp); + return 0; +@@ -220,7 +220,7 @@ int pngIdent(char *fullname, char *name) + zclose(zinput_file); + return 0; + } +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* On error */ + freeImage(image); + png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); +@@ -308,7 +308,7 @@ Image *pngLoad(char *fullname, char *nam + case PNG_COLOR_TYPE_GRAY_ALPHA: + case PNG_COLOR_TYPE_GRAY: + if (bit_depth < 8) +- png_set_gray_1_2_4_to_8(png_ptr); /* 1 pixlel 1 byte */ ++ png_set_expand_gray_1_2_4_to_8(png_ptr); /* 1 pixlel 1 byte */ + image = newRGBImage(width, height, 8); + image->rgb.used = 256; + for (i = 0; i < 256; i++) { diff --git a/xloadimage-4.1-png-pkg-config.patch b/xloadimage-4.1-png-pkg-config.patch index 5315ce9..65b3b11 100644 --- a/xloadimage-4.1-png-pkg-config.patch +++ b/xloadimage-4.1-png-pkg-config.patch @@ -1,30 +1,31 @@ diff -up xloadimage.4.1/configure.in.png-pkg-config xloadimage.4.1/configure.in ---- xloadimage.4.1/configure.in.png-pkg-config 2011-12-08 14:16:59.479149052 -0500 -+++ xloadimage.4.1/configure.in 2011-12-08 14:16:59.674147298 -0500 -@@ -16,7 +16,7 @@ AC_CHECK_LIB(m, main) +--- xloadimage.4.1/configure.in.png-pkg-config 2012-11-27 14:57:17.378047157 -0500 ++++ xloadimage.4.1/configure.in 2012-11-27 16:22:15.330123652 -0500 +@@ -16,7 +16,10 @@ AC_CHECK_LIB(m, main) dnl Replace `main' with a function in -lz: AC_CHECK_LIB(z, main) dnl Replace `main' with a function in -lpng: -AC_CHECK_LIB(png, main) -+PKG_CHECK_MODULES(PNG, libpng) ++PKG_CHECK_MODULES(PNG, libpng, HAVE_LIBPNG="yes", HAVE_LIBPNG="no") ++if test "x$HAVE_LIBPNG" = xyes ; then ++ AC_DEFINE([HAVE_LIBPNG], [], [Define if we have libpng.]) ++fi dnl Replace `main' with a function in -ljpeg: AC_CHECK_LIB(jpeg, main) dnl Replace `main' with a function in -ltiff: diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure ---- xloadimage.4.1/configure.png-pkg-config 2011-12-08 14:16:59.478149061 -0500 -+++ xloadimage.4.1/configure 2011-12-08 14:16:59.680147244 -0500 -@@ -1,28 +1,696 @@ +--- xloadimage.4.1/configure.png-pkg-config 2012-11-27 14:57:17.378047157 -0500 ++++ xloadimage.4.1/configure 2012-11-27 16:22:24.239123786 -0500 +@@ -1,28 +1,716 @@ #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.13 -# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. -+# Generated by GNU Autoconf 2.68. ++# Generated by GNU Autoconf 2.69. +# +# -+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -+# Foundation, Inc. ++# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# # # This configure script is free software; the Free Software Foundation @@ -153,6 +154,31 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + ++# Use a proper internal environment variable to ensure we don't fall ++ # into an infinite loop, continuously re-executing ourselves. ++ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then ++ _as_can_reexec=no; export _as_can_reexec; ++ # We cannot yet assume a decent shell, so we have to provide a ++# neutralization value for shells without unset; and this also ++# works around shells that cannot unset nonexistent variables. ++# Preserve -v and -x to the replacement shell. ++BASH_ENV=/dev/null ++ENV=/dev/null ++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++esac ++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} ++# Admittedly, this is quite paranoid, since all the known shells bail ++# out after a failed `exec'. ++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 ++as_fn_exit 255 ++ fi ++ # We don't want this to propagate to other subprocesses. ++ { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh @@ -186,7 +212,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +else + exitcode=1; echo positional parameters were not saved. +fi -+test x\$exitcode = x0 || exit 1" ++test x\$exitcode = x0 || exit 1 ++test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -231,21 +258,25 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + + + if test "x$CONFIG_SHELL" != x; then : -+ # We cannot yet assume a decent shell, so we have to provide a -+ # neutralization value for shells without unset; and this also -+ # works around shells that cannot unset nonexistent variables. -+ # Preserve -v and -x to the replacement shell. -+ BASH_ENV=/dev/null -+ ENV=/dev/null -+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV -+ export CONFIG_SHELL -+ case $- in # (((( -+ *v*x* | *x*v* ) as_opts=-vx ;; -+ *v* ) as_opts=-v ;; -+ *x* ) as_opts=-x ;; -+ * ) as_opts= ;; -+ esac -+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} ++ export CONFIG_SHELL ++ # We cannot yet assume a decent shell, so we have to provide a ++# neutralization value for shells without unset; and this also ++# works around shells that cannot unset nonexistent variables. ++# Preserve -v and -x to the replacement shell. ++BASH_ENV=/dev/null ++ENV=/dev/null ++(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV ++case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++esac ++exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} ++# Admittedly, this is quite paranoid, since all the known shells bail ++# out after a failed `exec'. ++$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 ++exit 255 +fi + + if test x$as_have_required = xno; then : @@ -344,11 +375,19 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -+ -# Defaults: -ac_help= ++ +} # as_fn_mkdir_p ++ ++# as_fn_executable_p FILE ++# ----------------------- ++# Test if FILE is an executable regular file. ++as_fn_executable_p () ++{ ++ test -f "$1" && test -x "$1" ++} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take @@ -470,6 +509,10 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + ++ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have ++ # already done that, so ensure we don't try to do so again and fall ++ # in an infinite loop. This has already happened in practice. ++ _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). @@ -504,16 +547,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. ++ # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + fi +else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null @@ -525,28 +568,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + as_mkdir_p=false +fi + -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' -+else -+ if ls -dL / >/dev/null 2>&1; then -+ as_ls_L_option=L -+ else -+ as_ls_L_option= -+ fi -+ as_test_x=' -+ eval sh -c '\'' -+ if test -d "$1"; then -+ test -d "$1/."; -+ else -+ case $1 in #( -+ -*)set "./$1";; -+ esac; -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( -+ ???[sx]*):;;*)false;;esac;fi -+ '\'' sh -+ ' -+fi -+as_executable_p=$as_test_x ++as_test_x='test -x' ++as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -722,7 +745,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure no_recursion= prefix=NONE program_prefix=NONE -@@ -31,94 +699,132 @@ program_transform_name=s,x,x, +@@ -31,94 +719,132 @@ program_transform_name=s,x,x, silent= site= srcdir= @@ -817,11 +840,11 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file="$ac_optarg" ;; + cache_file=$ac_optarg ;; - -- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ++ + --config-cache | -C) + cache_file=config.cache ;; -+ + +- -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ @@ -896,7 +919,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ -@@ -127,116 +833,77 @@ do +@@ -127,116 +853,77 @@ do -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) @@ -1042,7 +1065,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ -@@ -250,26 +917,26 @@ EOF +@@ -250,26 +937,26 @@ EOF -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) @@ -1073,7 +1096,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ -@@ -286,7 +953,17 @@ EOF +@@ -286,7 +973,17 @@ EOF | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) @@ -1092,7 +1115,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) -@@ -296,7 +973,7 @@ EOF +@@ -296,7 +993,7 @@ EOF ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) @@ -1101,7 +1124,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ -@@ -307,58 +984,67 @@ EOF +@@ -307,58 +1004,67 @@ EOF | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) @@ -1193,7 +1216,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure --x) # Obsolete; use --with-x. -@@ -369,370 +1055,1724 @@ EOF +@@ -369,370 +1075,1722 @@ EOF ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) @@ -1299,12 +1322,12 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; -+ esac + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac ++ esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done @@ -1328,8 +1351,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe -+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi @@ -1598,9 +1619,9 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +if $ac_init_version; then + cat <<\_ACEOF +configure -+generated by GNU Autoconf 2.68 ++generated by GNU Autoconf 2.69 + -+Copyright (C) 2010 Free Software Foundation, Inc. ++Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF @@ -1631,7 +1652,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err - fi ++ fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || @@ -1668,7 +1689,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err -+ fi + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || @@ -1713,7 +1734,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || -+ $as_test_x conftest$ac_exeext ++ test -x conftest$ac_exeext + }; then : + ac_retval=0 +else @@ -1963,7 +1984,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was -+generated by GNU Autoconf 2.68. Invocation command line was ++generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + @@ -2376,7 +2397,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2456,7 +2477,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2524,25 +2545,27 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - ac_cv_prog_CC="cl" - break - fi +- done +- IFS="$ac_save_ifs" +-fi +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done - done -- IFS="$ac_save_ifs" ++ done +IFS=$as_save_IFS + fi - fi -CC="$ac_cv_prog_CC" ++fi +CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$ac_t""$CC" 1>&6 @@ -2578,7 +2601,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue @@ -2659,7 +2682,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2720,7 +2743,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -2998,7 +3021,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } -+ + +-echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 @@ -3040,8 +3064,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - --echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ++ +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile @@ -3176,7 +3199,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" -@@ -746,99 +2786,250 @@ else +@@ -746,99 +2804,249 @@ else CFLAGS= fi fi @@ -3191,8 +3214,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +/* end confdefs.h. */ +#include +#include -+#include -+#include ++struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3416,8 +3438,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP - fi -- CPP="$ac_cv_prog_CPP" ++fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false @@ -3459,7 +3480,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + # Passes both tests. +ac_preproc_ok=: +break -+fi + fi +- CPP="$ac_cv_prog_CPP" +rm -f conftest.err conftest.i conftest.$ac_ext + +done @@ -3503,7 +3525,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. -@@ -846,227 +3037,189 @@ if test "x$with_x" = xno; then +@@ -846,227 +3054,189 @@ if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else @@ -3865,7 +3887,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else -@@ -1079,61 +3232,54 @@ else +@@ -1079,61 +3249,54 @@ else X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . @@ -3973,7 +3995,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi # Check for system-dependent libraries X programs must link with. -@@ -1143,565 +3289,591 @@ rm -f conftest* +@@ -1143,565 +3306,591 @@ rm -f conftest* if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else @@ -4192,7 +4214,12 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -#else -gethostbyname(); -#endif -- ++ # on Irix 5.2, according to T.E. Dickey. ++ # The functions gethostbyname, getservbyname, and inet_addr are ++ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ++ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" ++if test "x$ac_cv_func_gethostbyname" = xyes; then : + -; return 0; } -EOF -if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -4206,12 +4233,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -+ # on Irix 5.2, according to T.E. Dickey. -+ # The functions gethostbyname, getservbyname, and inet_addr are -+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. -+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" -+if test "x$ac_cv_func_gethostbyname" = xyes; then : - +- -if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : @@ -4360,7 +4382,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char connect(); -- ++ # on later versions), says Simon Leinen: it contains gethostby* ++ # variants that don't use the name server (or something). -lsocket ++ # must be given before -lnsl if both are needed. We assume that ++ # if connect needs -lnsl, so does gethostbyname. ++ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" ++if test "x$ac_cv_func_connect" = xyes; then : + -int main() { - -/* The GNU C library defines this for functions which it implements @@ -4385,13 +4413,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -+ # on later versions), says Simon Leinen: it contains gethostby* -+ # variants that don't use the name server (or something). -lsocket -+ # must be given before -lnsl if both are needed. We assume that -+ # if connect needs -lnsl, so does gethostbyname. -+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" -+if test "x$ac_cv_func_connect" = xyes; then : - +- -if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : @@ -4492,10 +4514,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char remove(); -+ # Guillermo Gomez says -lposix is necessary on A/UX. -+ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" -+if test "x$ac_cv_func_remove" = xyes; then : - +- -int main() { - -/* The GNU C library defines this for functions which it implements @@ -4520,14 +4539,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -- ++ # Guillermo Gomez says -lposix is necessary on A/UX. ++ ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" ++if test "x$ac_cv_func_remove" = xyes; then : + -if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : -else - echo "$ac_t""no" 1>&6 --fi -+fi + fi if test $ac_cv_func_remove = no; then - echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 @@ -4624,9 +4645,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -char shmat(); - -int main() { -+ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" -+if test "x$ac_cv_func_shmat" = xyes; then : - +- -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ @@ -4649,7 +4668,9 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -- ++ ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" ++if test "x$ac_cv_func_shmat" = xyes; then : + -if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then - echo "$ac_t""yes" 1>&6 - : @@ -4825,7 +4846,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 -+else + else +- echo "$ac_t""no" 1>&6 + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST @@ -4837,7 +4859,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue ++ as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in @@ -4874,8 +4896,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi - else -- echo "$ac_t""no" 1>&6 ++else + ac_cv_path_GREP=$GREP +fi + @@ -4883,9 +4904,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" - -- LDFLAGS="$ac_save_LDFLAGS" - ++ ++ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : @@ -4905,7 +4925,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" -+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue ++ as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in @@ -4933,7 +4953,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac -+ + +- LDFLAGS="$ac_save_LDFLAGS" + $ac_path_EGREP_found && break 3 + done + done @@ -4945,18 +4966,18 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +else + ac_cv_path_EGREP=$EGREP +fi -+ + + fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" ++ -echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1667: checking for ANSI C header files" >&5 -if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -+ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : @@ -5019,7 +5040,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure ac_cv_header_stdc=no fi rm -f conftest* -@@ -1710,16 +3882,15 @@ fi +@@ -1710,16 +3899,15 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. @@ -5042,7 +5063,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure ac_cv_header_stdc=no fi rm -f conftest* -@@ -1728,749 +3899,1783 @@ fi +@@ -1728,749 +3916,1757 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. @@ -5288,9 +5309,20 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" +-fi +-rm -f conftest* +-LIBS="$ac_save_LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ -+ + +-fi +-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +- echo "$ac_t""yes" 1>&6 +- ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ +- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +- cat >> confdefs.h <>confdefs.h <<_ACEOF +#define HAVE_LIBZ 1 +_ACEOF -+ -+ LIBS="-lz $LIBS" -+ + + LIBS="-lz $LIBS" + +-else +- echo "$ac_t""no" 1>&6 fi + +-echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 +-echo "configure:1898: checking for main in -lpng" >&5 +-ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` +-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then +- echo $ac_n "(cached) $ac_c" 1>&6 +-else +- ac_save_LIBS="$LIBS" +-LIBS="-lpng $LIBS" +-cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=yes" +-else +- echo "configure: failed program was:" >&5 +- cat conftest.$ac_ext >&5 +- rm -rf conftest* +- eval "ac_cv_lib_$ac_lib_var=no" +-fi -rm -f conftest* -LIBS="$ac_save_LIBS" @@ -5348,7 +5408,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 @@ -5370,13 +5430,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -- ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ +- ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` - cat >> confdefs.h <&5 + break 2 @@ -5421,30 +5481,11 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +$as_echo "no" >&6; } fi --echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 --echo "configure:1898: checking for main in -lpng" >&5 --ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` +-echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6 +-echo "configure:1941: checking for main in -ljpeg" >&5 +-ac_lib_var=`echo jpeg'_'main | sed 'y%./+-%__p_%'` -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 --else -- ac_save_LIBS="$LIBS" --LIBS="-lpng $LIBS" --cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=yes" --else -- echo "configure: failed program was:" >&5 -- cat conftest.$ac_ext >&5 -- rm -rf conftest* -- eval "ac_cv_lib_$ac_lib_var=no" + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else @@ -5456,86 +5497,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi -+else -+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" - fi --rm -f conftest* --LIBS="$ac_save_LIBS" - - fi --if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then -- echo "$ac_t""yes" 1>&6 -- ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -- cat >> confdefs.h <&5 -+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } -+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ PKG_CONFIG="" -+ fi -+fi - -- LIBS="-lpng $LIBS" -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 -+$as_echo_n "checking for PNG... " >&6; } - -+if test -n "$PNG_CFLAGS"; then -+ pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null` -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$PNG_LIBS"; then -+ pkg_cv_PNG_LIBS="$PNG_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null` - else -- echo "$ac_t""no" 1>&6 -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried - fi - --echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6 --echo "configure:1941: checking for main in -ljpeg" >&5 --ac_lib_var=`echo jpeg'_'main | sed 'y%./+-%__p_%'` --if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then -- echo $ac_n "(cached) $ac_c" 1>&6 -+ -+ -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes else - ac_save_LIBS="$LIBS" -LIBS="-ljpeg $LIBS" @@ -5555,50 +5516,10 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_lib_$ac_lib_var=no" -+ _pkg_short_errors_supported=no ++ PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi -rm -f conftest* -LIBS="$ac_save_LIBS" -+ if test $_pkg_short_errors_supported = yes; then -+ PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1` -+ else -+ PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$PNG_PKG_ERRORS" >&5 -+ -+ as_fn_error $? "Package requirements (libpng) were not met: -+ -+$PNG_PKG_ERRORS -+ -+Consider adjusting the PKG_CONFIG_PATH environment variable if you -+installed software in a non-standard prefix. -+ -+Alternatively, you may set the environment variables PNG_CFLAGS -+and PNG_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details." "$LINENO" 5 -+ -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -+is in your PATH or set the PKG_CONFIG environment variable to the full -+path to pkg-config. -+ -+Alternatively, you may set the environment variables PNG_CFLAGS -+and PNG_LIBS to avoid the need to call pkg-config. -+See the pkg-config man page for more details. -+ -+To get pkg-config, see . -+See \`config.log' for more details" "$LINENO" 5; } -+ -+else -+ PNG_CFLAGS=$pkg_cv_PNG_CFLAGS -+ PNG_LIBS=$pkg_cv_PNG_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } fi -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then @@ -5608,6 +5529,95 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - cat >> confdefs.h <&5 ++$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } ++ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ PKG_CONFIG="" ++ fi ++fi ++ ++pkg_failed=no ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5 ++$as_echo_n "checking for PNG... " >&6; } ++ ++if test -n "$PNG_CFLAGS"; then ++ pkg_cv_PNG_CFLAGS="$PNG_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++if test -n "$PNG_LIBS"; then ++ pkg_cv_PNG_LIBS="$PNG_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5 ++ ($PKG_CONFIG --exists --print-errors "libpng") 2>&5 ++ ac_status=$? ++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 ++ test $ac_status = 0; }; then ++ pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null` ++ test "x$?" != "x0" && pkg_failed=yes ++else ++ pkg_failed=yes ++fi ++ else ++ pkg_failed=untried ++fi ++ ++ ++ ++if test $pkg_failed = yes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ ++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then ++ _pkg_short_errors_supported=yes ++else ++ _pkg_short_errors_supported=no ++fi ++ if test $_pkg_short_errors_supported = yes; then ++ PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libpng" 2>&1` ++ else ++ PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libpng" 2>&1` ++ fi ++ # Put the nasty error message in config.log where it belongs ++ echo "$PNG_PKG_ERRORS" >&5 ++ ++ HAVE_LIBPNG="no" ++elif test $pkg_failed = untried; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++ HAVE_LIBPNG="no" ++else ++ PNG_CFLAGS=$pkg_cv_PNG_CFLAGS ++ PNG_LIBS=$pkg_cv_PNG_LIBS ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 ++$as_echo "yes" >&6; } ++ HAVE_LIBPNG="yes" ++fi ++if test "x$HAVE_LIBPNG" = xyes ; then ++ ++$as_echo "#define HAVE_LIBPNG /**/" >>confdefs.h ++ ++fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5 +$as_echo_n "checking for main in -ljpeg... " >&6; } +if ${ac_cv_lib_jpeg_main+:} false; then : @@ -5787,8 +5797,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure #define RETSIGTYPE $ac_cv_type_signal -EOF - -+_ACEOF - +- -for ac_func in mkdir select -do -echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 @@ -5806,14 +5815,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func(); - +- -int main() { -+for ac_func in select -+do : -+ ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" -+if test "x$ac_cv_func_select" = xyes; then : -+ cat >>confdefs.h <<_ACEOF -+#define HAVE_SELECT 1 +_ACEOF -/* The GNU C library defines this for functions which it implements @@ -5824,7 +5827,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -#else -$ac_func(); -#endif -- + -; return 0; } -EOF -if { (eval echo configure:2101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then @@ -5838,7 +5841,14 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -fi -rm -f conftest* -fi -- ++for ac_func in select ++do : ++ ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" ++if test "x$ac_cv_func_select" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_SELECT 1 ++_ACEOF + -if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -6130,8 +6140,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH - do -- case "\$ac_option" in ++do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break @@ -6322,16 +6331,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. -+ # In both cases, we have to default to `cp -p'. ++ # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' + fi +else -+ as_ln_s='cp -p' ++ as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null @@ -6391,28 +6400,16 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + as_mkdir_p=false +fi + -+if test -x / >/dev/null 2>&1; then -+ as_test_x='test -x' -+else -+ if ls -dL / >/dev/null 2>&1; then -+ as_ls_L_option=L -+ else -+ as_ls_L_option= -+ fi -+ as_test_x=' -+ eval sh -c '\'' -+ if test -d "$1"; then -+ test -d "$1/."; -+ else -+ case $1 in #( -+ -*)set "./$1";; -+ esac; -+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( -+ ???[sx]*):;;*)false;;esac;fi -+ '\'' sh -+ ' -+fi -+as_executable_p=$as_test_x ++ ++# as_fn_executable_p FILE ++# ----------------------- ++# Test if FILE is an executable regular file. ++as_fn_executable_p () ++{ ++ test -f "$1" && test -x "$1" ++} # as_fn_executable_p ++as_test_x='test -x' ++as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -6434,7 +6431,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +# values after options handling. +ac_log=" +This file was extended by $as_me, which was -+generated by GNU Autoconf 2.68. Invocation command line was ++generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS @@ -6496,10 +6493,10 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +config.status -+configured by $0, generated by GNU Autoconf 2.68, ++configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + -+Copyright (C) 2010 Free Software Foundation, Inc. ++Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + @@ -6512,7 +6509,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 -+do + do +- case "\$ac_option" in + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` @@ -6652,7 +6650,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then -+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion ++ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' @@ -7050,13 +7048,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; -+ esac + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac ++ esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag @@ -7064,7 +7062,7 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + shift + ac_file=$1 + shift - ++ + case $ac_mode in + :L) ac_source=$1;; + :[FH]) @@ -7087,23 +7085,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + as_fn_append ac_file_inputs " '$ac_f'" + done -- echo creating "$ac_file" -- rm -f "$ac_file" -- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." -- case "$ac_file" in -- *Makefile*) ac_comsub="1i\\ --# $configure_input" ;; -- *) ac_comsub= ;; -- esac -- -- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` -- sed -e "$ac_comsub --s%@configure_input@%$configure_input%g --s%@srcdir@%$srcdir%g --s%@top_srcdir@%$top_srcdir%g --" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file --fi; done --rm -f conftest.s* + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ @@ -7123,6 +7104,30 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure + *) ac_sed_conf_input=$configure_input;; + esac +- echo creating "$ac_file" +- rm -f "$ac_file" +- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." +- case "$ac_file" in +- *Makefile*) ac_comsub="1i\\ +-# $configure_input" ;; +- *) ac_comsub= ;; +- esac +- +- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` +- sed -e "$ac_comsub +-s%@configure_input@%$configure_input%g +-s%@srcdir@%$srcdir%g +-s%@top_srcdir@%$top_srcdir%g +-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +-fi; done +-rm -f conftest.s* ++ case $ac_tag in ++ *:-:* | *:-) cat >"$ac_tmp/stdin" \ ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; ++ esac ++ ;; ++ esac + -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# @@ -7224,13 +7229,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure - if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then - # The file is in a subdirectory. - test ! -d "$ac_dir" && mkdir "$ac_dir" -+ case $ac_tag in -+ *:-:* | *:-) cat >"$ac_tmp/stdin" \ -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; -+ esac -+ ;; -+ esac -+ + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ @@ -7397,9 +7395,13 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure fi -fi; done + ;; ++ -EOF -cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF @@ -7409,10 +7411,6 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure -chmod +x $CONFIG_STATUS -rm -fr confdefs* $ac_clean_files -test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 -+ esac -+ -+done # for ac_tag -+ + +as_fn_exit 0 +_ACEOF @@ -7448,8 +7446,8 @@ diff -up xloadimage.4.1/configure.png-pkg-config xloadimage.4.1/configure +fi diff -up xloadimage.4.1/Makefile.in.png-pkg-config xloadimage.4.1/Makefile.in ---- xloadimage.4.1/Makefile.in.png-pkg-config 2011-12-08 14:17:59.610607618 -0500 -+++ xloadimage.4.1/Makefile.in 2011-12-08 14:18:16.618454487 -0500 +--- xloadimage.4.1/Makefile.in.png-pkg-config 2012-11-27 14:57:17.419047158 -0500 ++++ xloadimage.4.1/Makefile.in 2012-11-27 14:57:17.480047158 -0500 @@ -4,10 +4,10 @@ CC = @CC@ diff --git a/xloadimage.spec b/xloadimage.spec index 3b63296..93c6c29 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 11%{?dist} +Release: 12%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -30,6 +30,7 @@ Patch19: xloadimage-4.1-ignore-dummy-copyright-variables.patch Patch20: xloadimage-4.1-bracketfix.patch Patch21: xloadimage-4.1-png-pkg-config.patch Patch22: xloadimage-4.1-libtiff4.patch +Patch23: xloadimage-4.1-png-1.5.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html BuildRequires: libX11-devel, libtiff-devel >= 4.0, libpng-devel, libjpeg-devel BuildRequires: libICE-devel @@ -71,7 +72,10 @@ dithered automatically). %patch19 -p1 %patch20 -p1 %patch21 -p1 -b .png-pkg-config +%if 0%{?fedora} >= 18 %patch22 -p1 -b .tiff4 +%endif +%patch23 -p1 -b .png15 chmod +x configure %build @@ -110,11 +114,14 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Tue Nov 27 2012 Tom Callaway - 4.1-12 +- fix png 1.5 support + * Sun Jul 22 2012 Fedora Release Engineering - 4.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon May 7 2012 Tom Callaway - 4.1-10 -- build against libtiff 4 +- build against libtiff 4 (on Fedora 18+) * Sat Jan 14 2012 Fedora Release Engineering - 4.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From 572e51f499f13875536967bde030702d8f9d0879 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 27 Nov 2012 17:04:36 -0500 Subject: [PATCH 02/38] fix libtiff BR to be conditional --- xloadimage.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 93c6c29..4a3f60c 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -32,7 +32,12 @@ Patch21: xloadimage-4.1-png-pkg-config.patch Patch22: xloadimage-4.1-libtiff4.patch Patch23: xloadimage-4.1-png-1.5.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html -BuildRequires: libX11-devel, libtiff-devel >= 4.0, libpng-devel, libjpeg-devel +%if 0%{?fedora} >= 18 +BuildRequires: libtiff-devel >= 4.0 +%else +BuildRequires: libtiff-devel +%endif +BuildRequires: libX11-devel, libpng-devel, libjpeg-devel BuildRequires: libICE-devel %description From 522b9c64f7a96084c454da118ab0423be9b77b5d Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Wed, 2 Jan 2013 13:33:31 -0500 Subject: [PATCH 03/38] fix memory leak, enable support for sub-second delay --- xloadimage-4.1-fix-mem-leak.patch | 12 +++++++ xloadimage-4.1-sub-second-delay.patch | 51 +++++++++++++++++++++++++++ xloadimage.spec | 12 ++++++- 3 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 xloadimage-4.1-fix-mem-leak.patch create mode 100644 xloadimage-4.1-sub-second-delay.patch diff --git a/xloadimage-4.1-fix-mem-leak.patch b/xloadimage-4.1-fix-mem-leak.patch new file mode 100644 index 0000000..63a2c53 --- /dev/null +++ b/xloadimage-4.1-fix-mem-leak.patch @@ -0,0 +1,12 @@ +diff -up xloadimage.4.1/new.c.fix-mem-leak xloadimage.4.1/new.c +--- xloadimage.4.1/new.c.fix-mem-leak 2013-01-02 13:21:24.082069878 -0500 ++++ xloadimage.4.1/new.c 2013-01-02 13:22:04.427104519 -0500 +@@ -181,7 +181,7 @@ Image *newTrueImage(width, height) + image->depth= 24; + image->pixlen= 3; + image->data= (unsigned char *)lmalloc(ovmul(ovmul(width, height), 3)); +- image->data= (unsigned char *)lmalloc(width * height * 3); ++ /* image->data= (unsigned char *)lmalloc(width * height * 3); */ + return(image); + } + diff --git a/xloadimage-4.1-sub-second-delay.patch b/xloadimage-4.1-sub-second-delay.patch new file mode 100644 index 0000000..50a88b5 --- /dev/null +++ b/xloadimage-4.1-sub-second-delay.patch @@ -0,0 +1,51 @@ +diff -up xloadimage.4.1/options.c.sub-second-delay xloadimage.4.1/options.c +--- xloadimage.4.1/options.c.sub-second-delay 2013-01-02 13:23:23.726173587 -0500 ++++ xloadimage.4.1/options.c 2013-01-02 13:23:37.706185351 -0500 +@@ -720,7 +720,7 @@ void processOptions(argc, argv, rglobal, + + continue; + #else /* !NO_DELAY */ +- newopt->info.delay= getInteger(DELAY, argv[a]); ++ newopt->info.delay= getFloat(DELAY, argv[a]); + break; + #endif /* !NO_DELAY */ + +diff -up xloadimage.4.1/options.h.sub-second-delay xloadimage.4.1/options.h +--- xloadimage.4.1/options.h.sub-second-delay 2013-01-02 13:25:44.297294626 -0500 ++++ xloadimage.4.1/options.h 2013-01-02 13:26:25.338329430 -0500 +@@ -49,7 +49,7 @@ typedef struct option { + unsigned int x, y, w, h; /* area of image to be used */ + } clip; + unsigned int colors; /* max # of colors to use for this image */ +- unsigned int delay; /* # of seconds delay before auto pic advance */ ++ double delay; /* # of seconds delay before auto pic advance */ + char *display; /* display name */ + struct { + char *type; /* image type */ +diff -up xloadimage.4.1/window.c.sub-second-delay xloadimage.4.1/window.c +--- xloadimage.4.1/window.c.sub-second-delay 2013-01-02 13:24:13.903216792 -0500 ++++ xloadimage.4.1/window.c 2013-01-02 13:25:35.928287337 -0500 +@@ -583,9 +583,9 @@ char imageInWindow(disp, scrn, image, gl + install= (getOption(global_options, INSTALL) != NULL); + private_cmap= (getOption(global_options, PRIVATE) != NULL); + if ((opt= getOption(image_options, DELAY))) +- delay= opt->info.delay; ++ delay= opt->info.delay*1000000; + else if ((opt= getOption(global_options, DELAY))) +- delay= opt->info.delay; ++ delay= opt->info.delay*1000000; + else + delay= 0; + if ((opt= getOption(image_options, VISUAL))) +@@ -872,7 +872,10 @@ char imageInWindow(disp, scrn, image, gl + #ifdef ENABLE_TIMEOUT + AlarmWentOff = 0; + signal(SIGALRM, delayAlarmHandler); +- alarm(delay); ++ if (delay > 999999) ++ alarm(delay/1000000); ++ else ++ ualarm(delay,0); + #endif /* ENABLE_TIMEOUT */ + } + diff --git a/xloadimage.spec b/xloadimage.spec index 4a3f60c..686a474 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 12%{?dist} +Release: 13%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -31,6 +31,8 @@ Patch20: xloadimage-4.1-bracketfix.patch Patch21: xloadimage-4.1-png-pkg-config.patch Patch22: xloadimage-4.1-libtiff4.patch Patch23: xloadimage-4.1-png-1.5.patch +Patch24: xloadimage-4.1-fix-mem-leak.patch +Patch25: xloadimage-4.1-sub-second-delay.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html %if 0%{?fedora} >= 18 BuildRequires: libtiff-devel >= 4.0 @@ -81,6 +83,9 @@ dithered automatically). %patch22 -p1 -b .tiff4 %endif %patch23 -p1 -b .png15 +%patch24 -p1 -b .fix-mem-leak +%patch25 -p1 -b .sub-second-delay + chmod +x configure %build @@ -119,6 +124,11 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Wed Jan 2 2013 Tom Callaway - 4.1-13 +- fix memory leak caused by opening a lot of files at once then cycling through them with "N" +- enable support for sub-second-delay values +- thanks to Roger Heflin for both patches + * Tue Nov 27 2012 Tom Callaway - 4.1-12 - fix png 1.5 support From d94c491fc8be1a97229e432be6ee021e1105bbe8 Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Mon, 21 Jan 2013 18:06:05 +0100 Subject: [PATCH 04/38] Rebuild due to "jpeg8-ABI" feature drop Signed-off-by: Adam Tkac --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 686a474..6ec2075 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 13%{?dist} +Release: 14%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Mon Jan 21 2013 Adam Tkac - 4.1-14 +- rebuild due to "jpeg8-ABI" feature drop + * Wed Jan 2 2013 Tom Callaway - 4.1-13 - fix memory leak caused by opening a lot of files at once then cycling through them with "N" - enable support for sub-second-delay values From 38d241cfbc627152726fcb844dd5c7d5e98d77af Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 21:47:07 -0600 Subject: [PATCH 05/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 6ec2075..487c5e6 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 14%{?dist} +Release: 15%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 4.1-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Mon Jan 21 2013 Adam Tkac - 4.1-14 - rebuild due to "jpeg8-ABI" feature drop From b297a56ba4cc1b1110a31ee49b00699a1365a788 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 03:23:23 -0500 Subject: [PATCH 06/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 487c5e6..53f324d 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 15%{?dist} +Release: 16%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 4.1-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Feb 15 2013 Fedora Release Engineering - 4.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From a9bbf3a78bc56c05650690df588ccccfb7decae4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 8 Jun 2014 01:00:26 -0500 Subject: [PATCH 07/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 53f324d..f783f77 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 16%{?dist} +Release: 17%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 4.1-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Sun Aug 04 2013 Fedora Release Engineering - 4.1-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 5d6d76ebb265835fac11cd6b87de8a21917ab62c Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 10:10:17 +0000 Subject: [PATCH 08/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index f783f77..bd58f7b 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 17%{?dist} +Release: 18%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 4.1-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 4.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From d9dc037a4f3dd511829c0d3e363c8a7f5854577b Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 04:05:54 +0000 Subject: [PATCH 09/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index bd58f7b..d33c8b7 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 18%{?dist} +Release: 19%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 4.1-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Aug 18 2014 Fedora Release Engineering - 4.1-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 9981e4ddb27673265b9b43ee898c72e0dce6b005 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 03:33:51 +0000 Subject: [PATCH 10/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index d33c8b7..65b9afe 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 19%{?dist} +Release: 20%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 4.1-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jun 19 2015 Fedora Release Engineering - 4.1-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 41944ec7da59a7510633ad9b10ada5437ba90d08 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 17:55:14 +0000 Subject: [PATCH 11/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 65b9afe..9256425 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 20%{?dist} +Release: 21%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 4.1-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Feb 05 2016 Fedora Release Engineering - 4.1-20 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 76dd94c59e99023b651a1da81dfdd8f798da759d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 22:11:08 +0000 Subject: [PATCH 12/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 9256425..40901ac 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 21%{?dist} +Release: 22%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 4.1-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Sat Feb 11 2017 Fedora Release Engineering - 4.1-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 039e0028d2c14ff64b622a0999f0e9b1175ee91d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 10:45:47 +0000 Subject: [PATCH 13/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 40901ac..428d5dc 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 22%{?dist} +Release: 23%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 4.1-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 4.1-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From c954030cf89ea454d62dc48ba0c16cfddd94d393 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 21:44:02 +0000 Subject: [PATCH 14/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 428d5dc..06eca3a 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 23%{?dist} +Release: 24%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 4.1-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 4.1-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 256e2009fcf19c880f0aca51eec223070e8d4bb3 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 9 Jul 2018 19:06:54 +0200 Subject: [PATCH 15/38] add BuildRequires: gcc Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot --- xloadimage.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xloadimage.spec b/xloadimage.spec index 06eca3a..0fdc83b 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -35,6 +35,7 @@ Patch24: xloadimage-4.1-fix-mem-leak.patch Patch25: xloadimage-4.1-sub-second-delay.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html %if 0%{?fedora} >= 18 +BuildRequires: gcc BuildRequires: libtiff-devel >= 4.0 %else BuildRequires: libtiff-devel From 8bffef478ec49b7509b35cd1aa2aa77b40bee4ee Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 09:21:31 +0000 Subject: [PATCH 16/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 0fdc83b..cb9a41e 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 24%{?dist} +Release: 25%{?dist} License: MIT Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz @@ -125,6 +125,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 4.1-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Fri Feb 09 2018 Fedora Release Engineering - 4.1-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 23f57fe6c24e5b89c63fc1e976264e53b114737d Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:18:31 +0100 Subject: [PATCH 17/38] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- xloadimage.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index cb9a41e..84cfa5c 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -3,7 +3,6 @@ Summary: Image viewer and processor Version: 4.1 Release: 25%{?dist} License: MIT -Group: User Interface/X Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 # Many thanks to all those who have done work on this package over the years From 042b2e65f3d472032f27d3f31b716f115c356f90 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 12:30:08 +0000 Subject: [PATCH 18/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 84cfa5c..2918727 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 25%{?dist} +Release: 26%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 4.1-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 4.1-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 986818cd389b1958ac61277aa96d12a2fdca43af Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 04:17:52 +0000 Subject: [PATCH 19/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 2918727..7bef825 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 26%{?dist} +Release: 27%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 4.1-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 4.1-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 394c8a23ac09cc032f1c8dcae4858ded1a43b719 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 04:33:33 +0000 Subject: [PATCH 20/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 7bef825..fffb4b6 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 27%{?dist} +Release: 28%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 4.1-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 4.1-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 6321aaf73f447146cd4f4b1651fc46bc445bf7b4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 14:48:16 +0000 Subject: [PATCH 21/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index fffb4b6..355afc5 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 28%{?dist} +Release: 29%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -124,6 +124,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 4.1-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jan 31 2020 Fedora Release Engineering - 4.1-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From 6c613c3acb0044929f3d734d946c2eea42f06f9f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 12 Jan 2021 01:50:31 +0000 Subject: [PATCH 22/38] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- xloadimage.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/xloadimage.spec b/xloadimage.spec index 355afc5..0f40e96 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -39,6 +39,7 @@ BuildRequires: libtiff-devel >= 4.0 %else BuildRequires: libtiff-devel %endif +BuildRequires: make BuildRequires: libX11-devel, libpng-devel, libjpeg-devel BuildRequires: libICE-devel From 797bb874d840d9afef3b833b34181ccaa9475a7e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 28 Jan 2021 00:07:41 +0000 Subject: [PATCH 23/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 0f40e96..3fd5505 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 29%{?dist} +Release: 30%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -125,6 +125,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Thu Jan 28 2021 Fedora Release Engineering - 4.1-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 4.1-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From e66a0de23882b136a44a8404f488b51127648a8d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 21:40:15 +0000 Subject: [PATCH 24/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 3fd5505..07e4e79 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 30%{?dist} +Release: 31%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -125,6 +125,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 4.1-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Thu Jan 28 2021 Fedora Release Engineering - 4.1-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From a3191d9a8837d32ef6c68fa0efcf139a8b718dab Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 05:12:31 +0000 Subject: [PATCH 25/38] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 07e4e79..adf69a1 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 31%{?dist} +Release: 32%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -125,6 +125,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 4.1-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 4.1-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From efa9453f182ff099e65b4aff4d2c1575448d2454 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 13:14:20 +0000 Subject: [PATCH 26/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index adf69a1..4e1f065 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 32%{?dist} +Release: 33%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -125,6 +125,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 4.1-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 4.1-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 754922ac161db3cc3ffb921285c06c1594bfbcdd Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 27 Nov 2022 16:55:02 +0100 Subject: [PATCH 27/38] Convert 12_fix-tile.dpatch to UTF-8 --- 12_fix-tile.dpatch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/12_fix-tile.dpatch b/12_fix-tile.dpatch index cb78666..9135742 100644 --- a/12_fix-tile.dpatch +++ b/12_fix-tile.dpatch @@ -1,5 +1,5 @@ #! /bin/sh -e -## 12_fix-tile.dpatch by Rémi Guyomarch (via FreeBSD & OpenBSD) +## 12_fix-tile.dpatch by Rémi Guyomarch (via FreeBSD & OpenBSD) ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Fix -tile for images smaller than the screen. From 20ac56439f975325b9e2f0d1d40ea78e90314be5 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sun, 27 Nov 2022 17:17:23 +0100 Subject: [PATCH 28/38] Port to strict(er) C99 compilers (#2148739) Related to: --- xloadimage-c99.patch | 165 +++++++++++++++++++++++++++++++++++++++++++ xloadimage.spec | 7 +- 2 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 xloadimage-c99.patch diff --git a/xloadimage-c99.patch b/xloadimage-c99.patch new file mode 100644 index 0000000..6cbf5df --- /dev/null +++ b/xloadimage-c99.patch @@ -0,0 +1,165 @@ +Add missing ints in old-style function definitions, to avoid build +failures with a strict(er) C99 compilers. + +The change to tiffIdent actually fixes a pointer clipping bug +because the missing types are not ints. + +There's also a #include , needed for calling the exit function. + +diff --git a/faces.c b/faces.c +index 3a2900e9a0030721..50c1077fa3456afd 100644 +--- a/faces.c ++++ b/faces.c +@@ -85,6 +85,7 @@ static int nextInt(zf, len) + + Image *facesLoad(fullname, name, verbose) + char *fullname, *name; ++ int verbose; + { ZFILE *zf; + Image *image; + char fname[BUFSIZ]; +diff --git a/options.c b/options.c +index 2fea7c5c1bd77d34..5edb2d29a086bddd 100644 +--- a/options.c ++++ b/options.c +@@ -425,6 +425,7 @@ static int getInteger(type, s) + } + + static float getFloat(type, s) ++ int type; + char *s; + { + float ret; +diff --git a/rlelib.c b/rlelib.c +index e729f6bddf08da20..0265c46c3ae888d7 100644 +--- a/rlelib.c ++++ b/rlelib.c +@@ -424,6 +424,7 @@ register struct sv_globals * globals; + */ + void + RunSkipBlankLines(nblank, globals) ++int nblank; + register struct sv_globals * globals; + { + } +@@ -435,6 +436,7 @@ register struct sv_globals * globals; + */ + void + RunSetColor(c, globals) ++int c; + register struct sv_globals * globals; + { + } +@@ -447,6 +449,7 @@ register struct sv_globals * globals; + /* ARGSUSED */ + void + RunSkipPixels(nskip, last, wasrun, globals) ++int nskip, last, wasrun; + register struct sv_globals * globals; + { + } +@@ -458,6 +461,7 @@ register struct sv_globals * globals; + */ + void + RunNewScanLine(flag, globals) ++int flag; + register struct sv_globals * globals; + { + } +@@ -469,6 +473,7 @@ register struct sv_globals * globals; + void + Runputdata(buf, n, globals) + rle_pixel * buf; ++int n; + register struct sv_globals * globals; + { + } +@@ -481,6 +486,7 @@ register struct sv_globals * globals; + /* ARGSUSED */ + void + Runputrun(color, n, last, globals) ++int color, n, last; + register struct sv_globals * globals; + { + } +@@ -1387,6 +1393,7 @@ int dith_size = 16; + */ + void + dithermap( levels, gamma, rgbmap, divN, modN, magic ) ++int levels; + double gamma; + int rgbmap[][3]; + int divN[256]; +@@ -1447,6 +1454,7 @@ int magic[16][16]; + */ + void + bwdithermap( levels, gamma, bwmap, divN, modN, magic ) ++int levels; + double gamma; + int bwmap[]; + int divN[256]; +@@ -1670,6 +1678,7 @@ int gammamap[256]; + * see "Note:" in dithermap comment. + */ + int dithergb( x, y, r, g, b, levels, divN, modN, magic ) ++int x, y, r, g, b, levels; + int divN[256]; + int modN[256]; + int magic[16][16]; +@@ -1700,6 +1709,7 @@ int magic[16][16]; + * see "Note:" in bwdithermap comment. + */ + int ditherbw( x, y, val, divN, modN, magic ) ++int x, y, val; + int divN[256]; + int modN[256]; + int magic[16][16]; +diff --git a/smooth.c b/smooth.c +index c61085b4df73a4f8..f11c682223739917 100644 +--- a/smooth.c ++++ b/smooth.c +@@ -74,6 +74,7 @@ static Image *doSmooth(image) + + Image *smooth(image, iterations, verbose) + Image *image; ++ int iterations; + unsigned int verbose; + { int a; + Image *old, *new; +diff --git a/tiff.c b/tiff.c +index 4c5649c91fb37d5c..b5e4722787440c83 100644 +--- a/tiff.c ++++ b/tiff.c +@@ -223,6 +223,8 @@ static void babble(name, info) + } + + int tiffIdent(fullname, name) ++char *fullname; ++char *name; + { + TIFF *tiff; + struct tiff_info info; +diff --git a/uufilter.c b/uufilter.c +index 72e20b200e9a06d7..e2b951602343efce 100644 +--- a/uufilter.c ++++ b/uufilter.c +@@ -11,6 +11,7 @@ + */ + + #include ++#include + #include + + int main(argc, argv) +diff --git a/xloadimage.c b/xloadimage.c +index cbb44d1d1e2a179c..938137aaa4269789 100644 +--- a/xloadimage.c ++++ b/xloadimage.c +@@ -46,6 +46,7 @@ static byte root_weave_bits[] = { + static Image *doProcessOnImage(image, option, verbose) + Image *image; + Option *option; ++ int verbose; + { Image *retimage= image; + XColor xcolor; /* color for foreground/background */ + diff --git a/xloadimage.spec b/xloadimage.spec index 4e1f065..95cbf9a 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 33%{?dist} +Release: 34%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -32,6 +32,7 @@ Patch22: xloadimage-4.1-libtiff4.patch Patch23: xloadimage-4.1-png-1.5.patch Patch24: xloadimage-4.1-fix-mem-leak.patch Patch25: xloadimage-4.1-sub-second-delay.patch +Patch26: xloadimage-c99.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html %if 0%{?fedora} >= 18 BuildRequires: gcc @@ -86,6 +87,7 @@ dithered automatically). %patch23 -p1 -b .png15 %patch24 -p1 -b .fix-mem-leak %patch25 -p1 -b .sub-second-delay +%patch26 -p1 chmod +x configure @@ -125,6 +127,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sun Nov 27 2022 Florian Weimer - 4.1-34 +- Port to strict(er) C99 compilers (#2148739) + * Sat Jul 23 2022 Fedora Release Engineering - 4.1-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 4a59d90f4f7f2139a8a3adaf7f26a410b58808f7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 07:34:24 +0000 Subject: [PATCH 29/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 95cbf9a..a7f3079 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 34%{?dist} +Release: 35%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -127,6 +127,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 4.1-35 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sun Nov 27 2022 Florian Weimer - 4.1-34 - Port to strict(er) C99 compilers (#2148739) From 608932692efefdc58488b38424ac65998a69e1d8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 18:58:11 +0000 Subject: [PATCH 30/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index a7f3079..d06fb5b 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 35%{?dist} +Release: 36%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -127,6 +127,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 4.1-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Jan 21 2023 Fedora Release Engineering - 4.1-35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 0843698886fd9b745c6f12003b8b647461b96581 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 09:49:21 +0000 Subject: [PATCH 31/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index d06fb5b..a1ed891 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 36%{?dist} +Release: 37%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -127,6 +127,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 4.1-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 4.1-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From a00098dac3fb582086932b568bb71a6764375b74 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:50 +0200 Subject: [PATCH 32/38] Eliminate use of obsolete %patchN syntax (#2283636) --- xloadimage.spec | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/xloadimage.spec b/xloadimage.spec index a1ed891..723688b 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -59,35 +59,35 @@ dithered automatically). %prep %setup -q -n %{name}.%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -b .png-pkg-config +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 +%patch -P9 -p1 +%patch -P10 -p1 +%patch -P11 -p1 +%patch -P12 -p1 +%patch -P13 -p1 +%patch -P14 -p1 +%patch -P15 -p1 +%patch -P16 -p1 +%patch -P17 -p1 +%patch -P18 -p1 +%patch -P19 -p1 +%patch -P20 -p1 +%patch -P21 -p1 -b .png-pkg-config %if 0%{?fedora} >= 18 -%patch22 -p1 -b .tiff4 +%patch -P22 -p1 -b .tiff4 %endif -%patch23 -p1 -b .png15 -%patch24 -p1 -b .fix-mem-leak -%patch25 -p1 -b .sub-second-delay -%patch26 -p1 +%patch -P23 -p1 -b .png15 +%patch -P24 -p1 -b .fix-mem-leak +%patch -P25 -p1 -b .sub-second-delay +%patch -P26 -p1 chmod +x configure From 147f297f8061a13df2191be99d9041836d31e3f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 10:10:18 +0000 Subject: [PATCH 33/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 723688b..2b7dff0 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 37%{?dist} +Release: 38%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -127,6 +127,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 4.1-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 4.1-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From e155b74cb3dea41dab772c87286a3e2b804af6f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 15:57:21 +0000 Subject: [PATCH 34/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 2b7dff0..91bb76d 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 38%{?dist} +Release: 39%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches 0-18 come from Debian 4.1-16.1 @@ -127,6 +127,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 4.1-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Sat Jul 20 2024 Fedora Release Engineering - 4.1-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 26a37fc0476a6ab8d9af0e7f8ebcec3dc520da3c Mon Sep 17 00:00:00 2001 From: Tom spot Callaway Date: Mon, 24 Feb 2025 15:51:57 -0500 Subject: [PATCH 35/38] bring over more Debian patches, apply a lot of cleanups for c23 support --- 22-include.patch | 17 + 27_shrink-should-not-zoom-upwards.patch | 19 + 28_correct-scaling-fullscreen.patch | 19 + 29_fix-manpage-hyphens.patch | 718 +++++ 32_fix-spelling.patch | 24 + xloadimage-4.1-c23.patch | 3739 +++++++++++++++++++++++ xloadimage-4.1-libtiff4.patch | 4 +- xloadimage.spec | 21 +- 8 files changed, 4557 insertions(+), 4 deletions(-) create mode 100644 22-include.patch create mode 100644 27_shrink-should-not-zoom-upwards.patch create mode 100644 28_correct-scaling-fullscreen.patch create mode 100644 29_fix-manpage-hyphens.patch create mode 100644 32_fix-spelling.patch create mode 100644 xloadimage-4.1-c23.patch diff --git a/22-include.patch b/22-include.patch new file mode 100644 index 0000000..be4c995 --- /dev/null +++ b/22-include.patch @@ -0,0 +1,17 @@ +From: Jari Aalto +Subject: Add include for functions like strcat() etc. + +--- + autoconfig.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/autoconfig.c ++++ b/autoconfig.c +@@ -5,6 +5,7 @@ + * jim frost 09.05.93 + */ + ++#include + #include + #include + #include diff --git a/27_shrink-should-not-zoom-upwards.patch b/27_shrink-should-not-zoom-upwards.patch new file mode 100644 index 0000000..1bbd6a2 --- /dev/null +++ b/27_shrink-should-not-zoom-upwards.patch @@ -0,0 +1,19 @@ +Description: Do not resize images that are smaller than the screen with -shrink + Shrink does also zoom upwards for images which are smaller than + the screen. The following patch fixes this, images smaller as the + screen are left at 100% zoom. +Author: David Frey +Forwarded: no +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=381382 +--- a/xloadimage.c ++++ b/xloadimage.c +@@ -408,6 +408,9 @@ int main(argc, argv) + / (float)newimage->width * 100.0 : + ((float)DisplayHeight(disp, scrn) * 0.9) + / (float)newimage->height * 100.0); ++ if ((opt->info.zoom.x > 100) || (opt->info.zoom.y > 100)) ++ opt->info.zoom.x=opt->info.zoom.y=100; ++ + addOption(optset, opt); + } + diff --git a/28_correct-scaling-fullscreen.patch b/28_correct-scaling-fullscreen.patch new file mode 100644 index 0000000..83ec7ec --- /dev/null +++ b/28_correct-scaling-fullscreen.patch @@ -0,0 +1,19 @@ +Description: -fullscreen option behaves incorrectly if one of the + images' dimensions is bigger than screen, but the other is not. It's + caused by a forgotten typecast from uint to int. +Author: Anton Khirnov +Forwarded: no +Bug-Debisn: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506343 +--- a/xloadimage.c ++++ b/xloadimage.c +@@ -379,8 +379,8 @@ int main(argc, argv) + if ((newimage->width > DisplayWidth(disp, scrn)) || + (newimage->height > DisplayHeight(disp, scrn))) { + opt->info.zoom.x= opt->info.zoom.y= +- (newimage->width - DisplayWidth(disp, scrn) > +- newimage->height - DisplayHeight(disp, scrn) ? ++ ((int)newimage->width - DisplayWidth(disp, scrn) > ++ (int)newimage->height - DisplayHeight(disp, scrn) ? + (float)DisplayWidth(disp, scrn) / (float)newimage->width * 100.0 : + (float)DisplayHeight(disp, scrn) / (float)newimage->height * 100.0); + } diff --git a/29_fix-manpage-hyphens.patch b/29_fix-manpage-hyphens.patch new file mode 100644 index 0000000..e7bfb85 --- /dev/null +++ b/29_fix-manpage-hyphens.patch @@ -0,0 +1,718 @@ +Description: Use explicit hyphens/minus signs in man page to + allow for copy&pasting options in Unicode environments. +Author: Dominik George +Forwarded: no +--- a/uufilter.man ++++ b/uufilter.man +@@ -2,7 +2,7 @@ + .SH NAME + uufilter - decode uuencoded files to stdout + .SH SYNOPSIS +-\fIuufilter\fR [-f \fIoutfilename\fR] [-l] [-s] [-v] [\fIinfilename\fR] ++\fIuufilter\fR [\-f \fIoutfilename\fR] [\-l] [\-s] [\-v] [\fIinfilename\fR] + .SH DESCRIPTION + \fIUufilter\fR is a "smart" uuencoded file decoder that can optionally + dump the file to stdout. +@@ -16,19 +16,19 @@ without stripping off the headers or oth + content. + .SH OPTIONS + .TP 8 +--f \fIfilename\fR ++\-f \fIfilename\fR + Dump output to \fIfilename\fR rather than the name specified in the + uuencoded file. + .TP +--l ++\-l + Lenient mode. This is useful if passed through a mailer that adds + trailing spaces. + .TP +--s ++\-s + Dump output to stdout rather than to the filename indicated in the + uuencoded file. + .TP +--v ++\-v + Verbose mode; talks about what's going on. + .SH AUTHOR + Jim Frost (jimf@centerline.com) +--- a/xloadimage.man ++++ b/xloadimage.man +@@ -9,7 +9,7 @@ the root window + .SH DESCRIPTION + \fIXloadimage\fR displays images in an X11 window, loads them onto the + root window, or writes them into a file. Many image types are +-recognized; use the \fI-supported\fR option to list them. ++recognized; use the \fI\-supported\fR option to list them. + .PP + If the filename \fIstdin\fR is given, xloadimage will read the image + from standard input if this capability is supported by the loader for +@@ -18,38 +18,38 @@ that image type (most types do support r + If the destination display cannot support the number of colors in the + image, the image will be dithered (monochrome destination) or have its + colormap reduced (color destination) as appropriate. This can also be +-done forcibly with the \fI-halftone\fR, \fI-dither\fR, and +-\fI-colors\fR options. ++done forcibly with the \fI\-halftone\fR, \fI\-dither\fR, and ++\fI\-colors\fR options. + .PP + A variety of image manipulations can be specified, including gamma +-correction, brightening, clipping, dithering, depth-reduction, ++correction, brightening, clipping, dithering, depth\(hyreduction, + rotation, and zooming. Most of these manipulations have simple + implementations; speed was opted for above accuracy. + .PP + If you are viewing a large image in a window, the initial window will + be at most 90% of the size of the display unless the window manager + does not correctly handle window size requests or if you've used the +-\fI-fullscreen\fR option. You may move the image around in the window ++\fI\-fullscreen\fR option. You may move the image around in the window + by dragging with the first mouse button. The cursor will indicate + which directions you may drag, if any. You may exit the window by + typing 'q' or '^C' when the keyboard focus is on the window. + .PP + If more than one image file is specified on the command line, each +-image will be shown in order (except if \fI-merge\fR or \fI-goto\fR ++image will be shown in order (except if \fI\-merge\fR or \fI\-goto\fR + are being used). + .PP + A wide variety of common image manipulations can be done by mixing and + matching the available options. See the section entitled \fIHINTS FOR + GOOD IMAGE DISPLAYS\fR for some ideas. + .PP +-The \fI-dump\fR option causes an image to be written to a file rather ++The \fI\-dump\fR option causes an image to be written to a file rather + than displayed after processing. This allows you to read an image, + perform a number of processing operations on it, and save the + resultant image. This also allows translation from any of the + recognized image types into any of the formats that support dumping. + .PP +-\fIXsetbg\fR is equivalent to \fIxloadimage -onroot -quiet\fR and +-\fIxview\fR is equivalent to \fIxloadimage -view -verbose\fR. ++\fIXsetbg\fR is equivalent to \fIxloadimage \-onroot \-quiet\fR and ++\fIxview\fR is equivalent to \fIxloadimage \-view \-verbose\fR. + .SH RESOURCE CLASS + \fIXloadimage\fR uses the resource class name \fIXloadimage\fR for + window managers which need this resource set. This name changed +@@ -59,58 +59,58 @@ in version 2.00 and 2.01; some previous + .SH GLOBAL OPTIONS + The following options affect the global operation of \fIxloadimage\fR. + They may be specified anywhere on the command line. Additionally the +-\fI-global\fR option can be used to force an image option to apply to ++\fI\-global\fR option can be used to force an image option to apply to + all images. + .TP 8 +--border \fIcolor\fR ++\-border \fIcolor\fR + This sets the background portion of the window which is not covered by + any images to be \fIcolor\fR. + .TP +--configuration ++\-configuration + Displays the image path, image suffixes, and supported filters which + will be used when looking for and reading images. These are loaded + from ~/.xloadimagerc and optionally from a systemwide file (normally +-/usr/lib/xloadimagerc). This replaces the -path option. ++/usr/lib/xloadimagerc). This replaces the \-path option. + .TP +--default ++\-default + Use the default root weave as the image. This option forces +-\fI-onroot\fR. If \fI-default\fR is used alone, it is the same as ++\fI\-onroot\fR. If \fI\-default\fR is used alone, it is the same as + \fIxsetroot\fR with no arguments. If used in conjunction with +-\fI-tile\fR this option can be used to place images on the default ++\fI\-tile\fR this option can be used to place images on the default + root weave (see \fBEXAMPLES\fR below). + .TP +--debug ++\-debug + Talk to the X server in synchronous mode. This is useful for + debugging. If an X error is seen while in this mode, a core will be + dumped. + .TP +--display \fIdisplay_name\fR ++\-display \fIdisplay_name\fR + X11 display name to send the image(s) to. + .TP +--dump \fIimage_type[,option[=value]]\fR \fIdump_file\fR ++\-dump \fIimage_type[,option[=value]]\fR \fIdump_file\fR + Rather than displaying the loaded and processed image, dump it into an + image file of the specified type. For a list of image types that can +-be dumped, use the \fI-supported\fR option. Some image types have ++be dumped, use the \fI\-supported\fR option. Some image types have + options that affect the format of the file that's created. See + \fBDUMP OPTIONS\fR below. An image can be dumped in any supported + dump format regardless of the original image type, so image file type + translation is possible using this option. + .TP +--fit ++\-fit + Force image to use the default visual and colormap. This is useful if + you do not want technicolor effects when the colormap focus is inside + the image window, but it may reduce the quality of the displayed +-image. This is on by default if -onroot or -windowid is specified. ++image. This is on by default if \-onroot or \-windowid is specified. + .TP +--fork ++\-fork + Fork xloadimage. This causes xloadimage to disassociate itself from +-the shell. This option automatically turns on -quiet. ++the shell. This option automatically turns on \-quiet. + .TP +--fullscreen +-Use the entire screen to display images. If combined with -onroot, ++\-fullscreen ++Use the entire screen to display images. If combined with \-onroot, + the image will be zoomed to fill the entire rootwindow. + .TP +--geometry \fIWxH[{+-X}{+-}Y]\fR ++\-geometry \fIWxH[{+\-X}{+\-}Y]\fR + This sets the size of the window onto which the images are loaded to a + different value than the size of the image. When viewing an image in + a window, this can be used to reduce the size of the destination +@@ -119,226 +119,226 @@ controls the size of the pixmap which wi + If the size is smaller than that of the display, the image will be + replicated. + .TP +--goto image_name ++\-goto image_name + Forces the next image to be displayed to be the image named + \fIimage_name\fR. This is useful for generating looped slideshows. + If more than one image of the same name as the target exists on the + argument list, the first in the argument list is used. + .TP +--help [option ...] ++\-help [option ...] + Give information on an option or list of options. If no option is + given, a simple interactive help facility is invoked. + .TP +--identify ++\-identify + Identify the supplied images rather than display them. + .TP +--install ++\-install + Forcibly install the image's colormap when the window is focused. + This violates ICCCM standards and only exists to allow operation with + naive window managers. Use this option only if your window manager + does not install colormaps properly. + .TP +--list ++\-list + List the images which are along the image path. + .TP +--onroot ++\-onroot + Load image(s) onto the root window instead of viewing in a window. +-This option automatically sets the -fit option. +-This is the opposite of \fI-view\fR. \fIXSetbg\fR has this option set ++This option automatically sets the \-fit option. ++This is the opposite of \fI\-view\fR. \fIXSetbg\fR has this option set + by default. + .TP +--path ++\-path + Displays miscellaneous information about the program configuration. +-This option is obsolete and has been replaced by -configuration. ++This option is obsolete and has been replaced by \-configuration. + .TP +--pixmap +-Force the use of a pixmap as backing-store. This is provided for +-servers where backing-store is broken (such as some versions of the ++\-pixmap ++Force the use of a pixmap as backing\(hystore. This is provided for ++servers where backing\(hystore is broken (such as some versions of the + AIXWindows server). It may improve scrolling performance on servers +-which provide backing-store. ++which provide backing\(hystore. + .TP +--private ++\-private + Force the use of a private colormap. Normally colors are allocated + shared unless there are not enough colors available. + .TP +--quiet ++\-quiet + Forces \fIxloadimage\fR and \fIxview\fR to be quiet. This is the + default for \fIxsetbg\fR, but the others like to whistle. + .TP +--supported ++\-supported + List the supported image types. + .TP +--type \fItype_name\fR ++\-type \fItype_name\fR + Forces \fIxloadimage\fR to try to load the image as a particular file + type rather than trying to guess. This often improves load + performance noticeably. + .TP +--verbose ++\-verbose + Causes \fIxloadimage\fR to be talkative, telling you what kind of + image it's playing with and any special processing that it has to do. + This is the default for \fIxview\fR and \fIxloadimage\fR. + .TP +--version ++\-version + Print the version number and patchlevel of this version of + \fIxloadimage\fR. + .TP +--view +-View image(s) in a window. This is the opposite of \fI-onroot\fR and ++\-view ++View image(s) in a window. This is the opposite of \fI\-onroot\fR and + the default for \fIxview\fR and \fIxloadimage\fR. + .TP +--visual \fIvisual_name\fR ++\-visual \fIvisual_name\fR + Force the use of a specific visual type to display an image. Normally + \fIxloadimage\fR tries to pick the best available image for a + particular image type. The available visual types are: DirectColor, + TrueColor, PseudoColor, StaticColor, GrayScale, and StaticGray. + Nonconflicting names may be abbreviated and case is ignored. + .TP +--windowid \fIhex_window_id\fR ++\-windowid \fIhex_window_id\fR + Sets the background pixmap of a particular window ID. The argument + must be in hexadecimal and must be preceded by "0x" (\fIeg\fR +--windowid 0x40000b. This is intended for setting the background ++\-windowid 0x40000b. This is intended for setting the background + pixmap of some servers which use untagged virtual roots + (\fIeg\fR HP-VUE), but can have other interesting applications. + .SH IMAGE OPTIONS + The following options may precede each image. These options are + local to the image they precede. + .TP +--at \fIX\fR,\fIY\fR ++\-at \fIX\fR,\fIY\fR + Indicates coordinates to load the image at on the base image. If +-this is an option to the first image, and the \fI-onroot\fR option is ++this is an option to the first image, and the \fI\-onroot\fR option is + specified, the image will be loaded at the given location on the + display background. + .TP +--background \fIcolor\fR ++\-background \fIcolor\fR + Use \fIcolor\fR as the background color instead of the default + (usually white but this depends on the image type) if you are + transferring a monochrome image to a color display. + .TP +--brighten \fIpercentage\fR ++\-brighten \fIpercentage\fR + Specify a percentage multiplier for a color image's colormap. A value + of more than 100 will brighten an image, one of less than 100 will + darken it. + .TP +--center ++\-center + Center the image on the base image loaded. If this is an option to + the first image, and the \fI-onroot\fR option is specified, the image + will be centered on the display background. + .TP +--clip \fIX\fR,\fIY\fR,\fIW\fR,\fIH\fR ++\-clip \fIX\fR,\fIY\fR,\fIW\fR,\fIH\fR + Clip the image before loading it. \fIX\fR and \fIY\fR define the +-upper-left corner of the clip area, and \fIW\fR and \fIH\fR define the ++upper\(hyleft corner of the clip area, and \fIW\fR and \fIH\fR define the + extents of the area. A zero value for \fIW\fR or \fIH\fR will be + interpreted as the remainder of the image. + .TP +--colors \fIn\fR ++\-colors \fIn\fR + Specify the maximum number of colors to use in the image. This is a + way to forcibly reduce the depth of an image. + .TP +--delay \fIsecs\fR ++\-delay \fIsecs\fR + Automatically advance to the next image after \fIsecs\fR seconds. You +-may want to use the \fI-global\fR switch with this command to create a ++may want to use the \fI\-global\fR switch with this command to create a + slideshow with multiple images. + .TP +--dither +-Dither a color image to monochrome using a Floyd-Steinberg dithering ++\-dither ++Dither a color image to monochrome using a Floyd\(hySteinberg dithering + algorithm. This happens by default when viewing color images on a +-monochrome display. This is slower than \fI-halftone\fR and affects ++monochrome display. This is slower than \fI\-halftone\fR and affects + the image accuracy but usually looks much better. + .TP +--foreground \fIcolor\fR ++\-foreground \fIcolor\fR + Use \fIcolor\fR as the foreground color instead of black if you are + transferring a monochrome image to a color display. This can also be + used to invert the foreground and background colors of a monochrome + image. + .TP +--gamma \fIdisplay_gamma\fR ++\-gamma \fIdisplay_gamma\fR + Specify the gamma correction for the display. + The default value is 1.0, a typical display needs 2.0 to 2.5. + .TP +--global ++\-global + Force the following option to apply to all images rather than one + specific image. Local image options will temporarily override any +-option specified with -global. ++option specified with \-global. + .TP +--gray ++\-gray + Convert an image to grayscale. This is very useful when displaying + colorful images on servers with limited color capability. It can also + be used to convert a bitmap image into a grayscale image, although the + resulting image will be smaller than the original. The optional +-spelling \fI-grey\fR may also be used. ++spelling \fI\-grey\fR may also be used. + .TP +--halftone ++\-halftone + Force halftone dithering of a color image when displaying on a + monochrome display. This option is ignored on monochrome images. + This dithering algorithm blows an image up by sixteen times; if you +-don't like this, the \fI-dither\fR option will not blow the image up ++don't like this, the \fI\-dither\fR option will not blow the image up + but will take longer to process and will be less accurate. + .TP +--idelay \fIsecs\fR ++\-idelay \fIsecs\fR + This option is no longer supported due to the addition of +-\fI-global\fR. The same functionality can be had with \fI-delay\fR. ++\fI\-global\fR. The same functionality can be had with \fI\-delay\fR. + .TP +--invert +-Inverts a monochrome image. This is shorthand for \fI-foreground +-white -background black\fR. ++\-invert ++Inverts a monochrome image. This is shorthand for \fI\-foreground ++white \-background black\fR. + .TP +--merge ++\-merge + Merge this image onto the base image after local processing. The base + image is considered to be the first image specified or the last image +-that was not preceded by \fI-merge\fR. If used in conjunction with +-\fI-at\fR and \fI-clip\fR, very complex images can be built up. This +-option is on by default for all images if the \fI-onroot\fR or +-\fI-windowid\fR options are specified. ++that was not preceded by \fI\-merge\fR. If used in conjunction with ++\fI\-at\fR and \fI\-clip\fR, very complex images can be built up. This ++option is on by default for all images if the \fI\-onroot\fR or ++\fI\-windowid\fR options are specified. + .TP +--name \fIimage_name\fR ++\-name \fIimage_name\fR + Force the next argument to be treated as an image name. This is +-useful if the name of the image is \fI-dither\fR, for instance. ++useful if the name of the image is \fI\-dither\fR, for instance. + .TP +--newoptions ++\-newoptions + Reset globally-specified options. + .TP +--normalize ++\-normalize + Normalize a color image. + .TP +--rotate \fIdegrees\fR ++\-rotate \fIdegrees\fR + Rotate the image by \fIdegrees\fR clockwise. The number must be a + multiple of 90. + .TP +--shrink ++\-shrink + Shrink an image down to fit on the display. This is particularly + useful with servers that do not support window sizes larger than the + physical screen (eg DECWINDOWS servers). + .TP +--smooth ++\-smooth + Smooth a color image. This reduces blockiness after zooming an image + up. If used on a monochrome image, nothing happens. This option can + take awhile to perform, especially on large images. You may specify +-more than one \fI-smooth\fR option per image, causing multiple ++more than one \fI\-smooth\fR option per image, causing multiple + iterations of the smoothing algorithm. + .TP +--tile ++\-tile + Tile this image (after any necessary merging or tiling) to create a + fullscreen image. This is usually used to create a large background +-image on which to merge other images. \fI-geometry\fR can be used to +-set the new image size to something other than -fullscreen. ++image on which to merge other images. \fI\-geometry\fR can be used to ++set the new image size to something other than \-fullscreen. + .TP +--title \fItitle\fR ++\-title \fItitle\fR + Change the title of the image. This sets the title bar title if + displaying in a window or the NIFF file image title if dumping the + image. + .TP +--xzoom \fIpercentage\fR ++\-xzoom \fIpercentage\fR + Zoom the X axis of an image by \fIpercentage\fR. A number greater + than 100 will expand the image, one smaller will compress it. A zero +-value will be ignored. This option, and the related \fI-yzoom\fR are ++value will be ignored. This option, and the related \fI\-yzoom\fR are + useful for correcting the aspect ratio of images to be displayed. + .TP +--yzoom \fIpercentage\fR +-Zoom the Y axis of an image by \fIpercentage\fR. See \fI-xzoom\fR for ++\-yzoom \fIpercentage\fR ++Zoom the Y axis of an image by \fIpercentage\fR. See \fI\-xzoom\fR for + more information. + .TP +--zoom \fIpercentage\fR +-Zoom both the X and Y axes by \fIpercentage\fR. See \fI-xzoom\fR for ++\-zoom \fIpercentage\fR ++Zoom both the X and Y axes by \fIpercentage\fR. See \fI\-xzoom\fR for + more information. Technically the percentage actually zoomed is the + square of the number supplied since the zoom is to both axes, but I + opted for consistency instead of accuracy. +@@ -347,80 +347,80 @@ To load the rasterfile "my.image" onto t + it to fill the entire background: + .sp + .ti +5 +-xloadimage -onroot my.image ++xloadimage \-onroot my.image + .PP + To center an image on the default root background: + .sp + .ti +5 +-xloadimage -default -tile my.image ++xloadimage \-default \-tile my.image + .sp + If using a monochrome display and a color image you will probably want + to dither the image for a cleaner (and faster) display: + .sp + .ti +5 +-xloadimage -default -tile -dither my.image ++xloadimage \-default \-tile \-dither my.image + .PP + To load a monochrome image "my.image" onto the background, using red + as the foreground color, replicate the image, and overlay + "another.image" onto it at coordinate (10,10): + .sp + .ti +5 +-xloadimage -foreground red my.image -at 10,10 another.image ++xloadimage \-foreground red my.image \-at 10,10 another.image + .PP + To center the rectangular region from 10 to 110 along the X axis and + from 10 to the height of the image along the Y axis: + .sp + .ti +5 +-xloadimage -center -clip 10,10,100,0 my.image ++xloadimage \-center \-clip 10,10,100,0 my.image + .PP + To double the size of an image: + .sp + .ti +5 +-xloadimage -zoom 200 my.image ++xloadimage \-zoom 200 my.image + .PP + To halve the size of an image: + .sp + .ti +5 +-xloadimage -zoom 50 my.image ++xloadimage \-zoom 50 my.image + .PP + To brighten a dark image: + .sp + .ti +5 +-xloadimage -brighten 150 my.image ++xloadimage \-brighten 150 my.image + .PP + To darken a bright image: + .sp + .ti +5 +-xloadimage -brighten 50 my.image ++xloadimage \-brighten 50 my.image + .SH HINTS FOR GOOD IMAGE DISPLAYS + Since images are likely to come from a variety of sources, they may be + in a variety of aspect ratios which may not be supported by your +-display. The \fI-xzoom\fR and \fI-yzoom\fR options can be used to ++display. The \fI\-xzoom\fR and \fI\-yzoom\fR options can be used to + change the aspect ratio of an image before display. If you use these + options, it is recommended that you increase the size of one of the + dimensions instead of shrinking the other, since shrinking looses + detail. For instance, many GIF and G3 FAX images have an X:Y ratio of + about 2:1. You can correct this for viewing on a 1:1 display with +-either \fI-xzoom 50\fR or \fI-yzoom 200\fR (reduce X axis to 50% of ++either \fI\-xzoom 50\fR or \fI\-yzoom 200\fR (reduce X axis to 50% of + its size and expand Y axis to 200% of its size, respectively) but the + latter should be used so no detail is lost in the conversion. + .PP + When zooming color images up you can reduce blockiness with +-\fI-smooth\fR. For zooms of 300% or more, I recommend two smoothing ++\fI\-smooth\fR. For zooms of 300% or more, I recommend two smoothing + passes (although this can take awhile to do on slow machines). There + will be a noticeable improvement in the image. + .PP + You can perform image processing on a small portion of an image by +-loading the image more than once and using the \fI-merge\fR, \fI-at\fR +-and \fI-clip\fR options. Load the image, then merge it with a ++loading the image more than once and using the \fI\-merge\fR, \fI\-at\fR ++and \fI\-clip\fR options. Load the image, then merge it with a + clipped, processed version of itself. To brighten a 100x100 rectangular + portion of an image located at (50,50), for instance, you could type: + .sp + .ti +5 +-xloadimage my.image -merge -at 50,50 -clip 50,50,100,100 -brighten 150 my.image ++xloadimage my.image \-merge \-at 50,50 \-clip 50,50,100,100 \-brighten 150 my.image + .PP + If you're using a display with a small colormap to display colorful +-images, try using the \fI-gray\fR option to convert to grayscale. ++images, try using the \fI\-gray\fR option to convert to grayscale. + .SH PATHS AND EXTENSIONS + The file ~/.xloadimagerc (and optionally a system-wide file) defines a + number of configuration options that affect xloadimage. +@@ -472,19 +472,19 @@ provided for compressed (.Z) files and G + \fBFILTERS\fR section for more information on defining your own + filters. + .PP +-Any text on a line following a hash-mark (#) is ignored; if you wish +-to use a hash-mark in a path, extension, or filter you can escape it ++Any text on a line following a hash\(hymark (#) is ignored; if you wish ++to use a hash\(hymark in a path, extension, or filter you can escape it + using a backslash (\\). + .PP + If you wish to include white-space in a filter program name, path, or +-extension you can enclose the entire text in double-quotes. For ++extension you can enclose the entire text in double\(hyquotes. For + example: + .PP + .nf +- filter = "gzip -cd" .gz ++ filter = "gzip \-cd" .gz + .fi + .PP +-Use backslash (\\) characters to allow inclusion of double-quote marks ++Use backslash (\\) characters to allow inclusion of double\(hyquote marks + or newlines. + .PP + The following is a sample ~/.xloadimagerc file: +@@ -499,7 +499,7 @@ The following is a sample ~/.xloadimager + extension = .csun .msun .sun .face .xbm .bm + + # invoke GNU zip if a .z or .zip extension is found +- filter = "gzip -cd" .z .zip ++ filter = "gzip \-cd" .z .zip + + .fi + .PP +@@ -507,7 +507,7 @@ The following is a sample ~/.xloadimager + .PP + \fIXloadimage\fR currently supports many common and some uncommon + image types, and can create images in several formats. For a complete +-list use the \fI-supported\fR option. ++list use the \fI\-supported\fR option. + .SH DUMPING IMAGES + Several image dumpers are included that can be used to create a new + image after loading and processing. The NIFF (Native Image File +@@ -518,12 +518,12 @@ format. + Some image dumpers allow options that affect the image output. These + options are appended to the image type following a comma and are + separated by commas. If a value is desired it can be specified +-following an equals-sign. For example, to create a monochrome JPEG ++following an equals\(hysign. For example, to create a monochrome JPEG + image file with a quality factor of 80, you would use the following + command line: + .PP + .nf +- xloadimage image_name -dump jpeg,quality=80,grayscale new_image.jpg ++ xloadimage image_name \-dump jpeg,quality=80,grayscale new_image.jpg + .fi + .PP + Option names can be abbreviated but if the abbreviation is too short +@@ -537,20 +537,20 @@ The xloadimage distribution includes a s + called \fIuufilter\fR that can be used to automatically uudecode files + for processing. \fIUufilter\fR ignores extraneous lines in the file + so it is particularly useful if the uuencoded file was created by +-concatenating email or news postings that had headers or line-break ++concatenating email or news postings that had headers or line\(hybreak + indicators included. + .PP + To make use of \fIuufilter\fR you can add the following to your + \fI.xloadimagerc\fR file: + .PP + .nf +- filter = "uufilter -s" .uu .uue ++ filter = "uufilter \-s" .uu .uue + .fi + The filter will be automatically invoked on any file with a .uu or + \&.uue extension. + .PP + For a list of filters automatically recognized by xloadimage use the +-\fI-configuration\fR option. ++\fI\-configuration\fR option. + .PP + .SH SUPPORTED IMAGE OPTIONS + .PP +@@ -564,7 +564,7 @@ Force a monochrome (grayscale) image to + image. + .TP + nointerleave +-Create a non-interleaved file. ++Create a non\(hyinterleaved file. + .TP + optimize + Enable entropy parameter optimization. +@@ -604,9 +604,9 @@ Image data compression technique. Can b + \fIrle\fR (CCITT RLE compression), + \fIg3fax\fR (CCITT Group 3 FAX compression), + \fIg4fax\fR (CCITT Group 4 FAX compression), +-\fIlzw\fR (Limpel-Ziv-Welsh compression, the default), ++\fIlzw\fR (Limpel\(hyZiv\(hyWelsh compression, the default), + \fIjpeg\fR (JPEG compression), +-\fInext\fR (NeXT run-length compression), ++\fInext\fR (NeXT run\(hylength compression), + \fIrlew\fR (CCITT RLEW compression), + \fImac\fR (Macintosh PackBits compression), + \fIpackbits\fR (same as \fImac\fR), +@@ -624,17 +624,17 @@ CenterLine Software + jimf@centerline.com + .fi + .PP +-For a more-or-less complete list of other contributors (there are a ++For a more\(hyor\(hyless complete list of other contributors (there are a + \fIlot\fR of them), please see the README file enclosed with the + distribution. + .SH FILES + .nf + .in +5 +-xloadimage - the image loader and viewer +-xsetbg - pseudonym which quietly sets the background +-xview - pseudonym which views in a window +-/etc/X11/Xloadimage - default system-wide configuration file +-~/.xloadimagerc - user's personal configuration file ++xloadimage \- the image loader and viewer ++xsetbg \- pseudonym which quietly sets the background ++xview \- pseudonym which views in a window ++/etc/X11/Xloadimage \- default system-wide configuration file ++~/.xloadimagerc \- user's personal configuration file + .in -5 + .fi + .SH COPYRIGHT +@@ -662,7 +662,7 @@ file, but \fIxloadimage\fR will only dis + Only GIF87a format is supported. + .PP + One of the pseudonyms for \fIxloadimage\fR, \fIxview\fR, is the same +-name as Sun uses for their SunView-under-X package. This will be ++name as Sun uses for their SunView\(hyunder\(hyX package. This will be + confusing if you're one of those poor souls who has to use Sun's + XView. + .PP +@@ -674,7 +674,7 @@ screen, something which is normally avoi + also ignore the MaxSize argument's real function, to limit the maximum + size of the window, and allow the window to be resized larger than the + image. If this happens, \fIxloadimage\fR merely places the image in +-the upper-left corner of the window and uses the zero-value'ed pixel ++the upper\(hyleft corner of the window and uses the zero\(hyvalue'ed pixel + for any space which is not covered by the image. This behavior is +-less-than-graceful but so are window managers which are cruel enough ++less\(hythan\(hygraceful but so are window managers which are cruel enough + to ignore such details. diff --git a/32_fix-spelling.patch b/32_fix-spelling.patch new file mode 100644 index 0000000..17b4f57 --- /dev/null +++ b/32_fix-spelling.patch @@ -0,0 +1,24 @@ +Description: Fix spelling issues in upstream source +Author: Dominik George +--- a/compress.c ++++ b/compress.c +@@ -145,7 +145,7 @@ void compress_cmap(image, verbose) + } + if (verbose) { + if ((rgb.used == image->rgb.used) && !badcount) +- printf("no improvment\n"); ++ printf("no improvement\n"); + else { + int unused= image->rgb.used - rgb.used - dupcount; + if (dupcount) +--- a/options.c ++++ b/options.c +@@ -707,7 +707,7 @@ void processOptions(argc, argv, rglobal, + break; + + case IDELAY: +- fprintf(stderr, "%s has been superceded by %s (translating)\n", ++ fprintf(stderr, "%s has been superseded by %s (translating)\n", + optionName(IDELAY), optionName(DELAY)); + /* FALLTHRU */ + diff --git a/xloadimage-4.1-c23.patch b/xloadimage-4.1-c23.patch new file mode 100644 index 0000000..d9699c9 --- /dev/null +++ b/xloadimage-4.1-c23.patch @@ -0,0 +1,3739 @@ +diff -up xloadimage.4.1/bright.c.c23 xloadimage.4.1/bright.c +--- xloadimage.4.1/bright.c.c23 2025-02-24 15:41:17.644552724 -0500 ++++ xloadimage.4.1/bright.c 2025-02-24 15:41:17.686319694 -0500 +@@ -15,10 +15,7 @@ + /* alter an image's brightness by a given percentage + */ + +-void brighten(image, percent, verbose) +- Image *image; +- unsigned int percent; +- unsigned int verbose; ++void brighten(Image *image, unsigned int percent, unsigned int verbose) + { int a; + unsigned int newrgb; + float fperc; +@@ -69,10 +66,7 @@ void brighten(image, percent, verbose) + printf("done\n"); + } + +-void gammacorrect(image, disp_gam, verbose) +- Image *image; +- double disp_gam; +- unsigned int verbose; ++void gammacorrect(Image *image, double disp_gam, unsigned int verbose) + { int a; + static int gammamap[256]; + byte *destptr; +@@ -119,10 +113,7 @@ void gammacorrect(image, disp_gam, verbo + /* this initializes a lookup table for doing normalization + */ + +-static void setupNormalizationArray(min, max, array, verbose) +- unsigned int min, max; +- byte *array; +- unsigned int verbose; ++static void setupNormalizationArray(unsigned int min, unsigned int max, byte *array, unsigned int verbose) + { int a; + unsigned int new; + float factor; +@@ -141,9 +132,7 @@ static void setupNormalizationArray(min, + /* normalize an image. + */ + +-Image *normalize(image, verbose) +- Image *image; +- unsigned int verbose; ++Image *normalize(Image *image, unsigned int verbose) + { unsigned int a, x, y; + unsigned int min, max; + Pixel pixval; +@@ -251,9 +240,7 @@ Image *normalize(image, verbose) + /* convert to grayscale + */ + +-void gray(image, verbose) +- Image *image; +- unsigned int verbose; ++void gray(Image *image, unsigned int verbose) + { int a; + unsigned int size; + Intensity intensity, red, green, blue; +diff -up xloadimage.4.1/clip.c.c23 xloadimage.4.1/clip.c +--- xloadimage.4.1/clip.c.c23 1993-10-21 17:28:36.000000000 -0400 ++++ xloadimage.4.1/clip.c 2025-02-24 15:41:17.686493983 -0500 +@@ -11,10 +11,7 @@ + #include "copyright.h" + #include "image.h" + +-Image *clip(simage, clipx, clipy, clipw, cliph, verbose) +- Image *simage; +- unsigned int clipx, clipy, clipw, cliph; +- unsigned int verbose; ++Image *clip(Image *simage, unsigned int clipx, unsigned int clipy, unsigned int clipw, unsigned int cliph, unsigned int verbose) + { Image *image; + unsigned int x, y; + unsigned int slinelen, dlinelen; +diff -up xloadimage.4.1/cmuwmraster.c.c23 xloadimage.4.1/cmuwmraster.c +--- xloadimage.4.1/cmuwmraster.c.c23 2025-02-24 15:41:17.644796059 -0500 ++++ xloadimage.4.1/cmuwmraster.c 2025-02-24 15:41:17.686602182 -0500 +@@ -16,9 +16,7 @@ + + /* SUPPRESS 558 */ + +-void babble(name, headerp) +-char *name; +-struct cmuwm_header *headerp; ++void babble(char *name, struct cmuwm_header *headerp) + { + printf("%s is a %ldx%ld %ld plane CMU WM raster\n", + name, +@@ -27,8 +25,7 @@ struct cmuwm_header *headerp; + memToVal(headerp->depth, sizeof(short))); + } + +-int cmuwmIdent(fullname, name) +-char *fullname, *name; ++int cmuwmIdent(char *fullname, char *name) + { + ZFILE *zf; + struct cmuwm_header header; +@@ -67,9 +64,7 @@ char *fullname, *name; + return r; + } + +-Image* cmuwmLoad(fullname, name, verbose) +-char *fullname, *name; +-unsigned int verbose; ++Image* cmuwmLoad(char *fullname, char *name, unsigned int verbose) + { + ZFILE *zf; + struct cmuwm_header header; +diff -up xloadimage.4.1/compress.c.c23 xloadimage.4.1/compress.c +--- xloadimage.4.1/compress.c.c23 2025-02-24 15:41:17.684853621 -0500 ++++ xloadimage.4.1/compress.c 2025-02-24 15:41:17.686677322 -0500 +@@ -30,9 +30,7 @@ + + #define NIL_PIXEL 0xffffffff + +-void compress_cmap(image, verbose) +- Image *image; +- unsigned int verbose; ++void compress_cmap(Image *image, unsigned int verbose) + { Pixel hash_table[32768]; + Pixel *pixel_table; + Pixel *pixel_map; +diff -up xloadimage.4.1/config.c.c23 xloadimage.4.1/config.c +--- xloadimage.4.1/config.c.c23 2025-02-24 15:41:17.659819318 -0500 ++++ xloadimage.4.1/config.c 2025-02-24 15:41:17.686756047 -0500 +@@ -36,8 +36,7 @@ static char *PathToken= "path"; + static char *ExtToken= "extension"; + static char *FilterToken= "filter"; + +-static void addFilter(extension, filter) +- char *extension, *filter; ++static void addFilter(char *extension, char *filter) + { struct filter *f, *t; + + f= (struct filter *)lmalloc(sizeof(struct filter)); +@@ -66,9 +65,7 @@ enum parse_state { + /* this function eats up whitespace, incrementing the line number at + * each newline + */ +-static void skip_whitespace(f, linenum) +- FILE *f; +- unsigned int *linenum; ++static void skip_whitespace(FILE *f, unsigned int *linenum) + { + int c; + +@@ -92,8 +89,7 @@ static void skip_whitespace(f, linenum) + } + + +-static void readPathsAndExts(name) +- char *name; ++static void readPathsAndExts(char *name) + { FILE *f; + char buf[BUFSIZ]; + char filter_name[BUFSIZ]; +@@ -298,9 +294,7 @@ void loadPathsAndExts() + #endif + } + +-static int fileIsOk(fullname, sbuf) +- char *fullname; +- struct stat *sbuf; ++static int fileIsOk(char *fullname, struct stat *sbuf) + { + if ((sbuf->st_mode & S_IFMT) == S_IFDIR) /* is a directory */ + return(0); +@@ -311,8 +305,7 @@ static int fileIsOk(fullname, sbuf) + * -1 if access denied or not found, 0 if ok. + */ + +-int findImage(name, fullname) +- char *name, *fullname; ++int findImage(char *name, char *fullname) + { unsigned int p, e; + struct stat sbuf; + +@@ -451,8 +444,7 @@ static char *homedir() + return pw->pw_dir; + } + +-char *expandPath(p) +- char *p; ++char *expandPath(char *p) + { char buf1[BUFSIZ], buf2[BUFSIZ]; + int b1, b2, var; + char *ptr; +diff -up xloadimage.4.1/dither.c.c23 xloadimage.4.1/dither.c +--- xloadimage.4.1/dither.c.c23 1993-10-22 11:22:55.000000000 -0400 ++++ xloadimage.4.1/dither.c 2025-02-24 15:41:17.686829679 -0500 +@@ -28,17 +28,15 @@ + #define Threshold 16384 /* in the dithering process */ + #define MinGrey 0 + +-static unsigned int tone_scale_adjust(); +-static void LeftToRight(); +-static void RightToLeft(); ++static unsigned int tone_scale_adjust(unsigned int); ++static void LeftToRight(int *, int *, int); ++static void RightToLeft(int *, int *, int); + + /* + * simple floyd-steinberg dither with serpentine raster processing + */ + +-Image *dither(cimage, verbose) +- Image *cimage; +- unsigned int verbose; ++Image *dither(Image *cimage, unsigned int verbose) + { + Image *image; /* destination image */ + unsigned int *grey; /* grey map for source image */ +@@ -189,8 +187,7 @@ Image *dither(cimage, verbose) + * + * this should help things look a bit better on most displays. + */ +-static unsigned int tone_scale_adjust(val) +- unsigned int val; ++static unsigned int tone_scale_adjust(unsigned int val) + { + unsigned int rslt; + +@@ -207,10 +204,7 @@ static unsigned int tone_scale_adjust(va + /* + * dither a line from left to right + */ +-static void LeftToRight(curr, next, width) +- int *curr; +- int *next; +- int width; ++static void LeftToRight(int *curr, int *next, int width) + { + int idx; + int error; +@@ -232,10 +226,7 @@ static void LeftToRight(curr, next, widt + /* + * dither a line from right to left + */ +-static void RightToLeft(curr, next, width) +- int *curr; +- int *next; +- int width; ++static void RightToLeft(int *curr, int *next, int width) + { + int idx; + int error; +diff -up xloadimage.4.1/faces.c.c23 xloadimage.4.1/faces.c +--- xloadimage.4.1/faces.c.c23 2025-02-24 15:41:17.678137737 -0500 ++++ xloadimage.4.1/faces.c 2025-02-24 15:41:17.686901561 -0500 +@@ -55,9 +55,7 @@ static void initHexTable() + /* read a hex value and return its value + */ + +-static int nextInt(zf, len) +- ZFILE *zf; +- unsigned int len; ++static int nextInt(ZFILE *zf, unsigned int len) + { int c; + int value= 0; + int count; +@@ -83,9 +81,7 @@ static int nextInt(zf, len) + return(value); + } + +-Image *facesLoad(fullname, name, verbose) +- char *fullname, *name; +- int verbose; ++Image *facesLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + Image *image; + char fname[BUFSIZ]; +@@ -175,8 +171,7 @@ Image *facesLoad(fullname, name, verbose + return(image); + } + +-int facesIdent(fullname, name) +- char *fullname, *name; ++int facesIdent(char *fullname, char *name) + { Image *image; + + if ((image= facesLoad(fullname, name, 1))) { +diff -up xloadimage.4.1/fbm.c.c23 xloadimage.4.1/fbm.c +--- xloadimage.4.1/fbm.c.c23 2025-02-24 15:41:17.645345316 -0500 ++++ xloadimage.4.1/fbm.c 2025-02-24 15:41:17.686962764 -0500 +@@ -104,8 +104,7 @@ static int fbmin_image_test() + * open FBM image in the input stream; returns FBMIN_SUCCESS if + * successful. (might also return various FBMIN_ERR codes.) + */ +-static int fbmin_open_image(s) +-ZFILE *s; ++static int fbmin_open_image(ZFILE *s) + { + char *hp; /* header pointer */ + +@@ -167,8 +166,7 @@ static int fbmin_close_file() + * semi-graceful fatal error mechanism + */ + +-static fbmin_fatal(msg) +- char *msg; ++static fbmin_fatal(char *msg) + { + printf("Error reading FBM file: %s\n", msg); + exit(0); +@@ -184,8 +182,7 @@ static fbmin_fatal(msg) + * descriptive but I don't care + */ + +-static void tellAboutImage(name) +- char *name; ++static void tellAboutImage(char *name) + { + if (fbmin_img_clrlen > 0) + printf("%s is a %dx%d FBM image with %d colors\n", name, +@@ -195,9 +192,7 @@ static void tellAboutImage(name) + name, fbmin_img_width, fbmin_img_height, fbmin_img_bits); + } + +-Image *fbmLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *fbmLoad(char *fullname, char *name, unsigned int verbose) + { + ZFILE *zf; + Image *image; +@@ -288,8 +283,7 @@ Image *fbmLoad(fullname, name, verbose) + return(image); + } + +-int fbmIdent(fullname, name) +-char *fullname, *name; ++int fbmIdent(char *fullname, char *name) + { + ZFILE *zf; + unsigned int ret; +diff -up xloadimage.4.1/fill.c.c23 xloadimage.4.1/fill.c +--- xloadimage.4.1/fill.c.c23 1993-10-21 17:28:37.000000000 -0400 ++++ xloadimage.4.1/fill.c 2025-02-24 15:41:17.687027255 -0500 +@@ -11,10 +11,7 @@ + #include "copyright.h" + #include "image.h" + +-void fill(image, fx, fy, fw, fh, pixval) +- Image *image; +- unsigned int fx, fy, fw, fh; +- Pixel pixval; ++void fill(Image *image, unsigned int fx, unsigned int fy, unsigned int fw, unsigned int fh, Pixel pixval) + { unsigned int x, y; + unsigned int linelen, start; + byte *lineptr, *pixptr; +diff -up xloadimage.4.1/gif.c.c23 xloadimage.4.1/gif.c +--- xloadimage.4.1/gif.c.c23 2025-02-24 15:41:17.645515975 -0500 ++++ xloadimage.4.1/gif.c 2025-02-24 15:41:17.687105301 -0500 +@@ -105,8 +105,7 @@ static BYTE gifin_interlace_flag; / + * open a GIF file, using s as the input stream + */ + +-static int gifin_open_file(s) +- ZFILE *s; ++static int gifin_open_file(ZFILE *s) + { + /* make sure there isn't already a file open */ + if (file_open) +@@ -255,8 +254,7 @@ static int gifin_open_image() + * try to read next pixel from the raster, return result in *pel + */ + +-static int gifin_get_pixel(pel) +- int *pel; ++static int gifin_get_pixel(int *pel) + { + int code; + int first; +@@ -381,9 +379,7 @@ static int gifin_close_file() + * load a colormap from the input stream + */ + +-static int gifin_load_cmap(cmap, ncolors) +- BYTE cmap[3][256]; +- int ncolors; ++static int gifin_load_cmap(BYTE cmap[3][256], int ncolors) + { + int i; + +@@ -447,8 +443,7 @@ static int gifin_read_data_block() + * (returns the code of the first pixel in the string) + */ + +-static int gifin_push_string(code) +- int code; ++static int gifin_push_string(int code) + { + int rslt; + +@@ -468,9 +463,7 @@ static int gifin_push_string(code) + * add a new string to the string table + */ + +-static void gifin_add_string(p, e) +- int p; +- int e; ++static void gifin_add_string(int p, int e) + { + prefix[table_size] = p; + extnsn[table_size] = e; +@@ -488,8 +481,7 @@ static void gifin_add_string(p, e) + * semi-graceful fatal error mechanism + */ + +-static void gifin_fatal(msg) +- char *msg; ++static void gifin_fatal(char *msg) + { + printf("Error reading GIF file: %s\n", msg); + exit(0); +@@ -502,8 +494,7 @@ static void gifin_fatal(msg) + * descriptive but I don't care + */ + +-static void tellAboutImage(name) +- char *name; ++static void tellAboutImage(char *name) + { + printf("%s is a %dx%d %sGIF image with %d colors\n", name, + gifin_img_width, gifin_img_height, +@@ -511,9 +502,7 @@ static void tellAboutImage(name) + (gifin_l_cmap_flag ? gifin_l_ncolors : gifin_g_ncolors)); + } + +-Image *gifLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *gifLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + Image *image; + int x, y, pixel, pass, scanlen; +@@ -605,8 +594,7 @@ Image *gifLoad(fullname, name, verbose) + return(image); + } + +-int gifIdent(fullname, name) +- char *fullname, *name; ++int gifIdent(char *fullname, char *name) + { ZFILE *zf; + unsigned int ret; + +diff -up xloadimage.4.1/gif.h.c23 xloadimage.4.1/gif.h +--- xloadimage.4.1/gif.h.c23 2025-02-24 15:41:17.645819159 -0500 ++++ xloadimage.4.1/gif.h 2025-02-24 15:41:17.687187024 -0500 +@@ -39,19 +39,19 @@ + + typedef unsigned char BYTE; + +-static int gifin_open_file(); ++static int gifin_open_file(ZFILE *s); + static int gifin_open_image(); +-static int gifin_get_pixel(); ++static int gifin_get_pixel(int *pel); + #if 0 + static int gifin_close_image(); + #endif + static int gifin_close_file(); +-static int gifin_load_cmap(); ++static int gifin_load_cmap(BYTE cmap[3][256], int ncolors); + static int gifin_skip_extension(); + static int gifin_read_data_block(); +-static int gifin_push_string(); +-static void gifin_add_string(); +-static void gifin_fatal(); ++static int gifin_push_string(int code); ++static void gifin_add_string(int p, int e); ++static void gifin_fatal(char *msg); + + /* #defines, typedefs, and such + */ +diff -up xloadimage.4.1/halftone.c.c23 xloadimage.4.1/halftone.c +--- xloadimage.4.1/halftone.c.c23 2025-02-24 15:41:17.645925059 -0500 ++++ xloadimage.4.1/halftone.c 2025-02-24 15:41:17.687245717 -0500 +@@ -152,9 +152,7 @@ static byte DitherBits[GRAYS][4] = { + /* simple dithering algorithm, really optimized for the 4x4 array + */ + +-Image *halftone(cimage, verbose) +- Image *cimage; +- unsigned int verbose; ++Image *halftone(Image *cimage, unsigned int verbose) + { Image *image; + unsigned char *sp, *dp, *dp2; /* data pointers */ + unsigned int dindex; /* index into dither array */ +diff -up xloadimage.4.1/image.h.c23 xloadimage.4.1/image.h +--- xloadimage.4.1/image.h.c23 2025-02-24 15:41:17.646185272 -0500 ++++ xloadimage.4.1/image.h 2025-02-24 15:41:17.687306239 -0500 +@@ -248,12 +248,12 @@ Image *tile _ArgProto((Image *image, int + void memoryExhausted _ArgProto((void)); + char *tail _ArgProto((char *)); + void usage _ArgProto((void)); +-int errorHandler(); ++/* int errorHandler(Display *, XErrorEvent *); */ + char *findstr _ArgProto((char *, char *)); + + /* new.c */ + extern unsigned long DepthToColorsTable[]; +-unsigned long colorsToDepth(); ++unsigned long colorsToDepth(unsigned long); + char *dupString _ArgProto((char *s)); + Image *newBitImage _ArgProto((unsigned int width, unsigned int height)); + Image *newRGBImage _ArgProto((unsigned int width, unsigned int height, +diff -up xloadimage.4.1/imagetypes.c.c23 xloadimage.4.1/imagetypes.c +--- xloadimage.4.1/imagetypes.c.c23 2025-02-24 15:41:17.660062713 -0500 ++++ xloadimage.4.1/imagetypes.c 2025-02-24 15:41:17.687371592 -0500 +@@ -21,11 +21,7 @@ extern int findImage(char *name, char *f + /* load a named image + */ + +-Image *loadImage(globalopts, options, name, verbose) +- OptionSet *globalopts; +- OptionSet *options; +- char *name; +- unsigned int verbose; ++Image *loadImage(OptionSet *globalopts, OptionSet *options, char *name, unsigned int verbose) + { char fullname[BUFSIZ]; + Option *opt; + Image *image; +@@ -103,8 +99,7 @@ Image *loadImage(globalopts, options, na + /* identify what kind of image a named image is + */ + +-void identifyImage(name) +- char *name; ++void identifyImage(char *name) + { char fullname[BUFSIZ]; + int a; + +@@ -127,11 +122,7 @@ void identifyImage(name) + + /* dump an image into an image file of the specified type + */ +-void dumpImage(image, type, filename, verbose) +- Image *image; +- char *type; +- char *filename; +- int verbose; ++void dumpImage(Image *image, char *type, char *filename, int verbose) + { int a; + char typename[32]; + char *optptr; +diff -up xloadimage.4.1/imagetypes.h.c23 xloadimage.4.1/imagetypes.h +--- xloadimage.4.1/imagetypes.h.c23 2025-02-24 15:41:17.646580011 -0500 ++++ xloadimage.4.1/imagetypes.h 2025-02-24 15:41:17.687441295 -0500 +@@ -10,84 +10,84 @@ + #ifndef __IMAGETYPES_H__ + #define __IMAGETYPES_H__ + +-Image *niffLoad(); +-Image *facesLoad(); +-Image *pbmLoad(); +-Image *sunRasterLoad(); +-Image *gifLoad(); +-Image *rleLoad(); +-Image *xwdLoad(); +-Image *vffLoad(); +-Image *xbitmapLoad(); +-Image *xpixmapLoad(); +-Image *fbmLoad(); +-Image *pcxLoad(); +-Image *imgLoad(); +-Image *macLoad(); +-Image *cmuwmLoad(); +-Image *mcidasLoad(); ++Image *niffLoad(char *, char *, unsigned int); ++Image *facesLoad(char *, char *, unsigned int); ++Image *pbmLoad(char *, char *, unsigned int); ++Image *sunRasterLoad(char *, char *, unsigned int); ++Image *gifLoad(char *, char *, unsigned int); ++Image *rleLoad(char *, char *, unsigned int); ++Image *xwdLoad(char *, char *, unsigned int); ++Image *vffLoad(char *, char *, unsigned int); ++Image *xbitmapLoad(char *, char *, unsigned int); ++Image *xpixmapLoad(char *, char *, unsigned int); ++Image *fbmLoad(char *, char *, unsigned int); ++Image *pcxLoad(char *, char *, unsigned int); ++Image *imgLoad(char *, char *, unsigned int); ++Image *macLoad(char *, char *, unsigned int); ++Image *cmuwmLoad(char *, char *, unsigned int); ++Image *mcidasLoad(char *, char *, unsigned int); + #if 0 + Image *pdsLoad(); + #else +-Image *vicarLoad(); ++Image *vicarLoad(char *, char *, unsigned int); + #endif + #ifdef HAVE_LIBJPEG +-Image *jpegLoad(); ++Image *jpegLoad(char *, char *, unsigned int); + #endif + #ifdef HAVE_LIBTIFF +-Image *tiffLoad(); ++Image *tiffLoad(char *, char *, unsigned int); + #endif + #ifdef HAVE_LIBPNG +-Image *pngLoad(); ++Image *pngLoad(char *, char *, unsigned int); + #endif + +-int niffIdent(); +-int facesIdent(); +-int pbmIdent(); +-int sunRasterIdent(); +-int gifIdent(); +-int rleIdent(); +-int xwdIdent(); +-int vffIdent(); +-int xbitmapIdent(); +-int xpixmapIdent(); +-int fbmIdent(); +-int pcxIdent(); +-int imgIdent(); +-int macIdent(); +-int cmuwmIdent(); +-int mcidasIdent(); ++int niffIdent(char *, char *); ++int facesIdent(char *, char *); ++int pbmIdent(char *, char *); ++int sunRasterIdent(char *, char *); ++int gifIdent(char *, char *); ++int rleIdent(char *, char *); ++int xwdIdent(char *, char *); ++int vffIdent(char *, char *); ++int xbitmapIdent(char *, char *); ++int xpixmapIdent(char *, char *); ++int fbmIdent(char *, char *); ++int pcxIdent(char *, char *); ++int imgIdent(char *, char *); ++int macIdent(char *, char *); ++int cmuwmIdent(char *, char *); ++int mcidasIdent(char *, char *); + #if 0 + int pdsIdent(); + #else +-int vicarIdent(); ++int vicarIdent(char *, char *); + #endif + #ifdef HAVE_LIBJPEG +-int jpegIdent(); ++int jpegIdent(char *, char *); + #endif + #ifdef HAVE_LIBTIFF +-int tiffIdent(); ++int tiffIdent(char *, char *); + #endif + #ifdef HAVE_LIBPNG +-int pngIdent(); ++int pngIdent(char *, char *); + #endif + +-void niffDump(); ++void niffDump(Image *, char *, char *, int); + #ifdef HAVE_LIBJPEG +-void jpegDump(); ++void jpegDump(Image *, char *, char *, int); + #endif + #ifdef HAVE_LIBTIFF +-void tiffDump(); ++void tiffDump(Image *, char *, char *, int); + #endif +-void pbmDump(); ++void pbmDump(Image *, char *, char *, int); + + /* some of these are order-dependent + */ + + struct { +- int (*identifier)(); /* print out image info if this kind of image */ +- Image *(*loader)(); /* load image if this kind of image */ +- void (*dumper)(); /* dump image of this kind */ ++ int (*identifier)(char fullname[BUFSIZ], char *name); /* print out image info if this kind of image */ ++ Image *(*loader)(char fullname[BUFSIZ], char *name, unsigned int verbose); /* load image if this kind of image */ ++ void (*dumper)(Image *image, char *optptr, char *filename, int verbose); /* dump image of this kind */ + char *type; /* image type name */ + char *name; /* name of this image format */ + } ImageTypes[] = { +diff -up xloadimage.4.1/img.c.c23 xloadimage.4.1/img.c +--- xloadimage.4.1/img.c.c23 2025-02-24 15:41:17.660268504 -0500 ++++ xloadimage.4.1/img.c 2025-02-24 15:41:17.687545005 -0500 +@@ -67,25 +67,25 @@ typedef struct ximg_header + byte color_model[2]; /* 0 = RGB,1 = CYM,2 = HLS, etc. */ + } XIMG_HEADER; + +-void (*transf) (); ++void (*transf) (unsigned char *, unsigned int, unsigned char, unsigned int); + +-static int vdi2pli(); ++static int vdi2pli(int, int); + #ifdef UNUSED_FUNCTIONS +-static int pli2vdi(); ++static int pli2vdi(int, int); + #endif /* UNUSED_FUNCTIONS */ + +-static void transf0 (); +-static void transf1 (); ++static void transf0 (unsigned char *, unsigned int, unsigned char, unsigned int); ++static void transf1 (unsigned char *, unsigned int, unsigned char, unsigned int); + #ifdef UNUSED_FUNCTIONS +-static void transf2 (); ++static void transf2 (unsigned char *, unsigned int, unsigned char, unsigned int); + #endif /* UNUSED_FUNCTIONS */ +-static void transf3 (); +-static void xread_img (); +-static void xread_line (); +-static int ident_img (); +-static Image *load_img (); +-static int ident_ximg (); +-static Image *load_ximg (); ++static void transf3 (unsigned char *, unsigned int, unsigned char, unsigned int); ++static void xread_img (ZFILE *, unsigned int, int); ++static void xread_line (ZFILE *, int); ++static int ident_img (char *); ++static Image *load_img (char *); ++static int ident_ximg (char *); ++static Image *load_ximg (char *); + + IMGHEADER header; + XIMG_HEADER xheader; +@@ -97,11 +97,7 @@ static unsigned char *bitplane[ALL_PL + #endif /* UNUSED_FUNCTIONS */ + + +-static void transf0(bitimage, plane, value, planes) +- unsigned char *bitimage; +- unsigned int plane; +- unsigned char value; +- unsigned int planes; ++static void transf0(unsigned char *bitimage, unsigned int plane, unsigned char value, unsigned int planes) + { + bitimage[x] = value; + x++; +@@ -109,11 +105,7 @@ static void transf0(bitimage, plane, val + + + +-static void transf1(bitimage, plane, value, planes) +- unsigned char *bitimage; +- unsigned int plane; +- unsigned char value; +- unsigned int planes; ++static void transf1(unsigned char *bitimage, unsigned int plane, unsigned char value, unsigned int planes) + { + unsigned char bit; + unsigned long off; +@@ -133,11 +125,7 @@ static void transf1(bitimage, plane, val + + + #ifdef UNUSED_FUNCTIONS +-static void transf2(bitimage, plane, value, planes) +- unsigned char *bitimage; +- unsigned int plane; +- unsigned char value; +- unsigned int planes; ++static void transf2(unsigned char *bitimage, unsigned int plane, unsigned char value, unsigned int planes) + { + int i; + +@@ -152,11 +140,7 @@ static void transf2(bitimage, plane, val + } + #endif /* UNUSED_FUNCTIONS */ + +-static void transf3(bitimage, plane, value, planes) +- unsigned char *bitimage; +- unsigned int plane; +- unsigned char value; +- unsigned int planes; ++static void transf3(unsigned char *bitimage, unsigned int plane, unsigned char value, unsigned int planes) + { + unsigned char bit; + unsigned long off; +@@ -181,9 +165,7 @@ static void transf3(bitimage, plane, val + x++; + } + +-static void xread_line (file, planes) +-ZFILE *file; +-int planes; ++static void xread_line (ZFILE *file, int planes) + { + ByteNr= 0; + for (plane= 0; plane < planes; plane++) +@@ -198,10 +180,7 @@ int planes; + + + +-static void xread_img (file, linie, planes) +-ZFILE *file; +-unsigned int linie; +-int planes; ++static void xread_img (ZFILE *file, unsigned int linie, int planes) + { + unsigned int wert, i, k; + unsigned char status; +@@ -366,8 +345,7 @@ int planes; + } + } + +-static int ident_img(name) +- char *name; ++static int ident_img(char *name) + { + ZFILE *file; + long size = 0; +@@ -415,8 +393,7 @@ static int ident_img(name) + return (1); + } + +-static Image *load_img(name) +- char *name; ++static Image *load_img(char *name) + { + ZFILE *file; + Image *image = NULL; +@@ -564,8 +541,7 @@ static Image *load_img(name) + + + +-static int ident_ximg(name) +- char *name; ++static int ident_ximg(char *name) + { + ZFILE *file; + long size = 0; +@@ -604,8 +580,7 @@ static int ident_ximg(name) + return (1); + } + +-static int vdi2pli(vdi, plimax) +- int vdi, plimax; ++static int vdi2pli(int vdi, int plimax) + { + static char vdi2pli[] = {0, 15, 1, 2, 4, 6, 3, 5, 7, 8, 9, 10, 12, 14, 11, 13 }; + +@@ -618,8 +593,7 @@ static int vdi2pli(vdi, plimax) + + + #ifdef UNUSED_FUNCTIONS +-static int pli2vdi(pli, plimax) +- int pli, plimax; ++static int pli2vdi(int pli, int plimax) + { + static char pli2vdi[] = {0, 2, 3, 6, 4, 7, 5, 8, 9, 10, 11, 14, 12, 15, 13, 1 }; + +@@ -631,8 +605,7 @@ static int pli2vdi(pli, plimax) + } + #endif /* UNUSED_FUNCTIONS */ + +-static Image *load_ximg(name) +- char *name; ++static Image *load_ximg(char *name) + { + void transferRGBMap(); + ZFILE *file; +@@ -757,10 +730,7 @@ static Image *load_ximg(name) + return(image); + } + +-int imgIdent(name, name2, verbose) +- char *name; +- char *name2; +- int verbose; ++int imgIdent(char *name, char *name2) + { + int identified; + +@@ -771,10 +741,7 @@ int imgIdent(name, name2, verbose) + return(identified); + } + +-Image *imgLoad(name, name2, verbose) +- char *name; +- char *name2; +- int verbose; ++Image *imgLoad(char *name, char *name2, unsigned int verbose) + { + errorInLoad = 0; + out_depthError = 0; +diff -up xloadimage.4.1/jpeg.c.c23 xloadimage.4.1/jpeg.c +--- xloadimage.4.1/jpeg.c.c23 2025-02-24 15:41:17.669166007 -0500 ++++ xloadimage.4.1/jpeg.c 2025-02-24 15:41:17.687638571 -0500 +@@ -114,8 +114,7 @@ static void error_exit (j_common_ptr com + + + static void +-jpegInfo (cinfo) +- j_decompress_ptr cinfo; ++jpegInfo (j_decompress_ptr cinfo) + { + /* Create display of image parameters */ + printf("%s is a %dx%d JPEG image, color space ", filename, +@@ -155,9 +154,7 @@ jpegInfo (cinfo) + /* Main control routine for loading */ + + Image * +-jpegLoad (fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++jpegLoad (char *fullname, char *name, unsigned int verbose) + { + struct jpeg_decompress_struct cinfo; + struct jpeg_source_mgr src_mgr; +@@ -248,8 +245,7 @@ jpegLoad (fullname, name, verbose) + return 0: Not jpeg file. + */ + int +-jpegIdent (fullname, name) +- char *fullname, *name; ++jpegIdent (char *fullname, char *name) + { + struct jpeg_decompress_struct cinfo; + struct jpeg_source_mgr src_mgr; +diff -up xloadimage.4.1/mac.c.c23 xloadimage.4.1/mac.c +--- xloadimage.4.1/mac.c.c23 1993-10-21 17:28:39.000000000 -0400 ++++ xloadimage.4.1/mac.c 2025-02-24 15:41:17.687714255 -0500 +@@ -52,8 +52,7 @@ static int macin_img_BPL; /* ima + * successful. (might also return various MACIN_ERR codes.) + */ + /* ARGSUSED */ +-static int macin_open_image(s) +-ZFILE *s; ++static int macin_open_image(ZFILE *s) + { + BYTE mhdr[MAC_HDR_LEN]; + char *hp; /* header pointer */ +@@ -124,8 +123,7 @@ static int macin_close_file() + * semi-graceful fatal error mechanism + */ + +-static macin_fatal(msg) +- char *msg; ++static macin_fatal(char *msg) + { + printf("Error reading MacPaint file: %s\n", msg); + exit(0); +@@ -141,16 +139,13 @@ static macin_fatal(msg) + * descriptive but I don't care + */ + +-static void tellAboutImage(name) +-char *name; ++static void tellAboutImage(char *name) + { + printf("%s is a %dx%d MacPaint image\n", + name, macin_img_width, macin_img_height); + } + +-Image *macLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *macLoad(char *fullname, char *name, unsigned int verbose) + { + ZFILE *zf; + Image *image; +@@ -215,8 +210,7 @@ Image *macLoad(fullname, name, verbose) + return(image); + } + +-int macIdent(fullname, name) +-char *fullname, *name; ++int macIdent(char *fullname, char *name) + { + ZFILE *zf; + unsigned int ret; +diff -up xloadimage.4.1/mac.h.c23 xloadimage.4.1/mac.h +--- xloadimage.4.1/mac.h.c23 1993-10-21 17:28:39.000000000 -0400 ++++ xloadimage.4.1/mac.h 2025-02-24 15:41:17.687770362 -0500 +@@ -32,7 +32,7 @@ typedef unsigned char BYTE; /* 8 bits un + #define MACIN_ERR_NFO -7 /* no file open */ + #define MACIN_ERR_NIO -8 /* no image open */ + +-static int macin_open_image(); ++static int macin_open_image(ZFILE *); + static int macin_close_file(); + #if 0 + static int macin_fatal(); +diff -up xloadimage.4.1/mcidas.c.c23 xloadimage.4.1/mcidas.c +--- xloadimage.4.1/mcidas.c.c23 2025-02-24 15:41:17.663801470 -0500 ++++ xloadimage.4.1/mcidas.c 2025-02-24 15:41:17.687880624 -0500 +@@ -7,7 +7,7 @@ + #include "xloadimage.h" + #include "mcidas.h" + +-char *mc_sensor(); ++char *mc_sensor(int); + + static struct { + int days; +@@ -30,8 +30,7 @@ static struct { + + /* convert numeric dates to human-readable + */ +-static char *convert_date(time, date) +- int time, date; ++static char *convert_date(int time, int date) + { static char buf[30]; + int hour; + int minute; +@@ -72,9 +71,7 @@ static char *convert_date(time, date) + /* + * convert from little endian to big endian four byte object + */ +-static unsigned long +-vhtonl(lend) +-unsigned long lend ; ++static unsigned long vhtonl(unsigned long lend) + { + unsigned long bend ; + unsigned char *lp, *bp ; +@@ -90,9 +87,7 @@ unsigned long lend ; + return(bend) ; + } + +-static void babble(name, dir) +- char *name; +- struct area_dir *dir; ++static void babble(char *name, struct area_dir *dir) + { + printf("%s is a %ldx%ld McIDAS areafile from %s at %s (%ld, %ld) (%ld, %ld)\n", + name, +@@ -105,8 +100,7 @@ static void babble(name, dir) + dir->eres) ; + } + +-static void swap_bytes(dir) +- struct area_dir *dir; ++static void swap_bytes(struct area_dir *dir) + { + unsigned long *begin ; + unsigned long *ulp ; +@@ -119,8 +113,7 @@ static void swap_bytes(dir) + } + + /* ARGSUSED */ +-int mcidasIdent(fullname, name) +- char *fullname, *name; ++int mcidasIdent(char *fullname, char *name) + { ZFILE *zf; + struct area_dir dir ; + int r; +@@ -155,9 +148,7 @@ int mcidasIdent(fullname, name) + } + + +-Image *mcidasLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *mcidasLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + struct area_dir dir; + struct navigation nav; +diff -up xloadimage.4.1/mc_tables.c.c23 xloadimage.4.1/mc_tables.c +--- xloadimage.4.1/mc_tables.c.c23 1993-10-21 17:28:39.000000000 -0400 ++++ xloadimage.4.1/mc_tables.c 2025-02-24 15:41:17.687934866 -0500 +@@ -7,9 +7,7 @@ + * return a string describing the sensor source. + * + */ +-char * +-mc_sensor(sscode) +-int sscode ; ++char *mc_sensor(int sscode) + { + switch (sscode) { + case 0 : return("Non-Image Derived Data") ; +diff -up xloadimage.4.1/merge.c.c23 xloadimage.4.1/merge.c +--- xloadimage.4.1/merge.c.c23 2025-02-24 15:41:17.657309590 -0500 ++++ xloadimage.4.1/merge.c 2025-02-24 15:41:17.687991174 -0500 +@@ -15,10 +15,7 @@ + * 24-bit. this saves a lot of space. + */ + +-static Image *bitmapToBitmap(src, dest, atx, aty, clipw, cliph, verbose) +- Image *src, *dest; +- unsigned int atx, aty, clipw, cliph; +- unsigned int verbose; ++static Image *bitmapToBitmap(Image *src, Image *dest, unsigned int atx, unsigned int aty, unsigned int clipw, unsigned int cliph, unsigned int verbose) + { unsigned int destlinelen, srclinelen; + unsigned int deststart; + unsigned int flip; +@@ -72,10 +69,7 @@ static Image *bitmapToBitmap(src, dest, + return(dest); + } + +-static Image *anyToTrue(src, dest, atx, aty, clipw, cliph, verbose) +- Image *src, *dest; +- unsigned int atx, aty, clipw, cliph; +- unsigned int verbose; ++static Image *anyToTrue(Image *src, Image *dest, unsigned int atx, unsigned int aty, unsigned int clipw, unsigned int cliph, unsigned int verbose) + { Pixel fg, bg; + unsigned int destlinelen, srclinelen; + unsigned int deststart; +@@ -165,11 +159,7 @@ static Image *anyToTrue(src, dest, atx, + /* put src image on dest image + */ + +-Image *merge(dest, src, atx, aty, verbose) +- Image *dest; +- Image *src; +- int atx, aty; +- unsigned int verbose; ++Image *merge(Image *dest, Image *src, int atx, int aty, unsigned int verbose) + { int clipw, cliph; + int clipped = 0; + Image *newimage; +@@ -239,10 +229,7 @@ Image *merge(dest, src, atx, aty, verbos + + /* this creates an image of the specified size by tiling a base image + */ +-Image *tile(image, x, y, width, height, verbose) +- Image *image; +- int x, y; +- unsigned int width, height, verbose; ++Image *tile(Image *image, int x, int y, unsigned int width, unsigned int height, unsigned int verbose) + { Image *base, *tmp; + int nx, ny; + +diff -up xloadimage.4.1/misc.c.c23 xloadimage.4.1/misc.c +--- xloadimage.4.1/misc.c.c23 2025-02-24 15:41:17.647130948 -0500 ++++ xloadimage.4.1/misc.c 2025-02-24 15:41:17.688055406 -0500 +@@ -26,8 +26,7 @@ extern char *BuildDate; + extern char *BuildUser; + extern char *BuildSystem; + +-static char *signalName(sig) +- int sig; ++static char *signalName(int sig) + { static char buf[32]; + + switch (sig) { +@@ -57,8 +56,7 @@ void memoryExhausted() + exit(1); + } + +-void internalError(sig) +- int sig; ++void internalError(int sig) + { static int handling_error= 0; + int a, b; + Screen *screen; +@@ -131,8 +129,7 @@ void usage() + /* NOTREACHED */ + } + +-char *tail(path) +- char *path; ++char *tail(char *path) + { int s; + char *t; + +@@ -146,9 +143,7 @@ char *tail(path) + /* simple error handler. this provides us with some kind of error recovery. + */ + +-int errorHandler(disp, error) +- Display *disp; +- XErrorEvent *error; ++int errorHandler(Display *disp, XErrorEvent *error) + { char errortext[BUFSIZ]; + + XGetErrorText(disp, error->error_code, errortext, BUFSIZ); +@@ -183,11 +178,12 @@ int errorHandler(disp, error) + + #define EOS '\0' /* C string terminator */ + ++/* char *s1; -> string to be searched */ ++/* char *s2; -> search-pattern string */ ++ + char * /* returns -> leftmost occurrence, + or null pointer if not present */ +-findstr( s1, s2 ) +- char *s1; /* -> string to be searched */ +- char *s2; /* -> search-pattern string */ ++findstr( char *s1, char *s2 ) + { + register byte *t; /* -> text character being tested */ + register byte *p; /* -> pattern char being tested */ +diff -up xloadimage.4.1/new.c.c23 xloadimage.4.1/new.c +--- xloadimage.4.1/new.c.c23 2025-02-24 15:41:17.675792517 -0500 ++++ xloadimage.4.1/new.c 2025-02-24 15:41:17.688122538 -0500 +@@ -55,8 +55,7 @@ unsigned long DepthToColorsTable[] = { + /* 32 */ 2147483648UL /* bigger than unsigned int; this is good enough */ + }; + +-unsigned long colorsToDepth(ncolors) +- unsigned long ncolors; ++unsigned long colorsToDepth(unsigned long ncolors) + { unsigned long a; + + for (a= 0; (a < 32) && (DepthToColorsTable[a] < ncolors); a++) +@@ -78,9 +77,7 @@ static unsigned int ovmul(unsigned int a + return r; + } + +-void goodImage(image, func) +- Image *image; +- char *func; ++void goodImage(Image *image, char *func) + { + if (!image) { + printf("%s: nil image\n", func); +@@ -96,8 +93,7 @@ void goodImage(image, func) + exit(0); + } + } +-char *dupString(s) +- char *s; ++char *dupString(char *s) + { char *d; + + if (!s) +@@ -107,9 +103,7 @@ char *dupString(s) + return(d); + } + +-void newRGBMapData(rgb, size) +- RGBMap *rgb; +- unsigned int size; ++void newRGBMapData(RGBMap *rgb, unsigned int size) + { + rgb->used= 0; + rgb->size= size; +@@ -119,16 +113,14 @@ void newRGBMapData(rgb, size) + rgb->blue= (Intensity *)lmalloc(sizeof(Intensity) * size); + } + +-void freeRGBMapData(rgb) +- RGBMap *rgb; ++void freeRGBMapData(RGBMap *rgb) + { + lfree((byte *)rgb->red); + lfree((byte *)rgb->green); + lfree((byte *)rgb->blue); + } + +-Image *newBitImage(width, height) +- unsigned int width, height; ++Image *newBitImage(unsigned int width, unsigned int height) + { Image *image; + unsigned int linelen; + +@@ -147,8 +139,7 @@ Image *newBitImage(width, height) + return(image); + } + +-Image *newRGBImage(width, height, depth) +- unsigned int width, height, depth; ++Image *newRGBImage(unsigned int width, unsigned int height, unsigned int depth) + { Image *image; + unsigned int pixlen, numcolors; + +@@ -168,8 +159,7 @@ Image *newRGBImage(width, height, depth) + return(image); + } + +-Image *newTrueImage(width, height) +- unsigned int width, height; ++Image *newTrueImage(unsigned int width, unsigned int height) + { Image *image; + + image= (Image *)lmalloc(sizeof(Image)); +@@ -185,8 +175,7 @@ Image *newTrueImage(width, height) + return(image); + } + +-void freeImageData(image) +- Image *image; ++void freeImageData(Image *image) + { + if (image->title) { + lfree((byte *)image->title); +@@ -197,8 +186,7 @@ void freeImageData(image) + lfree(image->data); + } + +-void freeImage(image) +- Image *image; ++void freeImage(Image *image) + { + goodImage(image, "freeImage"); + freeImageData(image); +@@ -206,8 +194,7 @@ void freeImage(image) + lfree((byte *)image); + } + +-byte *lmalloc(size) +- unsigned int size; ++byte *lmalloc(unsigned int size) + { byte *area; + + if (size == 0) { +@@ -222,8 +209,7 @@ byte *lmalloc(size) + return(area); + } + +-byte *lcalloc(size) +- unsigned int size; ++byte *lcalloc(unsigned int size) + { byte *area; + + if (size == 0) { +@@ -238,8 +224,7 @@ byte *lcalloc(size) + return(area); + } + +-void lfree(area) +- byte *area; ++void lfree(byte *area) + { + free(area); + } +diff -up xloadimage.4.1/niff.c.c23 xloadimage.4.1/niff.c +--- xloadimage.4.1/niff.c.c23 2025-02-24 15:41:17.647459269 -0500 ++++ xloadimage.4.1/niff.c 2025-02-24 15:41:17.688188564 -0500 +@@ -14,10 +14,7 @@ + #endif + #include "niff.h" + +-static void babble(name, header, title) +- char *name; +- struct niff_header *header; +- char *title; ++static void babble(char *name, struct niff_header *header, char *title) + { + printf("%s is a %ldx%ld ", name, + memToVal(header->width, 4), +@@ -44,10 +41,7 @@ static void babble(name, header, title) + printf("\n"); + } + +-static int readHeader(zf, header, rtitle) +- ZFILE *zf; +- struct niff_header *header; +- char **rtitle; ++static int readHeader(ZFILE *zf, struct niff_header *header, char **rtitle) + { unsigned int title_len; + char *title = NULL; + +@@ -82,8 +76,7 @@ static int readHeader(zf, header, rtitle + return(1); + } + +-int niffIdent(fullname, name) +- char *fullname, *name; ++int niffIdent(char *fullname, char *name) + { ZFILE *zf; + struct niff_header header; + char *title; +@@ -99,9 +92,7 @@ int niffIdent(fullname, name) + return(1); + } + +-static int readColormap(zf, image) +- ZFILE *zf; +- Image *image; ++static int readColormap(ZFILE *zf, Image *image) + { unsigned int a; + struct niff_cmap cmap; + +@@ -117,9 +108,7 @@ static int readColormap(zf, image) + return(1); + } + +-Image *niffLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *niffLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + struct niff_header header; + char *title; +@@ -185,11 +174,7 @@ Image *niffLoad(fullname, name, verbose) + /* this takes an Image and dumps it into a file in NIFF format. returns + * zero if successful. + */ +-void niffDump(image, options, filename, verbose) +- Image *image; +- char *options; /* ignored */ +- char *filename; +- int verbose; ++void niffDump(Image *image, char *options, char *filename, int verbose) + { FILE *f; + unsigned int a; + struct niff_header header; +diff -up xloadimage.4.1/options.c.c23 xloadimage.4.1/options.c +--- xloadimage.4.1/options.c.c23 2025-02-24 15:41:17.685111278 -0500 ++++ xloadimage.4.1/options.c 2025-02-24 15:41:17.688257094 -0500 +@@ -221,8 +221,7 @@ static void listOptions() + } + } + +-static int helpOnOption(option) +- char *option; ++static int helpOnOption(char *option) + { int a, foundone; + + if (*option == '-') +@@ -242,15 +241,13 @@ static int helpOnOption(option) + return(foundone); + } + +-static void literalMindedUser(s) +- char *s; ++static void literalMindedUser(char *s) + { + printf("The quotes around %s are unnecessary. You don't have to be so\n\ + literal-minded!\n", s); + } + +-void help(option) +- char *option; ++void help(char *option) + { char buf[BUFSIZ]; + + /* batch help facility +@@ -320,8 +317,7 @@ OptionSet *newOptionSet() + return(optset); + } + +-Option *newOption(type) +- OptionId type; ++Option *newOption(OptionId type) + { Option *opt; + + opt= (Option *)lmalloc(sizeof(Option)); +@@ -330,9 +326,7 @@ Option *newOption(type) + return(opt); + } + +-void addOption(optset, newopt) +- OptionSet *optset; +- Option *newopt; ++void addOption(OptionSet *optset, Option *newopt) + { Option *opt; + + if (optset->options) { +@@ -347,9 +341,7 @@ void addOption(optset, newopt) + + /* return the option structure for a typed option + */ +-Option *getOption(optset, type) +- OptionSet *optset; +- OptionId type; ++Option *getOption(OptionSet *optset, OptionId type) + { Option *opt; + + if (optset) +@@ -361,9 +353,7 @@ Option *getOption(optset, type) + + /* this kills all options of a particular type in a particular set + */ +-void killOption(optset, type) +- OptionSet *optset; +- OptionId type; ++void killOption(OptionSet *optset, OptionId type) + { Option *opt; + + if (!optset) +@@ -373,8 +363,7 @@ void killOption(optset, type) + opt->type= OPT_IGNORE; + } + +-OptionId optionNumber(arg) +- char *arg; ++OptionId optionNumber(char *arg) + { int a, b; + + if ((*arg) != '-') +@@ -390,8 +379,7 @@ OptionId optionNumber(arg) + return(OPT_BADOPT); + } + +-static char *optionName(type) +- OptionId type; ++static char *optionName(OptionId type) + { int a; + + for (a= 0; Options[a].name; a++) +@@ -400,16 +388,13 @@ static char *optionName(type) + return(""); + } + +-static void optionUsage(type) +- OptionId type; ++static void optionUsage(OptionId type) + { + helpOnOption(optionName(type)); + exit(1); + } + +-static int getInteger(type, s) +- OptionId type; +- char *s; ++static int getInteger(OptionId type, char *s) + { unsigned int ret; + + if (strncmp(s, "0x", 2)) { +@@ -424,9 +409,7 @@ static int getInteger(type, s) + /* NOTREACHED */ + } + +-static float getFloat(type, s) +- int type; +- char *s; ++static float getFloat(int type, char *s) + { + float ret; + +@@ -442,11 +425,7 @@ static float getFloat(type, s) + /* process the argument list into an option array. the first option in + * the returned list is the set of global options. + */ +-void processOptions(argc, argv, rglobal, rimage) +- int argc; +- char *argv[]; +- OptionSet **rglobal; +- OptionSet **rimage; ++void processOptions(int argc, char *argv[], OptionSet **rglobal, OptionSet **rimage) + { OptionSet *global_options= newOptionSet(); + OptionSet *image_options, *curset; + Option *newopt; +@@ -872,10 +851,7 @@ void processOptions(argc, argv, rglobal, + /* this is used by readers/dumpers to parse options strings of the + * form name[=value][,...] + */ +-int getNextTypeOption(opt_string, name, value) +- char **opt_string; +- char **name; +- char **value; ++int getNextTypeOption(char **opt_string, char **name, char **value) + { + static char option_name[BUFSIZ]; + static char option_value[BUFSIZ]; +diff -up xloadimage.4.1/options.h.c23 xloadimage.4.1/options.h +--- xloadimage.4.1/options.h.c23 2025-02-24 15:41:17.677037106 -0500 ++++ xloadimage.4.1/options.h 2025-02-24 15:41:17.688349238 -0500 +@@ -92,10 +92,10 @@ typedef struct option_array { + char *description; /* description of this option */ + } OptionArray; + +-Option *getOption(); /* options.c */ +-Option *newOption(); +-OptionId optionNumber(); +-int getNextTypeOption(); ++Option *getOption(OptionSet *, OptionId); /* options.c */ ++Option *newOption(OptionId); ++OptionId optionNumber(char *); ++int getNextTypeOption(char **, char **, char **); + + /* imagetypes.c */ + Image *loadImage _ArgProto((OptionSet *globalopts, OptionSet *options, +diff -up xloadimage.4.1/pbm.c.c23 xloadimage.4.1/pbm.c +--- xloadimage.4.1/pbm.c.c23 2025-02-24 15:41:17.633207666 -0500 ++++ xloadimage.4.1/pbm.c 2025-02-24 15:41:17.688411768 -0500 +@@ -56,8 +56,7 @@ static void initializeTable() + Initialized= 1; + } + +-static int pbmReadChar(zf) +- ZFILE *zf; ++static int pbmReadChar(ZFILE *zf) + { int c; + + if ((c= zgetc(zf)) == EOF) { +@@ -72,8 +71,7 @@ static int pbmReadChar(zf) + return(c); + } + +-static int pbmReadInt(zf) +- ZFILE *zf; ++static int pbmReadInt(ZFILE *zf) + { int c, value; + + for (;;) { +@@ -95,11 +93,7 @@ static int pbmReadInt(zf) + } + } + +-static int isPBM(zf, name, width, height, maxval, verbose) +- ZFILE *zf; +- char *name; +- int *width, *height, *maxval; +- unsigned int verbose; ++static int isPBM(ZFILE *zf, char *name, int *width, int *height, int *maxval, unsigned int verbose) + { byte buf[4]; + + if (! Initialized) +@@ -172,8 +166,7 @@ static int isPBM(zf, name, width, height + return(NOTPBM); + } + +-int pbmIdent(fullname, name) +- char *fullname, *name; ++int pbmIdent(char *fullname, char *name) + { ZFILE *zf; + int width, height, maxval, ret; + +@@ -185,9 +178,7 @@ int pbmIdent(fullname, name) + return(ret != NOTPBM); + } + +-Image *pbmLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *pbmLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + Image *image = NULL; + int pbm_type; +@@ -449,11 +440,7 @@ Image *pbmLoad(fullname, name, verbose) + return(image); + } + +-void pbmDump(image, options, file, verbose) +- Image *image; +- char *options; +- char *file; +- int verbose; ++void pbmDump(Image *image, char *options, char *file, int verbose) + { + FILE *f; + byte *srcptr; +diff -up xloadimage.4.1/pcx.c.c23 xloadimage.4.1/pcx.c +--- xloadimage.4.1/pcx.c.c23 2025-02-24 15:41:17.647823605 -0500 ++++ xloadimage.4.1/pcx.c 2025-02-24 15:41:17.688491594 -0500 +@@ -40,8 +40,7 @@ + */ + + +-unsigned int pcxIdent ( fullname, name ) +- char *fullname, *name; ++unsigned int pcxIdent ( char *fullname, char *name ) + { + ZFILE *zf; + unsigned int ret; +@@ -92,11 +91,9 @@ unsigned int pcxIdent ( fullname, name ) + ** Returns no value (void function) + */ + +-static void PCX_Load_Raster ( zf, image, depth ) +- ZFILE *zf; +- Image *image; +- int depth; +- /* Assertion : depth is 1 or 8 */ ++/* Assertion : depth is 1 or 8 */ ++ ++static void PCX_Load_Raster ( ZFILE *zf, Image *image, int depth ) + { + byte *ptr = &(image->data[0]); + int row = 0; +@@ -161,14 +158,11 @@ static void PCX_Load_Raster ( zf, image, + ** Returns no value (void function) + */ + ++/* Assertion : */ ++/* bpp is 1, 2 or 4 only, dividing 8 without remainder anyways, */ ++/* bpp * nr_pl <= 8 */ + +-static void PCX_Planes ( zf, image, bpp, nr_pl ) +- ZFILE *zf; +- Image *image; +- int bpp, nr_pl; +- /* Assertion : */ +- /* bpp is 1, 2 or 4 only, dividing 8 without remainder anyways, */ +- /* bpp * nr_pl <= 8 */ ++static void PCX_Planes ( ZFILE *zf, Image *image, int bpp, int nr_pl ) + { + byte *ptr, *sptr; + register byte *tptr; +@@ -255,9 +249,7 @@ static void PCX_Planes ( zf, image, bpp, + */ + + +-static void PCX_LoadImage ( zf ,image ) +- ZFILE *zf; +- Image *image; ++static void PCX_LoadImage ( ZFILE *zf, Image *image ) + { + switch (PCXH->Zbpp) { /* What kind of plane do we have ? */ + case 1 : /* Bit planes */ +@@ -292,9 +284,7 @@ static void PCX_LoadImage ( zf ,image ) + ** Returns pointer to allocated struct if successful, NULL otherwise + */ + +-Image *pcxLoad ( fullname, name, verbose ) +- char *fullname, *name; +- unsigned int verbose; ++Image *pcxLoad ( char *fullname, char *name, unsigned int verbose ) + { + ZFILE *zf; + unsigned int i; +diff -up xloadimage.4.1/pdsuncomp.c.c23 xloadimage.4.1/pdsuncomp.c +--- xloadimage.4.1/pdsuncomp.c.c23 2025-02-24 15:41:17.647955885 -0500 ++++ xloadimage.4.1/pdsuncomp.c 2025-02-24 15:41:17.688563610 -0500 +@@ -60,15 +60,15 @@ NODE *tree; /* huffma + static long hist[511]; /* histogram for huffman code */ + static int Decompressing= 0; /* flag for pdsRead() */ + +-static NODE *new_node(); +-static long int free_node(); ++static NODE *new_node(short int); ++static long int free_node(NODE *, long int); + +-NODE *huff_tree(hist) + /**************************************************************************** + *_TITLE huff_tree - constructs the Huffman tree; returns pointer to root * +-*_ARGS TYPE NAME I/O DESCRIPTION */ +- long int *hist; /* I First difference histogram */ ++*_ARGS TYPE NAME I/O DESCRIPTION * ++* long int *hist I First difference histogram */ + ++NODE *huff_tree(long int *hist) + { + /* Local variables used */ + long int freq_list[512]; /* Histogram frequency list */ +@@ -87,7 +87,7 @@ NODE *huff_tree(hist) + register NODE *temp; /* Temporary node pointer */ + + /* Functions called */ +- void sort_freq(); ++ void sort_freq(long int *, NODE **, long int); + + /*************************************************************************** + Allocate the array of nodes from memory and initialize these with numbers +@@ -161,12 +161,12 @@ NODE *huff_tree(hist) + return temp; + } + +-static NODE *new_node(value) + /**************************************************************************** + *_TITLE new_node - allocates a NODE structure and returns a pointer to it * +-*_ARGS TYPE NAME I/O DESCRIPTION */ +- short int value; /* I Value to assign to DN field */ ++*_ARGS TYPE NAME I/O DESCRIPTION * ++* short int value; I Value to assign to DN field */ + ++static NODE *new_node(short int value) + { + NODE *temp; /* Pointer to the memory block */ + +@@ -181,14 +181,14 @@ static NODE *new_node(value) + return temp; + } + +-void sort_freq(freq_list,node_list,num_freq) + /**************************************************************************** + *_TITLE sort_freq - sorts frequency and node lists in increasing freq. order* +-*_ARGS TYPE NAME I/O DESCRIPTION */ +- long int *freq_list; /* I Pointer to frequency list */ +- NODE **node_list; /* I Pointer to array of node pointers */ +- long int num_freq; /* I Number of values in freq list */ ++*_ARGS TYPE NAME I/O DESCRIPTION * ++* long int *freq_list; I Pointer to frequency list * ++* NODE **node_list; I Pointer to array of node pointers * ++* long int num_freq; I Number of values in freq list */ + ++void sort_freq(long int *freq_list, NODE **node_list, long int num_freq) + { + /* Local Variables */ + register long int *i; /* primary pointer into freq_list */ +@@ -243,8 +243,7 @@ void sort_freq(freq_list,node_list,num_f + */ + + #ifdef UNUSED_FUNCTIONS +-static void free_tree(nfreed) +- long int *nfreed; /* Return of total count of nodes freed. */ ++static void free_tree(long int *nfreed) + { + long int total_free = 0; + +@@ -272,11 +271,11 @@ static void free_tree(nfreed) + * and is not done by any of these routines. + * + * 16-AUG-89 Kris Becker U.S.G.S Flagstaff Original Version ++ * NODE *pnode; I Pointer to node to free ++ * long int total_free; I Total number of freed nodes + */ + +-static long int free_node(pnode,total_free) +- NODE *pnode; /* I Pointer to node to free */ +- long int total_free; /* I Total number of freed nodes */ ++static long int free_node(NODE *pnode, long int total_free) + { + if (pnode == (NODE *) NULL) + return(total_free); +@@ -291,13 +290,12 @@ static long int free_node(pnode,total_fr + } + + /* pdsDecompress - decompresses Huffman coded compressed image lines ++ * char *ibuf; I Compressed data buffer ++ * char *obuf; O Decompressed image line ++ * long int *nin; I Number of bytes on input buffer ++ * long int *nout; I Number of bytes in output buffer + */ +-static int decompress(ibuf,obuf,nin,nout) +- char *ibuf; /* I Compressed data buffer */ +- char *obuf; /* O Decompressed image line */ +- long int *nin; /* I Number of bytes on input buffer */ +- long int *nout; /* I Number of bytes in output buffer */ +- ++static int decompress(char *ibuf, char *obuf, long int *nin, long int *nout) + { + /* Local Variables */ + register NODE *ptr = tree; /* pointer to position in tree */ +@@ -348,9 +346,7 @@ static int decompress(ibuf,obuf,nin,nout + /* */ + /*********************************************************************/ + +-static int read_var(zf, ibuf) +- ZFILE *zf; +- char *ibuf; ++static int read_var(ZFILE *zf, char *ibuf) + { + int length,result,nlen; + unsigned char buf[2]; +@@ -362,8 +358,7 @@ static int read_var(zf, ibuf) + return(length); + } + +-void skip_record(zf) +- ZFILE *zf; ++void skip_record(ZFILE *zf) + { + unsigned int value; + unsigned char buf[2]; +@@ -380,9 +375,7 @@ void skip_record(zf) + * reads the histogram table and initializes the huffman tree. + */ + +-void pdsInit(zf, type) +- ZFILE *zf; +- int type; ++void pdsInit(ZFILE *zf, int type) + { + if (type == PDSVARIABLE) { + +@@ -409,10 +402,7 @@ void pdsInit(zf, type) + /* function which will read pds data and do decompression if necessary. + */ + +-int pdsRead(zf, buf, size) +- ZFILE *zf; +- char *buf; +- int size; ++int pdsRead(ZFILE *zf, char *buf, int size) + { + static char obuf[2048]; + char ibuf[2048]; +@@ -427,7 +417,7 @@ int pdsRead(zf, buf, size) + in_length= read_var(zf, ibuf); + if (in_length < 0) + return(-1); +- out_length= decompress(ibuf, obuf, &in_length, &out_length); ++ out_length= decompress(ibuf, obuf, (long int *) &in_length, (long int *) &out_length); + if (out_length < 0) + return(-1); + out_ptr= 0; +diff -up xloadimage.4.1/reduce.c.c23 xloadimage.4.1/reduce.c +--- xloadimage.4.1/reduce.c.c23 2025-02-24 15:41:17.664014160 -0500 ++++ xloadimage.4.1/reduce.c 2025-02-24 15:41:17.688658642 -0500 +@@ -38,9 +38,7 @@ void initSquareTable() + squareInit= 1; + } + +-unsigned long colorDistance(rgb, a, b) +- RGBMap *rgb; +- Pixel a, b; ++unsigned long colorDistance(RGBMap *rgb, Pixel a, Pixel b) + { + return(squareTable[DIST(*(rgb->red + a), *(rgb->red + b)) >> 1] + + squareTable[DIST(*(rgb->green + a), *(rgb->green + b)) >> 1] + +@@ -79,7 +77,7 @@ unsigned long colorDistance(rgb, a, b) + struct color_area { + unsigned short *pixels; /* array of pixel values in this area */ + unsigned short num_pixels; /* size of above array */ +- int (*sort_func)(); /* predicate func to sort with before ++ int (*sort_func)(const void *, const void *); /* predicate func to sort with before + * splitting */ + unsigned long pixel_count; /* # of image pixels we represent */ + struct color_area *prev, *next; +@@ -88,16 +86,18 @@ struct color_area { + /* predicate functions for qsort + */ + +-static int sortRGB(p1, p2) +- unsigned short *p1, *p2; ++static int sortRGB(const void* pp1, const void* pp2) + { unsigned int red1, green1, blue1, red2, green2, blue2; + +- red1= RED_INTENSITY(*p1); +- green1= GREEN_INTENSITY(*p1); +- blue1= BLUE_INTENSITY(*p1); +- red2= RED_INTENSITY(*p2); +- green2= GREEN_INTENSITY(*p2); +- blue2= BLUE_INTENSITY(*p2); ++ unsigned short p1 = *(unsigned short *)pp1; ++ unsigned short p2 = *(unsigned short *)pp2; ++ ++ red1= RED_INTENSITY(p1); ++ green1= GREEN_INTENSITY(p1); ++ blue1= BLUE_INTENSITY(p1); ++ red2= RED_INTENSITY(p2); ++ green2= GREEN_INTENSITY(p2); ++ blue2= BLUE_INTENSITY(p2); + + if (red1 == red2) + if (green1 == green2) +@@ -115,16 +115,18 @@ static int sortRGB(p1, p2) + return(1); + } + +-static int sortRBG(p1, p2) +- unsigned short *p1, *p2; ++static int sortRBG(const void* pp1, const void* pp2) + { unsigned int red1, green1, blue1, red2, green2, blue2; + +- red1= RED_INTENSITY(*p1); +- green1= GREEN_INTENSITY(*p1); +- blue1= BLUE_INTENSITY(*p1); +- red2= RED_INTENSITY(*p2); +- green2= GREEN_INTENSITY(*p2); +- blue2= BLUE_INTENSITY(*p2); ++ unsigned short p1 = *(unsigned short *)pp1; ++ unsigned short p2 = *(unsigned short *)pp2; ++ ++ red1= RED_INTENSITY(p1); ++ green1= GREEN_INTENSITY(p1); ++ blue1= BLUE_INTENSITY(p1); ++ red2= RED_INTENSITY(p2); ++ green2= GREEN_INTENSITY(p2); ++ blue2= BLUE_INTENSITY(p2); + + if (red1 == red2) + if (blue1 == blue2) +@@ -142,16 +144,18 @@ static int sortRBG(p1, p2) + return(1); + } + +-static int sortGRB(p1, p2) +- unsigned short *p1, *p2; ++static int sortGRB(const void *pp1, const void *pp2) + { unsigned int red1, green1, blue1, red2, green2, blue2; + +- red1= RED_INTENSITY(*p1); +- green1= GREEN_INTENSITY(*p1); +- blue1= BLUE_INTENSITY(*p1); +- red2= RED_INTENSITY(*p2); +- green2= GREEN_INTENSITY(*p2); +- blue2= BLUE_INTENSITY(*p2); ++ unsigned short p1 = *(unsigned short *)pp1; ++ unsigned short p2 = *(unsigned short *)pp2; ++ ++ red1= RED_INTENSITY(p1); ++ green1= GREEN_INTENSITY(p1); ++ blue1= BLUE_INTENSITY(p1); ++ red2= RED_INTENSITY(p2); ++ green2= GREEN_INTENSITY(p2); ++ blue2= BLUE_INTENSITY(p2); + + if (green1 == green2) + if (red1 == red2) +@@ -169,16 +173,18 @@ static int sortGRB(p1, p2) + return(1); + } + +-static int sortGBR(p1, p2) +- unsigned short *p1, *p2; ++static int sortGBR(const void *pp1, const void *pp2) + { unsigned int red1, green1, blue1, red2, green2, blue2; + +- red1= RED_INTENSITY(*p1); +- green1= GREEN_INTENSITY(*p1); +- blue1= BLUE_INTENSITY(*p1); +- red2= RED_INTENSITY(*p2); +- green2= GREEN_INTENSITY(*p2); +- blue2= BLUE_INTENSITY(*p2); ++ unsigned short p1 = *(unsigned short *)pp1; ++ unsigned short p2 = *(unsigned short *)pp2; ++ ++ red1= RED_INTENSITY(p1); ++ green1= GREEN_INTENSITY(p1); ++ blue1= BLUE_INTENSITY(p1); ++ red2= RED_INTENSITY(p2); ++ green2= GREEN_INTENSITY(p2); ++ blue2= BLUE_INTENSITY(p2); + + if (green1 == green2) + if (blue1 == blue2) +@@ -196,16 +202,18 @@ static int sortGBR(p1, p2) + return(1); + } + +-static int sortBRG(p1, p2) +- unsigned short *p1, *p2; ++static int sortBRG(const void *pp1, const void *pp2) + { unsigned int red1, green1, blue1, red2, green2, blue2; + +- red1= RED_INTENSITY(*p1); +- green1= GREEN_INTENSITY(*p1); +- blue1= BLUE_INTENSITY(*p1); +- red2= RED_INTENSITY(*p2); +- green2= GREEN_INTENSITY(*p2); +- blue2= BLUE_INTENSITY(*p2); ++ unsigned short p1 = *(unsigned short *)pp1; ++ unsigned short p2 = *(unsigned short *)pp2; ++ ++ red1= RED_INTENSITY(p1); ++ green1= GREEN_INTENSITY(p1); ++ blue1= BLUE_INTENSITY(p1); ++ red2= RED_INTENSITY(p2); ++ green2= GREEN_INTENSITY(p2); ++ blue2= BLUE_INTENSITY(p2); + + if (blue1 == blue2) + if (red1 == red2) +@@ -223,16 +231,18 @@ static int sortBRG(p1, p2) + return(1); + } + +-static int sortBGR(p1, p2) +- unsigned short *p1, *p2; ++static int sortBGR(const void *pp1, const void *pp2) + { unsigned int red1, green1, blue1, red2, green2, blue2; + +- red1= RED_INTENSITY(*p1); +- green1= GREEN_INTENSITY(*p1); +- blue1= BLUE_INTENSITY(*p1); +- red2= RED_INTENSITY(*p2); +- green2= GREEN_INTENSITY(*p2); +- blue2= BLUE_INTENSITY(*p2); ++ unsigned short p1 = *(unsigned short *)pp1; ++ unsigned short p2 = *(unsigned short *)pp2; ++ ++ red1= RED_INTENSITY(p1); ++ green1= GREEN_INTENSITY(p1); ++ blue1= BLUE_INTENSITY(p1); ++ red2= RED_INTENSITY(p2); ++ green2= GREEN_INTENSITY(p2); ++ blue2= BLUE_INTENSITY(p2); + + if (blue1 == blue2) + if (green1 == green2) +@@ -254,9 +264,7 @@ static int sortBGR(p1, p2) + * the color area in the list of color areas. + */ + +-static void insertColorArea(pixel_counts, rlargest, rsmallest, area) +- unsigned long *pixel_counts; +- struct color_area **rlargest, **rsmallest, *area; ++static void insertColorArea(unsigned long *pixel_counts, struct color_area **rlargest, struct color_area **rsmallest, struct color_area *area) + { int a; + unsigned int red, green, blue; + unsigned int min_red, min_green, min_blue; +@@ -362,9 +370,7 @@ static void insertColorArea(pixel_counts + *rsmallest= smallest; + } + +-Image *reduce(image, n, verbose) +- Image *image; +- unsigned int n, verbose; ++Image *reduce(Image *image, unsigned int n, unsigned int verbose) + { unsigned long pixel_counts[32768]; /* pixel occurrance histogram */ + unsigned short pixel_array[32768]; + unsigned long count, midpoint; +@@ -573,8 +579,7 @@ Image *reduce(image, n, verbose) + /* expand an image into a true color image + */ + +-Image *expand(image) +- Image *image; ++Image *expand(Image *image) + { + Image *new_image; + int x, y; +@@ -630,8 +635,7 @@ Image *expand(image) + + /* this function "flattens" a 1-bit RGB image into a bitmap image if possible. + */ +-Image *flatten(image) +- Image *image; ++Image *flatten(Image *image) + { int x, y, linelen; + Image *new; + byte *sp, *dp, *last_dp, mask; +diff -up xloadimage.4.1/rle.c.c23 xloadimage.4.1/rle.c +--- xloadimage.4.1/rle.c.c23 2025-02-24 15:41:17.648289651 -0500 ++++ xloadimage.4.1/rle.c 2025-02-24 15:41:17.688752136 -0500 +@@ -25,7 +25,7 @@ + # define debug(xx) + #endif + +-void dithermap(); ++void dithermap(int, double, int (*)[3], int*, int*, int(*)[16]); + + /* input file stuff */ + static int ptype; /* picture type : */ +@@ -53,8 +53,7 @@ int magic[16][16]; + int modN[256]; + int divN[256]; + +-int rleIdent(fullname, name) +- char *fullname, *name; ++int rleIdent(char *fullname, char *name) + { + ZFILE *rlefile; + int x_len,y_len; +@@ -137,9 +136,7 @@ int rleIdent(fullname, name) + } + } + +-Image *rleLoad(fullname,name,verbose) +- char *fullname,*name; +- unsigned int verbose; ++Image *rleLoad(char *fullname, char *name, unsigned int verbose) + { + int x_len, y_len; + int i,j; +@@ -395,9 +392,7 @@ Image *rleLoad(fullname,name,verbose) + #define DMAP(v,x,y) (modN[v]>magic[x][y] ? divN[v] + 1 : divN[v]) + + /* run the black and white through its map */ +-void bw_m_line(dp,number) +- int number; +- register unsigned char *dp; ++void bw_m_line(register unsigned char *dp, int number) + { + register unsigned char *r; + register int i; +@@ -409,9 +404,7 @@ void bw_m_line(dp,number) + } + + /* convert a colour line with map to 8 bits per pixel */ +-void c_m_line(dp,number,line) +- int number,line; +- register unsigned char *dp; ++void c_m_line(register unsigned char *dp, int number, int line) + { + register unsigned char *r, *g, *b; + register int i, col, row; +diff -up xloadimage.4.1/rle.h.c23 xloadimage.4.1/rle.h +--- xloadimage.4.1/rle.h.c23 2025-02-24 15:41:17.648411806 -0500 ++++ xloadimage.4.1/rle.h 2025-02-24 15:41:17.688817747 -0500 +@@ -140,42 +140,25 @@ extern struct sv_globals { + * buildmap - build a more usable colormap from data in globals struct. + */ + extern rle_pixel ** +-buildmap(); +-/* ( globals, minmap, gamma ) +- * struct sv_globals * globals; +- * int minmap; +- * double gamma; +- */ ++buildmap(struct sv_globals *globals, int minmap, double gamma); + + /* + * rle_getcom - get a specific comment from the image comments. + */ + extern char * +-rle_getcom(); +-/* ( name, globals ) +- * char * name; +- * struct sv_globals * globals; +- */ ++rle_getcom(char *name, struct sv_globals *globals); + + /* + * rle_putcom - put (or replace) a comment into the image comments. + */ + extern char * +-rle_putcom(); +-/* ( value, globals ) +- * char * value; +- * struct sv_globals * globals; +- */ ++rle_putcom(char *value, struct sv_globals *globals); + + /* + * rle_delcom - delete a specific comment from the image comments. + */ + extern char * +-rle_delcom(); +-/* ( name, globals ) +- * char * name; +- * struct sv_globals * globals; +- */ ++rle_delcom(char *name, struct sv_globals *globals); + + /* + * dither globals +diff -up xloadimage.4.1/rlelib.c.c23 xloadimage.4.1/rlelib.c +--- xloadimage.4.1/rlelib.c.c23 2025-02-24 15:41:17.678404514 -0500 ++++ xloadimage.4.1/rlelib.c 2025-02-24 15:41:17.688917387 -0500 +@@ -125,19 +125,43 @@ struct XtndRsetup + /* **************************************************************** + * Dispatch table for different output types. + */ +-typedef void sv_fn(); ++static int sv_bg_color[3] = { 0, 0, 0 }; ++ ++struct sv_globals sv_globals = { ++ RUN_DISPATCH, /* dispatch value */ ++ 3, /* 3 colors */ ++ sv_bg_color, /* background color */ ++ 0, /* (alpha) if 1, save alpha channel */ ++ 2, /* (background) 0->just save pixels, */ ++ /* 1->overlay, 2->clear to bg first */ ++ 0, 511, /* (xmin, xmax) X bounds to save */ ++ 0, 479, /* (ymin, ymax) Y bounds to save */ ++ 0, /* ncmap (if != 0, save color map) */ ++ 8, /* cmaplen (log2 of length of color map) */ ++ NULL, /* pointer to color map */ ++ NULL, /* pointer to comment strings */ ++ NULL, /* output file */ ++ { 7 } /* RGB channels only */ ++ /* Can't initialize the union */ ++}; ++ ++typedef void sv_r1_fn(struct sv_globals *); ++typedef void sv_r2_fn(int, struct sv_globals *); ++typedef void sv_r3_fn(int, int, int, struct sv_globals *); ++typedef void sv_r4_fn(rle_pixel *, int, struct sv_globals *); ++ + struct sv_dispatch_tab { +- char *magic; /* magic type flags */ +- sv_fn *setup, /* startup function */ +- *skipBlankLines, +- *setColor, +- *skipPixels, +- *newScanLine, +- *putdat, /* put a set of differing pixels */ +- *putrn, /* put a run all the same */ +- *blockHook, /* hook called at start of new */ +- /* output block */ +- *putEof; /* write EOF marker (if possible) */ ++ char *magic; /* magic type flags */ ++ sv_r1_fn *setup; /* startup function */ ++ sv_r2_fn *skipBlankLines; ++ sv_r2_fn *setColor; ++ sv_r3_fn *skipPixels; ++ sv_r2_fn *newScanLine; ++ sv_r4_fn *putdat; /* put a set of differing pixels */ ++ sv_r3_fn *putrn; /* put a run all the same */ ++ sv_r1_fn *blockHook; /* hook called at start of new */ ++ /* output block */ ++ sv_r1_fn *putEof; /* write EOF marker (if possible) */ + }; + + /* +@@ -198,17 +222,17 @@ struct sv_dispatch_tab { + */ + + +-void RunSetup(), +- RunSkipBlankLines(), +- RunSetColor(), +- RunSkipPixels(), +- RunNewScanLine(), +- Runputdata(), +- Runputrun(), +- RunputEof(); ++void RunSetup(struct sv_globals *), ++ RunSkipBlankLines(int, struct sv_globals *), ++ RunSetColor(int, struct sv_globals *), ++ RunSkipPixels(int, int, int, struct sv_globals *), ++ RunNewScanLine(int, struct sv_globals *), ++ Runputdata(rle_pixel *, int, struct sv_globals *), ++ Runputrun(int, int, int, struct sv_globals *), ++ RunputEof(struct sv_globals *); + +-void DefaultBlockHook(); +-void NullputEof(); ++void DefaultBlockHook(struct sv_globals *); ++void NullputEof(struct sv_globals *); + + struct sv_dispatch_tab sv_DTable[10] = { + { +@@ -225,30 +249,9 @@ struct sv_dispatch_tab sv_DTable[10] = { + }, + }; + +-static int sv_bg_color[3] = { 0, 0, 0 }; +- +-struct sv_globals sv_globals = { +- RUN_DISPATCH, /* dispatch value */ +- 3, /* 3 colors */ +- sv_bg_color, /* background color */ +- 0, /* (alpha) if 1, save alpha channel */ +- 2, /* (background) 0->just save pixels, */ +- /* 1->overlay, 2->clear to bg first */ +- 0, 511, /* (xmin, xmax) X bounds to save */ +- 0, 479, /* (ymin, ymax) Y bounds to save */ +- 0, /* ncmap (if != 0, save color map) */ +- 8, /* cmaplen (log2 of length of color map) */ +- NULL, /* pointer to color map */ +- NULL, /* pointer to comment strings */ +- NULL, /* output file */ +- { 7 } /* RGB channels only */ +- /* Can't initialize the union */ +-}; +- + /* ARGSUSED */ + void +-NullputEof(globals) +-struct sv_globals * globals; ++NullputEof(struct sv_globals *globals) + { + /* do nothing */ + } +@@ -413,8 +416,7 @@ union { short s; char c[2]; } arg; + * Put out initial setup data for RLE svfb files. + */ + void +-RunSetup(globals) +-register struct sv_globals * globals; ++RunSetup(struct sv_globals *globals) + { + } + +@@ -423,9 +425,7 @@ register struct sv_globals * globals; + * Skip one or more blank lines in the RLE file. + */ + void +-RunSkipBlankLines(nblank, globals) +-int nblank; +-register struct sv_globals * globals; ++RunSkipBlankLines(int nblank, register struct sv_globals *globals) + { + } + +@@ -435,9 +435,7 @@ register struct sv_globals * globals; + * color: 0 = Red, 1 = Green, 2 = Blue. + */ + void +-RunSetColor(c, globals) +-int c; +-register struct sv_globals * globals; ++RunSetColor(int c, register struct sv_globals *globals) + { + } + +@@ -448,9 +446,7 @@ register struct sv_globals * globals; + + /* ARGSUSED */ + void +-RunSkipPixels(nskip, last, wasrun, globals) +-int nskip, last, wasrun; +-register struct sv_globals * globals; ++RunSkipPixels(int nskip, int last, int wasrun, register struct sv_globals *globals) + { + } + +@@ -460,9 +456,7 @@ register struct sv_globals * globals; + * operation, only generate code if the newline flag is true. + */ + void +-RunNewScanLine(flag, globals) +-int flag; +-register struct sv_globals * globals; ++RunNewScanLine(int flag, register struct sv_globals *globals) + { + } + +@@ -471,10 +465,7 @@ register struct sv_globals * globals; + * Put one or more pixels of byte data into the output file. + */ + void +-Runputdata(buf, n, globals) +-rle_pixel * buf; +-int n; +-register struct sv_globals * globals; ++Runputdata(rle_pixel *buf, int n, register struct sv_globals *globals) + { + } + +@@ -485,9 +476,7 @@ register struct sv_globals * globals; + + /* ARGSUSED */ + void +-Runputrun(color, n, last, globals) +-int color, n, last; +-register struct sv_globals * globals; ++Runputrun(int color, int n, int last, register struct sv_globals *globals) + { + } + +@@ -497,15 +486,13 @@ register struct sv_globals * globals; + * Output an EOF opcode + */ + void +-RunputEof( globals ) +-register struct sv_globals * globals; ++RunputEof( register struct sv_globals *globals ) + { + } + + /*ARGSUSED*/ + void +-DefaultBlockHook(globals) +-struct sv_globals * globals; ++DefaultBlockHook(struct sv_globals *globals) + { + } + +@@ -560,10 +547,7 @@ struct sv_globals * globals; + * be addressed by an rle_pixel). + */ + rle_pixel ** +-buildmap( globals, minmap, gamma ) +-struct sv_globals *globals; +-int minmap; +-double gamma; ++buildmap( struct sv_globals *globals, int minmap, double gamma ) + { + rle_pixel ** cmap, * gammap; + register int i, j; +@@ -710,9 +694,7 @@ double gamma; + * [None] + */ + static char * +-match( n, v ) +-register char *n; +-register char *v; ++match( register char *n, register char *v ) + { + for ( ; *n != '\0' && *n != '=' && *n == *v; n++, v++ ) + ; +@@ -741,9 +723,7 @@ register char *v; + * [None] + */ + char * +-rle_getcom( name, globals ) +-char *name; +-struct sv_globals *globals; ++rle_getcom( char *name, struct sv_globals *globals ) + { + char ** cp; + char * v; +@@ -806,7 +786,7 @@ struct inst { + #define DATUM(inst) (0x00ff & inst.datum) + + static int debug_f; /* if non-zero, print debug info */ +-static void bfill(); ++static void bfill(char *, int, int); + + /***************************************************************** + * TAG( rle_get_setup ) +@@ -827,8 +807,7 @@ static void bfill(); + * Algorithm: + * Read in the setup info and fill in sv_globals. + */ +-int rle_get_setup( globals ) +-struct sv_globals * globals; ++int rle_get_setup( struct sv_globals *globals ) + { + struct XtndRsetup setup; + short magic; /* assume 16 bits */ +@@ -987,10 +966,7 @@ struct sv_globals * globals; + * Returns code. + */ + +-int rle_get_error( code, pgmname, fname ) +-int code; +-char *pgmname; +-char *fname; ++int rle_get_error( int code, char *pgmname, char *fname ) + { + switch( code ) + { +@@ -1045,10 +1021,7 @@ char *fname; + * sv_get_setup does all the work. + */ + void +-rle_get_setup_ok( globals, prog_name, file_name ) +-struct sv_globals * globals; +-char *prog_name; +-char *file_name; ++rle_get_setup_ok( struct sv_globals *globals, char *prog_name, char *file_name ) + { + int code; + +@@ -1075,8 +1048,7 @@ char *file_name; + * [None] + */ + void +-rle_debug( on_off ) +-int on_off; ++rle_debug( int on_off ) + { + debug_f = on_off; + } +@@ -1107,9 +1079,7 @@ int on_off; + * decoding the instructions into scanline data. + */ + +-int rle_getrow( globals, scanline ) +-struct sv_globals * globals; +-rle_pixel *scanline[]; ++int rle_getrow( struct sv_globals *globals, rle_pixel *scanline[] ) + { + register rle_pixel * scanc; + register int nc; +@@ -1299,9 +1269,7 @@ rle_pixel *scanline[]; + + /* Fill buffer at s with n copies of character c. N must be <= 65535*/ + /* ARGSUSED */ +-static void bfill( s, n, c ) +-char *s; +-int n, c; ++static void bfill( char *s, int n, int c ) + { + #if defined(vax) && !defined(VMS) + asm(" movc5 $0,*4(ap),12(ap),8(ap),*4(ap)"); +@@ -1353,7 +1321,7 @@ int n, c; + * Copyright (c) 1987, University of Utah + */ + +-void make_square(); ++void make_square(double, int *, int *, int (*)[16]); + + /* dither globals */ + int dith_levels = 128; +@@ -1392,13 +1360,7 @@ int dith_size = 16; + * if you don't want function call overhead. + */ + void +-dithermap( levels, gamma, rgbmap, divN, modN, magic ) +-int levels; +-double gamma; +-int rgbmap[][3]; +-int divN[256]; +-int modN[256]; +-int magic[16][16]; ++dithermap( int levels, double gamma, int rgbmap[][3], int divN[256], int modN[256], int magic[16][16] ) + { + double N; + register int i; +@@ -1453,13 +1415,7 @@ int magic[16][16]; + * divN[val] > magic[col][row] ? 1 : 0 + */ + void +-bwdithermap( levels, gamma, bwmap, divN, modN, magic ) +-int levels; +-double gamma; +-int bwmap[]; +-int divN[256]; +-int modN[256]; +-int magic[16][16]; ++bwdithermap( int levels, double gamma, int bwmap[], int divN[256], int modN[256], int magic[16][16] ) + { + double N; + register int i; +@@ -1500,11 +1456,7 @@ int magic[16][16]; + * its sublevel, and is used in the dithering computation. + */ + void +-make_square( N, divN, modN, magic ) +-double N; +-int divN[256]; +-int modN[256]; +-int magic[16][16] ; ++make_square( double N, int divN[256], int modN[256], int magic[16][16] ) + { + register int i, j, k, l; + double magicfact; +@@ -1596,9 +1548,7 @@ int magic16x16[16][16] = + * Algorithm: + * Chose sub cell of 16 by 16 magic square + */ +-void make_magic( size, magic ) +-int size; +-int magic[16][16]; ++void make_magic( int size, int magic[16][16] ) + { + int j,i,li,bi,bx,by; + int xx,yy; +@@ -1640,9 +1590,7 @@ int magic[16][16]; + * Outputs: + * Changes gamma array entries. + */ +-void make_gamma( gamma, gammamap ) +-double gamma; +-int gammamap[256]; ++void make_gamma( double gamma, int gammamap[256] ) + { + register int i; + +@@ -1677,11 +1625,7 @@ int gammamap[256]; + * Algorithm: + * see "Note:" in dithermap comment. + */ +-int dithergb( x, y, r, g, b, levels, divN, modN, magic ) +-int x, y, r, g, b, levels; +-int divN[256]; +-int modN[256]; +-int magic[16][16]; ++int dithergb( int x, int y, int r, int g, int b, int levels, int divN[256], int modN[256], int magic[16][16] ) + { + int col = x % 16, row = y % 16; + +@@ -1708,11 +1652,7 @@ int magic[16][16]; + * Algorithm: + * see "Note:" in bwdithermap comment. + */ +-int ditherbw( x, y, val, divN, modN, magic ) +-int x, y, val; +-int divN[256]; +-int modN[256]; +-int magic[16][16]; ++int ditherbw( int x, int y, int val, int divN[256], int modN[256], int magic[16][16] ) + { + int col = x % 16, row = y % 16; + +diff -up xloadimage.4.1/root.c.c23 xloadimage.4.1/root.c +--- xloadimage.4.1/root.c.c23 2025-02-24 15:41:17.667243127 -0500 ++++ xloadimage.4.1/root.c 2025-02-24 15:41:17.689062765 -0500 +@@ -23,9 +23,7 @@ + */ + + static void +-preserveResource(dpy, w) +- Display *dpy; +- Window w; ++preserveResource(Display *dpy, Window w) + { + /* create dummy resource */ + Pixmap pm= XCreatePixmap(dpy, w, 1, 1, 1); +@@ -49,10 +47,7 @@ preserveResource(dpy, w) + */ + + static void +-freePrevious(dpy, w, verbose) +- Display *dpy; +- Window w; +- unsigned int verbose; ++freePrevious(Display *dpy, Window w, unsigned int verbose) + { + Pixmap *pm; + unsigned char *charpm; +@@ -114,9 +109,7 @@ freePrevious(dpy, w, verbose) + * out of xsetroot with minor formatting changes. + */ + +-static Window getWmRootWindow(dpy, root) +- Display *dpy; +- Window root; ++static Window getWmRootWindow(Display *dpy, Window root) + { + Window parent; + Window *child; +@@ -140,9 +133,7 @@ static Window getWmRootWindow(dpy, root) + return((Window)0); + } + +-static Window getDECRootWindow(dpy, root) +- Display *dpy; +- Window root; ++static Window getDECRootWindow(Display *dpy, Window root) + { + Window temporary_rootW; + +@@ -155,12 +146,7 @@ static Window getDECRootWindow(dpy, root + } + #endif /* FIND_DEC_ROOTWINDOW */ + +-void imageOnRoot(disp, scrn, image, options, verbose) +- Display *disp; +- int scrn; +- Image *image; +- OptionSet *options; +- unsigned int verbose; ++void imageOnRoot(Display *disp, int scrn, Image *image, OptionSet *options, unsigned int verbose) + { Option *opt; + Pixmap pixmap; + XImageInfo *ximageinfo; +diff -up xloadimage.4.1/rotate.c.c23 xloadimage.4.1/rotate.c +--- xloadimage.4.1/rotate.c.c23 2025-02-24 15:41:17.664195359 -0500 ++++ xloadimage.4.1/rotate.c 2025-02-24 15:41:17.689122344 -0500 +@@ -10,14 +10,15 @@ + + /* rotate_bitmap() + * converts an old bitmap bit position into a new one ++ * ++ * int num; Source byte number ++ * int pos; Source bit position ++ * int width; Width of source bitmap ++ * int height; Height of source bitmap ++ * int *new_num; Destination byte number ++ * int *new_pos; Destination bit position + */ +-void rotate_bitmap(num, pos, width, height, new_num, new_pos) +-int num; /* Source byte number */ +-int pos; /* Source bit position */ +-int width; /* Width of source bitmap */ +-int height; /* Height of source bitmap */ +-int *new_num; /* Destination byte number */ +-int *new_pos; /* Destination bit position */ ++void rotate_bitmap(int num, int pos, int width, int height, int *new_num, int *new_pos) + { + int slen; /* Length of source line */ + int dlen; /* Length of destination line */ +@@ -36,11 +37,11 @@ int *new_pos; /* Destination bit posi + + /* rotate() + * rotates an image ++ * Image *simage; Image to rotate ++ * unsigned int degrees; Number of degrees to rotate ++ * unsigned int verbose; + */ +-Image *rotate(simage, degrees, verbose) +-Image *simage; /* Image to rotate */ +-unsigned int degrees; /* Number of degrees to rotate */ +-unsigned int verbose; ++Image *rotate(Image *simage, unsigned int degrees, unsigned int verbose) + { + char buf[BUFSIZ]; /* New title */ + Image *image1; /* Source image */ +diff -up xloadimage.4.1/send.c.c23 xloadimage.4.1/send.c +--- xloadimage.4.1/send.c.c23 2025-02-24 15:41:17.649114385 -0500 ++++ xloadimage.4.1/send.c 2025-02-24 15:41:17.689193520 -0500 +@@ -13,9 +13,7 @@ + + static int GotError; + +-static int pixmapErrorTrap(disp, pErrorEvent) +- Display *disp; +- XErrorEvent * pErrorEvent; ++static int pixmapErrorTrap(Display *disp, XErrorEvent *pErrorEvent) + { + #define MAXERRORLEN 100 + char buf[MAXERRORLEN+1]; +@@ -28,12 +26,9 @@ static int pixmapErrorTrap(disp, pErrorE + return(0); + } + +-Pixmap ximageToPixmap(disp, parent, ximageinfo) +- Display *disp; +- Window parent; +- XImageInfo *ximageinfo; ++Pixmap ximageToPixmap(Display *disp, Window parent, XImageInfo *ximageinfo) + { +- int (*old_handler)(); ++ int (*old_handler)(Display *, XErrorEvent *); + Pixmap pixmap; + + GotError = 0; +@@ -58,10 +53,7 @@ Pixmap ximageToPixmap(disp, parent, xima + * by looking at the structure ourselves. + */ + +-static unsigned int bitsPerPixelAtDepth(disp, scrn, depth) +- Display *disp; +- int scrn; +- unsigned int depth; ++static unsigned int bitsPerPixelAtDepth(Display *disp, int scrn, unsigned int depth) + { + #if XlibSpecificationRelease < 4 /* the way things were */ + unsigned int a; +@@ -87,16 +79,8 @@ static unsigned int bitsPerPixelAtDepth( + exit(1); + } + +-XImageInfo *imageToXImage(disp, scrn, visual, ddepth, image, private_cmap, fit, +- verbose) +- Display *disp; +- int scrn; +- Visual *visual; /* visual to use */ +- unsigned int ddepth; /* depth of the visual to use */ +- Image *image; +- unsigned int private_cmap; +- unsigned int fit; +- unsigned int verbose; ++XImageInfo *imageToXImage(Display *disp, int scrn, Visual *visual, unsigned int ddepth, Image *image, unsigned int private_cmap, unsigned int fit, ++ unsigned int verbose) + { Pixel *index, *redvalue, *greenvalue, *bluevalue; + unsigned int a, b, newmap, x, y, linelen, dpixlen, dbits; + XColor xcolor; +@@ -600,10 +584,7 @@ imageToXImage: XAllocColor failed on a T + * to the drawable. + */ + +-void sendXImage(ximageinfo, src_x, src_y, dst_x, dst_y, w, h) +- XImageInfo *ximageinfo; +- int src_x, src_y, dst_x, dst_y; +- unsigned int w, h; ++void sendXImage(XImageInfo *ximageinfo, int src_x, int src_y, int dst_x, int dst_y, unsigned int w, unsigned int h) + { XGCValues gcv; + + /* build and cache the GC +@@ -630,9 +611,7 @@ void sendXImage(ximageinfo, src_x, src_y + /* free up anything cached in the local Ximage structure. + */ + +-void freeXImage(image, ximageinfo) +- Image *image; +- XImageInfo *ximageinfo; ++void freeXImage(Image *image, XImageInfo *ximageinfo) + { + if (ximageinfo->gc) + XFreeGC(ximageinfo->disp, ximageinfo->gc); +diff -up xloadimage.4.1/smooth.c.c23 xloadimage.4.1/smooth.c +--- xloadimage.4.1/smooth.c.c23 2025-02-24 15:44:28.586923256 -0500 ++++ xloadimage.4.1/smooth.c 2025-02-24 15:44:52.920079717 -0500 +@@ -11,8 +11,7 @@ + #include "copyright.h" + #include "image.h" + +-static Image *doSmooth(image) +- Image *image; ++static Image *doSmooth(Image *image) + { Image *old, *new; + int x, y, x1, y1, linelen; + int xindex[3]; +@@ -72,10 +71,7 @@ static Image *doSmooth(image) + return(new); + } + +-Image *smooth(image, iterations, verbose) +- Image *image; +- int iterations; +- unsigned int verbose; ++Image *smooth(Image *image, int iterations, unsigned int verbose) + { int a; + Image *old, *new; + +diff -up xloadimage.4.1/sunraster.c.c23 xloadimage.4.1/sunraster.c +--- xloadimage.4.1/sunraster.c.c23 2025-02-24 15:42:55.454023774 -0500 ++++ xloadimage.4.1/sunraster.c 2025-02-24 15:44:21.566453997 -0500 +@@ -15,9 +15,7 @@ + /* SUPPRESS 558 */ + /* SUPPRESS 560 */ + +-static void babble(name, header) +- char *name; +- struct rheader *header; ++static void babble(char *name, struct rheader *header) + { + printf("%s is a", name); + switch (memToVal(header->type, 4)) { +@@ -66,8 +64,7 @@ static void babble(name, header) + printf(" Sun rasterfile\n"); + } + +-int sunRasterIdent(fullname, name) +- char *fullname, *name; ++int sunRasterIdent(char *fullname, char *name) + { ZFILE *zf; + struct rheader header; + int r; +@@ -100,13 +97,10 @@ int sunRasterIdent(fullname, name) + } + + /* read either rl-encoded or normal image data ++* enc is true if encoded file + */ + +-static void sunread(zf, buf, len, enc) +- ZFILE *zf; +- byte *buf; +- unsigned int len; +- unsigned int enc; /* true if encoded file */ ++static void sunread(ZFILE *zf, byte *buf, unsigned int len, unsigned int enc) + { static byte repchar, remaining= 0; + + /* rl-encoded read +@@ -154,9 +148,7 @@ static void sunread(zf, buf, len, enc) + } + } + +-Image *sunRasterLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *sunRasterLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + struct rheader header; + unsigned int mapsize; +diff -up xloadimage.4.1/tiff.c.c23 xloadimage.4.1/tiff.c +--- xloadimage.4.1/tiff.c.c23 2025-02-24 15:41:17.678617195 -0500 ++++ xloadimage.4.1/tiff.c 2025-02-24 15:41:17.689271622 -0500 +@@ -28,10 +28,7 @@ struct tiff_info { + char *title; + }; + +-static TIFF *is_tiff(fullname, name, info) +- char *fullname; +- char *name; +- struct tiff_info *info; ++static TIFF *is_tiff(char *fullname, char *name, struct tiff_info *info) + { + ZFILE *zf; + TIFFHeaderClassic th; +@@ -117,8 +114,7 @@ static TIFF *is_tiff(fullname, name, inf + return(0); + } + +-static char *photometricName(info) +- struct tiff_info *info; ++static char *photometricName(struct tiff_info *info) + { + static char buf[32]; + +@@ -154,8 +150,7 @@ static char *photometricName(info) + } + } + +-static char *compressionName(compression) +- int compression; ++static char *compressionName(int compression) + { + switch (compression) { + case COMPRESSION_NONE: +@@ -183,8 +178,7 @@ static char *compressionName(compression + } + } + +-static char *planarConfigName(config) +- int config; ++static char *planarConfigName(int config) + { + switch (config) { + case PLANARCONFIG_CONTIG: +@@ -196,9 +190,7 @@ static char *planarConfigName(config) + } + } + +-static void babble(name, info) +- char *name; +- struct tiff_info *info; ++static void babble(char *name, struct tiff_info *info) + { + switch (info->photometric) { + case PHOTOMETRIC_MINISWHITE: +@@ -222,9 +214,7 @@ static void babble(name, info) + printf("\n"); + } + +-int tiffIdent(fullname, name) +-char *fullname; +-char *name; ++int tiffIdent(char *fullname, char *name) + { + TIFF *tiff; + struct tiff_info info; +@@ -241,10 +231,7 @@ char *name; + return(1); + } + +-Image *tiffLoad(fullname, name, verbose) +- char *fullname; +- char *name; +- int verbose; ++Image *tiffLoad(char *fullname, char *name, unsigned int verbose) + { + TIFF *tiff; + struct tiff_info info; +@@ -467,11 +454,7 @@ Image *tiffLoad(fullname, name, verbose) + /* this is not what I'd call a well-designed TIFF dumping function but it + * does do the job. + */ +-void tiffDump(image, options, file, verbose) +- Image *image; +- char *options; +- char *file; +- int verbose; ++void tiffDump(Image *image, char *options, char *file, int verbose) + { + TIFF *out; + char *name, *value; +diff -up xloadimage.4.1/undither.c.c23 xloadimage.4.1/undither.c +--- xloadimage.4.1/undither.c.c23 1993-10-21 17:28:42.000000000 -0400 ++++ xloadimage.4.1/undither.c 2025-02-24 15:41:17.689343143 -0500 +@@ -7,9 +7,7 @@ + + #include "image.h" + +-Image *undither(oimage, verbose) +- Image *oimage; +- unsigned int verbose; ++Image *undither(Image *oimage, unsigned int verbose) + { + Image *nimage; /* new image to build */ + byte *optr, *nptr; /* Ptr into old/new data */ +diff -up xloadimage.4.1/uufilter.c.c23 xloadimage.4.1/uufilter.c +--- xloadimage.4.1/uufilter.c.c23 2025-02-24 15:41:27.132444513 -0500 ++++ xloadimage.4.1/uufilter.c 2025-02-24 15:41:47.467876786 -0500 +@@ -14,9 +14,7 @@ + #include + #include + +-int main(argc, argv) +- int argc; +- char **argv; ++int main(int argc, char **argv) + { + FILE *inf, *outf; + char *infilename = NULL; +diff -up xloadimage.4.1/value.c.c23 xloadimage.4.1/value.c +--- xloadimage.4.1/value.c.c23 1993-10-21 17:28:43.000000000 -0400 ++++ xloadimage.4.1/value.c 2025-02-24 15:41:17.689396647 -0500 +@@ -13,9 +13,7 @@ + #include "copyright.h" + #include "image.h" + +-unsigned long doMemToVal(p, len) +- byte *p; +- unsigned int len; ++unsigned long doMemToVal(byte *p, unsigned int len) + { unsigned int a; + unsigned long i; + +@@ -25,10 +23,7 @@ unsigned long doMemToVal(p, len) + return(i); + } + +-unsigned long doValToMem(val, p, len) +- unsigned long val; +- byte *p; +- unsigned int len; ++unsigned long doValToMem(unsigned long val, byte *p, unsigned int len) + { int a; + + for (a= len - 1; a >= 0; a--) { +@@ -38,9 +33,7 @@ unsigned long doValToMem(val, p, len) + return(val); + } + +-unsigned long doMemToValLSB(p, len) +- byte *p; +- unsigned int len; ++unsigned long doMemToValLSB(byte *p, unsigned int len) + { int val, a; + + val= 0; +@@ -52,10 +45,7 @@ unsigned long doMemToValLSB(p, len) + /* this is provided for orthagonality + */ + +-unsigned long doValToMemLSB(val, p, len) +- byte *p; +- unsigned long val; +- unsigned int len; ++unsigned long doValToMemLSB(unsigned long val, byte *p, unsigned int len) + { + while (len--) { + *(p++)= val & 0xff; +@@ -67,9 +57,7 @@ unsigned long doValToMemLSB(val, p, len) + /* this flips all the bits in a byte array at byte intervals + */ + +-void flipBits(p, len) +- byte *p; +- unsigned int len; ++void flipBits(byte *p, unsigned int len) + { static int init= 0; + static byte flipped[256]; + +diff -up xloadimage.4.1/vff.c.c23 xloadimage.4.1/vff.c +--- xloadimage.4.1/vff.c.c23 2025-02-24 15:41:17.649800142 -0500 ++++ xloadimage.4.1/vff.c 2025-02-24 15:41:17.689455021 -0500 +@@ -39,16 +39,14 @@ static char *header[MAX_HEAD_LINES]; + static int width, height, bands, cmsize; + static unsigned char rm[256], gm[256], bm[256]; + +-static int readHeader(); ++static int readHeader(ZFILE *); + static int parseHeader(); +-static int readImage(); ++static int readImage(ZFILE *, Image *); + static void freeheader(); + + + Image * +-vffLoad(fullname, name, verbose) +-char *fullname, *name; +-unsigned int verbose; ++vffLoad(char *fullname, char *name, unsigned int verbose) + { + + ZFILE *zf; +@@ -109,9 +107,7 @@ unsigned int verbose; + } + + static int +-readImage(zf, image) +-ZFILE *zf; +-Image *image; ++readImage(ZFILE *zf, Image *image) + { + byte *buf; + byte *op, *ip; +@@ -252,8 +248,7 @@ freeheader() + } + + static int +-readHeader(zf) +-ZFILE *zf; ++readHeader(ZFILE *zf) + { + char buf[HEAD_BUF_SIZE]; + int count, c, lines; +@@ -361,8 +356,7 @@ ZFILE *zf; + return(0); /* so that we try and see what was wrong */ + } + +-int vffIdent(fullname, name) +-char *fullname, *name; ++int vffIdent(char *fullname, char *name) + { + + ZFILE *zf; +diff -up xloadimage.4.1/vicar.c.c23 xloadimage.4.1/vicar.c +--- xloadimage.4.1/vicar.c.c23 2025-02-24 15:41:17.649944407 -0500 ++++ xloadimage.4.1/vicar.c 2025-02-24 15:41:17.689526442 -0500 +@@ -15,7 +15,7 @@ + #include "image.h" + #include + +-FILE *fp,*fopen(); ++FILE *fp,*fopen(const char * restrict, const char * restrict); + int label[10]; + char labstr[80]; + int flag=0; +@@ -31,8 +31,7 @@ int flag=0; + ** + */ + +-unsigned int vicarIdent (fullname, name) +- char *fullname, *name; ++unsigned int vicarIdent (char *fullname, char *name) + { + int i=0; + char IDENT[7]; +@@ -69,8 +68,7 @@ unsigned int vicarIdent (fullname, name) + + /* vicHeader - print the history record */ + +-static void vicarHeader(ptr) +- char *ptr; ++static void vicarHeader(char *ptr) + { + int i; + int prflag; +@@ -103,9 +101,7 @@ static void vicarHeader(ptr) + ** + */ + +-Image *vicarLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *vicarLoad(char *fullname, char *name, unsigned int verbose) + { + int i; + unsigned int mapsize, size; +@@ -115,7 +111,7 @@ Image *vicarLoad(fullname, name, verbose + byte *mapred,*mapgreen,*mapblue; + ZFILE *zf; + +- if ( vicarIdent(fullname,name,verbose) == 0 ) ++ if ( vicarIdent(fullname,name) == 0 ) + return(0); + + /* define the image structure */ +diff -up xloadimage.4.1/window.c.c23 xloadimage.4.1/window.c +--- xloadimage.4.1/window.c.c23 2025-02-24 15:41:17.677166842 -0500 ++++ xloadimage.4.1/window.c 2025-02-24 15:41:17.689603409 -0500 +@@ -40,7 +40,7 @@ static Colormap ImageColormap; + #ifdef ENABLE_TIMEOUT + static int AlarmWentOff = 0; + +-static void delayAlarmHandler() ++static void delayAlarmHandler(int AlarmWentOff) + { + AlarmWentOff = 1; + } +@@ -53,9 +53,7 @@ static void delayAlarmHandler() + * - mfc 90/10/08 + */ + +-static int getNextEventWithTimeout(disp, event) +- Display *disp; +- XEvent *event; ++static int getNextEventWithTimeout(Display *disp, XEvent *event) + { + #ifdef HAS_POLL + struct pollfd fds[1]; +@@ -95,12 +93,7 @@ static int getNextEventWithTimeout(disp, + } + #endif /* ENABLE_TIMEOUT */ + +-static void setCursor(disp, window, iw, ih, ww, wh, cursor) +- Display *disp; +- Window window; +- unsigned int iw, ih; +- unsigned int ww, wh; +- Cursor *cursor; ++static void setCursor(Display *disp, Window window, unsigned int iw, unsigned int ih, unsigned int ww, unsigned int wh, Cursor *cursor) + { XSetWindowAttributes swa; + + if ((ww >= iw) && (wh >= ih)) +@@ -119,10 +112,7 @@ static void setCursor(disp, window, iw, + /* place an image + */ + +-static void placeImage(disp, width, height, winwidth, winheight, rx, ry) +- Display *disp; +- int width, height, winwidth, winheight; +- int *rx, *ry; /* supplied and returned */ ++static void placeImage(Display *disp, int width, int height, int winwidth, int winheight, int *rx, int *ry) + { int pixx, pixy; + + pixx= *rx; +@@ -152,11 +142,8 @@ static void placeImage(disp, width, heig + /* blit an image + */ + +-static void blitImage(ximageinfo, width, height, +- x, y, w, h) +- XImageInfo *ximageinfo; +- unsigned int width, height; +- int x, y, w, h; ++static void blitImage(XImageInfo *ximageinfo, unsigned int width, unsigned int height, ++ int x, int y, int w, int h) + { + if (w > width) + w= width; +@@ -188,8 +175,7 @@ static void blitImage(ximageinfo, width, + /* clean up static window if we're through with it + */ + +-void cleanUpWindow(disp) +- Display *disp; ++void cleanUpWindow(Display *disp) + { + if (ImageWindow) + XDestroyWindow(disp, ImageWindow); +@@ -202,13 +188,7 @@ void cleanUpWindow(disp) + /* clean up after displaying an image + */ + +-static void cleanUpImage(disp, scrn, cursor, pixmap, image, ximageinfo) +- Display *disp; +- int scrn; +- Cursor cursor; +- Pixmap pixmap; +- Image *image; +- XImageInfo *ximageinfo; ++static void cleanUpImage(Display *disp, int scrn, Cursor cursor, Pixmap pixmap, Image *image, XImageInfo *ximageinfo) + { + XFreeCursor(disp, cursor); + if (pixmap != None) +@@ -220,10 +200,7 @@ static void cleanUpImage(disp, scrn, cur + * viewport. + */ + +-void setViewportColormap(disp, scrn, visual) +- Display *disp; +- int scrn; +- Visual *visual; ++void setViewportColormap(Display *disp, int scrn, Visual *visual) + { XSetWindowAttributes swa; + static Atom cmap_atom= None; + Window cmap_windows[2]; +@@ -259,8 +236,7 @@ void setViewportColormap(disp, scrn, vis + /* this attempts to convert an image title into a reasonable icon name + */ + +-static char *iconName(s) +- char *s; ++static char *iconName(char *s) + { static char buf[BUFSIZ]; + char *t; + +@@ -304,8 +280,7 @@ static struct visual_class_name { + {-1, NULL} + }; + +-int visualClassFromName(name) +- char *name; ++int visualClassFromName(char *name) + { int a; + char *s1, *s2; + int class= -1; +@@ -334,8 +309,7 @@ int visualClassFromName(name) + return(class); + } + +-char *nameOfVisualClass(class) +- int class; ++char *nameOfVisualClass(int class) + { int a; + + for (a= 0; VisualClassName[a].name; a++) +@@ -347,11 +321,7 @@ char *nameOfVisualClass(class) + /* find the best visual of a particular class with a particular depth + */ + +-static Visual *bestVisualOfClassAndDepth(disp, scrn, class, depth) +- Display *disp; +- int scrn; +- int class; +- unsigned int depth; ++static Visual *bestVisualOfClassAndDepth(Display *disp, int scrn, int class, unsigned int depth) + { Visual *best= NULL; + XVisualInfo template, *info; + int nvisuals; +@@ -376,12 +346,7 @@ static Visual *bestVisualOfClassAndDepth + * image + */ + +-static void bestVisual(disp, scrn, image, rvisual, rdepth) +- Display *disp; +- int scrn; +- Image *image; +- Visual **rvisual; +- unsigned int *rdepth; ++static void bestVisual(Display *disp, int scrn, Image *image, Visual **rvisual, unsigned int *rdepth) + { unsigned int depth, a; + Screen *screen; + Visual *visual, *default_visual; +@@ -492,13 +457,7 @@ static void bestVisual(disp, scrn, image + * any visual of that type at any depth + */ + +-void bestVisualOfClass(disp, scrn, image, visual_class, rvisual, rdepth) +- Display *disp; +- int scrn; +- Image *image; +- int visual_class; +- Visual **rvisual; +- unsigned int *rdepth; ++void bestVisualOfClass(Display *disp, int scrn, Image *image, int visual_class, Visual **rvisual, unsigned int *rdepth) + { + Visual *visual; + Screen *screen; +@@ -527,16 +486,8 @@ void bestVisualOfClass(disp, scrn, image + *rdepth= depth; + } + +-char imageInWindow(disp, scrn, image, global_options, image_options, +- argc, argv, verbose) +- Display *disp; +- int scrn; +- Image *image; +- OptionSet *global_options; +- OptionSet *image_options; +- int argc; +- char *argv[]; +- unsigned int verbose; ++char imageInWindow(Display *disp, int scrn, Image *image, OptionSet *global_options, OptionSet *image_options, ++ int argc, char *argv[], unsigned int verbose) + { Pixmap pixmap = None; + XImageInfo *ximageinfo; + Visual *visual; +diff -up xloadimage.4.1/xbitmap.c.c23 xloadimage.4.1/xbitmap.c +--- xloadimage.4.1/xbitmap.c.c23 2025-02-24 15:41:17.650216402 -0500 ++++ xloadimage.4.1/xbitmap.c 2025-02-24 15:41:17.689695164 -0500 +@@ -84,8 +84,7 @@ static void initHexTable() + /* read a hex value and return its value + */ + +-static int nextInt(zf) +- ZFILE *zf; ++static int nextInt(ZFILE *zf) + { int c; + int value= 0; + int shift= 0; +@@ -116,16 +115,13 @@ static int nextInt(zf) + } + } + +-static void badFile(name) +- char *name; ++static void badFile(char *name) + { + printf("%s: bad X bitmap file\n", name); + exit(1); + } + +-Image *xbitmapLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *xbitmapLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + Image *image; + char line[MAX_SIZE]; +@@ -243,8 +239,7 @@ Image *xbitmapLoad(fullname, name, verbo + * x bitmaps anyway given their size + */ + +-int xbitmapIdent(fullname, name) +- char *fullname, *name; ++int xbitmapIdent(char *fullname, char *name) + { Image *image; + + if ((image= xbitmapLoad(fullname, name, (unsigned int)1))) { +diff -up xloadimage.4.1/xloadimage.c.c23 xloadimage.4.1/xloadimage.c +--- xloadimage.4.1/xloadimage.c.c23 2025-02-24 15:41:17.682720468 -0500 ++++ xloadimage.4.1/xloadimage.c 2025-02-24 15:41:17.689765928 -0500 +@@ -43,10 +43,7 @@ static byte root_weave_bits[] = { + 0xe0, 0xb0, 0xd0, 0x70 + }; + +-static Image *doProcessOnImage(image, option, verbose) +- Image *image; +- Option *option; +- int verbose; ++static Image *doProcessOnImage(Image *image, Option *option, int verbose) + { Image *retimage= image; + XColor xcolor; /* color for foreground/background */ + +@@ -134,10 +131,7 @@ static Image *doProcessOnImage(image, op + + /* process a list of options on an image + */ +-static Image *processImage(image, global_options, image_options) +- Image *image; +- OptionSet *global_options; +- OptionSet *image_options; ++static Image *processImage(Image *image, OptionSet *global_options, OptionSet *image_options) + { Option *opt; + Image *tmpimage; + unsigned int verbose; +@@ -174,9 +168,7 @@ static Image *processImage(image, global + /* the real thing + */ + +-int main(argc, argv) +- int argc; +- char *argv[]; ++int main(int argc, char *argv[]) + { Option *opt; + char *dname; + Image *dispimage; /* image that will be sent to the display */ +diff -up xloadimage.4.1/xloadimage.h.c23 xloadimage.4.1/xloadimage.h +--- xloadimage.4.1/xloadimage.h.c23 2025-02-24 15:41:17.650575504 -0500 ++++ xloadimage.4.1/xloadimage.h 2025-02-24 15:41:17.689830727 -0500 +@@ -38,35 +38,35 @@ typedef struct { + */ + + void supportedImageTypes(); /* imagetypes.c */ +-void dumpImage(); ++void dumpImage(Image *, char *, char *, int); + +-char *tail(); /* misc.c */ ++char *tail(char *); /* misc.c */ + void memoryExhausted(); +-void internalError(); ++void internalError(int); + void version(); + void usage(); +-void goodImage(); +-int errorHandler(); ++void goodImage(Image *, char *); /* new.c */ ++int errorHandler(Display *, XErrorEvent *); /* misc.c */ + + void showConfiguration(); /* config.c */ + void listImages(); + +-char *expandPath(); /* path.c */ +-int findImage(); ++char *expandPath(char *); /* path.c */ ++int findImage(char *, char *); /* config.c */ + void listImages(); + void loadPathsAndExts(); + void showPath(); + +-void imageOnRoot(); /* root.c */ ++void imageOnRoot(Display *, int, Image *, OptionSet *, unsigned int); /* root.c */ + +-void sendXImage(); /* send.c */ +-XImageInfo *imageToXImage(); +-Pixmap ximageToPixmap(); +-void freeXImage(); ++void sendXImage(XImageInfo *, int, int, int, int, unsigned int, unsigned int); /* send.c */ ++XImageInfo *imageToXImage(Display *, int, Visual *, unsigned int, Image *, unsigned int, unsigned int, unsigned int); ++Pixmap ximageToPixmap(Display *, Window, XImageInfo *); ++void freeXImage(Image *, XImageInfo *); + + Visual *getBestVisual(); /* visual.c */ + +-int visualClassFromName(); /* window.c */ +-char *nameOfVisualClass(); +-void cleanUpWindow(); +-char imageInWindow(); ++int visualClassFromName(char *); /* window.c */ ++char *nameOfVisualClass(int); ++void cleanUpWindow(Display *); ++char imageInWindow(Display *, int, Image *, OptionSet *, OptionSet *, int, char **, unsigned int); +diff -up xloadimage.4.1/xpixmap.c.c23 xloadimage.4.1/xpixmap.c +--- xloadimage.4.1/xpixmap.c.c23 2025-02-24 15:41:17.650662488 -0500 ++++ xloadimage.4.1/xpixmap.c 2025-02-24 15:41:17.689886418 -0500 +@@ -24,18 +24,14 @@ extern int Scrn; /* X screen number + + #define XPM_FORMAT 1 + +-static void corrupted(fullname, zf) +- char *fullname; +- ZFILE *zf; ++static void corrupted(char *fullname, ZFILE *zf) + { + zclose(zf); + printf("%s: X Pixmap file is corrupted\n", fullname); + exit(1); + } + +-Image *xpixmapLoad(fullname, name, verbose) +- char *fullname, *name; +- unsigned int verbose; ++Image *xpixmapLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + char buf[BUFSIZ]; + char what[BUFSIZ]; +@@ -232,8 +228,7 @@ Image *xpixmapLoad(fullname, name, verbo + return(image); + } + +-int xpixmapIdent(fullname, name) +- char *fullname, *name; ++int xpixmapIdent(char *fullname, char *name) + { Image *image; + + if ((image= xpixmapLoad(fullname, name, (unsigned int)1))) { +diff -up xloadimage.4.1/xwd.c.c23 xloadimage.4.1/xwd.c +--- xloadimage.4.1/xwd.c.c23 2025-02-24 15:41:17.650805701 -0500 ++++ xloadimage.4.1/xwd.c 2025-02-24 15:41:17.689954529 -0500 +@@ -22,11 +22,7 @@ + * an XWD file. + */ + +-static int isXWD(name, zf, header, verbose) +- char *name; +- ZFILE *zf; +- XWDHeader *header; +- int verbose; ++static int isXWD(char *name, ZFILE *zf, XWDHeader *header, int verbose) + { GenericXWDHeader gh; + int a; + +@@ -132,8 +128,7 @@ static int isXWD(name, zf, header, verbo + return(1); + } + +-int xwdIdent(fullname, name) +- char *fullname, *name; ++int xwdIdent(char *fullname, char *name) + { ZFILE *zf; + XWDHeader header; + int ret; +@@ -145,10 +140,7 @@ int xwdIdent(fullname, name) + return(ret); + } + +-static Image *loadXYBitmap(fullname, zf, header) +- char *fullname; +- ZFILE *zf; +- XWDHeader header; ++static Image *loadXYBitmap(char *fullname, ZFILE *zf, XWDHeader header) + { Image *image; + int dlinelen; /* length of scan line in data file */ + int ilinelen; /* length of line within image structure */ +@@ -160,7 +152,7 @@ static Image *loadXYBitmap(fullname, zf, + int x, y; /* horizontal and vertical counters */ + byte *line; /* input scan line */ + byte *dptr, *iptr; /* image data pointers */ +- unsigned long (*loader)(); /* unit loading function */ ++ unsigned long (*loader)(byte *, unsigned int); /* unit loading function */ + + image= newBitImage(header.pixmap_width, header.pixmap_height); + ilinelen= (header.pixmap_width / 8) + (header.pixmap_width % 8 ? 1 : 0); +@@ -218,10 +210,7 @@ static Image *loadXYBitmap(fullname, zf, + * build the destination. 1-bit images are handled by XYBitmap. + */ + +-static Image *loadXYPixmap(fullname, zf, header) +- char *fullname; +- ZFILE *zf; +- XWDHeader header; ++static Image *loadXYPixmap(char *fullname, ZFILE *zf, XWDHeader header) + { Image *image; + int plane; + int dlinelen; /* length of scan line in data file */ +@@ -237,7 +226,7 @@ static Image *loadXYPixmap(fullname, zf, + byte *dptr, *iptr; /* image data pointers */ + unsigned long pixvals; /* bits for pixels in this unit */ + unsigned long mask; +- unsigned long (*loader)(); /* unit loading function */ ++ unsigned long (*loader)(byte *, unsigned int); /* unit loading function */ + + image= newRGBImage(header.pixmap_width, header.pixmap_height, + header.pixmap_depth); +@@ -313,10 +302,7 @@ static Image *loadXYPixmap(fullname, zf, + * you gotta problem. 1-bit images are handled by XYBitmap. + */ + +-static Image *loadZPixmap(fullname, zf, header) +- char *fullname; +- ZFILE *zf; +- XWDHeader header; ++static Image *loadZPixmap(char *fullname, ZFILE *zf, XWDHeader header) + { Image *image; + int dlinelen; /* length of scan line in data file */ + int ilinelen; /* length of scan line in image file */ +@@ -327,7 +313,7 @@ static Image *loadZPixmap(fullname, zf, + byte *dptr, *iptr; /* image data pointers */ + unsigned long pixmask; /* bit mask within pixel */ + unsigned long pixel; /* pixel we're working on */ +- unsigned long (*loader)(); /* unit loading function */ ++ unsigned long (*loader)(byte *, unsigned int); /* unit loading function */ + + image= newRGBImage(header.pixmap_width, header.pixmap_height, + header.pixmap_depth); +@@ -408,9 +394,7 @@ static Image *loadZPixmap(fullname, zf, + return(image); + } + +-Image *xwdLoad(fullname, name, verbose) +- char *fullname, *name; +- int verbose; ++Image *xwdLoad(char *fullname, char *name, unsigned int verbose) + { ZFILE *zf; + XWDHeader header; + int cmaplen; +diff -up xloadimage.4.1/zio.c.c23 xloadimage.4.1/zio.c +--- xloadimage.4.1/zio.c.c23 2025-02-24 15:41:17.664718091 -0500 ++++ xloadimage.4.1/zio.c 2025-02-24 15:41:17.690029930 -0500 +@@ -27,10 +27,7 @@ static ZFILE ZFileTable[MAX_ZFILES]; + /* read some info through the read cache + */ + +-static int doRead(zf, buf, len) +- ZFILE *zf; +- byte *buf; +- int len; ++static int doRead(ZFILE *zf, byte *buf, int len) + { int bread, readlen; + + /* loop through the read +@@ -85,8 +82,7 @@ static int doRead(zf, buf, len) + /* reset a read cache + */ + +-void zreset(filename) +- char *filename; ++void zreset(char *filename) + { int a; + struct cache *old; + +@@ -138,8 +134,7 @@ void zreset(filename) + } + } + +-ZFILE *zopen(name) +- char *name; ++ZFILE *zopen(char *name) + { int a; + ZFILE *zf; + char buf[BUFSIZ]; +@@ -262,16 +257,12 @@ ZFILE *zopen(name) + return(zf); + } + +-int zread(zf, buf, len) +- ZFILE *zf; +- byte *buf; +- unsigned int len; ++int zread(ZFILE *zf, byte *buf, unsigned int len) + { + return(doRead(zf, buf, len)); + } + +-int zgetc(zf) +- ZFILE *zf; ++int zgetc(ZFILE *zf) + { unsigned char c; + + if (doRead(zf, &c, 1) > 0) +@@ -280,10 +271,7 @@ int zgetc(zf) + return(EOF); + } + +-char *zgets(buf, size, zf) +- byte *buf; +- unsigned int size; +- ZFILE *zf; ++char *zgets(byte *buf, unsigned int size, ZFILE *zf) + { int p= 0; + + while (doRead(zf, buf + p, 1) > 0) { +@@ -302,8 +290,7 @@ char *zgets(buf, size, zf) + * need to re-open it + */ + +-void znocache(zf) +- ZFILE *zf; ++void znocache(ZFILE *zf) + { + debug(("znocache(\"%s\") called\n", zf->filename)); + zf->nocache= 1; +@@ -313,8 +300,7 @@ void znocache(zf) + * zreset() is called with the filename. + */ + +-void zclose(zf) +- ZFILE *zf; ++void zclose(ZFILE *zf) + { + debug(("zclose(\"%s\") called\n", zf->filename)); + zf->dataptr= zf->data; +diff -up xloadimage.4.1/zoom.c.c23 xloadimage.4.1/zoom.c +--- xloadimage.4.1/zoom.c.c23 2025-02-24 15:41:17.664857979 -0500 ++++ xloadimage.4.1/zoom.c 2025-02-24 15:41:17.690094798 -0500 +@@ -11,10 +11,7 @@ + #include "copyright.h" + #include "image.h" + +-static unsigned int *buildIndex(width, zoom, rwidth) +- unsigned int width; +- unsigned int zoom; +- unsigned int *rwidth; ++static unsigned int *buildIndex(unsigned int width, unsigned int zoom, unsigned int *rwidth) + { float fzoom; + unsigned int *index; + unsigned int a; +@@ -36,10 +33,7 @@ static unsigned int *buildIndex(width, z + return(index); + } + +-Image *zoom(oimage, xzoom, yzoom, verbose) +- Image *oimage; +- unsigned int xzoom, yzoom; +- unsigned int verbose; ++Image *zoom(Image *oimage, unsigned int xzoom, unsigned int yzoom, unsigned int verbose) + { char buf[BUFSIZ]; + Image *image; + unsigned int *xindex, *yindex; diff --git a/xloadimage-4.1-libtiff4.patch b/xloadimage-4.1-libtiff4.patch index bfc71c2..7d6c839 100644 --- a/xloadimage-4.1-libtiff4.patch +++ b/xloadimage-4.1-libtiff4.patch @@ -6,7 +6,7 @@ diff -up xloadimage.4.1/tiff.c.tiff4 xloadimage.4.1/tiff.c { ZFILE *zf; - TIFFHeader th; -+ TIFFHeaderCommon th; ++ TIFFHeaderClassic th; TIFF *tiff; zf = zopen(fullname); @@ -14,7 +14,7 @@ diff -up xloadimage.4.1/tiff.c.tiff4 xloadimage.4.1/tiff.c /* read TIFF header and see if it looks right */ - if ((zread(zf, (byte *)&th, sizeof(TIFFHeader)) == sizeof(TIFFHeader)) && -+ if ((zread(zf, (byte *)&th, sizeof(TIFFHeaderCommon)) == sizeof(TIFFHeaderCommon)) && ++ if ((zread(zf, (byte *)&th, sizeof(TIFFHeaderClassic)) == sizeof(TIFFHeaderClassic)) && ((th.tiff_magic == TIFF_BIGENDIAN) || (th.tiff_magic == TIFF_LITTLEENDIAN))) { diff --git a/xloadimage.spec b/xloadimage.spec index 91bb76d..9cb6aa9 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,10 +1,10 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 39%{?dist} +Release: 40%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz -# Patches 0-18 come from Debian 4.1-16.1 +# Patches with number prefix come from Debian # Many thanks to all those who have done work on this package over the years Patch0: 01_libjpeg-support.dpatch Patch1: 02_png-support.dpatch @@ -33,6 +33,13 @@ Patch23: xloadimage-4.1-png-1.5.patch Patch24: xloadimage-4.1-fix-mem-leak.patch Patch25: xloadimage-4.1-sub-second-delay.patch Patch26: xloadimage-c99.patch +Patch27: 22-include.patch +Patch28: 27_shrink-should-not-zoom-upwards.patch +Patch29: 28_correct-scaling-fullscreen.patch +Patch30: 29_fix-manpage-hyphens.patch +Patch31: 32_fix-spelling.patch +# There is no real upstream for xloadimage anymore, so this work probably stays here forever. +Patch32: xloadimage-4.1-c23.patch URL: http://www.frostbytes.com/~jimf/xloadimage.html %if 0%{?fedora} >= 18 BuildRequires: gcc @@ -88,6 +95,12 @@ dithered automatically). %patch -P24 -p1 -b .fix-mem-leak %patch -P25 -p1 -b .sub-second-delay %patch -P26 -p1 +%patch -P27 -p1 +%patch -P28 -p1 +%patch -P29 -p1 +%patch -P30 -p1 +%patch -P31 -p1 +%patch -P32 -p1 -b .c23 chmod +x configure @@ -127,6 +140,10 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Mon Feb 24 2025 Tom Callaway - 4.1-40 +- bring over more Debian patches +- apply a lot of cleanups for c23 support + * Sun Jan 19 2025 Fedora Release Engineering - 4.1-39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 6d936ed32d0c35ffd0d0099ef435a637ec9ebc5a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:54:06 +0000 Subject: [PATCH 36/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 9cb6aa9..752ff97 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 40%{?dist} +Release: 41%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches with number prefix come from Debian @@ -140,6 +140,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 4.1-41 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Mon Feb 24 2025 Tom Callaway - 4.1-40 - bring over more Debian patches - apply a lot of cleanups for c23 support From b56e82e4afba08ba84378adbf54fbf3c0011f1f4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 20:43:45 +0000 Subject: [PATCH 37/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 752ff97..87205f4 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 41%{?dist} +Release: 42%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches with number prefix come from Debian @@ -140,6 +140,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Sat Jan 17 2026 Fedora Release Engineering - 4.1-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + * Fri Jul 25 2025 Fedora Release Engineering - 4.1-41 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 3dd74dd5589f937bb92cae87460cd8a95cc16bbf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 09:16:37 +0000 Subject: [PATCH 38/38] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild --- xloadimage.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xloadimage.spec b/xloadimage.spec index 87205f4..35b8aff 100644 --- a/xloadimage.spec +++ b/xloadimage.spec @@ -1,7 +1,7 @@ Name: xloadimage Summary: Image viewer and processor Version: 4.1 -Release: 42%{?dist} +Release: 43%{?dist} License: MIT Source0: ftp://ftp.x.org/R5contrib/%{name}.%{version}.tar.gz # Patches with number prefix come from Debian @@ -140,6 +140,9 @@ cp -a %{buildroot}%{_mandir}/man1/xloadimage.1x %{buildroot}%{_mandir}/man1/xvie %{_mandir}/man1/* %changelog +* Fri Jul 17 2026 Fedora Release Engineering - 4.1-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + * Sat Jan 17 2026 Fedora Release Engineering - 4.1-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild