Hello community,
here is the log from the commit of package xorg-x11-libXpm
checked in at Sat Aug 25 00:10:34 CEST 2007.
--------
--- xorg-x11-libXpm/xorg-x11-libXpm.changes 2006-10-14 06:16:54.000000000 +0200
+++ /mounts/work_src_done/STABLE/xorg-x11-libXpm/xorg-x11-libXpm.changes 2007-08-24 15:50:24.313608000 +0200
@@ -1,0 +2,12 @@
+Fri Aug 24 15:49:55 CEST 2007 - sndirsch@suse.de
+
+- libXpm 3.5.7
+ * Sun bug 4486226: Xpm is not internationalized
+ * Use AM_CFLAGS & AM_CPPFLAGS to replace per-program and obsolete macros
+ * Include comment/copyright/license for AC_DEFINE_DIR in acinclude.m4
+ * Replace index/rindex with C89 standard strchr/strrchr
+ * Use srcdir in paths passed to xgettext when making .po files
+ * Replace strcpy with strncpy to match previous code block
+ * X.Org Bug #11863: Build libXpm on MS Windows (with MinGW)
+
+-------------------------------------------------------------------
Old:
----
libXpm-3.5.6.tar.bz2
New:
----
libXpm-3.5.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xorg-x11-libXpm.spec ++++++
--- /var/tmp/diff_new_pack.MT3523/_old 2007-08-25 00:09:53.000000000 +0200
+++ /var/tmp/diff_new_pack.MT3523/_new 2007-08-25 00:09:53.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package xorg-x11-libXpm (Version 7.2)
#
-# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -11,11 +11,11 @@
# norootforbuild
Name: xorg-x11-libXpm
-%define dirsuffix 3.5.6
+%define dirsuffix 3.5.7
BuildRequires: pkgconfig xorg-x11-libICE-devel xorg-x11-libSM-devel xorg-x11-libX11-devel xorg-x11-libXau-devel xorg-x11-libXdmcp-devel xorg-x11-libXext-devel xorg-x11-libXt-devel xorg-x11-proto-devel xorg-x11-xtrans-devel
Url: http://xorg.freedesktop.org/
Version: 7.2
-Release: 1
+Release: 56
License: X11/MIT
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Group: System/Libraries
@@ -92,7 +92,16 @@
/usr/%{_lib}/pkgconfig/*.pc
%{_mandir}/man1/*
-%changelog -n xorg-x11-libXpm
+%changelog
+* Fri Aug 24 2007 - sndirsch@suse.de
+- libXpm 3.5.7
+ * Sun bug 4486226: Xpm is not internationalized
+ * Use AM_CFLAGS & AM_CPPFLAGS to replace per-program and obsolete macros
+ * Include comment/copyright/license for AC_DEFINE_DIR in acinclude.m4
+ * Replace index/rindex with C89 standard strchr/strrchr
+ * Use srcdir in paths passed to xgettext when making .po files
+ * Replace strcpy with strncpy to match previous code block
+ * X.Org Bug #11863: Build libXpm on MS Windows (with MinGW)
* Sat Oct 14 2006 - sndirsch@suse.de
- updated to X.Org 7.2RC1
* Wed Aug 02 2006 - sndirsch@suse.de
++++++ libXpm-3.5.6.tar.bz2 -> libXpm-3.5.7.tar.bz2 ++++++
++++ 32953 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/acinclude.m4 new/libXpm-3.5.7/acinclude.m4
--- old/libXpm-3.5.6/acinclude.m4 1970-01-01 01:00:00.000000000 +0100
+++ new/libXpm-3.5.7/acinclude.m4 2007-07-26 02:44:42.000000000 +0200
@@ -0,0 +1,47 @@
+##### http://autoconf-archive.cryp.to/ac_define_dir.html
+#
+# SYNOPSIS
+#
+# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
+#
+# DESCRIPTION
+#
+# This macro sets VARNAME to the expansion of the DIR variable,
+# taking care of fixing up ${prefix} and such.
+#
+# VARNAME is then offered as both an output variable and a C
+# preprocessor symbol.
+#
+# Example:
+#
+# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
+#
+# LAST MODIFICATION
+#
+# 2006-10-13
+#
+# COPYLEFT
+#
+# Copyright (c) 2006 Stepan Kasal
+# Copyright (c) 2006 Andreas Schwab
+# Copyright (c) 2006 Guido U. Draheim
+# Copyright (c) 2006 Alexandre Oliva
+#
+# Copying and distribution of this file, with or without
+# modification, are permitted in any medium without royalty provided
+# the copyright notice and this notice are preserved.
+
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
+dnl refers to ${prefix}. Thus we have to use `eval' twice.
+ eval ac_define_dir="\"[$]$2\""
+ eval ac_define_dir="\"$ac_define_dir\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/compile new/libXpm-3.5.7/compile
--- old/libXpm-3.5.6/compile 2006-10-13 02:08:53.000000000 +0200
+++ new/libXpm-3.5.7/compile 1970-01-01 01:00:00.000000000 +0100
@@ -1,142 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2005-05-14.22
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
-# Written by Tom Tromey .
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to or send patches to
-# .
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to .
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "compile $scriptversion"
- exit $?
- ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
- if test -n "$eat"; then
- eat=
- else
- case $1 in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
- eat=1
- case $2 in
- *.o | *.obj)
- ofile=$2
- ;;
- *)
- set x "$@" -o "$2"
- shift
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- set x "$@" "$1"
- shift
- ;;
- *)
- set x "$@" "$1"
- shift
- ;;
- esac
- fi
- shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
-# that we are using for the .o file. Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
-while true; do
- if mkdir "$lockdir" >/dev/null 2>&1; then
- break
- fi
- sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
- mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/config.h.in new/libXpm-3.5.7/config.h.in
--- old/libXpm-3.5.6/config.h.in 2006-10-13 22:23:20.000000000 +0200
+++ new/libXpm-3.5.7/config.h.in 2007-08-22 22:23:55.000000000 +0200
@@ -33,6 +33,9 @@
/* Define to 1 if you have the header file. */
#undef HAVE_UNISTD_H
+/* Location of translated messages */
+#undef LOCALEDIR
+
/* Name of package */
#undef PACKAGE
@@ -51,11 +54,23 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Major version of this package */
+#undef PACKAGE_VERSION_MAJOR
+
+/* Minor version of this package */
+#undef PACKAGE_VERSION_MINOR
+
+/* Patch version of this package */
+#undef PACKAGE_VERSION_PATCHLEVEL
+
/* Define to 1 to automatically look for files with .Z & .gz extensions */
#undef STAT_ZFILE
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if you want to use the gettext() function. */
+#undef USE_GETTEXT
+
/* Version number of package */
#undef VERSION
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/configure.ac new/libXpm-3.5.7/configure.ac
--- old/libXpm-3.5.6/configure.ac 2006-10-13 20:59:09.000000000 +0200
+++ new/libXpm-3.5.7/configure.ac 2007-08-22 22:22:56.000000000 +0200
@@ -1,7 +1,7 @@
# $Id$
AC_PREREQ(2.57)
-AC_INIT([libXpm], 3.5.6, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXpm)
+AC_INIT([libXpm], 3.5.7, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXpm)
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([dist-bzip2])
@@ -33,6 +33,26 @@
CFLAGS="$GCC_WARNINGS $CFLAGS"
fi
+# Internationalization & localization support
+AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"])
+AC_MSG_CHECKING([where to install localized messages])
+AC_ARG_WITH([localedir], AC_HELP_STRING([--with-localedir=<path>],
+ [Path to install message files in (default: datadir/locale)]),
+ [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
+AC_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages])
+if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then
+ AC_MSG_RESULT([nowhere])
+ USE_GETTEXT="no"
+else
+ AC_MSG_RESULT([$LOCALEDIR])
+fi
+
+if test "x$USE_GETTEXT" = "xyes" ; then
+ AC_DEFINE([USE_GETTEXT], 1,
+ [Define to 1 if you want to use the gettext() function.])
+fi
+AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes")
+
# Optional feature: When ___.xpm is requested, also look for ___.xpm.Z & .gz
# Replaces ZFILEDEF = -DSTAT_ZFILE in old Imakefile
AC_ARG_ENABLE(stat-zfile,
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/cxpm/cxpm.c new/libXpm-3.5.7/cxpm/cxpm.c
--- old/libXpm-3.5.6/cxpm/cxpm.c 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/cxpm/cxpm.c 2007-06-27 22:39:29.000000000 +0200
@@ -34,7 +34,16 @@
#define CXPMPROG
+#ifdef HAVE_CONFIG_H
+#include
+#endif
#include "XpmI.h"
+#ifdef USE_GETTEXT
+#include
+#include
+#else
+#define gettext(a) (a)
+#endif
#undef xpmGetC
#define xpmGetC(data) sGetc(data, data->stream.file)
@@ -86,9 +95,9 @@
#include "Image.c"
void
-ErrorMessage(ErrorStatus, data)
- int ErrorStatus;
- xpmData *data;
+ErrorMessage(
+ int ErrorStatus,
+ xpmData *data)
{
char *error = NULL;
@@ -97,23 +106,36 @@
case XpmSuccess:
return;
case XpmOpenFailed:
- error = "Cannot open file";
+ /* L10N_Comments : Error produced when filename does not exist
+ or insufficient permissions to open (i.e. cxpm /no/such/file ) */
+ error = gettext("Cannot open file");
break;
case XpmFileInvalid:
- error = "Invalid XPM file";
+ /* L10N_Comments : Error produced when filename can be read, but
+ is not an XPM file (i.e. cxpm /dev/null ) */
+ error = gettext("Invalid XPM file");
break;
case XpmNoMemory:
- error = "Not enough memory";
+ /* L10N_Comments : Error produced when filename can be read, but
+ is too big for memory
+ (i.e. limit datasize 32 ; cxpm /usr/dt/backdrops/Crochet.pm ) */
+ error = gettext("Not enough memory");
break;
case XpmColorFailed:
- error = "Failed to parse color";
+ /* L10N_Comments : Error produced when filename can be read, but
+ contains an invalid color specification (need to create test case)*/
+ error = gettext("Failed to parse color");
break;
}
if (error) {
- fprintf(stderr, "Xpm Error: %s.\n", error);
+ /* L10N_Comments : Wrapper around above Xpm errors - %s is
+ replaced with the contents of the error message retrieved above */
+ fprintf(stderr, gettext("Xpm Error: %s.\n"), error);
if (ErrorStatus == XpmFileInvalid && data)
- fprintf(stderr, "Error found line %d near character %d\n",
+ /* L10N_Comments : Error produced when filename can be read, but
+ is not an XPM file (i.e. cxpm /dev/null ) */
+ fprintf(stderr, gettext("Error found line %d near character %d\n"),
data->lineNum + 1,
data->charNum + 1);
exit(1);
@@ -130,9 +152,17 @@
int ErrorStatus;
xpmData data;
+#ifdef USE_GETTEXT
+ setlocale(LC_ALL,"");
+ bindtextdomain("cxpm",LOCALEDIR);
+ textdomain("cxpm");
+#endif
+
if (argc > 1) {
if (!strcmp(argv[1], "-?") || !strncmp(argv[1], "-h", 2)) {
- fprintf(stderr, "Usage: %s [filename]\n", argv[0]);
+ /* L10N_Comments : Usage message produced by running cxpm -h
+ %s will be replaced by argv[0] (program name) */
+ fprintf(stderr, gettext("Usage: %s [filename]\n"), argv[0]);
exit(1);
}
filename = argv[1];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/cxpm/Makefile.am new/libXpm-3.5.7/cxpm/Makefile.am
--- old/libXpm-3.5.6/cxpm/Makefile.am 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/cxpm/Makefile.am 2007-08-06 23:16:37.000000000 +0200
@@ -1,6 +1,7 @@
bin_PROGRAMS = cxpm
-cxpm_CFLAGS = $(XPM_CFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/include/X11
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include/X11
+AM_CFLAGS = $(XPM_CFLAGS)
cxpm_SOURCES = cxpm.c
@@ -37,3 +38,11 @@
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
+if USE_GETTEXT
+noinst_DATA = cxpm.po
+
+cxpm.po: $(cxpm_SOURCES:%=$(srcdir)/%)
+ xgettext -c"L10N_Comments" -d cxpm -n $(cxpm_SOURCES:%=$(srcdir)/%)
+
+CLEANFILES += cxpm.po
+endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/missing new/libXpm-3.5.7/missing
--- old/libXpm-3.5.6/missing 2006-10-13 02:08:53.000000000 +0200
+++ new/libXpm-3.5.7/missing 2007-08-22 22:23:56.000000000 +0200
@@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2005-06-08.21
+scriptversion=2006-05-10.23
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
@@ -33,6 +33,8 @@
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +46,7 @@
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -77,6 +79,7 @@
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -106,7 +109,7 @@
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
-case "$1" in
+case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@@ -135,7 +138,7 @@
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
-case "$1" in
+case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@@ -164,7 +167,7 @@
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -192,8 +195,8 @@
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -214,25 +217,25 @@
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@@ -244,18 +247,18 @@
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@@ -267,11 +270,9 @@
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@@ -289,11 +290,17 @@
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@@ -317,13 +324,13 @@
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/data.c new/libXpm-3.5.7/src/data.c
--- old/libXpm-3.5.6/src/data.c 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/data.c 2007-08-06 21:57:34.000000000 +0200
@@ -422,7 +422,7 @@
if (!l)
return (XpmFileInvalid);
buf[l] = '\0';
- ptr = rindex(buf, '_');
+ ptr = strrchr(buf, '_');
if (!ptr || strncmp("_format", ptr, l - (ptr - buf)))
return XpmFileInvalid;
/* this is definitely an XPM 1 file */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/Makefile.am new/libXpm-3.5.7/src/Makefile.am
--- old/libXpm-3.5.6/src/Makefile.am 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/Makefile.am 2007-06-27 22:42:56.000000000 +0200
@@ -2,9 +2,8 @@
lib_LTLIBRARIES=libXpm.la
-AM_CFLAGS = -I. \
- -I$(top_srcdir)/include/X11/ \
- $(XPM_CFLAGS)
+AM_CPPFLAGS = -I. -I$(top_srcdir)/include/X11/
+AM_CFLAGS = $(XPM_CFLAGS)
libXpm_la_LDFLAGS = -version-number 4:11:0 -no-undefined
libXpm_la_LIBADD = $(XPM_LIBS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/parse.c new/libXpm-3.5.7/src/parse.c
--- old/libXpm-3.5.6/src/parse.c 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/parse.c 2007-08-06 21:57:16.000000000 +0200
@@ -138,7 +138,7 @@
ptr = buf;
got_one = False;
while (!got_one) {
- ptr = index(ptr, '_');
+ ptr = strchr(ptr, '_');
if (!ptr)
return (XpmFileInvalid);
switch (l - (ptr - buf)) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/RdFToI.c new/libXpm-3.5.7/src/RdFToI.c
--- old/libXpm-3.5.6/src/RdFToI.c 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/RdFToI.c 2007-08-06 21:47:45.000000000 +0200
@@ -44,6 +44,10 @@
#include
#include
#include
+#else
+#ifdef FOR_MSW
+#include
+#endif
#endif
LFUNC(OpenReadFile, int, (char *filename, xpmData *mdata));
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/simx.h new/libXpm-3.5.7/src/simx.h
--- old/libXpm-3.5.6/src/simx.h 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/simx.h 2007-08-06 21:49:33.000000000 +0200
@@ -40,6 +40,9 @@
#ifdef FOR_MSW
#include "windows.h" /* MS windows GDI types */
+#define _XFUNCPROTOBEGIN
+#define _XFUNCPROTOEND
+#define NO_ZPIPE
/*
* minimal portability layer between ansi and KR C
@@ -101,7 +104,7 @@
/* color related */
FUNC(XParseColor, int, (Display *, Colormap *, char *, XColor *));
- FUNC(XAllocColor, int, (Display *, Colormap *, XColor *));
+ FUNC(XAllocColor, int, (Display *, Colormap, XColor *));
FUNC(XQueryColors, void, (Display *display, Colormap *colormap,
XColor *xcolors, int ncolors));
FUNC(XFreeColors, int, (Display *d, Colormap cmap,
@@ -134,6 +137,18 @@
#undef LFUNC
#undef FUNC
+/* Some functions and constants that have non-standard names in the
+ MS library. */
+#define bzero(addr,sz) memset(addr, 0, sz)
+#define close _close
+#define fdopen _fdopen
+#define index strchr
+#define open _open
+#define O_RDONLY _O_RDONLY
+#define rindex strrchr
+#define strdup _strdup
+
+
#endif /* def FOR_MSW */
#endif /* _SIMX_H */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/WrFFrI.c new/libXpm-3.5.7/src/WrFFrI.c
--- old/libXpm-3.5.6/src/WrFFrI.c 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/WrFFrI.c 2007-08-22 22:04:12.000000000 +0200
@@ -117,9 +117,9 @@
#ifdef VMS
name = filename;
#else
- if (!(name = rindex(filename, '/'))
+ if (!(name = strrchr(filename, '/'))
#ifdef AMIGA
- && !(name = rindex(filename, ':'))
+ && !(name = strrchr(filename, ':'))
#endif
)
name = filename;
@@ -127,24 +127,25 @@
name++;
#endif
/* let's try to make a valid C syntax name */
- if (index(name, '.')) {
+ if (strchr(name, '.')) {
strncpy(new_name, name, sizeof(new_name));
new_name[sizeof(new_name)-1] = '\0';
/* change '.' to '_' */
name = s = new_name;
- while ((dot = index(s, '.'))) {
+ while ((dot = strchr(s, '.'))) {
*dot = '_';
s = dot;
}
}
- if (index(name, '-')) {
+ if (strchr(name, '-')) {
if (name != new_name) {
- strcpy(new_name, name);
+ strncpy(new_name, name, sizeof(new_name));
+ new_name[sizeof(new_name)-1] = '\0';
name = new_name;
}
/* change '-' to '_' */
s = name;
- while ((dot = index(s, '-'))) {
+ while ((dot = strchr(s, '-'))) {
*dot = '_';
s = dot;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/src/XpmI.h new/libXpm-3.5.7/src/XpmI.h
--- old/libXpm-3.5.6/src/XpmI.h 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/src/XpmI.h 2007-08-06 21:47:15.000000000 +0200
@@ -58,9 +58,13 @@
extern FILE *popen();
#endif
+#ifdef FOR_MSW
+#include "simx.h"
+#else
#include
#include
#include
+#endif
#ifdef VMS
#include
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/sxpm/Makefile.am new/libXpm-3.5.7/sxpm/Makefile.am
--- old/libXpm-3.5.6/sxpm/Makefile.am 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/sxpm/Makefile.am 2007-08-06 23:18:41.000000000 +0200
@@ -2,9 +2,9 @@
bin_PROGRAMS = sxpm
-sxpm_CFLAGS = $(SXPM_CFLAGS)
+AM_CFLAGS = $(SXPM_CFLAGS)
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
sxpm_SOURCES = sxpm.c
@@ -42,6 +42,14 @@
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
+if USE_GETTEXT
+noinst_DATA = sxpm.po
+
+sxpm.po: $(sxpm_SOURCES:%=$(srcdir)/%)
+ xgettext -c"L10N_Comments" -d sxpm -n $(sxpm_SOURCES:%=$(srcdir)/%)
+
+CLEANFILES += sxpm.po
+endif
endif
EXTRA_DIST = \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libXpm-3.5.6/sxpm/sxpm.c new/libXpm-3.5.7/sxpm/sxpm.c
--- old/libXpm-3.5.6/sxpm/sxpm.c 2006-10-12 00:31:40.000000000 +0200
+++ new/libXpm-3.5.7/sxpm/sxpm.c 2007-06-27 22:39:29.000000000 +0200
@@ -32,6 +32,10 @@
* Developed by Arnaud Le Hors *
\*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+#include
+#endif
+
#include
#include
#include
@@ -47,6 +51,13 @@
#include
+#ifdef USE_GETTEXT
+#include
+#include
+#else
+#define gettext(a) (a)
+#endif
+
/* XPM */
/* plaid pixmap */
static char *plaid[] = {
@@ -158,11 +169,19 @@
char *buffer;
#endif
+#ifdef USE_GETTEXT
+ XtSetLanguageProc(NULL,NULL,NULL);
+ bindtextdomain("sxpm",LOCALEDIR);
+ textdomain("sxpm");
+#endif
+
topw = XtInitialize(argv[0], "Sxpm",
options, XtNumber(options), &argc, argv);
if (!topw) {
- fprintf(stderr, "Sxpm Error... [ Undefined DISPLAY ]\n");
+ /* L10N_Comments : Error if no $DISPLAY or $DISPLAY can't be opened.
+ Not normally reached as Xt exits before we get here. */
+ fprintf(stderr, gettext("Sxpm Error... [ Undefined DISPLAY ]\n"));
exit(1);
}
colormap = XDefaultColormapOfScreen(XtScreen(topw));
@@ -467,7 +486,9 @@
unsigned int i, j;
for (i = 0; i < view.attributes.nextensions; i++) {
- fprintf(stderr, "Xpm extension : %s\n",
+ /* L10N_Comments : Output when -v & file has extensions
+ %s is replaced by extension name */
+ fprintf(stderr, gettext("Xpm extension : %s\n"),
view.attributes.extensions[i].name);
for (j = 0; j < view.attributes.extensions[i].nlines; j++)
fprintf(stderr, "\t\t%s\n",
@@ -559,8 +580,10 @@
void
Usage()
{
- fprintf(stderr, "\nUsage: %s [options...]\n", command[0]);
- fprintf(stderr, "Where options are:\n\
+ /* L10N_Comments : Usage message (sxpm -h) in two parts.
+ In the first part %s is replaced by the command name. */
+ fprintf(stderr, gettext("\nUsage: %s [options...]\n"), command[0]);
+ fprintf(stderr, gettext("Where options are:\n\
\n\
[-d host:display] Display to connect to.\n\
[-g geom] Geometry of window.\n\
@@ -587,7 +610,7 @@
[-version] Print out program's version number\n\
and library's version number if different.\n\
if no input is specified sxpm reads from standard input.\n\
-\n");
+\n"));
exit(0);
}
@@ -604,27 +627,48 @@
case XpmSuccess:
return;
case XpmColorError:
- warning = "Could not parse or alloc requested color";
+/* L10N_Comments : The following set of messages are classified as
+ either errors or warnings. Based on the class of message, different
+ wrappers are selected at the end to state the message source & class.
+
+ L10N_Comments : WARNING produced when filename can be read, but
+ contains an invalid color specification (need to create test case)*/
+ warning = gettext("Could not parse or alloc requested color");
break;
case XpmOpenFailed:
- error = "Cannot open file";
+ /* L10N_Comments : ERROR produced when filename does not exist
+ or insufficient permissions to open (i.e. sxpm /no/such/file ) */
+ error = gettext("Cannot open file");
break;
case XpmFileInvalid:
- error = "Invalid XPM file";
+ /* L10N_Comments : ERROR produced when filename can be read, but
+ is not an XPM file (i.e. sxpm /dev/null ) */
+ error = gettext("Invalid XPM file");
break;
case XpmNoMemory:
- error = "Not enough memory";
+ /* L10N_Comments : ERROR produced when filename can be read, but
+ is too big for memory
+ (i.e. limit datasize 32 ; sxpm /usr/dt/backdrops/Crochet.pm ) */
+ error = gettext("Not enough memory");
break;
case XpmColorFailed:
- error = "Failed to parse or alloc some color";
+ /* L10N_Comments : ERROR produced when filename can be read, but
+ contains an invalid color specification (need to create test case)*/
+ error = gettext("Failed to parse or alloc some color");
break;
}
if (warning)
- fprintf(stderr, "%s Xpm Warning: %s.\n", tag, warning);
+ /* L10N_Comments : Wrapper around above WARNING messages.
+ First %s is the tag for the operation that produced the warning.
+ Second %s is the message selected from the above set. */
+ fprintf(stderr, gettext("%s Xpm Warning: %s.\n"), tag, warning);
if (error) {
- fprintf(stderr, "%s Xpm Error: %s.\n", tag, error);
+ /* L10N_Comments : Wrapper around above ERROR messages.
+ First %s is the tag for the operation that produced the error.
+ Second %s is the message selected from the above set */
+ fprintf(stderr, gettext("%s Xpm Error: %s.\n"), tag, error);
Punt(1);
}
}
@@ -695,15 +739,16 @@
char libminor;
GetNumbers(XpmIncludeVersion, &format, &libmajor, &libminor);
- fprintf(stderr, "sxpm version: %d.%d%c\n",
+ /* L10N_Comments : sxpm -version output */
+ fprintf(stderr, gettext("sxpm version: %d.%d%c\n"),
format, libmajor, libminor);
- /*
+ /* L10N_Comments :
* if we are linked to an XPM library different from the one we've been
- * compiled with, print its own number too.
+ * compiled with, print its own number too when sxpm -version is called.
*/
if (XpmIncludeVersion != XpmLibraryVersion()) {
GetNumbers(XpmLibraryVersion(), &format, &libmajor, &libminor);
- fprintf(stderr, "using the XPM library version: %d.%d%c\n",
+ fprintf(stderr, gettext("using the XPM library version: %d.%d%c\n"),
format, libmajor, libminor);
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org