File xview-debian.patch of Package xview
diff -rNu xview-3.2p1.4.orig/Build-LinuxXView.bash xview-3.2p1.4/Build-LinuxXView.bash
--- xview-3.2p1.4.orig/Build-LinuxXView.bash 2013-08-25 12:02:12.944378393 +0200
+++ xview-3.2p1.4/Build-LinuxXView.bash 2013-08-25 12:04:11.828380137 +0200
@@ -1,14 +1,16 @@
# This script sets up the necessary environment to build XView for Linux.
# It should be sourced by bash or run with one of the arguments shown below.
# If you want to use a installation directory prefix different from /, set
-# $INSTPREFIX accordingly. Setting $OPENWINHOME to values != /usr/openwin
+# $DESTDIR accordingly. Setting $OPENWINHOME to values != /usr/openwin
# is untested at the moment!
-# This script relies on wrappers for make and imake being in the current
+# This script relies on a wrapper for imake being in the current
# directory. The imake-wrapper appends the file $IMAKEAPPEND to the created
-# Makefile if it exists. The make-wrapper simply calls pmake instead of make.
+# Makefile if it exists.
# Don't try to build XView with bash 2.0 installed as /bin/sh -- it will fail
# (due to a bug in X11R6's Imake.rules). Use bash 1.14 or 2.01 instead.
+[ $# -gt 0 ] && set -e
+
if ! [ -d lib/libxview ]; then
echo Please change to XView source tree and try again
exit 1
@@ -17,33 +19,33 @@
# Set the directories that will be used for installation
[ -z "$OPENWINHOME" ] && OPENWINHOME=/usr/openwin
[ -z "$X11DIR" ] && X11DIR=/usr/X11R6
-OWDEST=$INSTPREFIX$OPENWINHOME
-X11DEST=$INSTPREFIX$X11DIR/lib/X11/config
+OWDEST=$DESTDIR$OPENWINHOME
+X11DEST=$DESTDIR$X11DIR/lib/X11/config
# Generate file that gets appended to every Makefile created by the imake-wrapper
+# BUILDPREFIX can be used to compile with shared libraries not installed in
+# the standard locations
if [ -n "$BUILDPREFIX" ]; then
- IMAKE_EXTRA_INCLUDES="-I$BUILDPREFIX/usr/X11R6/include -I$BUILDPREFIX/usr/include"
- IMAKE_EXTRA_LOCAL_LDFLAGS="-L$BUILDPREFIX/usr/X11R6/lib -L$BUILDPREFIX/usr/lib"
+ IMAKE_EXTRA_INCLUDES="-I$BUILDPREFIX/usr/X11R6/include -I$BUILDPREFIX/usr/include -I$BUILDPREFIX/usr/include/X11"
+ IMAKE_EXTRA_LOCAL_LDFLAGS="-L$BUILDPREFIX/usr/X11R6/lib -L$BUILDPREFIX/usr/lib -L$BUILDPREFIX/lib"
fi
cat > imake.append <<EOF
# Variable-definitions appended by imake-wrapper
XVDESTDIR = $OWDEST
- EXTRA_DEFINES = -DOPENWINHOME_DEFAULT=\"$OPENWINHOME\"
+ EXTRA_DEFINES = -DOPENWINHOME_DEFAULT=\"$OPENWINHOME\" -D_GNU_SOURCE
CONFIGDIR = $X11DEST
- INCLUDES ?=
- INCLUDES := -I`pwd`/build/include -I$OWDEST/include $IMAKE_EXTRA_INCLUDES \$(INCLUDES)
- LOCAL_LDFLAGS ?=
- LOCAL_LDFLAGS := -L$OWDEST/lib $IMAKE_EXTRA_LOCAL_LDFLAGS \$(LOCAL_LDFLAGS)
+ INCLUDES := -I`pwd`/build/include $IMAKE_EXTRA_INCLUDES -I$OWDEST/include \$(INCLUDES)
+ LOCAL_LDFLAGS := -L`pwd`/lib/libolgx -L`pwd`/lib/libxview $IMAKE_EXTRA_LOCAL_LDFLAGS -L$OWDEST/lib \$(LOCAL_LDFLAGS)
+ MAKEOVERRIDES =
+ CFLAGS += \$(EXTRA_CFLAGS)
# End of variable-definitions appended by imake-wrapper
EOF
-#INCLUDES := -I`pwd`/build/include -I$OWDEST/include $IMAKE_EXTRA_INCLUDES -I/usr/X11R6/include \$(INCLUDES)
-#LOCAL_LDFLAGS := -L$OWDEST/lib $IMAKE_EXTRA_LOCAL_LDFLAGS -L/usr/X11R6/lib \$(LOCAL_LDFLAGS)
IMAKEAPPEND="`pwd`/imake.append"
-IMAKEINCLUDE="-I`pwd`/config -I$BUILDPREFIX/usr/X11R6/lib/X11/config"
+IMAKEINCLUDE="-I`pwd`/config -I$BUILDPREFIX/usr/lib/X11/config -I$BUILDPREFIX/usr/X11R6/lib/X11/config -I/usr/lib/X11/config -I/usr/X11R6/lib/X11/config"
# Make sure our wrappers are in the path
if [ -z "$XVIEW_SETUP" ]; then
@@ -57,9 +59,11 @@
PATH PS1 XVIEW_SETUP
hash -r
-# patch doesn't restore the permissions, so make sure our wrappers are
+# patch doesn't restore the permissions, so make sure our wrapper is
# executable
-chmod a+rx imake make
+chmod a+rx imake
+# our make-wrapper is obsolete
+rm -f make
if [ "x$1" = xall ]; then
set -- libs instlibs clients contrib olvwm instclients instcontrib instolvwm instfinish
@@ -68,9 +72,10 @@
while [ $# -gt 0 ]; do
case "$1" in
libs)
- cd config
- imake -DUseInstalled $IMAKEINCLUDE
- cd ..
+ (
+ cd config
+ imake -DUseInstalled $IMAKEINCLUDE
+ ) || exit $?
imake -DUseInstalled $IMAKEINCLUDE
make World
;;
@@ -82,7 +87,6 @@
clients)
make Clients
;;
-
contrib)
make Contrib
;;
@@ -92,7 +96,7 @@
imake -DUseInstalled $IMAKEINCLUDE
make depend
make
- )
+ ) || exit $?
;;
instclients)
make SUBDIRS=clients install install.man install.srcs
@@ -102,8 +106,9 @@
;;
instolvwm)
(
- cd clients/olvwm-4.1 && make install install.man
- )
+ cd clients/olvwm-4.1
+ make install install.man
+ ) || exit $?
;;
instfinish)
[ -e $OWDEST/lib/openwin-menu-std ] || mv $OWDEST/lib/openwin-menu $OWDEST/lib/openwin-menu-std
@@ -118,12 +123,12 @@
chmod -R a+rX,u+w,go-w $OWDEST $X11DEST/XView.*
chmod a+x $OWDEST/share/src/xview/examples/bin/*
chown -R root.root $OWDEST $X11DEST/XView.*
- [ -z "$INSTPREFIX" ] || chown -R root.root $INSTPREFIX/usr
+ [ -z "$DESTDIR" ] || chown -R root.root $DESTDIR/usr
;;
tar)
DIRNAME="`pwd`"
DIRNAME="${DIRNAME##*/}"
- ( cd $INSTPREFIX && tar cv ${OPENWINHOME##/} ${X11DIR##/}/lib/X11/config/XView.*) | \
+ ( cd $DESTDIR/ && tar cv ${OPENWINHOME##/} ${X11DIR##/}/lib/X11/config/XView.* ) | \
gzip -9 > ../$DIRNAME.bin.tar.gz
;;
srctar)
@@ -134,13 +139,13 @@
cd ..
chmod -R a+rX,u+w,go-w "$DIRNAME"
tar cv "$DIRNAME" | gzip -9 > $DIRNAME.src.tar.gz
- )
+ ) || exit $?
;;
clean)
rm -f imake.append
[ -e clients/olvwm-4.1/Makefile ] && (cd clients/olvwm-4.1 && make clean)
[ -e Makefile ] && make Clean
- find -name Makefile -o -name "*~" -o -name "*.so.*" -o -name "*.so" | xargs -r rm
+ find -name Makefile -o -name "*~" -o -name core | xargs -r rm
;;
diff)
rm -f imake.append
@@ -149,7 +154,7 @@
(
cd ..
diff --context --recursive --new-file xview3.2p1-X11R6 $DIRNAME | gzip -9 > $DIRNAME.diff.gz
- )
+ ) || exit $?
;;
esac
shift
diff -rNu xview-3.2p1.4.orig/Imakefile xview-3.2p1.4/Imakefile
--- xview-3.2p1.4.orig/Imakefile 2013-08-25 12:02:12.940378393 +0200
+++ xview-3.2p1.4/Imakefile 2013-08-25 12:04:11.832380137 +0200
@@ -1,8 +1,14 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# Top level Imakefile for ProductNameAndRelease
-/**/# @(#)Imakefile 1.7 1/7/92 SMI
+XCOMM # Imake.tmpl seems to think it's a good idea to #define clean to cleandir.
+XCOMM # We surely don't, so let's get rid of that nonsense. Fixes Debian Bug
+XCOMM # #123901. <mbuck@debian.org>
+#undef clean
+cleandir::
+
+XCOMM #########################################################################
+XCOMM # Top level Imakefile for ProductNameAndRelease
+XCOMM # @(#)Imakefile 1.7 1/7/92 SMI
CC = cc
CFLAGS = -O
@@ -11,8 +17,8 @@
#define PassCDebugFlags
WORLDOPTS =
-/**/# If you want to make only the library, then start the build in the lib
-/**/# subdirectory. Be sure to do a 'make includes' in images and bitmaps first.
+XCOMM # If you want to make only the library, then start the build in the lib
+XCOMM # subdirectory. Be sure to do a 'make includes' in images and bitmaps first.
COREDIRS = lib images bitmaps misc util config
#if InstallOpenLookFonts
FONTSDIR = fonts
@@ -21,13 +27,13 @@
#endif
CLIENTSDIR = clients
SUBDIRS = $(COREDIRS) $(FONTSDIR)
-/**/# even if these SUBDIRS are not included in the general rules, be sure to
-/**/# do a make clean in them.
- CLEAN_SUBDIRS = clients contrib doc fonts bitmaps images lib misc util
-
-/**/#
-/**/# Be sure to run "make includes" before "make depend" or "make"
-/**/#
+XCOMM # even if these SUBDIRS are not included in the general rules, be sure to
+XCOMM # do a make clean in them.
+ CLEAN_SUBDIRS = clients contrib doc fonts bitmaps images lib misc util config
+
+XCOMM #
+XCOMM # Be sure to run "make includes" before "make depend" or "make"
+XCOMM #
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
PopulateSubdirs($(SUBDIRS))
@@ -36,8 +42,8 @@
InstallSrcsSubdirs($(SUBDIRS))
#ifdef XVDestDir
-/**/# remove all the symlinks before installing the real files if using the
-/**/# same directory for the includes as for the final install.
+XCOMM # remove all the symlinks before installing the real files if using the
+XCOMM # same directory for the includes as for the final install.
install::
-@if [ $(BUILDINCDIR) = $(XVDESTDIR) ]; then \
echo "deleting temporary build directory $(BUILDINCDIR) ..."; \
@@ -84,9 +90,9 @@
#endif
@echo ""
-/**/#
-/**/# Rules to build the client programs
-/**/#
+XCOMM #
+XCOMM # Rules to build the client programs
+XCOMM #
Clients::
@echo ""
@echo "Begin build of XView client programs..."
@@ -126,9 +132,9 @@
@echo ""
#endif
-/**/#
-/**/# Rules to build contrib
-/**/#
+XCOMM #
+XCOMM # Rules to build contrib
+XCOMM #
Contrib::
@echo ""
@echo "Begin build of XView contrib programs..."
@@ -145,12 +151,12 @@
@date
@echo ""
@echo "Build of XView contrib complete. Next step, make SUBDIRS='contrib' install."
- @echo "Examples will be installed into $(XVDESTDIR)/
+ @echo "Examples will be installed into $(XVDESTDIR)/share/src/xview"
@echo ""
-/**/#
-/**/# Rule to clean all SUBDIRS
-/**/#
+XCOMM #
+XCOMM # Rule to clean all SUBDIRS
+XCOMM #
Clean::
@echo ""
@echo "Cleaning for all SUBDIRS..."
diff -rNu xview-3.2p1.4.orig/bitmaps/Imakefile xview-3.2p1.4/bitmaps/Imakefile
--- xview-3.2p1.4.orig/bitmaps/Imakefile 2013-08-25 12:02:12.940378393 +0200
+++ xview-3.2p1.4/bitmaps/Imakefile 2013-08-25 12:04:12.580380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/########################################################################
-/**/# @(#)Imakefile 1.6 28 Jun 1993 SMI
-/**/# Imakefile for images directory. XView release 2.0.
+XCOMM ########################################################################
+XCOMM # @(#)Imakefile 1.6 28 Jun 1993 SMI
+XCOMM # Imakefile for images directory. XView release 2.0.
CORE_BITMAPS = \
@@ -34,10 +34,17 @@
ALLFILES = $(BITMAPS)
-all: $(SRCS)
+all:: $(SRCS)
BuildIncludes($(INCLUDES_SRCS),$(BITMAP_INCDIR),/**/)
+XCOMM Some of our examples are looking for X11/bitmaps/..., so create a link
+XCOMM to make sure they find their bitmaps before we've been installed.
+XCOMM mbuck@debian.org
+includes::
+ rm -f $(BUILDINCDIR)/$(INCDIR)/X11
+ ln -s . $(BUILDINCDIR)/$(INCDIR)/X11
+
install:: $(SRCS)
$(MKDIRHIER) $(DESTDIR)$(HEADER_DEST)/$(BITMAPINC)
diff -rNu xview-3.2p1.4.orig/clients/Imakefile xview-3.2p1.4/clients/Imakefile
--- xview-3.2p1.4.orig/clients/Imakefile 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/Imakefile 2013-08-25 12:04:11.996380139 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.6 28 Apr 1993 SMI
-/**/# Imakefile for contrib directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.6 28 Apr 1993 SMI
+XCOMM # Imakefile for contrib directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/clients/clock/Imakefile xview-3.2p1.4/clients/clock/Imakefile
--- xview-3.2p1.4.orig/clients/clock/Imakefile 2013-08-25 12:02:12.740378390 +0200
+++ xview-3.2p1.4/clients/clock/Imakefile 2013-08-25 12:04:12.260380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.11 28 Jun 1993 SMI
-/**/# Imakefile for clock
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.11 28 Jun 1993 SMI
+XCOMM # Imakefile for clock
#define HasInfoFiles YES
diff -rNu xview-3.2p1.4.orig/clients/clock/clock.c xview-3.2p1.4/clients/clock/clock.c
--- xview-3.2p1.4.orig/clients/clock/clock.c 2013-08-25 12:02:12.740378390 +0200
+++ xview-3.2p1.4/clients/clock/clock.c 2013-08-25 12:04:12.264380143 +0200
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <pwd.h>
#include <math.h>
+#include <time.h>
#include <xview/xview.h>
#include <xview/panel.h>
#include <xview/canvas.h>
@@ -146,6 +147,10 @@
static Notify_value analog_timer_expired();
static Notify_value icon_timer_expired();
static Notify_value dig_timer_expired();
+static int min (int a, int b);
+static int seconds_on();
+static int date_on();
+static int armwidth();
typedef enum {digital, analog} Face;
@@ -866,7 +871,12 @@
paint_date (c)
Clock c;
{
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int now;
+#else
+ time_t now;
+#endif
struct tm *tm;
char buf[25];
Frame f;
@@ -910,7 +920,13 @@
paint_second_hand (c)
Clock c;
{
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int x, y, diameter, radius, now, fromrim, angle, height, width;
+#else
+ int x, y, diameter, radius, fromrim, angle, height, width;
+ time_t now;
+#endif
struct tm *tm;
ClockDisplay d;
Pixwin *pw;
@@ -954,7 +970,12 @@
static Notify_value
timer_expired (me, which)
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
Notify_value me;
+#else
+ Frame me;
+#endif
int which;
{
int closed;
@@ -993,7 +1014,13 @@
Pixwin * pw;
Rectlist *area;
{
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int w, h, x, y, prw, prh, now;
+#else
+ int w, h, x, y, prw, prh;
+ time_t now;
+#endif
struct tm *tm;
Clock c;
@@ -1048,7 +1075,13 @@
icon_timer_expired (me, which)
{
static int mins, hours;
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int now, w, h;
+#else
+ int w, h;
+ time_t now;
+#endif
struct tm *tm;
Font_string_dims size;
Clock c;
@@ -1077,11 +1110,22 @@
static Notify_value
analog_timer_expired (me, which)
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
Notify_value me;
+#else
+ Frame me;
+#endif
int which;
{
static int mins, hours;
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int now, x, y, w, h, prw, prh;
+#else
+ int x, y, w, h, prw, prh;
+ time_t now;
+#endif
struct tm *tm;
Clock c;
@@ -1154,7 +1198,13 @@
Pixwin * pw;
Rectlist *area;
{
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int i, now, y_coord, fontHeight, fontWidth;
+#else
+ int i, y_coord, fontHeight, fontWidth;
+ time_t now;
+#endif
struct tm *tm;
Clock c;
ClockDisplay d;
@@ -1207,11 +1257,21 @@
static Notify_value
dig_timer_expired (me, which, invalidate)
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
Notify_value me;
+#else
+ Frame me;
+#endif
int which, invalidate;
{
static int mins, hours;
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int now;
+#else
+ time_t now;
+#endif
struct tm *tm;
Clock c;
@@ -1526,7 +1586,7 @@
window_fit (o-> frame);
#ifndef NO_LIB_DESKSET
ds_position_popup(c->frame, o->frame, DS_POPUP_LOR);
-#endif NO_LIB_DESKSET
+#endif /* NO_LIB_DESKSET */
}
static void
@@ -1662,7 +1722,12 @@
init_clck (argc, argv)
int argc; char **argv;
{
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
int now;
+#else
+ time_t now;
+#endif
struct tm *tm;
Menu_item tmp_item;
char **argscanner = argv;
diff -rNu xview-3.2p1.4.orig/clients/cmdtool/Imakefile xview-3.2p1.4/clients/cmdtool/Imakefile
--- xview-3.2p1.4.orig/clients/cmdtool/Imakefile 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/cmdtool/Imakefile 2013-08-25 12:04:12.260380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.16 28 Jun 1993 SMI
-/**/# Imakefile for cmdtool and shelltool.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.16 28 Jun 1993 SMI
+XCOMM # Imakefile for cmdtool and shelltool.
DEFINES = -DSTANDALONE $(XVCLIENTDEFINES)
INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XVCLIENTINCLUDES)
diff -rNu xview-3.2p1.4.orig/clients/cmdtool/cmdtool.c xview-3.2p1.4/clients/cmdtool/cmdtool.c
--- xview-3.2p1.4.orig/clients/cmdtool/cmdtool.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/cmdtool/cmdtool.c 2013-08-25 12:04:12.260380143 +0200
@@ -18,7 +18,7 @@
#include <strings.h>
#else
#include <string.h>
-#endif SVR4
+#endif /* SVR4 */
#include <sys/types.h>
#include <xview/attr.h>
@@ -353,7 +353,7 @@
tty_pid = (int)xv_get(ttysw, TTY_PID);
#ifdef DEBUG
(void)fprintf(stderr, "child pid = %d\n", tty_pid);
-#endif DEBUG
+#endif /* DEBUG */
if (tty_pid == -1) {
strcpy(err_msg, (am_cmdtool) ? MSG("Command") : MSG("Shell"));
strcat(err_msg, MSG(" Tool: Out of swap space. Cannot continue.\n"));
diff -rNu xview-3.2p1.4.orig/clients/cmdtool/cmdtool.man xview-3.2p1.4/clients/cmdtool/cmdtool.man
--- xview-3.2p1.4.orig/clients/cmdtool/cmdtool.man 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/cmdtool/cmdtool.man 2013-08-25 12:04:12.260380143 +0200
@@ -361,7 +361,7 @@
option from the restricted menu restores the full menu
and functionality of
.B cmdtool.
-.R.RE
+\".R.RE
.SS User Defined Keyboard Remapping
The file
.B ~/.textswrc
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/CHANGES xview-3.2p1.4/clients/olvwm-4.1/CHANGES
--- xview-3.2p1.4.orig/clients/olvwm-4.1/CHANGES 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/CHANGES 2013-08-25 12:04:12.064380140 +0200
@@ -1,3 +1,38 @@
+Version 4.4 fixes:
+ 1) Fixed a colormap problem with VDM background gifs on 24-bit
+ framebuffers
+
+ 2) Fixed a core dump when pressing on the menu separator in a pinned
+ root menu
+
+ 3) Fixed a problem with the warp key
+
+ 4) Changed the default behavior of TransientSaveUnder to False -- this
+ gives better performance, and works around a common bug in X
+ servers
+
+Version 4.3 fixes:
+ 1) Updated for better support on 24-bit framebuffers, especially with
+ TrueColor visuals
+
+Version 4.2 fixes:
+ 1) Fixed problems with windows that have a compound text title
+
+ 2) Fixed problems with the cursor font name
+
+ 3) error.c will now compile under Solaris 2.6
+
+ 4) Fixed misc. compilation warnings. Some survive in error.c and states.c
+
+ 5) Fixed warp function when two screens have the same program: warp will
+ now look first on the screen containing the mouse pointer
+
+ 6) Fixed hot key functions when num lock/shift lock might be pressed
+
+ 7) Fixed problem with AutoRootMenu startup
+
+ 8) Fixed problem with VirtualIconic resource
+
Version 4.1 fixes:
1) Fixed compilation problems with /usr/ucb/cc on SunOS 4.1.3
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/Imakefile xview-3.2p1.4/clients/olvwm-4.1/Imakefile
--- xview-3.2p1.4.orig/clients/olvwm-4.1/Imakefile 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/Imakefile 2013-08-25 12:04:12.060380140 +0200
@@ -1,79 +1,89 @@
-/**/# If you want to install the help files for olvwm, set HasInfoFiles to YES
+XCOMM # If you want to install the help files for olvwm, set HasInfoFiles to YES
#define HasInfoFiles YES
-/**/# If you haven't installed olwm from xview3 or from Sun's OpenWindows,
-/**/# and you want to install the olwm man page (which discusses most of the
-/**/# window operations), defind NeedOlwmManPage to YES
-#define NeedOlwmManPage NO
-
-/**/#
-/**/# Set MORECCFLAGS to any options you want to pass to the compiler. These
-/**/# include and defines, and debugging and/or optimization flags, and the like.
-/**/# Also, if you have headers for things like the XPM library in a non-standard
-/**/# place, include the appropriate -I flag here.
-/**/#
-/**/# There are a bunch of defines, and I can't honestly say I've used or even
-/**/# tested all of them (since much of this code came from the xview 3.2 release)
-/**/# and certainly I haven't used all combinations of them. See below for
-/**/# suggested settings:
-/**/#
-/**/# Here's a set of possible defines:
-/**/# -DALLPLANES Support the AllPlanes extension (valid in SunOs/Solaris)
-/**/# -DDEBUG Include some debugging code
-/**/# -DIDENT Include ident directives for the compiler
-/**/# -DMAXPID=32768 For 386BSD
-/**/# -DMEMDEBUG To debug the memory allocation
-/**/# -DOW_I18N_L3 Include support for Level 3 internationalization
-/**/# (Note: I haven't tested without this, and I can't
-/**/# test it in any locale but C, so include it, but
-/**/# take it with a grain of salt -- the original olwm
-/**/# code will work, but the olvwm extensions may not
-/**/# support the correctinternationalization)
-/**/# -DOW_I18N_L4 Include support for Level 4 internationalization
-/**/# (Note: This is not yet supported, but it may work)
-/**/# -DREGEXP Support for the 386 BSD regular expression library
-
-/**/# -DRLIMIT_NOFILE Support for the 386BSD/Ultrix RLIMIT calls
-/**/# -DSHAPE Support the shapes extension (valid in SunOS/Solaris)
-/**/# -DSYSV Support for System V (Release 3 or 4)
-/**/# -DSVR4 Support for System V Release 4 (you must also include
-/**/# -DSYSV)
-/**/# -DXPM Support the XPM color pixmaps -- requires that you
-/**/# have the xpm library (version 3.0) somewhere
-/**/# If your xpm header isn't in /usr/openwin/include
-/**/# make sure to add the appropriate -I flag to # MORECCFLAGS. Also remember to add the
-/**/# library name to LDFLAGS.
-/**/#
-/**/# I haven't tested this on Solaris 1.x, but I'd suggest
-/**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT
-
-/**/# For a generic Solaris 2.x system, I'd suggest
-/**/#MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4
-
-/**/# Linux/ELF
-MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DXPM -DXVIEW32 -DMAXPID=32768 -I/usr/include/bsd -include /usr/include/bsd/bsd.h -I$(INCROOT)/X11
-
-/**/#
-/**/# Set MORELDFLAGS to any link options you want. Be sure to add -lxpm if you
-/**/# want to include XPM support. For a generic Solaris 1.x
-/**/# system, I'd suggest
-/**/#MORELDFLAGS=-L${OPENWINHOME}/lib
-/**/#
-/**/# For Solaris 2.x, I'd suggest
-/**/#MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl
-/**/#SYS_LIBRARIES = -ll -lm
-
-/**/# Linux/ELF
-MORELDFLAGS=-lbsd -lXpm
-SYS_LIBRARIES = -lfl -lm
+XCOMM # If you haven't installed olwm from xview3 or from Sun's OpenWindows,
+XCOMM # and you want to install the olwm man page (which discusses most of the
+XCOMM # window operations), defind NeedOlwmManPage to YES
+#define NeedOlwmManPage YES
+
+XCOMM #
+XCOMM # Set MORECCFLAGS to any options you want to pass to the compiler. These
+XCOMM # include and defines, and debugging and/or optimization flags, and the like.
+XCOMM # Also, if you have headers for things like the XPM library in a non-standard
+XCOMM # place, include the appropriate -I flag here.
+XCOMM #
+XCOMM # There are a bunch of defines, and I can't honestly say I've used or even
+XCOMM # tested all of them (since much of this code came from the xview 3.2 release)
+XCOMM # and certainly I haven't used all combinations of them. See below for
+XCOMM # suggested settings:
+XCOMM #
+XCOMM # Here's a set of possible defines:
+XCOMM # -DALLPLANES Support the AllPlanes extension (valid in SunOs/Solaris)
+XCOMM # -DDEBUG Include some debugging code
+XCOMM # -DIDENT Include ident directives for the compiler
+XCOMM # -DMAXPID=32768 For 386BSD
+XCOMM # -DMEMDEBUG To debug the memory allocation
+XCOMM # -DOW_I18N_L3 Include support for Level 3 internationalization
+XCOMM # (Note: I haven't tested without this, and I can't
+XCOMM # test it in any locale but C, so include it, but
+XCOMM # take it with a grain of salt -- the original olwm
+XCOMM # code will work, but the olvwm extensions may not
+XCOMM # support the correctinternationalization)
+XCOMM # -DOW_I18N_L4 Include support for Level 4 internationalization
+XCOMM # (Note: This is not yet supported, but it may work)
+XCOMM # -DREGEXP Support for the 386 BSD regular expression library
+
+XCOMM # -DRLIMIT_NOFILE Support for the 386BSD/Ultrix RLIMIT calls
+XCOMM # -DSHAPE Support the shapes extension (valid in SunOS/Solaris)
+XCOMM # -DSYSV Support for System V (Release 3 or 4)
+XCOMM # -DSVR4 Support for System V Release 4 (you must also include
+XCOMM # -DSYSV)
+XCOMM # -DXPM Support the XPM color pixmaps -- requires that you
+XCOMM # have the xpm library (version 3.0) somewhere
+XCOMM # If your xpm header isn't in /usr/openwin/include
+XCOMM # make sure to add the appropriate -I flag to # MORECCFLAGS. Also remember to add the
+XCOMM # library name to LDFLAGS.
+XCOMM #
+XCOMM # I haven't tested this on Solaris 1.x, but I'd suggest
+XCOMM #MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DIDENT
+
+XCOMM # For a generic Solaris 2.x system, I'd suggest
+XCOMM #MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DSVR4 -DSYSV -DIDENT -x O4
+
+XCOMM # Linux/ELF
+XCOMM # libc 5
+XCOMM #MORECCFLAGS=-DOW_I18N_L3 -DSHAPE -DXPM -DXVIEW32 -DMAXPID=32768 -I/usr/include/bsd -include /usr/include/bsd/bsd.h -I$(INCROOT)/X11
+XCOMM # GNU libc2
+MORECCFLAGS=-DOW_I18N_L3 -DIDENT -DXPM -DSHAPE -DXVIEW32 -DMAXPID=32768 -I$(INCROOT)/X11
+
+XCOMM #
+XCOMM # Set MORELDFLAGS to any link options you want. Be sure to add -lxpm if you
+XCOMM # want to include XPM support. For a generic Solaris 1.x
+XCOMM # system, I'd suggest
+XCOMM #MORELDFLAGS=-L${OPENWINHOME}/lib
+XCOMM #
+XCOMM # For Solaris 2.x, I'd suggest
+XCOMM #MORELDFLAGS=-L${OPENWINHOME}/lib -R ${OPENWINHOME}/lib -lintl
+XCOMM #SYS_LIBRARIES = -ll -lm
+
+XCOMM # Linux/ELF
+XCOMM # libc 5
+XCOMM #MORELDFLAGS=-lbsd -lXpm
+XCOMM #SYS_LIBRARIES = -lfl -lm
+XCOMM # GNU libc2
+MORELDFLAGS=-lXpm
+SYS_LIBRARIES = -lfl #-lm
-/**/# No more changes needed
+XCOMM # No more changes needed
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.5 10/4/91 SMI
-/**/# Imakefile for olwm release 3.0.
+XCOMM # Link libolgx static
+OLGXLIB = -Wl,-Bstatic -lolgx -Wl,-Bdynamic
+
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.5 10/4/91 SMI
+XCOMM # Imakefile for olwm release 3.0.
DEFINES = $(MORECCFLAGS)
INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XPMINCDIR)
@@ -121,24 +131,21 @@
${HEADERS} ${BITMAPS} ${SRCS} \
${MISC} ${INFOFILES} ${MANPAGES} ${SCRIPTS}
-ComplexProgramTarget(olvwm)
-
-#if NeedMenuFile
-InstallNonExecList($(MISC),$(LIBRARY_DEST))
-#endif
-
-parse.c: parse.l
- lex -t parse.l > parse.c
+LexFile(parse)
-olvwmrc.c: olvwmrc.y
- yacc olvwmrc.y
- mv y.tab.c olvwmrc.c
+YaccFileNoFlags(olvwmrc)
olvwmrc.o: parse.c olvwmrc.c
version.c: ${SRCS} ${HEADERS}
@echo '#ident "@(#)olvwm version compiled '`date`'"' > version.c
+ComplexProgramTarget(olvwm)
+
+#if NeedMenuFile
+InstallNonExecList($(MISC),$(LIBRARY_DEST))
+#endif
+
clean::
/bin/rm -f parse.c olvwmrc.c version.c
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/atom.c xview-3.2p1.4/clients/olvwm-4.1/atom.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/atom.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/atom.c 2013-08-25 12:04:12.036380140 +0200
@@ -73,11 +73,11 @@
Atom AtomDecorIconName;
Atom AtomSunReReadMenuFile;
#ifdef OW_I18N_L4
-Atom AtomCompoundText;
Atom AtomDecorIMStatus;
Atom AtomLeftIMStatus;
Atom AtomRightIMStatus;
#endif
+Atom AtomCompoundText;
/***************************************************************************
* Global functions
@@ -153,9 +153,7 @@
AtomTargets = XInternAtom(dpy,"TARGETS",False);
AtomTimestamp = XInternAtom(dpy,"TIMESTAMP",False);
AtomUser = XInternAtom(dpy,"USER",False);
-#ifdef OW_I18N_L4
AtomCompoundText = XInternAtom(dpy, "COMPOUND_TEXT" , False);
-#endif
/* SunView environment */
AtomSunViewEnv = XInternAtom(dpy,"_SUN_SUNVIEW_ENV",False);
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/cursors.c xview-3.2p1.4/clients/olvwm-4.1/cursors.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/cursors.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/cursors.c 2013-08-25 12:04:12.056380140 +0200
@@ -21,7 +21,7 @@
#include "st.h"
#ifdef IDENT
-#ident "@(#)cursors.c 1.4 olvwm version 07 Jan 1994"
+#ident "@(#)cursors.c 1.5 olvwm version 01/13/98"
#endif
static st_table *cursorTable;
@@ -278,7 +278,18 @@
if (our_copy[0] == 'X')
font_file = "cursor";
else if (our_copy[0] == 'O')
- font_file = "olcursor";
+#if 0
+ font_file = "-sun-open look cursor-----12-120-75-75-p-455-sunolcursor-1";
+#else
+ /* The width of 455 of the font name above seems to be
+ * bogus, causing horizontally stretched cursors. Older
+ * versions of olvwm used "olcursor" as the font name which
+ * on my system is an alias that uses a width of 160, so let's
+ * use that instead.
+ * <mbuck@debian.org>
+ */
+ font_file = "-sun-open look cursor-----12-120-75-75-p-160-sunolcursor-1";
+#endif
createCursor(dpy, cmap, pointer, cursor_id, font_file, end, ptr);
}
else {
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/defaults.c xview-3.2p1.4/clients/olvwm-4.1/defaults.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/defaults.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/defaults.c 2013-08-25 12:04:12.060380140 +0200
@@ -90,7 +90,7 @@
#ifdef SVR4
if (sysinfo(SI_HOSTNAME, hostname, sizeof(hostname)) != -1) {
#else
-#ifdef __linux
+#ifdef __linux__
if (0 == gethostname(hostname, sizeof(hostname))) {
#else
if (0 == gethostname(hostname, sizeof(hostname), &namelen)) {
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/environ.c xview-3.2p1.4/clients/olvwm-4.1/environ.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/environ.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/environ.c 2013-08-25 12:04:20.364380262 +0200
@@ -130,7 +130,7 @@
len = colon - display;
}
- (void)sprintf(value,"%.*s.%d",len,display,screen);
+ (void)sprintf(value,"%*s.%d",len,display,screen);
putEnv(env,"DISPLAY",value);
}
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/evbind.c xview-3.2p1.4/clients/olvwm-4.1/evbind.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/evbind.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/evbind.c 2013-08-25 12:04:12.040380140 +0200
@@ -5,7 +5,7 @@
*/
#ifdef IDENT
-#ident "@(#)evbind.c 1.6 olvwm version 09 Feb 1994"
+#ident "@(#)evbind.c 1.7 olvwm version 01/13/98"
#endif
/*
@@ -139,7 +139,7 @@
*/
typedef struct {
- int state;
+ unsigned int state;
int button;
SemanticAction action;
} MouseBinding;
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/gettext.c xview-3.2p1.4/clients/olvwm-4.1/gettext.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/gettext.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/gettext.c 2013-08-25 12:04:12.044380140 +0200
@@ -17,12 +17,16 @@
#define bzero(a,b) memset(a,0,b)
#endif
+#if !defined(__linux__) || !defined(__GLIBC__)
char *malloc(), *strdup();
+#endif
char * dgettext();
char *_gettext();
char *in_path();
char *fgets(), *getenv();
+#if !defined(__linux__) || !defined(__GLIBC__)
caddr_t mmap(), calloc();
+#endif
#ifdef NOT
static struct domain_binding *firstbind=0, *lastbind=0;
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/gif.c xview-3.2p1.4/clients/olvwm-4.1/gif.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/gif.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/gif.c 2013-08-25 12:04:12.064380140 +0200
@@ -56,7 +56,10 @@
int disposal;
} Gif89 = { -1, -1, -1, 0 };
-extern XImage* ReadImage();
+static XImage* ReadImage();
+static int ReadColorMap(FILE *fd, int number, XColor *buffer);
+static int DoExtension(FILE *fd, int label);
+static int GetDataBlock(FILE *fd, unsigned char *buf);
XImage *ReadGIF(dpy, fd, pNcolors, pColors)
Display *dpy;
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/i18n.c xview-3.2p1.4/clients/olvwm-4.1/i18n.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/i18n.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/i18n.c 2013-08-25 12:04:12.064380140 +0200
@@ -209,6 +209,6 @@
s++;
}
}
-#endif DEBUG
+#endif /* DEBUG */
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/images.c xview-3.2p1.4/clients/olvwm-4.1/images.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/images.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/images.c 2013-08-25 12:04:12.036380140 +0200
@@ -465,7 +465,7 @@
0x01, 0x00, 0xaa, 0x00,
};
-#else SMALL_IMAGES
+#else /* SMALL_IMAGES */
#define Back_width 32
#define Back_height 32
@@ -658,7 +658,7 @@
0x98, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-#endif SMALL_IMAGES
+#endif /* SMALL_IMAGES */
/*
* Images for Virtual Window Menu
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/mem.h xview-3.2p1.4/clients/olvwm-4.1/mem.h
--- xview-3.2p1.4.orig/clients/olvwm-4.1/mem.h 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/mem.h 2013-08-25 12:04:12.044380140 +0200
@@ -39,7 +39,7 @@
#else
#define MemNew(t) ((t *)MemAlloc((unsigned int)sizeof(t)))
#define MemNewString(s) (strcpy((char *)MemAlloc(strlen(s)+1),s))
-#endif MEMDEBUG
+#endif /* MEMDEBUG */
#ifdef OW_I18N_L4
@@ -49,6 +49,6 @@
#define MemNewText(s) MemNewString((char *)s)
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
-#endif _OLWM_MEM_H
+#endif /* _OLWM_MEM_H */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/menu.c xview-3.2p1.4/clients/olvwm-4.1/menu.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/menu.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/menu.c 2013-08-25 12:04:12.040380140 +0200
@@ -5,7 +5,7 @@
*/
#ifdef IDENT
-#ident "@(#)menu.c 1.6 olvwm version 07 Jan 1994"
+#ident "@(#)menu.c 1.8 olvwm version 03/02/00"
#endif
/*
@@ -1282,7 +1282,7 @@
offset = BUTT_IMGVSPACE;
menuInfo->hasImages = True;
break;
-#endif OLGX_LABEL_IS_COMB
+#endif /* OLGX_LABEL_IS_COMB */
}
menu->maxLabWidth = MAX(menu->maxLabWidth, labelWidth);
menu->maxLabHeight = MAX(menu->maxLabHeight, labelHeight);
@@ -1433,7 +1433,7 @@
case ImageLabel:
#ifdef OLGX_LABEL_IS_COMB
case ComboLabel:
-#endif OLGX_LABEL_IS_COMB
+#endif /* OLGX_LABEL_IS_COMB */
tempheight += pb->label[pb->which].pixlabel->height +
BUTT_IMGVSPACE * 2;
break;
@@ -3159,7 +3159,11 @@
else if (pb->label[pb->which].kind == ComboLabel) {
label = &combLabel;
combLabel.pixlabel = *(pb->label[pb->which].pixlabel);
+#ifdef OW_I18N_L4
+ combLabel.strlabel = GetText(pb->label[pb->which].string);
+#else
combLabel.strlabel = pb->label[pb->which].string;
+#endif
state |= OLGX_LABEL_IS_COMB;
}
#endif
@@ -3167,6 +3171,7 @@
label = pb->label[pb->which].pixlabel;
state |= OLGX_LABEL_IS_PIXMAP;
}
+ else return; /* kind == NoKind, e.g. a separator */
#if defined(SVR4) || defined(XVIEW32)
if (menuInfo->hasAccelerators) {
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/moveresize.c xview-3.2p1.4/clients/olvwm-4.1/moveresize.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/moveresize.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/moveresize.c 2013-08-25 12:04:12.056380140 +0200
@@ -5,7 +5,7 @@
*/
#ifdef IDENT
-#ident "@(#)moveresize.c 1.7 olvwm version 09 Feb 1994"
+#ident "@(#)moveresize.c 1.8 olvwm version 01/13/98"
#endif
/*
@@ -1067,6 +1067,7 @@
XUngrabPointer(mstuff->dpy, CurrentTime);
XUngrabKeyboard(mstuff->dpy, CurrentTime);
+ XFlush(mstuff->dpy);
/*
* If we moved the outline (not the whole window) cause the window to be
* raised at the same time it is moved. Raise just the frame the user
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/ol_button.413.c xview-3.2p1.4/clients/olvwm-4.1/ol_button.413.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/ol_button.413.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/ol_button.413.c 2013-08-25 12:04:12.060380140 +0200
@@ -723,7 +723,7 @@
else
XwcDrawString(info->dpy, win, info->textfontset,
info->gc_rec[OLGX_TEXTGC]->gc, x, y, string, len);
-#else OW_I18N
+#else /* OW_I18N */
XDrawString(info->dpy, win, info->gc_rec[OLGX_TEXTGC_REV]->gc, x, y,
string, len);
else
@@ -975,4 +975,4 @@
TextScrollButton_Width(info) - 2,
NumScrollButton_Height(info));
}
-#endif SVR4
+#endif /* SVR4 */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/ol_button.svr4.c xview-3.2p1.4/clients/olvwm-4.1/ol_button.svr4.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/ol_button.svr4.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/ol_button.svr4.c 2013-08-25 12:04:12.036380140 +0200
@@ -1793,4 +1793,4 @@
}
}
-#endif SVR4
+#endif /* SVR4 */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/olgx_impl.h xview-3.2p1.4/clients/olvwm-4.1/olgx_impl.h
--- xview-3.2p1.4.orig/clients/olvwm-4.1/olgx_impl.h 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/olgx_impl.h 2013-08-25 12:04:12.052380140 +0200
@@ -114,7 +114,7 @@
void xcolor_to_hsv();
void olgx_hsv_to_3D();
-#endif !OL_PRIVATE_DEFINED
+#endif /* !OL_PRIVATE_DEFINED */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/olvwmrc.y xview-3.2p1.4/clients/olvwm-4.1/olvwmrc.y
--- xview-3.2p1.4.orig/clients/olvwm-4.1/olvwmrc.y 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/olvwmrc.y 2013-08-25 12:04:12.052380140 +0200
@@ -5,7 +5,7 @@
%{
#ifdef IDENT
-#ident "@(#)olvwmrc.y 1.6 olvwm version 07 Jan 1994"
+#ident "@(#)olvwmrc.y 1.8 olvwm version 03/02/00"
#endif
#include <sys/types.h>
@@ -37,7 +37,7 @@
char *LookupToken();
char *FindOlvwmRC();
void resetKeys();
-char *strexpand();
+static char *strexpand();
typedef struct progscreen {
char *target;
@@ -81,6 +81,7 @@
List *WinMenuActionsList = NULL;
static Display *dpy;
+static unsigned int NumLockMask;
%}
@@ -155,6 +156,7 @@
| file WinMenuProg
| file Assignment
| error CLOSEBRACE
+;
Assignment : WORD EQUALS String
{
@@ -173,6 +175,7 @@
VariableList = ListCons(v, VariableList);
}
}
+;
KeyProg : KeySpec OPENBRACE Actions CLOSEBRACE
{
@@ -191,6 +194,7 @@
AddKeyBinding(p->keycode, p->modmask, d);
ProgKeyList = ListCons($1, ProgKeyList);
}
+;
ScreenProg : ScreenStart List CLOSEBRACE
{
@@ -201,6 +205,7 @@
p->target = $2;
ProgScreenList = ListCons(p, ProgScreenList);
}
+;
WinMenuProg : WINMENU OPENBRACE WinMenuActions CLOSEBRACE
{
@@ -212,6 +217,7 @@
}
WinMenuActionsList = $3;
}
+;
WinMenuActions : /* empty */
{ $$ = NULL; }
@@ -224,6 +230,7 @@
p->actions = $4;
$$ = ListCons(p, $1);
}
+;
Actions : /* empty */
{ $$ = NULL; }
@@ -257,6 +264,7 @@
{ $$ = ListCons($2, $1); }
| Actions IfElseAction
{ $$ = ListCons($2, $1); }
+;
WarpAction : WARP COLON String
{
@@ -267,6 +275,7 @@
p->parameter = strdup($3);
$$ = p;
}
+;
CloseAction: CLOSE COLON List
{
@@ -277,6 +286,7 @@
p->parameter = $3;
$$ = p;
}
+;
QuitAction: QUIT COLON List
{
@@ -287,6 +297,7 @@
p->parameter = $3;
$$ = p;
}
+;
OpenAction: OPEN COLON List
{
@@ -297,6 +308,7 @@
p->parameter = $3;
$$ = p;
}
+;
RaiseLowerAction: RAISELOWER COLON List
{
@@ -307,6 +319,7 @@
p->parameter = $3;
$$ = p;
}
+;
LowerAction: LOWER COLON List
{
@@ -317,6 +330,7 @@
p->parameter = $3;
$$ = p;
}
+;
RaiseAction: RAISE COLON List
{
@@ -327,6 +341,7 @@
p->parameter = $3;
$$ = p;
}
+;
ExecuteAction: EXECUTE COLON List
{
@@ -337,6 +352,7 @@
p->parameter = $3;
$$ = p;
}
+;
GotoAction: GOTO COLON String
{
@@ -358,7 +374,7 @@
p->parameter = strdup(s);
$$ = p;
}
-
+;
GeometryAction : GEOMETRY COLON String
{
@@ -369,6 +385,7 @@
p->parameter = strdup($3);
$$ = p;
}
+;
RebindAction : REBIND COLON
{
@@ -388,6 +405,7 @@
p->parameter = strdup($3);
$$ = p;
}
+;
StickAction : STICK COLON String
{
@@ -398,6 +416,7 @@
p->parameter = strdup($3);
$$ = p;
}
+;
SetSizeAction : SETSIZE COLON String
{
@@ -408,6 +427,7 @@
p->parameter = strdup($3);
$$ = p;
}
+;
FocusAction : FOCUS COLON String
{
@@ -418,6 +438,7 @@
p->parameter = strdup($3);
$$ = p;
}
+;
IfElseAction: IFELSE COLON String OPENBRACE Actions CLOSEBRACE
OPENBRACE Actions CLOSEBRACE
@@ -436,6 +457,7 @@
$$ = p;
}
+;
KeySpec : Key Modifier
{
@@ -467,9 +489,11 @@
$$ = p;
free($1);
}
+;
Key : String
{ $$ = strdup($1); }
+;
Modifier : /* empty */
{ $$ = 0; }
@@ -492,6 +516,7 @@
}
$$ |= FindModifierMask(kc);
}
+;
List : String
{ $$ = $1; }
@@ -505,11 +530,13 @@
free($3);
$$ = s;
}
+;
ScreenStart : SCREEN INT OPENBRACE
{
$$ = $2;
}
+;
String : WORD
{
@@ -524,6 +551,7 @@
$$ = strexpand(t);
free($1);
}
+;
%%
/* Programs */
#define YYDEBUG 1
@@ -712,7 +740,8 @@
{
if (p->keycode == ev->xkey.keycode &&
- (p->modmask == AnyModifier || p->modmask == ev->xkey.state))
+ (p->modmask == AnyModifier ||
+ (p->modmask == (~(NumLockMask|LockMask) & ev->xkey.state))))
return p;
return NULL;
}
@@ -799,14 +828,26 @@
extern List *ScreenInfoList;
List *l = ScreenInfoList;
ScreenInfo *scr;
+ Client *saveClient = NULL;
+ Window root, child;
+ int rx, ry, wx, wy;
+ unsigned int keys;
/* allow one warp per screen */
for (scr = ListEnum(&l); scr != NULL; scr = ListEnum(&l)) {
findClient_rootid = scr->rootid;
c = (Client *) ListApply(ActiveClientList, findClient, t);
- if (c)
- clientWarp(c);
+ if (c) {
+ if (XQueryPointer(dpy, c->groupid, &root, &child,
+ &rx, &ry, &wx, &wy, &keys)) {
+ clientWarp(c);
+ break;
+ }
+ else saveClient = c;
+ }
}
+ if (saveClient)
+ clientWarp(saveClient);
findClient_rootid = 0;
}
free(s);
@@ -1249,6 +1290,7 @@
return;
olvwmOldBuf = olvwmBuf;
dpy = ldpy;
+ NumLockMask = FindModifierMask(XKeysymToKeycode(dpy, XK_Num_Lock));
yyparse();
#ifdef DEBUG
DumpProgKeyList();
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/olwm.c xview-3.2p1.4/clients/olvwm-4.1/olwm.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/olwm.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/olwm.c 2013-08-25 12:04:12.044380140 +0200
@@ -340,6 +340,24 @@
ReparentScreens(DefDpy);
if (!GRV.FocusFollowsMouse)
ClientFocusTopmost(DefDpy, GetFirstScrInfo(), CurrentTime);
+#if 1
+ /* In FocusFollowsMouse mode, pass focus to the NoFocus window if no
+ * other window currently has it. Otherwise, we'll miss key events if
+ * the pointer isn't inside a window on startup.
+ * Thanks to Jeff King for reporting the bug, debugging it and suggesting the
+ * following fix.
+ *
+ * <mbuck@debian.org>
+ */
+ else {
+ Window win;
+ int revert;
+ XGetInputFocus(DefDpy, &win, &revert);
+ if (win == PointerRoot || win == None) {
+ NoFocusTakeFocus(DefDpy, CurrentTime, NULL);
+ }
+ }
+#endif
CreateAutoRootMenu(DefDpy);
/* Initialize selections. */
@@ -662,11 +680,23 @@
static void
handleChildSignal()
{
+#if 1
+/* Some versions of glibc2 seem to need the extra signal(), some don't.
+ * So let's play safe and always include it under Linux (shouldn't hurt
+ * even if it's not required).
+ *
+ * mbuck@debian.org
+ */
+#if (defined(SYSV) && !defined(SVR4)) || defined(__linux__)
+ signal(SIGCHLD, handleChildSignal);
+#endif
+#else
#ifdef SYSV
#ifndef SVR4
signal(SIGCHLD, handleChildSignal);
#endif
#endif
+#endif
deadChildren = True;
}
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/patchlevel.h xview-3.2p1.4/clients/olvwm-4.1/patchlevel.h
--- xview-3.2p1.4.orig/clients/olvwm-4.1/patchlevel.h 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/patchlevel.h 2013-08-25 12:04:12.036380140 +0200
@@ -1 +1 @@
-#define PATCHLEVELv4 1
+#define PATCHLEVELv4 4
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/pixmap.c xview-3.2p1.4/clients/olvwm-4.1/pixmap.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/pixmap.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/pixmap.c 2013-08-25 12:04:12.048380140 +0200
@@ -4,7 +4,7 @@
*/
#ifdef IDENT
-#ident "@(#)pixmap.c 1.3 olvwm version 09 Feb 1994"
+#ident "@(#)pixmap.c 1.5 olvwm version 03/02/00"
#endif
/*
@@ -32,8 +32,8 @@
#define _XtIntrinsic_h
typedef unsigned long Pixel; /* Index into colormap */
#endif /* NO_PIXEL_FIX */
-#include <xpm.h>
-#endif XPM
+#include <X11/xpm.h>
+#endif /* XPM */
#include "i18n.h"
#include <olgx/olgx.h>
@@ -77,9 +77,10 @@
return((unsigned)image->bytes_per_line * image->height);
}
-int readGifFile(dpy, drawable, fn, w, h, pPix, hotx, hoty, colormap,
+int readGifFile(dpy, scrInfo, drawable, fn, w, h, pPix, hotx, hoty, colormap,
ncolors, colors)
Display *dpy;
+ScreenInfo *scrInfo;
Drawable drawable;
char *fn;
unsigned int *w, *h;
@@ -99,6 +100,9 @@
XColor color;
GC gc;
XGCValues gc_val;
+ int iw, ih;
+ long pixel;
+ Colormap rootColormap;
if (fn && ((fin = fopen (fn, "r")) == NULL))
@@ -115,7 +119,8 @@
/* Create the output image */
out_image = XCreateImage(dpy, DefaultVisual(dpy, screen),
- in_image->depth,
+ /*in_image->depth,*/
+ scrInfo->depth,
in_image->format,
in_image->xoffset, NULL,
in_image->width, in_image->height,
@@ -125,7 +130,6 @@
out_image);
MemFree (in_image->data);
MemFree (in_image);
-
if (out_image->depth == 1)
{
if (*ncolors && XAllocColor(dpy, *colormap, &(*colors)[1]))
@@ -142,7 +146,7 @@
{
gc_val.background = XGetPixel(out_image, 0, 0);
gc_val.foreground = 0;
- }
+ }
*pPix = XCreatePixmap (dpy, drawable, out_image->width,
out_image->height, out_image->depth);
@@ -188,7 +192,7 @@
}
}
-doPseudo(dpy, colormap, ncolors, colors, in_image, out_image)
+doPseudo8(dpy, colormap, ncolors, colors, in_image, out_image)
Display *dpy;
Colormap *colormap;
int ncolors;
@@ -284,6 +288,39 @@
}
}
+doPseudo24(dpy, colormap, ncolors, colors, in_image, out_image)
+Display *dpy;
+Colormap *colormap;
+int ncolors;
+XColor *colors;
+register XImage *in_image, *out_image;
+{
+int iw, ih;
+XColor *color;
+
+ for (iw = 0; iw < in_image->width; iw++) {
+ for (ih = 0; ih < in_image->height; ih++) {
+ color = &colors[XGetPixel(in_image, iw, ih)];
+ XPutPixel(out_image, iw, ih,
+ (((color->red) >> 8) << 0) |
+ (((color->green) >> 8) << 8) |
+ (((color->blue) >> 8) << 16));
+ }
+ }
+}
+
+doPseudo(dpy, colormap, ncolors, colors, in_image, out_image)
+Display *dpy;
+Colormap *colormap;
+int ncolors;
+XColor *colors;
+register XImage *in_image, *out_image;
+{
+ if (out_image->depth == 24)
+ doPseudo24(dpy, colormap, ncolors, colors, in_image, out_image);
+ else doPseudo8(dpy, colormap, ncolors, colors, in_image, out_image);
+}
+
/*
* Sun Icon support (not presently working)
*
@@ -378,7 +415,7 @@
return False;
return True;
}
-#endif SUNICON
+#endif /* SUNICON */
#ifdef NOT
/*
@@ -448,11 +485,11 @@
#endif
if (strncmp(s, "GIF", 3) == 0)
return GifFormat;
- if (s[0] == '#')
- return XBitmapFormat;
- if (sscanf(s, "/* Format_version=%d", &dummy) < 1)
- return BadFormat;
- return SunIconFormat;
+ if (sscanf(s, "/* Format_version=%d", &dummy) >= 1)
+ return SunIconFormat;
+ /* X Bitmap files can begin with pretty much anything -- if it's not
+ * an xbitmap, then other things will fail gracefully anyway */
+ return XBitmapFormat;
}
/*
@@ -630,6 +667,7 @@
&(pixinfo->pixmap),
(Pixmap *)0, /* ignore shape mask for now */
&xpmAttr)) != PixmapSuccess) {
+ rval = False;
goto FAILURE;
}
pixinfo->width = xpmAttr.width;
@@ -637,7 +675,7 @@
break;
#endif
case GifFormat:
- if (readGifFile(dpy, drawable, filename,
+ if (readGifFile(dpy, scrInfo, drawable, filename,
&pixinfo->width, &pixinfo->height, &bitmap,
&xhot, &yhot, &scrInfo->colormap,
&pixinfo->ncolors, &pixinfo->colors) != BitmapSuccess)
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/properties.c xview-3.2p1.4/clients/olvwm-4.1/properties.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/properties.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/properties.c 2013-08-25 12:04:12.044380140 +0200
@@ -63,8 +63,8 @@
extern Atom AtomDecorIMStatus;
extern Atom AtomLeftIMStatus;
extern Atom AtomRightIMStatus;
-extern Atom AtomCompoundText;
#endif
+extern Atom AtomCompoundText;
/***************************************************************************
* GetWindowProperty
@@ -147,8 +147,9 @@
}
#else
- if (textProp.encoding == XA_STRING &&
- textProp.format == 8) {
+ if ((textProp.encoding == XA_STRING ||
+ textProp.encoding == AtomCompoundText) &&
+ textProp.format == 8) {
*text = MemNewText(textProp.value);
ret = True;
} else {
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/resources.c xview-3.2p1.4/clients/olvwm-4.1/resources.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/resources.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/resources.c 2013-08-25 12:04:12.060380140 +0200
@@ -5,7 +5,7 @@
*/
#ifdef IDENT
-#ident "@(#)resources.c 1.7 olvwm version 09 Feb 1994"
+#ident "@(#)resources.c 1.9 olvwm version 03/02/00"
#endif
/*
@@ -424,7 +424,7 @@
{ "keepTransientsAbove", "KeepTransientsAbove", "False",
&(GRV.KeepTransientsAbove), cvtBoolean, NULL,
0L },
-{ "transientsSaveUnder", "TransientsSaveUnder", "True",
+{ "transientsSaveUnder", "TransientsSaveUnder", "False",
&(GRV.TransientsSaveUnder), cvtBoolean, NULL,
0L },
{ "transientsTitled", "TransientsTitled", "True",
@@ -563,7 +563,7 @@
0L },
{ "virtualIconic", "VirtualIconic", "False",
&(GRV.VirtualIconic), cvtBoolean, NULL,
- RI_IMMUTABLE },
+ 0L },
{ "virtualSticky", "VirtualSticky", "",
&(GRV.StickyList), cvtStringList, NULL,
0L },
@@ -620,13 +620,13 @@
0L },
{ "autoShowRootMenu", "AutoShowRootMenu", "False",
&(GRV.AutoShowRootMenu), cvtBoolean, NULL,
- RI_IMMUTABLE },
+ 0L },
{ "autoRootMenuX", "AutoRootMenuX", "0",
&(GRV.AutoRootMenuX), cvtInteger, NULL,
- RI_IMMUTABLE },
+ 0L },
{ "autoRootMenuY", "AutoRootMenuY", "0",
&(GRV.AutoRootMenuY), cvtInteger, NULL,
- RI_IMMUTABLE },
+ 0L },
{ "inputFocusColor", "InputFocusColor", NULL,
&(GRV.InputFocusColor), cvtString, updInputFocusColor,
0L },
@@ -1135,8 +1135,22 @@
info = XLoadQueryFont(dpy, string);
+#if 0
if (info == NULL)
return False;
+#else
+ if (info == NULL) {
+ /* ++roman: Unfortunately olvwm crashes if it has NULL pointers to
+ * fonts :-( So try to load a default font if the requested failed. */
+ fprintf( stderr, "failed to load font `%s' -- using `fixed' instead\n",
+ string );
+ info = XLoadQueryFont(dpy, "fixed" );
+ if (!info) {
+ fprintf( stderr, "failed to load `fixed' too -- expect a crash\n" );
+ return False;
+ }
+ }
+#endif
*dest = info;
return True;
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/screen.c xview-3.2p1.4/clients/olvwm-4.1/screen.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/screen.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/screen.c 2013-08-25 12:04:12.052380140 +0200
@@ -5,7 +5,7 @@
*/
#ifdef IDENT
-#ident "@(#)screen.c 1.7 olvwm version 09 Feb 1994"
+#ident "@(#)screen.c 1.8 olvwm version 04/28/99"
#endif
/*
@@ -153,6 +153,14 @@
static XrmQuark virtualPixmapColorCQ;
static XrmQuark virtualPixmapColorIQ;
+static updateScreenWorkspaceColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenWindowColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenForegroundColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenBackgroundColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenBorderColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenInputFocusColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenGlyphFont(Display *dpy, ScreenInfo *scrInfo);
+
/*-------------------------------------------------------------------------
* Local Functions
*-------------------------------------------------------------------------*/
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/services.c xview-3.2p1.4/clients/olvwm-4.1/services.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/services.c 2013-08-25 12:02:12.760378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/services.c 2013-08-25 12:04:12.044380140 +0200
@@ -82,7 +82,7 @@
return 1;
} else if (pid == 0) {
/* child */
-#if defined(SYSV) || defined(__linux)
+#if defined(SYSV) || defined(__linux__)
setpgrp();
#else
setpgrp(0, getpid());
@@ -240,7 +240,7 @@
close( pshPipe[1] );
close( 1 ); /* close stdout */
dup( 2 ); /* make olwm stderr = psh stdout */
-#if defined(SYSV) || defined(__linux)
+#if defined(SYSV) || defined(__linux__)
setpgrp();
#else
setpgrp(0, getpid());
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/st.c xview-3.2p1.4/clients/olvwm-4.1/st.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/st.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/st.c 2013-08-25 12:04:12.052380140 +0200
@@ -39,6 +39,8 @@
#define do_hash(key, table) (*table->hash)(key, table->num_bins)
+static rehash(st_table *table);
+
/*#define do_hash(key, table)\
((table->hash == ST_PTRHASH) ? (((int) (key) >> 2) % table->num_bins) :\
(table->hash == ST_NUMHASH) ? ((int) (key) % table->num_bins) :\
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/st.h xview-3.2p1.4/clients/olvwm-4.1/st.h
--- xview-3.2p1.4.orig/clients/olvwm-4.1/st.h 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/st.h 2013-08-25 12:04:12.036380140 +0200
@@ -64,4 +64,4 @@
int st_strhash();
-#endif ST_INCLUDED
+#endif /* ST_INCLUDED */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/usermenu.c xview-3.2p1.4/clients/olvwm-4.1/usermenu.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/usermenu.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/usermenu.c 2013-08-25 12:04:12.056380140 +0200
@@ -5,7 +5,7 @@
*/
#ifdef IDENT
-#ident "@(#)usermenu.c 1.6 olvwm version 07 Jan 1994"
+#ident "@(#)usermenu.c 1.8 olvwm version 04/28/99"
#endif
/*
@@ -122,8 +122,8 @@
#define _XtIntrinsic_h
typedef unsigned long Pixel; /* Index into colormap */
#endif /* NO_PIXEL_FIX */
-#include <xpm.h>
-#endif XPM
+#include <X11/xpm.h>
+#endif /* XPM */
#include <assert.h>
#include <string.h>
@@ -878,7 +878,7 @@
/*
* Menu Search Path
*/
-#define NUM_SEARCH_PATH 7
+#define NUM_SEARCH_PATH 8
static char **menuSearchPath;
/*
@@ -915,6 +915,11 @@
/* $HOME/.<menufile> */
sprintf(buf, "%s/.%%s", home);
menuSearchPath[i++] = MemNewString(buf);
+
+#ifdef __linux__
+ /* ++roman: /etc/X11/olvwm/<menufile> */
+ menuSearchPath[i++] = MemNewString("/etc/X11/olvwm/%s");
+#endif
#ifdef OW_I18N_L3
/* $OPENWINHOME/share/locale/<locale>/olwm/<menufile> */
@@ -1019,7 +1024,7 @@
int lineno = 1; /* Needed for recursion */
int rval;
- if (++menuRecursionCount > 25) {
+ if (++menuRecursionCount > 1000) {
fprintf(stderr, GetString("olvwm: maximum menu filedepth exceeded\n"));
menuRecursionCount = 0;
return MENU_RECURSION;
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/usleep.c xview-3.2p1.4/clients/olvwm-4.1/usleep.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/usleep.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/usleep.c 2013-08-25 12:04:12.060380140 +0200
@@ -76,7 +76,7 @@
setitimer(ITIMER_REAL, &old, (struct itimerval *)0);
return 0;
-#else SYSV
+#else /* SYSV */
return usleep(usec);
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/virtual.c xview-3.2p1.4/clients/olvwm-4.1/virtual.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/virtual.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/virtual.c 2013-08-25 12:04:12.048380140 +0200
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <string.h>
#include <dirent.h>
+#include <math.h>
#include <sys/param.h>
#include <X11/Xos.h>
#include <X11/Xlib.h>
@@ -23,19 +24,37 @@
#include "globals.h"
#include "win.h"
#include "menu.h"
-#include "math.h"
#include "virtual.h"
#include "patchlevel.h"
#include "vdm.icon"
#include "vdm.mask"
+#if defined(__linux__) && defined(__GLIBC__) && 0
+/* GNU libc doesn't use INIT, so we have to define sp ourselves. We have to
+ * initialize it as well before we call compile(). Maybe this is a bug in
+ * GNU libc, but I couldn't care less...
+ *
+ * NEWS: As of glibc 2.0.5c, GNU libc does use INIT, but it calls the first
+ * argument of compile __instring instead of instring. Sigh. Whoever designed
+ * this regexp API deserves to be shot immediately, if you ask me.
+ *
+ * MORE NEWS: glibc 2.0.6 seems to do this right, so I added a && 0
+ * above to disable my patches. Remove it if you have an older glibc.
+ *
+ * martin.buck@bigfoot.com
+ */
+/*char *sp;*/
+#define INIT register char *sp = __instring;
+#else
#define INIT register char *sp = instring;
+#endif
#define GETC() (*sp++)
#define PEEKC() (*sp)
#define UNGETC(c) (--sp)
#define RETURN(c) return;
-#define ERROR(val) regerr(val)
+static regexp_err(int val);
+#define ERROR(val) regexp_err(val)
#define TRUE 1
#define FALSE 0
@@ -94,6 +113,9 @@
#define CEIL(a,b) (((a)+(b)-1)/(b))
+static rexMatch(char *string);
+static rexInit(char *pattern);
+
/*
* ==========================================================================
*
@@ -1165,6 +1187,23 @@
v->client->scrInfo->vdm->resources->geometry);
VirtualSetGeometry(v->client->iconwin,
v->client->scrInfo->vdm->resources->iconGeometry);
+#if 1
+/* If a geometry for the virtual desktop icon was specified, treat the icon as
+ * if it was positioned manually. This ensures that it never gets placed
+ * automatically, even if FreeIconSlots is set. Unfortunately,
+ * VirtualSetGeometry() doesn't tell us whether the geometry spec was valid,
+ * so we have to check ourselves...
+ *
+ * <mbuck@debian.org>
+ */
+{
+ int changed, dummy;
+ changed = XParseGeometry(v->client->scrInfo->vdm->resources->iconGeometry, &dummy, &dummy, &dummy, &dummy);
+ if (changed & (XValue | YValue)) {
+ v->client->iconwin->fManuallyPositioned = True;
+ }
+}
+#endif
XFree((char *) sizeHints);
XFree((char *) wmHints);
@@ -2060,8 +2099,7 @@
MenuInfoCreate(cache, winInfo, menu, depth, slot);
}
-static
-regerr(val)
+static regexp_err(val)
int val;
{
switch(val) {
@@ -2154,6 +2192,13 @@
#ifdef REGEXP
expbuf = regcomp(newPattern);
#else
+#if defined(__linux__) && defined(__GLIBC__)
+ /* See comment above.
+ *
+ * martin.buck@bigfoot.com
+ */
+/* sp = newPattern;*/
+#endif
compile(newPattern, expbuf, &expbuf[256], '\0');
#endif
}
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/winframe.c xview-3.2p1.4/clients/olvwm-4.1/winframe.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/winframe.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/winframe.c 2013-08-25 12:04:12.040380140 +0200
@@ -84,6 +84,7 @@
static void setIMStatusText();
#endif
static void updateResizePositions();
+static int headerHeight(Client *cli, Graphics_info *gis);
/***************************************************************************
* sizing and decoration positioning functions
@@ -1048,7 +1049,7 @@
OLGX_NORMAL | TextOLGX);
}
}
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
@@ -1908,7 +1909,7 @@
/* set up the status */
if (cli->wmDecors->flags & WMDecorationIMStatus)
setIMStatusText(dpy,w,panewin);
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
/* Determine which menu should come up when menus are requested
* for this frame. */
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/winicon.c xview-3.2p1.4/clients/olvwm-4.1/winicon.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/winicon.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/winicon.c 2013-08-25 12:04:12.060380140 +0200
@@ -52,6 +52,10 @@
* forward-declared functions
***************************************************************************/
+static int heightTopIcon(WinIconFrame *win);
+static int heightBottomIcon(WinIconFrame *win);
+static int widthBothIcon(WinIconFrame *win);
+
/***************************************************************************
* private event functions
***************************************************************************/
diff -rNu xview-3.2p1.4.orig/clients/olvwm-4.1/winipane.c xview-3.2p1.4/clients/olvwm-4.1/winipane.c
--- xview-3.2p1.4.orig/clients/olvwm-4.1/winipane.c 2013-08-25 12:02:12.764378391 +0200
+++ xview-3.2p1.4/clients/olvwm-4.1/winipane.c 2013-08-25 12:04:12.044380140 +0200
@@ -118,6 +118,39 @@
0, 0, winInfo->core.width, winInfo->core.height,
0, 0, (unsigned long)1L);
#else
+#if 1
+ /* The original code has problems displaying icons for screen depths
+ * != 1 and != 8. The new logic here is: If either the icon pixmap or
+ * the icon window are 1 plane deep, use XCopyPlane() to get a B&W icon.
+ * If the depths of the pixmap and the window are the same (but != 1),
+ * use XCopyArea() to get a color icon. If they don't match, complain.
+ *
+ * <mbuck@debian.org>
+ */
+ if (winInfo->iconDepth == 1) {
+ XCopyPlane(dpy, winInfo->iconPixmap, pane, gc,
+ 0, 0, winInfo->core.width, winInfo->core.height,
+ 0, 0, (unsigned long)1L);
+ } else {
+ XWindowAttributes attr;
+
+ if (XGetWindowAttributes(dpy, pane, &attr)) {
+ if (attr.depth == 1) {
+ XCopyPlane(dpy, winInfo->iconPixmap, pane, gc,
+ 0, 0, winInfo->core.width, winInfo->core.height,
+ 0, 0, (unsigned long)1L);
+ } else if (winInfo->iconDepth == attr.depth) {
+ XCopyArea(dpy, winInfo->iconPixmap, pane, gc,
+ 0, 0, winInfo->core.width, winInfo->core.height,
+ 0, 0);
+ } else {
+ ErrorWarning(GetString("Unsupported icon pixmap depth"));
+ }
+ } else {
+ ErrorWarning(GetString("Huh? Can't get attributes of my icon window."));
+ }
+ }
+#else
switch(winInfo->iconDepth) {
case 8:
XCopyArea(dpy, winInfo->iconPixmap, pane, gc,
@@ -134,6 +167,7 @@
break;
}
#endif
+#endif
if (winInfo->iconMask != None) {
XSetClipMask(dpy, gc, None);
diff -rNu xview-3.2p1.4.orig/clients/olwm/Imakefile xview-3.2p1.4/clients/olwm/Imakefile
--- xview-3.2p1.4.orig/clients/olwm/Imakefile 2013-08-25 12:02:12.740378390 +0200
+++ xview-3.2p1.4/clients/olwm/Imakefile 2013-08-25 12:04:12.012380140 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.8 28 Apr 1993 SMI
-/**/# Imakefile for olwm release 3.0.
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Apr 1993 SMI
+XCOMM # Imakefile for olwm release 3.0.
DEFINES = -DSHAPE $(XVCLIENTDEFINES)
INCLUDES = -I$(HEADER_DEST) -I$(TOP) $(XVCLIENTINCLUDES)
diff -rNu xview-3.2p1.4.orig/clients/olwm/cmdstream.c xview-3.2p1.4/clients/olwm/cmdstream.c
--- xview-3.2p1.4.orig/clients/olwm/cmdstream.c 2013-08-25 12:02:12.744378390 +0200
+++ xview-3.2p1.4/clients/olwm/cmdstream.c 2013-08-25 12:04:12.008380139 +0200
@@ -51,10 +51,10 @@
* Local Forward Declarations
* ---------------------------------------------------------------------*/
-Command *MatchCommand();
-CmdAttr *MatchAttr();
-int EncodeAttrValue();
-int DecodeAttrValue();
+static Command *MatchCommand();
+static CmdAttr *MatchAttr();
+static int EncodeAttrValue();
+static int DecodeAttrValue();
/* ----------------------------------------------------------------------
* SetCmdStream
diff -rNu xview-3.2p1.4.orig/clients/olwm/defaults.c xview-3.2p1.4/clients/olwm/defaults.c
--- xview-3.2p1.4.orig/clients/olwm/defaults.c 2013-08-25 12:02:12.744378390 +0200
+++ xview-3.2p1.4/clients/olwm/defaults.c 2013-08-25 12:04:12.012380140 +0200
@@ -57,7 +57,7 @@
char *homedir = getenv("HOME");
char *envfile = getenv("XENVIRONMENT");
char hostname[100];
-#ifndef __linux
+#ifndef __linux__
int namelen;
#endif
@@ -82,7 +82,7 @@
if (homedir != NULL) {
(void) strcpy(filename, homedir);
(void) strcat(filename, "/.Xdefaults-");
-#ifndef __linux
+#ifndef __linux__
if (0 == gethostname(hostname, sizeof(hostname), &namelen)) {
#else
if (0 == gethostname(hostname, sizeof(hostname))) {
diff -rNu xview-3.2p1.4.orig/clients/olwm/environ.c xview-3.2p1.4/clients/olwm/environ.c
--- xview-3.2p1.4.orig/clients/olwm/environ.c 2013-08-25 12:02:12.744378390 +0200
+++ xview-3.2p1.4/clients/olwm/environ.c 2013-08-25 12:04:20.360380262 +0200
@@ -131,7 +131,7 @@
len = colon - display;
}
- (void)sprintf(value,"%.*s.%d",len,display,screen);
+ (void)sprintf(value,"%*s.%d",len,display,screen);
putEnv(env,"DISPLAY",value);
}
diff -rNu xview-3.2p1.4.orig/clients/olwm/events.c xview-3.2p1.4/clients/olwm/events.c
--- xview-3.2p1.4.orig/clients/olwm/events.c 2013-08-25 12:02:12.744378390 +0200
+++ xview-3.2p1.4/clients/olwm/events.c 2013-08-25 12:04:12.004380139 +0200
@@ -579,7 +579,7 @@
if (timeout->tv_sec < 0)
return False;
-#ifndef __linux
+#ifndef __linux__
(void) gettimeofday(&starttime, NULL);
#endif
@@ -615,7 +615,7 @@
* return an indication of valid data to the caller, yet also return
* a value for the time remaining that is less than or equal to zero.
*/
-#ifndef __linux
+#ifndef __linux__
/* Linux: select does the remaining time calculation for us. */
(void) gettimeofday(&curtime, NULL);
tvdiff(&starttime, &curtime, &diff1);
diff -rNu xview-3.2p1.4.orig/clients/olwm/gettext.c xview-3.2p1.4/clients/olwm/gettext.c
--- xview-3.2p1.4.orig/clients/olwm/gettext.c 2013-08-25 12:02:12.744378390 +0200
+++ xview-3.2p1.4/clients/olwm/gettext.c 2013-08-25 12:04:12.008380139 +0200
@@ -11,7 +11,7 @@
#include "gettext.h"
-#if defined(__linux) && !defined(LC_MESSAGES)
+#if defined(__linux__) && !defined(LC_MESSAGES)
#define LC_MESSAGES LC_RESPONSE
#endif
@@ -19,12 +19,16 @@
#define bzero(a,b) memset(a,0,b)
#endif
+#if !defined(__linux__) || !defined(__GLIBC__)
char *malloc(), *strdup();
-char * dgettext();
+#endif
+char * dgettext(char *, char *);
char *_gettext();
char *in_path();
char *fgets(), *getenv();
+#if !defined(__linux__) || !defined(__GLIBC__)
caddr_t mmap(), calloc();
+#endif
static struct domain_binding *firstbind=0, *lastbind=0;
diff -rNu xview-3.2p1.4.orig/clients/olwm/i18n.c xview-3.2p1.4/clients/olwm/i18n.c
--- xview-3.2p1.4.orig/clients/olwm/i18n.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/i18n.c 2013-08-25 12:04:12.012380140 +0200
@@ -207,6 +207,6 @@
s++;
}
}
-#endif DEBUG
+#endif /* DEBUG */
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
diff -rNu xview-3.2p1.4.orig/clients/olwm/mem.c xview-3.2p1.4/clients/olwm/mem.c
--- xview-3.2p1.4.orig/clients/olwm/mem.c 2013-08-25 12:02:12.744378390 +0200
+++ xview-3.2p1.4/clients/olwm/mem.c 2013-08-25 12:04:12.000380139 +0200
@@ -137,7 +137,7 @@
{
void *p;
-#ifdef __linux
+#ifdef __linux__
if (!sz) /* Linux malloc(0) returns NULL, unlike BSD */
sz = 1;
#endif
diff -rNu xview-3.2p1.4.orig/clients/olwm/mem.h xview-3.2p1.4/clients/olwm/mem.h
--- xview-3.2p1.4.orig/clients/olwm/mem.h 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/mem.h 2013-08-25 12:04:12.004380139 +0200
@@ -36,7 +36,7 @@
#else
#define MemNew(t) ((t *)MemAlloc((unsigned int)sizeof(t)))
#define MemNewString(s) (strcpy((char *)MemAlloc(strlen(s)+1),s))
-#endif MEMDEBUG
+#endif /* MEMDEBUG */
#ifdef OW_I18N_L4
@@ -46,6 +46,6 @@
#define MemNewText(s) MemNewString((char *)s)
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
-#endif _OLWM_MEM_H
+#endif /* _OLWM_MEM_H */
diff -rNu xview-3.2p1.4.orig/clients/olwm/menu.c xview-3.2p1.4/clients/olwm/menu.c
--- xview-3.2p1.4.orig/clients/olwm/menu.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/menu.c 2013-08-25 12:04:12.004380139 +0200
@@ -109,6 +109,7 @@
int MenuTrack();
void DrawLocCursor();
+static Bool isEnabled(MenuInfo *mInfo, int item);
/*
*****************************************************************************
diff -rNu xview-3.2p1.4.orig/clients/olwm/olwm.c xview-3.2p1.4/clients/olwm/olwm.c
--- xview-3.2p1.4.orig/clients/olwm/olwm.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/olwm.c 2013-08-25 12:04:12.004380139 +0200
@@ -45,7 +45,7 @@
#include "error.h"
#include "dsdm.h"
-#if defined(__linux) && !defined(MAXPID)
+#if defined(__linux__) && !defined(MAXPID)
#define MAXPID 32767
#endif
@@ -619,7 +619,7 @@
static void
handleChildSignal()
{
-#ifdef __linux
+#ifdef __linux__
/* Reinitialize signal catcher */
signal(SIGCHLD, handleChildSignal);
#endif
diff -rNu xview-3.2p1.4.orig/clients/olwm/resources.c xview-3.2p1.4/clients/olwm/resources.c
--- xview-3.2p1.4.orig/clients/olwm/resources.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/resources.c 2013-08-25 12:04:12.012380140 +0200
@@ -40,7 +40,7 @@
#include "events.h"
#include "error.h"
-#if defined(__linux) && !defined(LC_MESSAGES)
+#if defined(__linux__) && !defined(LC_MESSAGES)
#define LC_MESSAGES LC_RESPONSE
#endif
diff -rNu xview-3.2p1.4.orig/clients/olwm/screen.c xview-3.2p1.4/clients/olwm/screen.c
--- xview-3.2p1.4.orig/clients/olwm/screen.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/screen.c 2013-08-25 12:04:12.008380139 +0200
@@ -111,6 +111,12 @@
static XrmQuark stippledRubberBandsCQ;
static XrmQuark stippledRubberBandsIQ;
+static updateScreenWorkspaceColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenWindowColor(Display *dpy, ScreenInfo*scrInfo);
+static updateScreenForegroundColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenBackgroundColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenBorderColor(Display *dpy, ScreenInfo *scrInfo);
+static updateScreenGlyphFont(Display *dpy, ScreenInfo *scrInfo);
/*-------------------------------------------------------------------------
* Local Functions
diff -rNu xview-3.2p1.4.orig/clients/olwm/services.c xview-3.2p1.4/clients/olwm/services.c
--- xview-3.2p1.4.orig/clients/olwm/services.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/services.c 2013-08-25 12:04:12.008380139 +0200
@@ -80,7 +80,7 @@
return 1;
} else if (pid == 0) {
/* child */
-#if defined(SYSV) || defined(__linux)
+#if defined(SYSV) || defined(__linux__)
setpgrp();
#else
setpgrp(0, getpid());
@@ -238,7 +238,7 @@
close( pshPipe[1] );
close( 1 ); /* close stdout */
dup( 2 ); /* make olwm stderr = psh stdout */
-#if defined(SYSV) || defined(__linux)
+#if defined(SYSV) || defined(__linux__)
setpgrp();
#else
setpgrp(0, getpid());
diff -rNu xview-3.2p1.4.orig/clients/olwm/slave.c xview-3.2p1.4/clients/olwm/slave.c
--- xview-3.2p1.4.orig/clients/olwm/slave.c 2013-08-25 12:02:12.748378390 +0200
+++ xview-3.2p1.4/clients/olwm/slave.c 2013-08-25 12:04:12.004380139 +0200
@@ -44,7 +44,7 @@
* Local Forward Declarations
* ---------------------------------------------------------------------*/
-void SlaveFailure();
+static void SlaveFailure();
/* ----------------------------------------------------------------------
@@ -87,7 +87,7 @@
case 0: /* Slave */
dup2(input[0],0);
dup2(output[1],1);
-#ifndef __linux
+#ifndef __linux__
if (getrlimit(RLIMIT_NOFILE,&rlimit) == -1)
maxfd = 0;
else
diff -rNu xview-3.2p1.4.orig/clients/olwm/st.c xview-3.2p1.4/clients/olwm/st.c
--- xview-3.2p1.4.orig/clients/olwm/st.c 2013-08-25 12:02:12.752378390 +0200
+++ xview-3.2p1.4/clients/olwm/st.c 2013-08-25 12:04:12.008380139 +0200
@@ -34,6 +34,8 @@
(table->hash == ST_NUMHASH) ? ((int) (key) % table->num_bins) :\
(*table->hash)((key), table->num_bins))
+static rehash(st_table *table);
+
st_table *st_init_table_with_params(compare, hash, size, density, grow_factor,
reorder_flag)
int (*compare)();
diff -rNu xview-3.2p1.4.orig/clients/olwm/usermenu.c xview-3.2p1.4/clients/olwm/usermenu.c
--- xview-3.2p1.4.orig/clients/olwm/usermenu.c 2013-08-25 12:02:12.752378390 +0200
+++ xview-3.2p1.4/clients/olwm/usermenu.c 2013-08-25 12:04:12.012380140 +0200
@@ -719,7 +719,7 @@
/*
* Menu Search Path
*/
-#define NUM_SEARCH_PATH 7
+#define NUM_SEARCH_PATH 8
static char **menuSearchPath;
/*
@@ -755,6 +755,11 @@
/* $HOME/.<menufile> */
sprintf(buf, "%s/.%%s", home);
menuSearchPath[i++] = MemNewString(buf);
+
+#ifdef __linux__
+ /* ++roman: /etc/X11/olwm/<menufile> */
+ menuSearchPath[i++] = MemNewString("/etc/X11/olwm/%s");
+#endif
#ifdef OW_I18N_L3
/* $OPENWINHOME/share/locale/<locale>/olwm/<menufile> */
diff -rNu xview-3.2p1.4.orig/clients/olwm/usleep.c xview-3.2p1.4/clients/olwm/usleep.c
--- xview-3.2p1.4.orig/clients/olwm/usleep.c 2013-08-25 12:02:12.752378390 +0200
+++ xview-3.2p1.4/clients/olwm/usleep.c 2013-08-25 12:04:12.012380140 +0200
@@ -76,7 +76,7 @@
setitimer(ITIMER_REAL, &old, (struct itimerval *)0);
return 0;
-#else SYSV
+#else /* SYSV */
return usleep(usec);
diff -rNu xview-3.2p1.4.orig/clients/olwm/winframe.c xview-3.2p1.4/clients/olwm/winframe.c
--- xview-3.2p1.4.orig/clients/olwm/winframe.c 2013-08-25 12:02:12.752378390 +0200
+++ xview-3.2p1.4/clients/olwm/winframe.c 2013-08-25 12:04:12.000380139 +0200
@@ -72,6 +72,7 @@
static void setIMStatusText();
#endif
static void updateResizePositions();
+static int headerHeight(Client *cli, Graphics_info *gis);
/***************************************************************************
* sizing and decoration positioning functions
@@ -930,7 +931,7 @@
OLGX_NORMAL | TextOLGX);
}
}
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
/* drawBase2D - draw the outer border of the window (2D mode)
@@ -1737,7 +1738,7 @@
/* set up the status */
if (cli->wmDecors->flags & WMDecorationIMStatus)
setIMStatusText(dpy,w,panewin);
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
/* Determine which menu should come up when menus are requested
* for this frame. */
diff -rNu xview-3.2p1.4.orig/clients/olwm/winicon.c xview-3.2p1.4/clients/olwm/winicon.c
--- xview-3.2p1.4.orig/clients/olwm/winicon.c 2013-08-25 12:02:12.752378390 +0200
+++ xview-3.2p1.4/clients/olwm/winicon.c 2013-08-25 12:04:12.012380140 +0200
@@ -43,6 +43,10 @@
/* Class function vector */
static ClassIconFrame classIconFrame;
+static int heightTopIcon(WinIconFrame *win);
+static int heightBottomIcon(WinIconFrame *win);
+static int widthBothIcon(WinIconFrame *win);
+
/***************************************************************************
* private event functions
***************************************************************************/
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/Imakefile xview-3.2p1.4/clients/olwmslave/Imakefile
--- xview-3.2p1.4.orig/clients/olwmslave/Imakefile 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/Imakefile 2013-08-25 12:04:12.032380140 +0200
@@ -1,12 +1,12 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.7 28 Apr 1993 SMI
-/**/# Imakefile for olwmslave release 3.0.
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.7 28 Apr 1993 SMI
+XCOMM # Imakefile for olwmslave release 3.0.
#define HasInfoFiles YES
-#ifndef __linux
+#ifndef __linux__
DEFINES = $(XVCLIENTDEFINES)
#else
DEFINES = $(XVCLIENTDEFINES) -DOW_I18N_L3
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/cmdstream.c xview-3.2p1.4/clients/olwmslave/cmdstream.c
--- xview-3.2p1.4.orig/clients/olwmslave/cmdstream.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/cmdstream.c 2013-08-25 12:04:12.032380140 +0200
@@ -50,10 +50,10 @@
* Local Forward Declarations
* ---------------------------------------------------------------------*/
-Command *MatchCommand();
-CmdAttr *MatchAttr();
-int EncodeAttrValue();
-int DecodeAttrValue();
+static Command *MatchCommand();
+static CmdAttr *MatchAttr();
+static int EncodeAttrValue();
+static int DecodeAttrValue();
/* ----------------------------------------------------------------------
* SetCmdStream
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/helprecv.c xview-3.2p1.4/clients/olwmslave/helprecv.c
--- xview-3.2p1.4.orig/clients/olwmslave/helprecv.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/helprecv.c 2013-08-25 12:04:12.032380140 +0200
@@ -15,7 +15,7 @@
#include "helpcmd.h"
extern int ShowHelpWindow();
- void ReceiveHelpCmd();
+static void ReceiveHelpCmd();
/* ----------------------------------------------------------------------
* RegisterHelpWindow
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/helpwin.c xview-3.2p1.4/clients/olwmslave/helpwin.c
--- xview-3.2p1.4.orig/clients/olwmslave/helpwin.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/helpwin.c 2013-08-25 12:04:12.032380140 +0200
@@ -128,14 +128,15 @@
* Local Forward Functions
* ---------------------------------------------------------------------*/
int ShowHelpWindow();
-void InitHelpWindow();
-Bool CreateHelpWindow();
-Notify_value DestroyHelpWindow();
-void ResetHelpWindow();
-Bool TextHelpWindow();
-Bool ImageHelpWindow();
-void MoreHelp();
-void ErrorNotice();
+static void InitHelpWindow();
+static Bool CreateHelpWindow();
+static Notify_value DestroyHelpWindow();
+static void ResetHelpWindow();
+static Bool TextHelpWindow();
+static Bool ImageHelpWindow();
+static void MoreHelp();
+static void ErrorNotice();
+static int ConstrainMousePos();
/* ----------------------------------------------------------------------
* ShowHelpWindow
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/i18n.c xview-3.2p1.4/clients/olwmslave/i18n.c
--- xview-3.2p1.4.orig/clients/olwmslave/i18n.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/i18n.c 2013-08-25 12:04:12.032380140 +0200
@@ -143,6 +143,6 @@
s++;
}
}
-#endif DEBUG
+#endif /* DEBUG */
#endif
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/i18n.h xview-3.2p1.4/clients/olwmslave/i18n.h
--- xview-3.2p1.4.orig/clients/olwmslave/i18n.h 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/i18n.h 2013-08-25 12:04:12.032380140 +0200
@@ -24,8 +24,8 @@
extern wchar_t *ctstowcsdup();
extern char *ctstombsdup();
extern char *wcstoctsdup();
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
-#endif i18n_DEFINED
+#endif /* i18n_DEFINED */
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/mem.h xview-3.2p1.4/clients/olwmslave/mem.h
--- xview-3.2p1.4.orig/clients/olwmslave/mem.h 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/mem.h 2013-08-25 12:04:12.032380140 +0200
@@ -16,4 +16,4 @@
#define MemNewString(s) (strcpy(MemAlloc(strlen(s)+1),s))
#ifdef OW_I18N_L4
#define MemNewWString(s) (wscpy(MemAlloc((wslen(s)+1) * sizeof(wchar_t)),s))
-#endif OW_I18N_L4
+#endif /* OW_I18N_L4 */
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/olwmslave.c xview-3.2p1.4/clients/olwmslave/olwmslave.c
--- xview-3.2p1.4.orig/clients/olwmslave/olwmslave.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/olwmslave.c 2013-08-25 12:04:12.032380140 +0200
@@ -44,9 +44,9 @@
/* ----------------------------------------------------------------------
* Forward Definitions
* ----------------------------------------------------------------------*/
-void InitScreenInfo();
-void ParseScreenArgs();
-Notify_value InputReader();
+static void InitScreenInfo();
+static void ParseScreenArgs();
+static Notify_value InputReader();
/* ----------------------------------------------------------------------
* main
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/propsrecv.c xview-3.2p1.4/clients/olwmslave/propsrecv.c
--- xview-3.2p1.4.orig/clients/olwmslave/propsrecv.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/propsrecv.c 2013-08-25 12:04:12.032380140 +0200
@@ -15,7 +15,7 @@
#include "propscmd.h"
extern int ShowWindowProps();
- void ReceivePropsCmd();
+static void ReceivePropsCmd();
/* ----------------------------------------------------------------------
* RegisterPropsWindow
diff -rNu xview-3.2p1.4.orig/clients/olwmslave/propswin.c xview-3.2p1.4/clients/olwmslave/propswin.c
--- xview-3.2p1.4.orig/clients/olwmslave/propswin.c 2013-08-25 12:02:12.756378391 +0200
+++ xview-3.2p1.4/clients/olwmslave/propswin.c 2013-08-25 12:04:12.032380140 +0200
@@ -38,9 +38,9 @@
* Local Forward Declarations
* ----------------------------------------------------------------------*/
int ShowWindowProps();
-void InitWindowProps();
-Bool CreateWindowProps();
-Notify_value DestroyWindowProps();
+static void InitWindowProps();
+static Bool CreateWindowProps();
+static Notify_value DestroyWindowProps();
void ApplyProps();
void ResetProps();
diff -rNu xview-3.2p1.4.orig/clients/props/Imakefile xview-3.2p1.4/clients/props/Imakefile
--- xview-3.2p1.4.orig/clients/props/Imakefile 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/props/Imakefile 2013-08-25 12:04:12.268380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.3 10/4/91 SMI
-/**/# Imakefile for props
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.3 10/4/91 SMI
+XCOMM # Imakefile for props
#define HasInfoFiles YES
@@ -14,15 +14,12 @@
HEADERS = props.h color.h image.h l10n_props.h
INFOFILES = props.info
-MANPAGES =
+MANPAGES = props.man
SRCS = props.c color_props.c color.c l10n_props.c l10n_read.c
OBJS = props.o color_props.o color.o l10n_props.o l10n_read.o
ALLFILES = ${HEADERS} ${INFOFILES} ${MANPAGES} ${SRCS}
-AllTarget(props)
-
-NormalProgramTarget(props,$(OBJS),$(DEPLIBS),$(LOCAL_LIBRARIES),$(SYS_LIBRARIES))
-InstallProgram(props,$(BINDIR))
+ComplexProgramTarget(props)
#include <XView.prog>
diff -rNu xview-3.2p1.4.orig/clients/props/l10n_props.c xview-3.2p1.4/clients/props/l10n_props.c
--- xview-3.2p1.4.orig/clients/props/l10n_props.c 2013-08-25 12:02:12.772378391 +0200
+++ xview-3.2p1.4/clients/props/l10n_props.c 2013-08-25 12:04:12.268380143 +0200
@@ -22,7 +22,7 @@
#define bcopy(a,b,c) memmove(b,a,c)
#endif
-#if defined linux && !defined LC_MESSAGES
+#if defined __linux__ && !defined LC_MESSAGES
#define LC_MESSAGES LC_RESPONSE
#endif
@@ -101,7 +101,7 @@
#define SS_CATEGORY 4
{0}
};
-#endif OW_I18N
+#endif /* OW_I18N */
l10n_config_sss_t *l10n_config_sss = NULL;
static l10n_config_sss_t *l10n_config_sss_cur = NULL;
diff -rNu xview-3.2p1.4.orig/clients/props/l10n_props.h xview-3.2p1.4/clients/props/l10n_props.h
--- xview-3.2p1.4.orig/clients/props/l10n_props.h 2013-08-25 12:02:12.772378391 +0200
+++ xview-3.2p1.4/clients/props/l10n_props.h 2013-08-25 12:04:12.264380143 +0200
@@ -70,7 +70,7 @@
* format for strftime, not string itself).
*/
wchar_t *(*convert_label)();
-#endif OW_I18N
+#endif /* OW_I18N */
int default_value;
diff -rNu xview-3.2p1.4.orig/clients/props/l10n_read.c xview-3.2p1.4/clients/props/l10n_read.c
--- xview-3.2p1.4.orig/clients/props/l10n_read.c 2013-08-25 12:02:12.772378391 +0200
+++ xview-3.2p1.4/clients/props/l10n_read.c 2013-08-25 12:04:12.264380143 +0200
@@ -25,7 +25,7 @@
#define ITEM_SEPARATOR ';'
-#ifndef __linux
+#ifndef __linux__
#ifndef ultrix
extern char *malloc();
#endif
@@ -99,7 +99,7 @@
if ((config_file = fopen(fullpath, "r")) == NULL)
{
perror(fullpath);
- goto ret;
+ goto fileerr_ret;
}
/*
@@ -297,6 +297,7 @@
ret:
(void) fclose(config_file);
+fileerr_ret:
return rcode;
}
diff -rNu xview-3.2p1.4.orig/clients/props/props.man xview-3.2p1.4/clients/props/props.man
--- xview-3.2p1.4.orig/clients/props/props.man 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/clients/props/props.man 2013-08-25 12:04:12.264380143 +0200
@@ -0,0 +1,80 @@
+.\" Copyright (C) 2000 by Martin Buck <mbuck@debian.org>
+.\" Licensed under the GNU General Public License
+.TH props 1 "Version 3.2p1" XView
+
+.SH NAME
+props \- Change OpenWindows settings
+
+.SH SYNOPSIS
+.B props
+[
+.I generic-tool-arguments
+]
+
+.SH DESCRIPTION
+\fBprops\fP can be used to change certain settings for OpenWindows/XView
+programs using a GUI. As most of these settings are stored in
+OpenWindows-specific X resources, they won't have an influence on
+non-OpenWindows programs.
+.PP
+These are the settings that can be modified using \fBprops\fP (their meaning
+\is explained in \fBxview\fP (7)):
+.TP
+OpenWindows.Beep
+.TP
+OpenWindows.DragRightDistance
+.TP
+OpenWindows.IconLocation
+.TP
+OpenWindows.MultiClickTimeout
+.TP
+OpenWindows.PopupJumpCursor
+.TP
+OpenWindows.ScrollbarPlacement
+.TP
+OpenWindows.SelectDisplaysMenu
+.TP
+OpenWindows.SetInput
+.TP
+OpenWindows.WindowColor
+.TP
+OpenWindows.WorkspaceColor
+.TP
+Scrollbar.JumpCursor
+.TP
+*displayLang: C
+.TP
+*timeFormat: C
+.TP
+*basicLocale: C
+.TP
+*inputLang: C
+.TP
+*numeric: C
+
+
+.SH OPTIONS
+.IP "\fIgeneric-tool-arguments\fP"
+\fBprops\fP accepts the \s-1XV\s0iew generic tool arguments described in
+\fBxview\fP (7).
+
+.SH FILES
+.IP ~/.Xdefaults
+Stores user's resource values. Modified by \fBprops\fP when new settings are
+applied.
+
+.SH AUTHOR
+This manual page was written by Martin Buck <mbuck@debian.org> for Debian
+GNU/Linux.
+
+.SH "SEE ALSO"
+.BR xview (7)
+
+.SH BUGS
+\fBprops\fP saves all resources currently defined in the X server to
+\fI~/.Xdefaults\fP, overwriting its current contents. This will remove
+comments and conditionals, reorder resources and also save resources which
+were originally loaded into the server by other means.
+.PP
+The color selector is available only on display classes GrayScale,
+PseudoColor and DirectColor.
diff -rNu xview-3.2p1.4.orig/clients/textedit/Imakefile xview-3.2p1.4/clients/textedit/Imakefile
--- xview-3.2p1.4.orig/clients/textedit/Imakefile 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/textedit/Imakefile 2013-08-25 12:04:12.016380140 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.6 90/07/17 SMI
-/**/# Imakefile for textedit
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.6 90/07/17 SMI
+XCOMM # Imakefile for textedit
DEFINES = -DSTANDALONE
INCLUDES = -I/usr/openwin/include -I$(HEADER_DEST) -I$(TOP)
diff -rNu xview-3.2p1.4.orig/clients/textedit/textedit.c xview-3.2p1.4/clients/textedit/textedit.c
--- xview-3.2p1.4.orig/clients/textedit/textedit.c 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/textedit/textedit.c 2013-08-25 12:04:12.016380140 +0200
@@ -41,7 +41,7 @@
long textsw_store_file();
*/
char *getwd();
-#ifndef __linux
+#ifndef __linux__
char *sprintf();
#endif
void frame_cmdline_help();
@@ -117,6 +117,8 @@
#define OPTION_EDIT_LOG_WRAPS_AT (1<<15)
#endif
+static die(char *msg1,char *msg2,char *msg3);
+
#ifdef TEXTEDIT_HELP_STRING
static char *help_msg()
/*
@@ -416,10 +418,10 @@
} else {
moncontrol(0);
}
-#endif GPROF
+#endif /* GPROF */
textedit_main(argc, argv);
}
-#endif (defined(STANDALONE) || defined(DEBUG) || defined(GPROF))
+#endif /* (defined(STANDALONE) || defined(DEBUG) || defined(GPROF)) */
textedit_main(argc, argv)
int argc;
@@ -820,10 +822,10 @@
* Setup signal handlers.
*/
(void)notify_set_signal_func(base_frame, mysigproc, SIGINT, NOTIFY_ASYNC);
-#if !defined(__linux) || defined(SIGXCPU)
+#if !defined(__linux__) || defined(SIGXCPU)
(void)notify_set_signal_func(base_frame, mysigproc, SIGXCPU, NOTIFY_ASYNC);
#endif
-#if !defined(__linux) || defined(SIGBUS)
+#if !defined(__linux__) || defined(SIGBUS)
(void)notify_set_signal_func(base_frame, mysigproc, SIGBUS, NOTIFY_ASYNC);
#endif
(void)notify_set_signal_func(base_frame, mysigproc, SIGHUP, NOTIFY_ASYNC);
@@ -911,7 +913,7 @@
char name_to_use[MAXNAMLEN];
int pid = getpid();
int was_SIGILL = (sig == SIGILL);
-#ifndef __linux
+#ifndef __linux__
struct sigvec vec;
#else
struct sigaction vec;
@@ -940,6 +942,11 @@
(void)fflush(stderr);
if (textsw_store_file(textsw, name_to_use, 0, 0) == 0)
goto Done;
+#ifdef XVIEW_USE_INSECURE_TMPFILES
+ /* This is insecure use of /tmp. So we try to save to $HOME and if that
+ * fails, give up.
+ */
+ /* martin.buck@bigfoot.com */
(void)sprintf(name_to_use, "/usr/tmp/textedit.%d", pid);
(void)fprintf(stderr, "failed!\nAttempting Store to %s ... ", name_to_use);
(void)fflush(stderr);
@@ -948,6 +955,11 @@
(void)sprintf(name_to_use, "/tmp/textedit.%d", pid);
(void)fprintf(stderr, "failed!\nAttempting Store to %s ... ", name_to_use);
(void)fflush(stderr);
+#else
+ (void)sprintf(name_to_use, "%s/textedit.%d", xv_getlogindir(), pid);
+ (void)fprintf(stderr, "failed!\nAttempting Store to %s ... ", name_to_use);
+ (void)fflush(stderr);
+#endif
if (textsw_store_file(textsw, name_to_use, 0, 0) == 0)
goto Done;
(void)fprintf(stderr, "failed!\nSorry, cannot save your edits: ");
@@ -962,30 +974,46 @@
#ifndef lint
char dummy, *bad_ptr = 0;
/* (void)signal(SIGSEGV, SIG_DFL); /* Make sure 0 deref dumps. */
-#ifndef __linux
+#ifndef __linux__
vec.sv_handler = SIG_DFL;
vec.sv_mask = vec.sv_onstack = 0;
sigvec(SIGSEGV, &vec, 0);
#else
vec.sa_handler = SIG_DFL;
+#if 1
+/* martin.buck@bigfoot.com */
+ sigemptyset(&vec.sa_mask);
+#else
vec.sa_mask = 0;
+#endif
vec.sa_flags = 0;
+/* mbuck@debian.org */
+#if 0
vec.sa_restorer = NULL;
+#endif
sigaction(SIGSEGV, &vec, (struct sigaction *)0);
#endif
dummy = *bad_ptr;
#endif
} else {
/* (void)signal(SIGILL, SIG_DFL); /* Make sure abort() dumps. */
-#ifndef __linux
+#ifndef __linux__
vec.sv_handler = SIG_DFL;
vec.sv_mask = vec.sv_onstack = 0;
sigvec(SIGILL, &vec, 0);
#else
vec.sa_handler = SIG_DFL;
+#if 1
+/* martin.buck@bigfoot.com */
+ sigemptyset(&vec.sa_mask);
+#else
vec.sa_mask = 0;
+#endif
vec.sa_flags = 0;
+/* mbuck@debian.org */
+#if 0
vec.sa_restorer = NULL;
+#endif
sigaction(SIGILL, &vec, (struct sigaction *)0);
#endif
abort();
diff -rNu xview-3.2p1.4.orig/clients/textedit/textedit.man xview-3.2p1.4/clients/textedit/textedit.man
--- xview-3.2p1.4.orig/clients/textedit/textedit.man 2013-08-25 12:02:12.768378391 +0200
+++ xview-3.2p1.4/clients/textedit/textedit.man 2013-08-25 12:04:12.016380140 +0200
@@ -555,7 +555,7 @@
.I "DeskSet Environment Reference Guide".
See also
.BR xview (1).
-.RE
+.RE
.LP
Only those items that are active appear
as normal text in the menu;
diff -rNu xview-3.2p1.4.orig/config/Imakefile xview-3.2p1.4/config/Imakefile
--- xview-3.2p1.4.orig/config/Imakefile 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/Imakefile 2013-08-25 12:04:11.992380139 +0200
@@ -5,8 +5,8 @@
*
*/
-/**/# config directory
-/**/# @(#)Imakefile 1.9 28 Jun 1993 SMI
+XCOMM # config directory
+XCOMM # @(#)Imakefile 1.9 28 Jun 1993 SMI
#XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl library.tmpl
XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl XView.prog
diff -rNu xview-3.2p1.4.orig/config/XView.cf xview-3.2p1.4/config/XView.cf
--- xview-3.2p1.4.orig/config/XView.cf 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.cf 2013-08-25 12:04:11.984380139 +0200
@@ -1,8 +1,8 @@
#ifndef XViewCf
#define XViewCf YES
-/**/###########################################################################
-/**/# @(#)XView.cf 1.10 09 Feb 1992 SMI
-/**/# XView.cf for XView release 3.0. Specify site preferences here.
+XCOMM ###########################################################################
+XCOMM # @(#)XView.cf 1.10 09 Feb 1992 SMI
+XCOMM # XView.cf for XView release 3.0. Specify site preferences here.
/*
* When anything is changed here, you must remake all the Makefiles
@@ -51,8 +51,8 @@
* Enable Linux-specific behaviour
*/
#if defined(LinuxArchitecture) || defined(linux)
-#undef __linux
-#define __linux 1
+#undef __linux__
+#define __linux__ 1
#endif
#if defined(i386Architecture) || defined(i386)
#undef __i386
@@ -87,7 +87,8 @@
*/
/* #if HasOpenWindows */
# ifndef OpenWindowsHome
-# define OpenWindowsHome $$OPENWINHOME
+/*# define OpenWindowsHome $$OPENWINHOME*/
+# define OpenWindowsHome /usr
# endif
/* #endif */
/*
@@ -112,7 +113,8 @@
* the appropriate value.
*/
#ifndef XVDestDir
-#define XVDestDir /usr/openwin
+/*#define XVDestDir /usr/X11R6*/
+#define XVDestDir /usr
#endif
/*
* Command to add object modules to the library.
@@ -202,15 +204,18 @@
* building on a SunOS 4.x operating system add the flag -DSUNOS41.
*/
/* Add -DX11R6 to use workarounds for acess to xlib private data */
+/* FIXME: Should we add -DFULL_R5 for Linux? I don't know whether this affects
+ * binary compatibility, so we'll do it the safe way and leave it undefined
+ */
#ifndef LibXViewDefines
# if PreR4Server
# define LibXViewDefines -DPRE_R4_ICCCM
# else
-# ifdef __linux
+# ifdef __linux__
# ifdef __i386
-# define LibXViewDefines -I$(OPENWINHOME)/include -DX11R6 -Di386 -DOPENWINHOME_DEFAULT=\"$(OPENWINHOME)\"
+# define LibXViewDefines -I$(OPENWINHOME)/include -DX11R6 -Di386 -DNO_CAST_VATOAV
# else
-# define LibXViewDefines -I$(OPENWINHOME)/include -DX11R6 -DOPENWINHOME_DEFAULT=\"$(OPENWINHOME)\"
+# define LibXViewDefines -I$(OPENWINHOME)/include -DX11R6 -DNO_CAST_VATOAV
# endif
# else
# define LibXViewDefines -DFULL_R5 -I$(OPENWINHOME)/include -DSUNOS41 -DX11R6
@@ -286,7 +291,7 @@
* to YES.
*/
#ifndef RedefineTextExtrasMenu
-#define RedefineTextExtrasMenu YES
+#define RedefineTextExtrasMenu NO
#endif
/*
* DEC 3100 Config options
diff -rNu xview-3.2p1.4.orig/config/XView.lib xview-3.2p1.4/config/XView.lib
--- xview-3.2p1.4.orig/config/XView.lib 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.lib 2013-08-25 12:04:11.836380137 +0200
@@ -1,6 +1,6 @@
-/**/##########################################################################
-/**/# @(#)XView.lib 1.3 07 Jan 1992 SMI
-/**/# XView.lib for XView release 3.0. Common commands for all library builds.
+XCOMM ##########################################################################
+XCOMM # @(#)XView.lib 1.3 07 Jan 1992 SMI
+XCOMM # XView.lib for XView release 3.0. Common commands for all library builds.
#ifdef BandAidCompiler
#include BandAidCompiler
diff -rNu xview-3.2p1.4.orig/config/XView.obj xview-3.2p1.4/config/XView.obj
--- xview-3.2p1.4.orig/config/XView.obj 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.obj 2013-08-25 12:04:11.960380139 +0200
@@ -1,6 +1,6 @@
-/**/###########################################################################
-/**/# @(#)XView.obj 1.6 28 Jun 1993 SMI
-/**/# XView.obj for XView release 3.0. Common commands for all library objects.
+XCOMM ###########################################################################
+XCOMM # @(#)XView.obj 1.6 28 Jun 1993 SMI
+XCOMM # XView.obj for XView release 3.0. Common commands for all library objects.
/*
* If the library.tmpl file has already been included, then add its
@@ -55,10 +55,10 @@
*/
#if SharedLibXView
-#ifdef __linux
+#ifdef __linux__
SubdirNormalSharedLibraryTarget(${LIBTARGET},${SOREV},$(OBJS),$(SHARED_DIR),shared)
-#else /* __linux */
+#else /* __linux__ */
#if SubdirHasTextObjs
SubdirNormalSharedLibraryTarget(${LIBTARGET},${SOREV},$(TEXT_OBJS) $(SPECIAL_OBJS),$(SHARED_DIR),shared)
@@ -73,7 +73,7 @@
SubdirNormalSharedLibraryDataTarget(${LIBTARGET},${SOREV},$(DATA_OBJS),$(UNSHARED_DIR),.)
# endif
-#endif /* __linux */
+#endif /* __linux__ */
# if DebugLibXView
diff -rNu xview-3.2p1.4.orig/config/XView.prog xview-3.2p1.4/config/XView.prog
--- xview-3.2p1.4.orig/config/XView.prog 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.prog 2013-08-25 12:04:11.972380139 +0200
@@ -1,4 +1,4 @@
-/**/# @(#)XView.prog 1.6 28 Jun 1993 SMI
+XCOMM # @(#)XView.prog 1.6 28 Jun 1993 SMI
PopulateSCCSTree(h,$(ALLFILES))
diff -rNu xview-3.2p1.4.orig/config/XView.rules xview-3.2p1.4/config/XView.rules
--- xview-3.2p1.4.orig/config/XView.rules 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.rules 2013-08-25 12:04:11.940380138 +0200
@@ -1,6 +1,6 @@
-/**/###########################################################################
-/**/# @(#)XView.rules 1.8 12 May 1993 SMI
-/**/# XView.rules for XView release 3.0. Imake rules needed by distribution.
+XCOMM ###########################################################################
+XCOMM # @(#)XView.rules 1.8 12 May 1993 SMI
+XCOMM # XView.rules for XView release 3.0. Imake rules needed by distribution.
/*
***********************************************************************
@@ -104,6 +104,17 @@
* shared library directory for all objects in solist.
*/
#ifndef SubdirNormalSharedLibraryTarget
+#ifdef __linux__
+#define SubdirNormalSharedLibraryTarget(libname,rev,solist,dir,sub) @@\
+AllTarget(lib/**/libname.so.rev) @@\
+ @@\
+lib/**/libname.so.rev:: solist @@\
+ -@if [ ! -d dir ]; then mkdir dir; else exit 0; fi @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ pwd="`pwd`"; \ @@\
+ for i in solist; do (set -x; $(RM) dir/$$i; $(LN) "$$pwd"/sub/$$i dir/$$i); done
+
+#else /* __linux__ */
#define SubdirNormalSharedLibraryTarget(libname,rev,solist,dir,sub) @@\
AllTarget(lib/**/libname.so.rev) @@\
@@\
@@ -112,6 +123,7 @@
@case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
for i in solist; do (set -x; $(CP) sub/$$i dir; $(CP) sub/$$i .); done
+#endif /* !__linux__ */
#endif /* SubdirNormalSharedLibraryTarget */
/*
@@ -121,9 +133,9 @@
* unneeded data modules from the ./shared directory.
*/
#ifndef SubdirNormalSharedLibraryDataTarget
-#ifdef __linux
+#ifdef __linux__
#define SubdirNormalSharedLibraryDataTarget(libname,rev,salist,dir,sub)
-#else /* __linux */
+#else /* __linux__ */
#define SubdirNormalSharedLibraryDataTarget(libname,rev,salist,dir,sub) @@\
AllTarget(lib/**/libname.sa.rev) @@\
@@\
@@ -133,7 +145,7 @@
for i in salist; do \ @@\
(set -x; $(CP) sub/$$i dir; $(CP) shared/$$i $(SHARED_DIR)); done
-#endif /* !__linux */
+#endif /* !__linux__ */
#endif /* SubdirNormalSharedLibraryDataTarget */
@@ -145,22 +157,24 @@
* included in both the .so and the .sa parts of the library.
*/
#ifndef SubdirBuildNormalSharedLibraryTarget
-#ifdef __linux
+#ifdef __linux__
#define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
AllTarget(lib/**/libname.so.rev) @@\
@@\
lib/**/libname.so.rev:: solist @@\
$(RM) $@~ @@\
- (cd sodir; $(CC) -shared -Wl,-soname -Wl,`basename $@ | sed 's/\(\.[0-9]\).*$$/\1/'` -o $@~ ?*.o) @@\
- $(RM) $@ @@\
+ (cd sodir; $(CC) -shared -Wl,-soname -Wl,`basename $@ | sed 's/\(\.[0-9]\).*$$/\1/'` -o $@~ ?*.o $(XVIEW_DEPLIBS)) @@\
+ $(RM) $@ `basename $@ | sed 's/\(\.[0-9]\).*$$/\1/'` lib/**/libname.so @@\
$(MV) sodir/$@~ $@ @@\
+ $(LN) $@ `basename $@ | sed 's/\(\.[0-9]\).*$$/\1/'` @@\
+ $(LN) $@ lib/**/libname.so @@\
@@\
@@\
clean:: @@\
- $(RM) lib/**/libname.so.rev sodir/?*.o
+ $(RM) lib/**/libname.so.rev `basename lib/**/libname.so.rev | sed 's/\(\.[0-9]\).*$$/\1/'` lib/**/libname.so sodir/?*.o
-#else /* __linux */
+#else /* __linux__ */
#define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
AllTarget(lib/**/libname.so.rev) @@\
@@ -177,7 +191,7 @@
clean:: @@\
$(RM) lib/**/libname.so.rev sodir/?*.o strings*
-#endif /* !__linux */
+#endif /* !__linux__ */
#endif /* SubdirBuildNormalSharedLibraryTarget */
@@ -190,12 +204,12 @@
* sorting script and a list of objects to sort.
*/
#ifndef SubdirBuildSortedSharedLibraryTarget
-#ifdef __linux
+#ifdef __linux__
#define SubdirBuildSortedSharedLibraryTarget(libname,rev,solist,sodir,objsort,objlist) \
SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir)
-#else /* __linux */
+#else /* __linux__ */
#define SubdirBuildSortedSharedLibraryTarget(libname,rev,solist,sodir,objsort,objlist) @@\
AllTarget(lib/**/libname.so.rev) @@\
@@ -213,7 +227,7 @@
clean:: @@\
$(RM) lib/**/libname.so.rev sodir/?*.o strings* xstrings*
-#endif /* !__linux */
+#endif /* !__linux__ */
#endif /* SubdirBuildSortedSharedLibraryTarget */
/*
@@ -226,10 +240,10 @@
#ifndef SubdirBuildNormalSharedLibraryDataTarget
-#ifdef __linux
+#ifdef __linux__
#define SubdirBuildNormalSharedLibraryDataTarget(libname,rev,sadir)
-#else /* __linux */
+#else /* __linux__ */
#define SubdirBuildNormalSharedLibraryDataTarget(libname,rev,sadir) @@\
AllTarget(lib/**/libname.sa.rev) @@\
@@ -244,15 +258,15 @@
clean:: @@\
$(RM) lib/**/libname.sa.rev sadir/?*.o
-#endif /* !__linux */
+#endif /* !__linux__ */
#endif /* SubdirBuildNormalSharedLibraryDataTarget */
#else /* DoRanlibCmd */
#ifndef SubdirBuildNormalSharedLibraryDataTarget
-#ifdef __linux
+#ifdef __linux__
#define SubdirBuildNormalSharedLibraryDataTarget(libname,rev,sadir)
-#else /* __linux */
+#else /* __linux__ */
#define SubdirBuildNormalSharedLibraryDataTarget(libname,rev,sadir) @@\
AllTarget(lib/**/libname.sa.rev) @@\
@@\
@@ -267,7 +281,7 @@
#endif /* SubdirBuildNormalSharedLibraryDataTarget */
-#endif /* !__linux */
+#endif /* !__linux__ */
#endif /* DoRanlibCmd */
/*
@@ -277,6 +291,26 @@
* overflow the GLOBAL_OFFSET_TABLE for some architectures.
*/
#ifndef SubdirSharedLibraryObjectRule
+#ifdef __linux__
+#define SubdirSharedLibraryObjectRule() @@\
+all:: @@\
+ -@if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
+ -@if [ ! -f $(XSTR_STRINGS_FILE) ]; then \ @@\
+ touch $(XSTR_STRINGS_FILE); else exit 0; fi @@\
+ -@if [ ! -f strings ]; then \ @@\
+ $(LN) $(XSTR_STRINGS_FILE) strings; else exit 0; fi @@\
+ @@\
+.c.o: @@\
+ $(RM) $@ shared/$@ @@\
+ $(CC) $(PIC) $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(STRCONST) -c $*.c -o shared/$*.o @@\
+ $(CC) $(CFLAGS) $(STRCONST) -c $*.c -o $*.o @@\
+ @@\
+clean:: @@\
+ $(RM) strings* @@\
+ -@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\
+ $(RM) shared/?*.o; else exit 0; fi @@\
+
+#else /* __linux__ */
#define SubdirSharedLibraryObjectRule() @@\
all:: @@\
-@if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
@@ -295,6 +329,7 @@
-@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\
$(RM) shared/?*.o; else exit 0; fi @@\
+#endif /* !__linux__ */
#endif /* SubdirSharedLibraryObjectRule */
/*
@@ -380,9 +415,9 @@
* InstallSharedLibraryDataNoBuild - rules to install the shared library data
* Check if ranlib is needed
*/
-#ifdef __linux
+#ifdef __linux__
#define InstallSharedLibraryDataNoBuild(libname,rev,dest)
-#else /* __linux */
+#else /* __linux__ */
#if DoRanlibCmd
#ifndef InstallSharedLibraryDataNoBuild
@@ -404,12 +439,13 @@
#endif /* InstallSharedLibraryDataNoBuild */
#endif /* DoRanlibCmd */
-#endif /* __linux */
+#endif /* __linux__ */
/*
* InstallSharedLibraryNoBuild - generate rules to install the shared library.
*/
#ifndef InstallSharedLibraryNoBuild
+#ifdef __linux__
#define InstallSharedLibraryNoBuild(libname,rev,dest) @@\
install:: @@\
$(RM) $(DESTDIR)dest/lib/**/libname.so @@\
@@ -417,6 +453,14 @@
(cd $(DESTDIR)dest && $(LN) lib/**/libname.so.rev lib/**/libname.so) @@\
(PATH=$$PATH:/sbin:/usr/sbin && ldconfig -v -N -l $(DESTDIR)dest/lib/**/libname.so.rev)
+#else /* __linux__ */
+#define InstallSharedLibraryNoBuild(libname,rev,dest) @@\
+install:: @@\
+ $(RM) $(DESTDIR)dest/lib/**/libname.so @@\
+ $(INSTALL) -c $(INSTSHAREDLIBFLAGS) lib/**/libname.so.rev $(DESTDIR)dest @@\
+ (cd $(DESTDIR)dest && $(LN) lib/**/libname.so.rev lib/**/libname.so) @@\
+
+#endif /* !__linux__ */
#endif /* InstallSharedLibraryNoBuild */
/*
@@ -494,12 +538,14 @@
#define LinkToFile(step,filename,linkname,dir) @@\
step:: filename @@\
@case '${MFLAGS}' in *[i]*) set +e;; esac; @@\
- -@if [ ! -f dir/linkname ]; then \ @@\
- echo "linking dir/linkname to filename..." \ @@\
- echo " cd" dir; cd dir ; $(RM) linkname ; \ @@\
+ -@linkdestdir=dir; \ @@\
+ [ step = install ] && [ "x$(DESTDIR)" != x ] && linkdestdir=$(DESTDIR)/$$linkdestdir; \ @@\
+ if [ ! -f $$linkdestdir/linkname ]; then \ @@\
+ echo "linking $$linkdestdir/linkname to filename..."; \ @@\
+ echo " cd $$linkdestdir"; cd "$$linkdestdir"; $(RM) linkname ; \ @@\
(set -x; $(LN) filename linkname); \ @@\
else \ @@\
- echo "dir/linkname exists, no link made." ; \ @@\
+ echo "$$linkdestdir/linkname exists, no link made." ; \ @@\
fi
#endif /* LinkToFile */
diff -rNu xview-3.2p1.4.orig/config/XView.rules.xstr xview-3.2p1.4/config/XView.rules.xstr
--- xview-3.2p1.4.orig/config/XView.rules.xstr 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.rules.xstr 2013-08-25 12:04:11.840380137 +0200
@@ -1,6 +1,6 @@
-/**/###########################################################################
-/**/# @(#)XView.rules 1.8 12 May 1993 SMI
-/**/# XView.rules for XView release 3.0. Imake rules needed by distribution.
+XCOMM ###########################################################################
+XCOMM # @(#)XView.rules 1.8 12 May 1993 SMI
+XCOMM # XView.rules for XView release 3.0. Imake rules needed by distribution.
/*
***********************************************************************
diff -rNu xview-3.2p1.4.orig/config/XView.tmpl xview-3.2p1.4/config/XView.tmpl
--- xview-3.2p1.4.orig/config/XView.tmpl 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/config/XView.tmpl 2013-08-25 12:04:11.996380139 +0200
@@ -2,10 +2,10 @@
#define XViewTmpl YES
#include <XView.cf>
-/**/###########################################################################
-/**/# @(#)XView.tmpl 1.15 12 May 1993 SMI
-/**/# XView.tmpl for XView release 3.2. Template to add additional config
-/**/# rules to those supplied with X Version 11 release 5.
+XCOMM ###########################################################################
+XCOMM # @(#)XView.tmpl 1.15 12 May 1993 SMI
+XCOMM # XView.tmpl for XView release 3.2. Template to add additional config
+XCOMM # rules to those supplied with X Version 11 release 5.
/***************************************************************************/
/***************************************************************************/
@@ -77,7 +77,8 @@
* Where to install the help files for spot help.
*/
#ifndef XVHelpDest
-#define XVHelpDest $(LIBRARY_DEST)/help
+/*#define XVHelpDest $(LIBRARY_DEST)/help*/
+#define XVHelpDest $(XVDESTDIR)/share/openwin/help
#endif
/*
* Where to install the extra support files.
@@ -95,7 +96,7 @@
/*
* Work around small conflict with Project.tmpl file
*/
-#ifndef __linux
+#ifndef __linux__
#if UseInstalled
MKDIRHIER = BourneShell BinDir/mkdirhier
#endif
@@ -196,6 +197,7 @@
/*
* use the same trick X11R5 does for defining rules for installed libs
*/
+#undef _Use
#ifdef UseInstalled
#define _Use(a,b) a
#else
@@ -412,7 +414,7 @@
*/
#if SharedLibXView
# ifndef SharedXViewRev
-#ifdef __linux
+#ifdef __linux__
#define SharedXViewRev 3.2.4
#else
#if SystemV4
diff -rNu xview-3.2p1.4.orig/contrib/Imakefile xview-3.2p1.4/contrib/Imakefile
--- xview-3.2p1.4.orig/contrib/Imakefile 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/Imakefile 2013-08-25 12:04:12.268380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 28 Jun 1993 SMI
-/**/# Imakefile for contrib directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 28 Jun 1993 SMI
+XCOMM # Imakefile for contrib directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/contrib/examples/Imakefile xview-3.2p1.4/contrib/examples/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/Imakefile 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/examples/Imakefile 2013-08-25 12:04:12.268380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.4 1/7/92 SMI
-/**/# Imakefile for contrib/examples directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.4 1/7/92 SMI
+XCOMM # Imakefile for contrib/examples directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/contrib/examples/canvas/Imakefile xview-3.2p1.4/contrib/examples/canvas/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/canvas/Imakefile 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/contrib/examples/canvas/Imakefile 2013-08-25 12:04:12.392380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/canvas
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/canvas
#define InstallSrcs YES
LOCATION = examples/canvas
diff -rNu xview-3.2p1.4.orig/contrib/examples/color/Imakefile xview-3.2p1.4/contrib/examples/color/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/color/Imakefile 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/contrib/examples/color/Imakefile 2013-08-25 12:04:12.276380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/color
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/color
#define InstallSrcs YES
LOCATION = examples/color
diff -rNu xview-3.2p1.4.orig/contrib/examples/color/animate.c xview-3.2p1.4/contrib/examples/color/animate.c
--- xview-3.2p1.4.orig/contrib/examples/color/animate.c 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/contrib/examples/color/animate.c 2013-08-25 12:04:12.272380143 +0200
@@ -82,7 +82,7 @@
dpy = (Display *)xv_get(frame, XV_DISPLAY);
_font = (Xv_Font)xv_find(frame, FONT,
-#ifndef __linux
+#ifndef __linux__
FONT_NAME, "icon",
#else
FONT_NAME, "lucidasanstypewriter-24",
diff -rNu xview-3.2p1.4.orig/contrib/examples/cursor/Imakefile xview-3.2p1.4/contrib/examples/cursor/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/cursor/Imakefile 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/contrib/examples/cursor/Imakefile 2013-08-25 12:04:12.276380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/cursor
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/cursor
#define InstallSrcs YES
LOCATION = examples/cursor
diff -rNu xview-3.2p1.4.orig/contrib/examples/defaults/Imakefile xview-3.2p1.4/contrib/examples/defaults/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/defaults/Imakefile 2013-08-25 12:02:12.800378391 +0200
+++ xview-3.2p1.4/contrib/examples/defaults/Imakefile 2013-08-25 12:04:12.276380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/defaults
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/defaults
#define InstallSrcs YES
LOCATION = examples/defaults
diff -rNu xview-3.2p1.4.orig/contrib/examples/dnd/Imakefile xview-3.2p1.4/contrib/examples/dnd/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/dnd/Imakefile 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/examples/dnd/Imakefile 2013-08-25 12:04:12.272380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.5 1/7/92 SMI
-/**/# Imakefile for examples/dnd
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.5 1/7/92 SMI
+XCOMM # Imakefile for examples/dnd
#define InstallSrcs YES
LOCATION = examples/dnd
diff -rNu xview-3.2p1.4.orig/contrib/examples/dnd/source1.c xview-3.2p1.4/contrib/examples/dnd/source1.c
--- xview-3.2p1.4.orig/contrib/examples/dnd/source1.c 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/examples/dnd/source1.c 2013-08-25 12:04:12.272380143 +0200
@@ -20,7 +20,7 @@
#include "./drop.icon"
};
-#if defined(__linux) && !defined(NBBY)
+#if defined(__linux__) && !defined(NBBY)
#define NBBY 8
#endif
diff -rNu xview-3.2p1.4.orig/contrib/examples/dnd/source2.c xview-3.2p1.4/contrib/examples/dnd/source2.c
--- xview-3.2p1.4.orig/contrib/examples/dnd/source2.c 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/examples/dnd/source2.c 2013-08-25 12:04:12.272380143 +0200
@@ -20,7 +20,7 @@
#include "./drop.icon"
};
-#if defined(__linux) && !defined(NBBY)
+#if defined(__linux__) && !defined(NBBY)
#define NBBY 8
#endif
diff -rNu xview-3.2p1.4.orig/contrib/examples/extensions/Imakefile xview-3.2p1.4/contrib/examples/extensions/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/extensions/Imakefile 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/extensions/Imakefile 2013-08-25 12:04:12.364380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.4 1/7/92 SMI
-/**/# Imakefile for examples/extensions
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.4 1/7/92 SMI
+XCOMM # Imakefile for examples/extensions
#define IHaveSubdirs
#define InstallSrcs YES
diff -rNu xview-3.2p1.4.orig/contrib/examples/extensions/panel_items/Imakefile xview-3.2p1.4/contrib/examples/extensions/panel_items/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/extensions/panel_items/Imakefile 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/extensions/panel_items/Imakefile 2013-08-25 12:04:12.364380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.5 1/7/92 SMI
-/**/# Imakefile for examples/extensions
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.5 1/7/92 SMI
+XCOMM # Imakefile for examples/extensions
#define InstallSrcs YES
LOCATION = examples/extensions/panel_items
diff -rNu xview-3.2p1.4.orig/contrib/examples/extensions/panel_items/wizzy.c xview-3.2p1.4/contrib/examples/extensions/panel_items/wizzy.c
--- xview-3.2p1.4.orig/contrib/examples/extensions/panel_items/wizzy.c 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/extensions/panel_items/wizzy.c 2013-08-25 12:04:12.364380145 +0200
@@ -41,7 +41,7 @@
#ifdef WIZZY_CAN_ACCEPT_KBD_FOCUS
static void wizzy_accept_kbd_focus();
static void wizzy_yield_kbd_focus();
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
/*
* Panel Operations Vector Table for this item.
@@ -68,7 +68,7 @@
#else
NULL, /* accept_kbd_focus() */
NULL, /* yield_kbd_focus() */
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
NULL /* extension: reserved for future use */
};
@@ -86,7 +86,7 @@
Panel panel; /* Panel this item is owned by */
#ifdef WIZZY_CAN_ACCEPT_KBD_FOCUS
int has_kbd_focus; /* TRUE or FALSE */
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
} Wizzy_info;
@@ -136,7 +136,7 @@
PANEL_OPS_VECTOR, &ops,
#ifdef WIZZY_CAN_ACCEPT_KBD_FOCUS
PANEL_ACCEPT_KEYSTROKE, TRUE,
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
0);
return XV_OK;
@@ -226,7 +226,7 @@
return XV_OK;
#ifdef WIZZY_CAN_ACCEPT_KBD_FOCUS
wizzy_remove(item);
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
free(dp);
return XV_OK;
}
@@ -397,7 +397,7 @@
if (!panel_status->destroying &&
xv_get(dp->panel, PANEL_CARET_ITEM) == item)
(void) panel_advance_caret(dp->panel);
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
}
@@ -415,7 +415,7 @@
/* If no item has the keyboard focus, then give this item the focus */
if (!xv_get(dp->panel, PANEL_CARET_ITEM))
xv_set(dp->panel, PANEL_CARET_ITEM, item, 0);
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
}
@@ -491,5 +491,5 @@
focus_win = xv_get(frame, FRAME_FOCUS_WIN);
xv_set(focus_win, XV_SHOW, FALSE, 0);
}
-#endif WIZZY_CAN_ACCEPT_KBD_FOCUS
+#endif /* WIZZY_CAN_ACCEPT_KBD_FOCUS */
diff -rNu xview-3.2p1.4.orig/contrib/examples/fonts/Imakefile xview-3.2p1.4/contrib/examples/fonts/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/fonts/Imakefile 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/fonts/Imakefile 2013-08-25 12:04:12.368380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/fonts
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/fonts
#define InstallSrcs YES
LOCATION = examples/fonts
diff -rNu xview-3.2p1.4.orig/contrib/examples/fonts/simple_font.c xview-3.2p1.4/contrib/examples/fonts/simple_font.c
--- xview-3.2p1.4.orig/contrib/examples/fonts/simple_font.c 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/fonts/simple_font.c 2013-08-25 12:04:12.392380145 +0200
@@ -38,7 +38,7 @@
window_fit(frame);
dpy = (Display *)xv_get(frame, XV_DISPLAY);
-#ifndef __linux
+#ifndef __linux__
font = (Xv_Font)xv_find(frame, FONT, FONT_NAME, "courier", NULL);
#else
font = (Xv_Font)xv_find(frame, FONT, FONT_NAME, "fixed", NULL);
diff -rNu xview-3.2p1.4.orig/contrib/examples/frames/Imakefile xview-3.2p1.4/contrib/examples/frames/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/frames/Imakefile 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/frames/Imakefile 2013-08-25 12:04:12.364380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/frames
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/frames
#define InstallSrcs YES
LOCATION = examples/frames
diff -rNu xview-3.2p1.4.orig/contrib/examples/icons/Imakefile xview-3.2p1.4/contrib/examples/icons/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/icons/Imakefile 2013-08-25 12:02:12.804378391 +0200
+++ xview-3.2p1.4/contrib/examples/icons/Imakefile 2013-08-25 12:04:12.392380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/icons
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/icons
#define InstallSrcs YES
LOCATION = examples/icons
diff -rNu xview-3.2p1.4.orig/contrib/examples/menus/Imakefile xview-3.2p1.4/contrib/examples/menus/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/menus/Imakefile 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/menus/Imakefile 2013-08-25 12:04:12.360380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/menus
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/menus
#define InstallSrcs YES
LOCATION = examples/menus
diff -rNu xview-3.2p1.4.orig/contrib/examples/menus/menu_dir.c xview-3.2p1.4/contrib/examples/menus/menu_dir.c
--- xview-3.2p1.4.orig/contrib/examples/menus/menu_dir.c 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/menus/menu_dir.c 2013-08-25 12:04:12.276380143 +0200
@@ -14,7 +14,12 @@
#include <xview/canvas.h>
#include <sys/stat.h>
#include <dirent.h>
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#include <dirent.h>
+#else
#include <sys/dirent.h>
+#endif
#include <X11/Xos.h>
#ifndef MAXPATHLEN
#include <sys/param.h> /* probably sun/BSD specific */
diff -rNu xview-3.2p1.4.orig/contrib/examples/menus/menu_dir2.c xview-3.2p1.4/contrib/examples/menus/menu_dir2.c
--- xview-3.2p1.4.orig/contrib/examples/menus/menu_dir2.c 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/menus/menu_dir2.c 2013-08-25 12:04:12.348380144 +0200
@@ -14,7 +14,12 @@
#include <xview/canvas.h>
#include <sys/stat.h>
#include <dirent.h>
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#include <dirent.h>
+#else
#include <sys/dirent.h>
+#endif
#include <X11/Xos.h>
#ifndef MAXPATHLEN
#include <sys/param.h>
diff -rNu xview-3.2p1.4.orig/contrib/examples/misc/Imakefile xview-3.2p1.4/contrib/examples/misc/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/misc/Imakefile 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/misc/Imakefile 2013-08-25 12:04:12.368380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.6 1/7/92 SMI
-/**/# Imakefile for examples/misc
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.6 1/7/92 SMI
+XCOMM # Imakefile for examples/misc
#define InstallSrcs YES
LOCATION = examples/misc
diff -rNu xview-3.2p1.4.orig/contrib/examples/notice/Imakefile xview-3.2p1.4/contrib/examples/notice/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/notice/Imakefile 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/notice/Imakefile 2013-08-25 12:04:12.396380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/notice
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/notice
#define InstallSrcs YES
LOCATION = examples/notice
diff -rNu xview-3.2p1.4.orig/contrib/examples/notifier/Imakefile xview-3.2p1.4/contrib/examples/notifier/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/notifier/Imakefile 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/notifier/Imakefile 2013-08-25 12:04:12.272380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/notifier
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/notifier
#define InstallSrcs YES
LOCATION = examples/notifier
diff -rNu xview-3.2p1.4.orig/contrib/examples/notifier/animate.c xview-3.2p1.4/contrib/examples/notifier/animate.c
--- xview-3.2p1.4.orig/contrib/examples/notifier/animate.c 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/notifier/animate.c 2013-08-25 12:04:12.272380143 +0200
@@ -83,7 +83,7 @@
dpy = (Display *)xv_get(frame, XV_DISPLAY);
_font = (Xv_Font)xv_find(frame, FONT,
-#ifndef __linux
+#ifndef __linux__
FONT_NAME, "icon",
#else
FONT_NAME, "lucidasanstypewriter-24",
diff -rNu xview-3.2p1.4.orig/contrib/examples/notifier/notify.c xview-3.2p1.4/contrib/examples/notifier/notify.c
--- xview-3.2p1.4.orig/contrib/examples/notifier/notify.c 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/notifier/notify.c 2013-08-25 12:04:12.272380143 +0200
@@ -15,7 +15,7 @@
int RUN = TRUE;
XFontStruct *font;
/* Time out for select. */
-#ifndef __linux
+#ifndef __linux__
struct timeval timeout = { 0, 250000 };
#else
struct timeval timeout; /* Linux changes timeval in select(), reinit every time */
@@ -99,7 +99,7 @@
while (RUN) {
FD_SET(fd, &readfds);
-#ifdef __linux
+#ifdef __linux__
timeout.tv_sec = 0;
timeout.tv_usec = 250000;
#endif
diff -rNu xview-3.2p1.4.orig/contrib/examples/notifier/ntfy_pipe.c xview-3.2p1.4/contrib/examples/notifier/ntfy_pipe.c
--- xview-3.2p1.4.orig/contrib/examples/notifier/ntfy_pipe.c 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/notifier/ntfy_pipe.c 2013-08-25 12:04:12.272380143 +0200
@@ -169,13 +169,11 @@
struct rusage *rusage; /* resources used by this process (unused) */
{
if (WIFEXITED(*status)) {
- printf("Process termined with status %d\n",
#ifdef SVR4
- *status
+ printf("Process termined with status %d\n", *status);
#else
- status->w_retcode
+ printf("Process termined with status %d\n", status->w_retcode);
#endif
- );
/* unregister input func with appropriate file descriptor */
notify_set_input_func(client, NOTIFY_FUNC_NULL,
(client == client1)? pipe_io[1][0] : 0);
diff -rNu xview-3.2p1.4.orig/contrib/examples/panels/Imakefile xview-3.2p1.4/contrib/examples/panels/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/panels/Imakefile 2013-08-25 12:02:12.808378391 +0200
+++ xview-3.2p1.4/contrib/examples/panels/Imakefile 2013-08-25 12:04:12.272380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/panels
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/panels
#define InstallSrcs YES
LOCATION = examples/panels
diff -rNu xview-3.2p1.4.orig/contrib/examples/scrollbar/Imakefile xview-3.2p1.4/contrib/examples/scrollbar/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/scrollbar/Imakefile 2013-08-25 12:02:12.812378391 +0200
+++ xview-3.2p1.4/contrib/examples/scrollbar/Imakefile 2013-08-25 12:04:12.276380143 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/scrollbar
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/scrollbar
#define InstallSrcs YES
LOCATION = examples/scrollbar
diff -rNu xview-3.2p1.4.orig/contrib/examples/scrollbar/scroll_cells.c xview-3.2p1.4/contrib/examples/scrollbar/scroll_cells.c
--- xview-3.2p1.4.orig/contrib/examples/scrollbar/scroll_cells.c 2013-08-25 12:02:12.812378391 +0200
+++ xview-3.2p1.4/contrib/examples/scrollbar/scroll_cells.c 2013-08-25 12:04:12.276380143 +0200
@@ -96,7 +96,7 @@
Display *dpy = (Display *)xv_get(canvas, XV_DISPLAY);
font = (Xv_Font)xv_find(frame, FONT,
-#ifndef __linux
+#ifndef __linux__
FONT_NAME, "icon",
#else
FONT_NAME, "lucidasanstypewriter-24",
diff -rNu xview-3.2p1.4.orig/contrib/examples/selection/Imakefile xview-3.2p1.4/contrib/examples/selection/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/selection/Imakefile 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/examples/selection/Imakefile 2013-08-25 12:04:12.368380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.4 1/7/92 SMI
-/**/# Imakefile for examples/cursor
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.4 1/7/92 SMI
+XCOMM # Imakefile for examples/cursor
#define InstallSrcs YES
LOCATION = examples/selection
diff -rNu xview-3.2p1.4.orig/contrib/examples/seln_svc/Imakefile xview-3.2p1.4/contrib/examples/seln_svc/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/seln_svc/Imakefile 2013-08-25 12:02:12.812378391 +0200
+++ xview-3.2p1.4/contrib/examples/seln_svc/Imakefile 2013-08-25 12:04:12.396380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/seln_svc
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/seln_svc
#define InstallSrcs YES
LOCATION = examples/seln_svc
diff -rNu xview-3.2p1.4.orig/contrib/examples/sv_compat/Imakefile xview-3.2p1.4/contrib/examples/sv_compat/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/sv_compat/Imakefile 2013-08-25 12:02:12.812378391 +0200
+++ xview-3.2p1.4/contrib/examples/sv_compat/Imakefile 2013-08-25 12:04:12.392380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.7 90/08/02 SMI
-/**/# Imakefile for examples/sv_compat
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.7 90/08/02 SMI
+XCOMM # Imakefile for examples/sv_compat
#define InstallSrcs YES
LOCATION = examples/sv_compat
diff -rNu xview-3.2p1.4.orig/contrib/examples/textsw/Imakefile xview-3.2p1.4/contrib/examples/textsw/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/textsw/Imakefile 2013-08-25 12:02:12.812378391 +0200
+++ xview-3.2p1.4/contrib/examples/textsw/Imakefile 2013-08-25 12:04:12.392380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.3 1/7/92 SMI
-/**/# Imakefile for examples/textsw
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.3 1/7/92 SMI
+XCOMM # Imakefile for examples/textsw
#define InstallSrcs YES
LOCATION = examples/textsw
diff -rNu xview-3.2p1.4.orig/contrib/examples/ttysw/Imakefile xview-3.2p1.4/contrib/examples/ttysw/Imakefile
--- xview-3.2p1.4.orig/contrib/examples/ttysw/Imakefile 2013-08-25 12:02:12.816378391 +0200
+++ xview-3.2p1.4/contrib/examples/ttysw/Imakefile 2013-08-25 12:04:12.364380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.9 1/7/92 SMI
-/**/# Imakefile for examples/textsw
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.9 1/7/92 SMI
+XCOMM # Imakefile for examples/textsw
#define InstallSrcs YES
LOCATION = examples/ttysw
diff -rNu xview-3.2p1.4.orig/contrib/misc/capitalize xview-3.2p1.4/contrib/misc/capitalize
--- xview-3.2p1.4.orig/contrib/misc/capitalize 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/capitalize 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,27 @@
+#!/usr/bin/perl --
+# Free replacement for Sun's capitalize as required by Openwin's
+# text_extras_menu.
+#
+# Copyright (C) 1998 by Martin Buck <mbuck@debian.org>
+# Licensed under the GNU General Public License
+
+sub usage {
+ die "Usage: $0 -u|-l|-c\n";
+}
+
+usage if ($#ARGV != 0);
+
+if ($ARGV[0] eq "-u") {
+ $capitalize = sub { s/(.)/\u$1/g };
+} elsif ($ARGV[0] eq "-l") {
+ $capitalize = sub { s/(.)/\l$1/g };
+} elsif ($ARGV[0] eq "-c") {
+ $capitalize = sub { s/(^| |\t)(.)/$1\u$2/g };
+} else {
+ usage;
+}
+
+while (<STDIN>) {
+ &$capitalize;
+ print $_;
+}
diff -rNu xview-3.2p1.4.orig/contrib/misc/capitalize.1 xview-3.2p1.4/contrib/misc/capitalize.1
--- xview-3.2p1.4.orig/contrib/misc/capitalize.1 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/capitalize.1 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,35 @@
+.\" Copyright (C) 1999 by Martin Buck <mbuck@debian.org>
+.\" Licensed under the GNU General Public License
+
+.TH capitalize 1 "Version 3.2p1" XView
+
+.SH NAME
+capitalize \- change case of text
+
+.SH SYNOPSIS
+.B capitalize
+.I -u|-l|-c
+
+.SH DESCRIPTION
+\fIcapitalize\fP is a filter that changes the case of text sent through it.
+It reads text from \fBstdin\fP and writes the result to \fBstdout\fP.
+.PP
+Please note that \fIcapitalize\fP is intended mainly to be run from XView's
+text menu. It is used in the default \fBtext_extras_menu\fP.
+
+.SH OPTIONS
+.IP "\fB-u\fP"
+Convert all characters to upper case.
+.IP "\fB-l\fP"
+Convert all characters to lower case.
+.IP "\fB-c\fP"
+Convert the first letter of words to upper case.
+
+.SH AUTHOR
+Martin Buck <mbuck@debian.org> for Debian GNU/Linux
+
+.SH "SEE ALSO"
+.BR xview (7),
+.BR insert_brackets (1),
+.BR remove_brackets (1),
+.BR shift_lines (1)
diff -rNu xview-3.2p1.4.orig/contrib/misc/insert_brackets xview-3.2p1.4/contrib/misc/insert_brackets
--- xview-3.2p1.4.orig/contrib/misc/insert_brackets 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/insert_brackets 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,16 @@
+#!/usr/bin/perl --
+# Free replacement for Sun's insert_brackets as required by Openwin's
+# text_extras_menu.
+#
+# Copyright (C) 1998 by Martin Buck <mbuck@debian.org>
+# Licensed under the GNU General Public License
+
+if ($#ARGV != 1) {
+ die "Usage: $0 <left> <right>\n";
+}
+
+print "$ARGV[0]";
+while (<STDIN>) {
+ print $_;
+}
+print "$ARGV[1]";
diff -rNu xview-3.2p1.4.orig/contrib/misc/insert_brackets.1 xview-3.2p1.4/contrib/misc/insert_brackets.1
--- xview-3.2p1.4.orig/contrib/misc/insert_brackets.1 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/insert_brackets.1 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,29 @@
+.\" Copyright (C) 1999 by Martin Buck <mbuck@debian.org>
+.\" Licensed under the GNU General Public License
+
+.TH insert_brackets 1 "Version 3.2p1" XView
+
+.SH NAME
+insert_brackets \- add delimiters before/after text
+
+.SH SYNOPSIS
+.B insert_brackets
+.I delimiter1 delimiter2
+
+.SH DESCRIPTION
+\fIinsert_brackets\fP is a filter that adds the specified delimiters around
+the text sent through it. It reads text from stdin and writes the result to
+stdout. The delimiters can be arbitrary characters, but things like
+\fB{ }\fP, \fB( )\fP, etc. are most common.
+.PP
+Please note that \fIinsert_brackets\fP is intended mainly to be run from XView's
+text menu. It is used in the default \fBtext_extras_menu\fP.
+
+.SH AUTHOR
+Martin Buck <mbuck@debian.org> for Debian GNU/Linux
+
+.SH "SEE ALSO"
+.BR xview (7),
+.BR capitalize (1),
+.BR remove_brackets (1),
+.BR shift_lines (1)
diff -rNu xview-3.2p1.4.orig/contrib/misc/remove_brackets xview-3.2p1.4/contrib/misc/remove_brackets
--- xview-3.2p1.4.orig/contrib/misc/remove_brackets 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/remove_brackets 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,18 @@
+#!/usr/bin/perl --
+# Free replacement for Sun's remove_brackets as required by Openwin's
+# text_extras_menu.
+#
+# Copyright (C) 1998 by Martin Buck <mbuck@debian.org>
+# Licensed under the GNU General Public License
+
+if ($#ARGV != 1) {
+ die "Usage: $0 <left> <right>\n";
+}
+
+undef $/;
+$_ = <STDIN>;
+
+if (substr($_, 0, 1) eq $ARGV[0] && substr($_, -1) eq $ARGV[1]) {
+ $_ = substr($_, 1, -1);
+}
+print $_;
diff -rNu xview-3.2p1.4.orig/contrib/misc/remove_brackets.1 xview-3.2p1.4/contrib/misc/remove_brackets.1
--- xview-3.2p1.4.orig/contrib/misc/remove_brackets.1 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/remove_brackets.1 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,30 @@
+.\" Copyright (C) 1999 by Martin Buck <mbuck@debian.org>
+.\" Licensed under the GNU General Public License
+
+.TH remove_brackets 1 "Version 3.2p1" XView
+
+.SH NAME
+remove_brackets \- remove delimiters from text
+
+.SH SYNOPSIS
+.B remove_brackets
+.I delimiter1 delimiter2
+
+.SH DESCRIPTION
+\fIremove_brackets\fP is a filter that removes the specified delimiters from
+the beginning/end of the text sent through it. It reads text from stdin and
+writes the result to stdout. The delimiters can be arbitrary characters, but
+things like \fB{ }\fP, \fB( )\fP, etc. are most common. The delimiters are
+removed only if both of them match.
+.PP
+Please note that \fIremove_brackets\fP is intended mainly to be run from XView's
+text menu. It is used in the default \fBtext_extras_menu\fP.
+
+.SH AUTHOR
+Martin Buck <mbuck@debian.org> for Debian GNU/Linux
+
+.SH "SEE ALSO"
+.BR xview (7),
+.BR capitalize (1),
+.BR insert_brackets (1),
+.BR shift_lines (1)
diff -rNu xview-3.2p1.4.orig/contrib/misc/shift_lines xview-3.2p1.4/contrib/misc/shift_lines
--- xview-3.2p1.4.orig/contrib/misc/shift_lines 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/shift_lines 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,29 @@
+#!/usr/bin/perl --
+# Free replacement for Sun's shift_lines as required by Openwin's
+# text_extras_menu.
+#
+# Copyright (C) 1998 by Martin Buck <mbuck@debian.org>
+# Licensed under the GNU General Public License
+
+$shift = 1;
+if ($#ARGV >= 0) {
+ if ($#ARGV != 1 || $ARGV[0] ne "-t") {
+ die "Usage: $0 [-t <num>]\n";
+ }
+ $shift = $ARGV[1];
+}
+
+$spaces = "";
+if ($shift >= 0) {
+ for ($s = 1; $s <= $shift; $s++) {
+ $spaces = $spaces . " ";
+ }
+}
+
+while (<STDIN>) {
+ if ($shift < 0) {
+ print substr($_, -$shift);
+ } else {
+ print $spaces . $_;
+ }
+}
diff -rNu xview-3.2p1.4.orig/contrib/misc/shift_lines.1 xview-3.2p1.4/contrib/misc/shift_lines.1
--- xview-3.2p1.4.orig/contrib/misc/shift_lines.1 1970-01-01 01:00:00.000000000 +0100
+++ xview-3.2p1.4/contrib/misc/shift_lines.1 2013-08-25 12:04:12.268380143 +0200
@@ -0,0 +1,34 @@
+.\" Copyright (C) 1999 by Martin Buck <mbuck@debian.org>
+.\" Licensed under the GNU General Public License
+
+.TH shift_lines 1 "Version 3.2p1" XView
+
+.SH NAME
+shift_lines \- add or remove indentation to/from lines
+
+.SH SYNOPSIS
+.B capitalize
+.RI [ "-t num" ]
+
+.SH DESCRIPTION
+\fIshift_lines\fP is a filter that adds or removes indentation on the left side
+of the lines sent through it. It reads text from stdin and writes the result
+to stdout. When adding indentation, it will insert space characters; when
+removing, it removes any characters, not just space.
+.PP
+Please note that \fIshift_lines\fP is intended mainly to be run from XView's
+text menu. It is used in the default \fBtext_extras_menu\fP.
+
+.SH OPTIONS
+.IP "\fB-t num\fP"
+Specify number of characters to be added/removed on the left side of the lines.
+Default is 1, negative numbers will remove the given amount of indentation.
+
+.SH AUTHOR
+Martin Buck <mbuck@debian.org> for Debian GNU/Linux
+
+.SH "SEE ALSO"
+.BR xview (7),
+.BR capitalize (1),
+.BR insert_brackets (1),
+.BR remove_brackets (1)
diff -rNu xview-3.2p1.4.orig/doc/Imakefile xview-3.2p1.4/doc/Imakefile
--- xview-3.2p1.4.orig/doc/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/doc/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.13 28 Jun 1993 SMI
-/**/# Imakefile for doc directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.13 28 Jun 1993 SMI
+XCOMM # Imakefile for doc directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/doc/bugs/Imakefile xview-3.2p1.4/doc/bugs/Imakefile
--- xview-3.2p1.4.orig/doc/bugs/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/doc/bugs/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.9 28 Jun 1993 SMI
-/**/# Imakefile for doc/bugs files.
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.9 28 Jun 1993 SMI
+XCOMM # Imakefile for doc/bugs files.
DOCFILES = bugform
diff -rNu xview-3.2p1.4.orig/doc/config/Imakefile xview-3.2p1.4/doc/config/Imakefile
--- xview-3.2p1.4.orig/doc/config/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/doc/config/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.1 89/07/21 SMI
-/**/# Imakefile for doc/config directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.1 89/07/21 SMI
+XCOMM # Imakefile for doc/config directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/doc/config/usenixws/Imakefile xview-3.2p1.4/doc/config/usenixws/Imakefile
--- xview-3.2p1.4.orig/doc/config/usenixws/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/doc/config/usenixws/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.6 28 Jun 1993 SMI
-/**/# Imakefile for doc/config/usenixws files.
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.6 28 Jun 1993 SMI
+XCOMM # Imakefile for doc/config/usenixws files.
TROFF= ptroff -t
DOCFILES = paper.ms
diff -rNu xview-3.2p1.4.orig/fonts/Imakefile xview-3.2p1.4/fonts/Imakefile
--- xview-3.2p1.4.orig/fonts/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/fonts/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.1 89/07/21 SMI
-/**/# Imakefile for fonts directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.1 89/07/21 SMI
+XCOMM # Imakefile for fonts directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/fonts/bdf/100dpi/Imakefile xview-3.2p1.4/fonts/bdf/100dpi/Imakefile
--- xview-3.2p1.4.orig/fonts/bdf/100dpi/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/fonts/bdf/100dpi/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#####################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
-/**/# Imakefile for text fonts.
+XCOMM #####################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM # Imakefile for text fonts.
SRCS = \
luBIS08.bdf luBIS10.bdf luBIS12.bdf luBIS14.bdf luBIS18.bdf \
@@ -115,9 +115,9 @@
FontTarget(lutBS19)
FontTarget(lutRS19)
-/**/#####################################################################
-/**/# In order to install these fonts, InstallOpenLookFonts must be
-/**/# YES in either your site.def or XView.cf file.
+XCOMM #####################################################################
+XCOMM # In order to install these fonts, InstallOpenLookFonts must be
+XCOMM # YES in either your site.def or XView.cf file.
InstallFonts($(TEXTFONT_FONTINSTDIR)/ol100dpi)
InstallFontAliases($(TEXTFONT_FONTINSTDIR)/ol100dpi)
diff -rNu xview-3.2p1.4.orig/fonts/bdf/75dpi/Imakefile xview-3.2p1.4/fonts/bdf/75dpi/Imakefile
--- xview-3.2p1.4.orig/fonts/bdf/75dpi/Imakefile 2013-08-25 12:02:12.772378391 +0200
+++ xview-3.2p1.4/fonts/bdf/75dpi/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#####################################################################
-/**/# @(#)Imakefile 1.10 28 Jun 1993 SMI
-/**/# Imakefile for text fonts.
+XCOMM #####################################################################
+XCOMM # @(#)Imakefile 1.10 28 Jun 1993 SMI
+XCOMM # Imakefile for text fonts.
SRCS = \
luBIS08.bdf luBIS10.bdf luBIS12.bdf luBIS14.bdf luBIS18.bdf \
@@ -115,9 +115,9 @@
FontTarget(lutBS19)
FontTarget(lutRS19)
-/**/#####################################################################
-/**/# In order to install these fonts, InstallOpenLookFonts must be
-/**/# YES in either your site.def or XView.cf file.
+XCOMM #####################################################################
+XCOMM # In order to install these fonts, InstallOpenLookFonts must be
+XCOMM # YES in either your site.def or XView.cf file.
InstallFonts($(TEXTFONT_FONTINSTDIR)/ol75dpi)
diff -rNu xview-3.2p1.4.orig/fonts/bdf/Imakefile xview-3.2p1.4/fonts/bdf/Imakefile
--- xview-3.2p1.4.orig/fonts/bdf/Imakefile 2013-08-25 12:02:12.796378391 +0200
+++ xview-3.2p1.4/fonts/bdf/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.6 28 Jun 1993 SMI
-/**/# Imakefile for fonts/bdf directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.6 28 Jun 1993 SMI
+XCOMM # Imakefile for fonts/bdf directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/fonts/bdf/misc/Imakefile xview-3.2p1.4/fonts/bdf/misc/Imakefile
--- xview-3.2p1.4.orig/fonts/bdf/misc/Imakefile 2013-08-25 12:02:12.784378391 +0200
+++ xview-3.2p1.4/fonts/bdf/misc/Imakefile 2013-08-25 12:04:12.576380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#####################################################################
-/**/# Imakefile for OPEN LOOK glyph fonts.
-/**/# @(#)Imakefile 1.9 28 Jun 1993 SMI
+XCOMM #####################################################################
+XCOMM # Imakefile for OPEN LOOK glyph fonts.
+XCOMM # @(#)Imakefile 1.9 28 Jun 1993 SMI
SRCS = \
olcursor.bdf olgl10.bdf olgl12.bdf olgl14.bdf olgl19.bdf
@@ -21,9 +21,9 @@
FontTarget(olgl14)
FontTarget(olgl19)
-/**/#####################################################################
-/**/# In order to install these fonts, InstallOpenLookFonts must be
-/**/# YES in either your site.def or XView.cf file.
+XCOMM #####################################################################
+XCOMM # In order to install these fonts, InstallOpenLookFonts must be
+XCOMM # YES in either your site.def or XView.cf file.
InstallFonts($(OPENLOOK_FONTINSTDIR)/olmisc)
InstallFontAliases($(OPENLOOK_FONTINSTDIR)/olmisc)
diff -rNu xview-3.2p1.4.orig/images/Imakefile xview-3.2p1.4/images/Imakefile
--- xview-3.2p1.4.orig/images/Imakefile 2013-08-25 12:02:12.912378393 +0200
+++ xview-3.2p1.4/images/Imakefile 2013-08-25 12:04:12.572380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/########################################################################
-/**/# @(#)Imakefile 1.5 90/07/17
-/**/# Imakefile for images directory. XView release 2.0.
+XCOMM ########################################################################
+XCOMM # @(#)Imakefile 1.5 90/07/17
+XCOMM # Imakefile for images directory. XView release 2.0.
CORE_ICONS = default.icon mglass.icon mglass_mask.icon
@@ -99,7 +99,7 @@
ALLFILES = $(BITMAPS) $(ICONS) $(PIXRECTS) $(CURSORS) $(IMAGES)
-all: $(SRCS)
+all:: $(SRCS)
BuildIncludes($(INCLUDES_SRCS),$(IMAGE_INCDIR),/**/)
diff -rNu xview-3.2p1.4.orig/imake xview-3.2p1.4/imake
--- xview-3.2p1.4.orig/imake 2013-08-25 12:02:12.944378393 +0200
+++ xview-3.2p1.4/imake 2013-08-25 12:04:11.828380137 +0200
@@ -7,4 +7,12 @@
if [ -f "$IMAKEAPPEND" ]; then
cat "$IMAKEAPPEND" >> Makefile
fi
+
+# Fix Makefile to stop after errors in subdirs (but not for "clean" targets).
+# The first line is necessary for XFree86 3.x to make it stop after errors.
+# The 2nd line is necessary for XFree86 4.x to make it continue after "make clean" errors
+# (it sets SHELL=/bin/sh -e).
+perl -p -i -e 's/(\$\(MAKE\)[^;|]*(all|depend|populate|lintlib|includes|tags)[^;|]*);/$1 || exit 1;/;
+ s/(\$\(MAKE\)[^;|]*clean[^;|]*);/$1 || true;/;' Makefile
+
exit 0
diff -rNu xview-3.2p1.4.orig/lib/Imakefile xview-3.2p1.4/lib/Imakefile
--- xview-3.2p1.4.orig/lib/Imakefile 2013-08-25 12:02:12.912378393 +0200
+++ xview-3.2p1.4/lib/Imakefile 2013-08-25 12:04:12.396380145 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.4 89/07/27 SMI
-/**/# Imakefile for XView libraries.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.4 89/07/27 SMI
+XCOMM # Imakefile for XView libraries.
#define IHaveSubdirs YES
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/lib/libolgx/Imakefile xview-3.2p1.4/lib/libolgx/Imakefile
--- xview-3.2p1.4.orig/lib/libolgx/Imakefile 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libolgx/Imakefile 2013-08-25 12:04:12.572380148 +0200
@@ -6,9 +6,9 @@
#include <Library.tmpl>
-/**/########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
-/**/# Imakefile for building libxolgx.
+XCOMM ########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM # Imakefile for building libxolgx.
LIBTARGET = olgx
SOREV = $(SOOLGXREV)
@@ -45,3 +45,7 @@
#include <XView.obj>
#include <XView.lib>
+
+#ifdef __linux__
+XVIEW_DEPLIBS = $(LDPRELIBS) $(XLIB) -lc
+#endif
diff -rNu xview-3.2p1.4.orig/lib/libxview/Imakefile xview-3.2p1.4/lib/libxview/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/Imakefile 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/Imakefile 2013-08-25 12:04:12.396380145 +0200
@@ -5,9 +5,9 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.5 24 Mar 1992 SMI
-/**/# makefile rules for Imakefile in libxview library directory.
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.5 24 Mar 1992 SMI
+XCOMM # makefile rules for Imakefile in libxview library directory.
LIBTARGET = xview
SOREV = $(SOXVIEWREV)
@@ -35,3 +35,7 @@
MakeLintLibSubdirs($(SUBDIRS))
#include <XView.lib>
+
+#ifdef __linux__
+XVIEW_DEPLIBS = $(LDPRELIBS) $(XLIB) -L../../libolgx -lolgx -lutil -lc
+#endif
diff -rNu xview-3.2p1.4.orig/lib/libxview/attr/Imakefile xview-3.2p1.4/lib/libxview/attr/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/attr/Imakefile 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/attr/Imakefile 2013-08-25 12:04:12.400380145 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/attr/attr.c xview-3.2p1.4/lib/libxview/attr/attr.c
--- xview-3.2p1.4.orig/lib/libxview/attr/attr.c 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/attr/attr.c 2013-08-25 12:04:12.400380145 +0200
@@ -17,7 +17,7 @@
#include <xview_private/attr_impl.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
Xv_private FILE *xv_help_find_file();
@@ -91,7 +91,11 @@
/* These two variables are used instead of the paramters so that the
position in the lists is maintained after a recursive call.
*/
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ __va_copy(valist, valist1);
+#else
valist = valist1;
+#endif
avlist = avlist1;
if( !avlist )
diff -rNu xview-3.2p1.4.orig/lib/libxview/attr/attr_copy.c xview-3.2p1.4/lib/libxview/attr/attr_copy.c
--- xview-3.2p1.4.orig/lib/libxview/attr/attr_copy.c 2013-08-25 12:02:12.824378392 +0200
+++ xview-3.2p1.4/lib/libxview/attr/attr_copy.c 2013-08-25 12:04:12.400380145 +0200
@@ -12,6 +12,11 @@
#include <xview/attr.h>
+static int copy_1_attr(Attr_attribute attr, Attr_avlist *source, Attr_avlist *dest);
+static int copy_counted_list(Attr_attribute **source, Attr_attribute **dest);
+static int copy_singleton(Attr_attribute attr, Attr_attribute **source, Attr_attribute **dest);
+static int copy_null_list(Attr_attribute attr, Attr_attribute **source, Attr_attribute **dest);
+
/*
* attr_copy: copy an attribute list, returning the size in bytes
*/
diff -rNu xview-3.2p1.4.orig/lib/libxview/attr/attr_impl.h xview-3.2p1.4/lib/libxview/attr/attr_impl.h
--- xview-3.2p1.4.orig/lib/libxview/attr/attr_impl.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/attr/attr_impl.h 2013-08-25 12:04:12.400380145 +0200
@@ -45,4 +45,4 @@
extern int attr_count_avlist();
extern Attr_avlist attr_copy_valist();
-#endif _attr_impl_h_already_included
+#endif /* _attr_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/Imakefile xview-3.2p1.4/lib/libxview/base/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/base/Imakefile 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/Imakefile 2013-08-25 12:04:12.500380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/base.h xview-3.2p1.4/lib/libxview/base/base.h
--- xview-3.2p1.4.orig/lib/libxview/base/base.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/base.h 2013-08-25 12:04:12.496380147 +0200
@@ -53,13 +53,13 @@
* the macro SUNOS41. This has to be fixed later to accomodate non-SUNOS41 and
* non-SVR4 systems.
*/
-#if !defined(SUNOS41) && !defined(__linux)
+#if !defined(SUNOS41) && !defined(__linux__)
#define XV_OS_SVR4
#define XV_USE_TTCOMPAT
#define SYSV_WAIT
#define SYSV_UCONTEXT
#define XV_USE_XVFCNTL
-#elif defined(__linux)
+#elif defined(__linux__)
#define XV_OS_SVR4
#undef XV_USE_TTCOMPAT
#define SYSV_UCONTEXT
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/gen_impl.h xview-3.2p1.4/lib/libxview/base/gen_impl.h
--- xview-3.2p1.4.orig/lib/libxview/base/gen_impl.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/gen_impl.h 2013-08-25 12:04:12.500380147 +0200
@@ -39,4 +39,4 @@
char *instance_name;
} Generic_info;
-#endif _gen_impl_h_already_included
+#endif /* _gen_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/generic.c xview-3.2p1.4/lib/libxview/base/generic.c
--- xview-3.2p1.4.orig/lib/libxview/base/generic.c 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/generic.c 2013-08-25 12:04:12.496380147 +0200
@@ -251,7 +251,12 @@
break;
case XV_KEY_DATA:
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ key = (unsigned long) avlist[1];
+#else
key = (int) avlist[1];
+#endif
existing_node = node = find_node(object, key, &prev);
if (!node) {
node = add_node(object, key);
@@ -278,7 +283,12 @@
case XV_KEY_DATA_COPY_PROC:
case XV_KEY_DATA_REMOVE:
case XV_KEY_DATA_REMOVE_PROC:
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ key = (unsigned long) avlist[1];
+#else
key = (int) avlist[1];
+#endif
node = find_node(object, key, &prev);
if (node) {
switch ((Xv_generic_attr) (*avlist)) {
@@ -453,7 +463,7 @@
case XV_IM:
result = NULL;
break;
-#endif OW_I18N
+#endif /* OW_I18N */
default:
if (xv_check_bad_attr(XV_GENERIC_OBJECT, attr) == XV_ERROR) {
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/generic.h xview-3.2p1.4/lib/libxview/base/generic.h
--- xview-3.2p1.4.orig/lib/libxview/base/generic.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/generic.h 2013-08-25 12:04:12.496380147 +0200
@@ -247,8 +247,14 @@
} Xv_generic_struct;
typedef enum {
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ XV_INIT_ARGS = XV_ATTR(ATTR_OPAQUE_PAIR, 4),
+ XV_INIT_ARGC_PTR_ARGV = XV_ATTR(ATTR_OPAQUE_PAIR, 7), /* -S- */
+#else
XV_INIT_ARGS = XV_ATTR(ATTR_INT_PAIR, 4),
XV_INIT_ARGC_PTR_ARGV = XV_ATTR(ATTR_INT_PAIR, 7), /* -S- */
+#endif
XV_USAGE_PROC = XV_ATTR(ATTR_FUNCTION_PTR, 9), /* -S- */
XV_ERROR_PROC = XV_ATTR(ATTR_FUNCTION_PTR, 12),
XV_X_ERROR_PROC = XV_ATTR(ATTR_FUNCTION_PTR, 15)
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/qualifyx.h xview-3.2p1.4/lib/libxview/base/qualifyx.h
--- xview-3.2p1.4.orig/lib/libxview/base/qualifyx.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/qualifyx.h 2013-08-25 12:04:12.496380147 +0200
@@ -33,4 +33,4 @@
#define Visual XVisual_t
#define Window XWindow_t
-#endif _view2_private_qualify_x_h_already_included
+#endif /* _view2_private_qualify_x_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/xv.c xview-3.2p1.4/lib/libxview/base/xv.c
--- xview-3.2p1.4.orig/lib/libxview/base/xv.c 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/xv.c 2013-08-25 12:04:12.500380147 +0200
@@ -112,7 +112,7 @@
*/
#ifndef XV_OBJECT_SEAL
#define XV_OBJECT_SEAL 0xF0A58142
-#endif XV_OBJECT_SEAL
+#endif /* XV_OBJECT_SEAL */
#define XV_EMBEDDING_SEAL 0xF1B69200
#define XV_EMBEDDING_MASK 0xFFFFFF00
@@ -556,7 +556,11 @@
case XV_KEY_DATA:
case XV_IS_SUBTYPE_OF:
status = XV_OK;
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ __va_copy(args, args_save);
+#else
args = args_save;
+#endif
result = generic_get(object, &status, (Attr_attribute) attr, args);
va_end(args);
return result;
@@ -575,7 +579,11 @@
* Go to the beginning of the varargs list every time to insure each
* pkg gets the start of the varargs.
*/
+#if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)
+ __va_copy(args, args_save);
+#else
args = args_save;
+#endif
/* ask the object to handle the get */
result = (*(pkg->get)) (object, &status, (Attr_attribute) attr, args);
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/xv_debug.h xview-3.2p1.4/lib/libxview/base/xv_debug.h
--- xview-3.2p1.4.orig/lib/libxview/base/xv_debug.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/xv_debug.h 2013-08-25 12:04:12.500380147 +0200
@@ -10,11 +10,11 @@
#define _xv_debug_h_already_included
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <xview/pkg.h> /* needed to get definition of Xv_private */
/*
* Not strictly necessary to include <stdio.h> here, but eliminates
@@ -88,7 +88,7 @@
* xv_got_debugger to TRUE from the debugger.
*/
-#else _XV_DEBUG
+#else /* _XV_DEBUG */
#define DEBUG_ONLY(x)
#define AN_ERROR(expr, flag) (expr)
@@ -97,6 +97,6 @@
#define FATAL_ERROR(exit_code) if (xv_abort_fatal_error) abort() \
else exit(exit_code)
-#endif _XV_DEBUG
+#endif /* _XV_DEBUG */
-#endif _xv_debug_h_already_included
+#endif /* _xv_debug_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/xv_error.c xview-3.2p1.4/lib/libxview/base/xv_error.c
--- xview-3.2p1.4.orig/lib/libxview/base/xv_error.c 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/xv_error.c 2013-08-25 12:04:12.496380147 +0200
@@ -16,12 +16,17 @@
#include <xview_private/i18n_impl.h>
#include <xview_private/portable.h>
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#include <errno.h>
+#else
/* Unix system error variables */
extern int sys_nerr;
extern char *sys_errlist[];
extern int errno;
+#endif
-#ifndef __linux
+#ifndef __linux__
/* Global already defined in xv_init.c */
Xv_private_data char *xv_app_name;
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/xv_list.h xview-3.2p1.4/lib/libxview/base/xv_list.h
--- xview-3.2p1.4.orig/lib/libxview/base/xv_list.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/xv_list.h 2013-08-25 12:04:12.496380147 +0200
@@ -91,4 +91,4 @@
for (_this = (_type)_head, _next = XV_SL_SAFE_NEXT(_this); \
_this; _this = (_type)_next, _next = XV_SL_SAFE_NEXT(_this))
-#endif _xv_list_h_already_included
+#endif /* _xv_list_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/xv_parse.c xview-3.2p1.4/lib/libxview/base/xv_parse.c
--- xview-3.2p1.4.orig/lib/libxview/base/xv_parse.c 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/xv_parse.c 2013-08-25 12:04:12.496380147 +0200
@@ -29,7 +29,7 @@
#include <X11/Xresource.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
extern XrmDatabase defaults_rdb;
@@ -312,7 +312,7 @@
if (argc <= slot->num_args) {
char dummy[128];
- (void) sprintf(dummy,
+ (void) snprintf(dummy, sizeof(dummy),
XV_MSG("%s: missing argument after %s"),
app_name,
argv[0]);
@@ -392,7 +392,7 @@
if (defaults_lookup(argv[1], known_scales) == -1) {
char dummy[1024];
- (void) sprintf(dummy,
+ (void) snprintf(dummy, sizeof(dummy),
XV_MSG("%s: unknown scale \"%s\" used with %s option"),
app_name, argv[1], argv[0]);
xv_error(XV_NULL,
@@ -611,7 +611,7 @@
{
char dummy[128];
- (void) sprintf(dummy,
+ (void) snprintf(dummy, sizeof(dummy),
XV_MSG("%s: can't have negative argument %s after %s"),
app_name, argv[bad_arg], argv[0]);
xv_error(XV_NULL,
diff -rNu xview-3.2p1.4.orig/lib/libxview/base/xv_xlib.h xview-3.2p1.4/lib/libxview/base/xv_xlib.h
--- xview-3.2p1.4.orig/lib/libxview/base/xv_xlib.h 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/base/xv_xlib.h 2013-08-25 12:04:12.500380147 +0200
@@ -27,5 +27,5 @@
int count;
} Xv_xrectlist;
-#endif _view2_private_xv_xlib_h_already_included
+#endif /* _view2_private_xv_xlib_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/canvas/Imakefile xview-3.2p1.4/lib/libxview/canvas/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/canvas/Imakefile 2013-08-25 12:02:12.828378392 +0200
+++ xview-3.2p1.4/lib/libxview/canvas/Imakefile 2013-08-25 12:04:12.512380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.5 24 Mar 1992 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.5 24 Mar 1992 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/color/Imakefile xview-3.2p1.4/lib/libxview/color/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/color/Imakefile 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/color/Imakefile 2013-08-25 12:04:12.424380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/color/cms_pblc.c xview-3.2p1.4/lib/libxview/color/cms_pblc.c
--- xview-3.2p1.4.orig/lib/libxview/color/cms_pblc.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/color/cms_pblc.c 2013-08-25 12:04:12.424380146 +0200
@@ -316,14 +316,22 @@
{
Cms_info *cms = CMS_PRIVATE(cms_public);
Xv_opaque value;
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
Attr_avlist avlist = (Attr_avlist) args;
+#endif
int cms_status = 0;
switch (attr) {
case CMS_PIXEL: {
unsigned long index;
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ index = va_arg(args, unsigned long);
+#else
index = (unsigned long)avlist[0];
+#endif
if (index >= cms->size) {
index = cms->size - 1;
} else if (index < 0) {
@@ -398,6 +406,21 @@
break;
case CMS_COLORS:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ {
+ Xv_singlecolor *v = va_arg(args, Xv_singlecolor *);
+
+ if (cms_get_colors(cms, (unsigned long)0, cms->size,
+ v, (XColor *)NULL,
+ (unsigned char *)NULL, (unsigned char *)NULL,
+ (unsigned char *)NULL) == XV_OK) {
+ value = (Xv_opaque)v;
+ } else {
+ value = NULL;
+ }
+ }
+#else
if (cms_get_colors(cms, (unsigned long)0, cms->size,
(Xv_singlecolor *)avlist[0], (XColor *)NULL,
(unsigned char *)NULL, (unsigned char *)NULL,
@@ -406,9 +429,25 @@
} else {
value = NULL;
}
+#endif
break;
case CMS_X_COLORS:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ {
+ XColor *v = va_arg(args, XColor *);
+
+ if (cms_get_colors(cms, (unsigned long)0, cms->size,
+ (Xv_singlecolor *)NULL, v,
+ (unsigned char *)NULL, (unsigned char *)NULL,
+ (unsigned char *)NULL) == XV_OK) {
+ value = (Xv_opaque)v;
+ } else {
+ value = NULL;
+ }
+ }
+#else
if (cms_get_colors(cms, (unsigned long)0, cms->size,
(Xv_singlecolor *)NULL, (XColor *)avlist[0],
(unsigned char *)NULL, (unsigned char *)NULL,
@@ -417,10 +456,16 @@
} else {
value = NULL;
}
+#endif
break;
case CMS_CMS_DATA: {
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ Xv_cmsdata *cms_data = va_arg(args, Xv_cmsdata *);
+#else
Xv_cmsdata *cms_data = (Xv_cmsdata *)avlist[0];
+#endif
cms_data->type = cms->type;
cms_data->size = cms->size;
diff -rNu xview-3.2p1.4.orig/lib/libxview/cursor/Imakefile xview-3.2p1.4/lib/libxview/cursor/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/cursor/Imakefile 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/cursor/Imakefile 2013-08-25 12:04:12.428380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/defaults/Imakefile xview-3.2p1.4/lib/libxview/defaults/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/defaults/Imakefile 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/defaults/Imakefile 2013-08-25 12:04:12.428380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/defaults/defaults.c xview-3.2p1.4/lib/libxview/defaults/defaults.c
--- xview-3.2p1.4.orig/lib/libxview/defaults/defaults.c 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/defaults/defaults.c 2013-08-25 12:04:12.428380146 +0200
@@ -24,7 +24,12 @@
#include <xview/server.h>
#endif
#include <xview/xv_error.h>
+/* mbuck@debian.org */
+#if 1
+#include <X11/Xlibint.h>
+#else
#include <X11/Xlib.h>
+#endif
#include <X11/Xatom.h>
#include <X11/Xresource.h>
#include <xview_private/i18n_impl.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/Imakefile xview-3.2p1.4/lib/libxview/dnd/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/dnd/Imakefile 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/Imakefile 2013-08-25 12:04:12.416380145 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/dnd.c xview-3.2p1.4/lib/libxview/dnd/dnd.c
--- xview-3.2p1.4.orig/lib/libxview/dnd/dnd.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/dnd.c 2013-08-25 12:04:12.416380145 +0200
@@ -39,6 +39,18 @@
extern int DndFindSite();
extern XID DndGetCursor();
+static int SendTrigger(
+ Dnd_info *dnd,
+ Xv_Drawable_info *info,
+ XButtonEvent *buttonEvent,
+ int local);
+static int SendOldDndEvent(Dnd_info *dnd, XButtonEvent *buttonEvent);
+static void UpdateGrabCursor(Dnd_info *dnd, int type);
+static void UpdateGrabCursor(Dnd_info *dnd, int type);
+static int WaitForAck(Dnd_info *dnd, Xv_Drawable_info *info);
+static int IsV2App(Display *dpy, Window window, Dnd_info *dnd, XButtonEvent *ev);
+
+
Xv_public int
dnd_send_drop(dnd_public)
Xv_object dnd_public;
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/dnd_dsdm.c xview-3.2p1.4/lib/libxview/dnd/dnd_dsdm.c
--- xview-3.2p1.4.orig/lib/libxview/dnd/dnd_dsdm.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/dnd_dsdm.c 2013-08-25 12:04:12.416380145 +0200
@@ -28,6 +28,8 @@
Xv_private int DndSendPreviewEvent();
+static void ReplyProc();
+
Xv_private int
DndContactDSDM(dnd)
Dnd_info *dnd;
@@ -40,8 +42,6 @@
if (!dnd->sel) {
Xv_object owner,
server;
- static void ReplyProc();
-
owner = (Xv_object)xv_get(DND_PUBLIC(dnd), XV_OWNER);
server = XV_SERVER_FROM_WINDOW(owner);
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/dnd_pblc.c xview-3.2p1.4/lib/libxview/dnd/dnd_pblc.c
--- xview-3.2p1.4.orig/lib/libxview/dnd/dnd_pblc.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/dnd_pblc.c 2013-08-25 12:04:12.416380145 +0200
@@ -19,7 +19,7 @@
#include <xview_private/portable.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
static void BuildDefaults();
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/dndimpl.h xview-3.2p1.4/lib/libxview/dnd/dndimpl.h
--- xview-3.2p1.4.orig/lib/libxview/dnd/dndimpl.h 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/dndimpl.h 2013-08-25 12:04:12.416380145 +0200
@@ -112,4 +112,4 @@
Pkg_private Xv_opaque dnd_get_attr();
Pkg_private int dnd_destroy();
-#endif ~xview_dndimpl_DEFINED
+#endif /* ~xview_dndimpl_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/site.c xview-3.2p1.4/lib/libxview/dnd/site.c
--- xview-3.2p1.4.orig/lib/libxview/dnd/site.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/site.c 2013-08-25 12:04:12.416380145 +0200
@@ -18,7 +18,7 @@
#include <xview_private/windowimpl.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
static void TransCoords();
Xv_private Xv_Window win_get_top_level();
@@ -241,13 +241,13 @@
return(XV_ERROR);
rect = xv_alloc(Rect);
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
/* This will probably not work right, but it compiles. */
/* (rectNode->rect) is of the wrong type. */
memmove(rect, &(rectNode->rect), sizeof(Rect));
#else
bcopy(rectNode->rect, rect, sizeof(Rect));
-#endif SVR4
+#endif /* SVR4 */
return((Xv_opaque)rect);
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/site_impl.h xview-3.2p1.4/lib/libxview/dnd/site_impl.h
--- xview-3.2p1.4.orig/lib/libxview/dnd/site_impl.h 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/site_impl.h 2013-08-25 12:04:12.416380145 +0200
@@ -81,4 +81,4 @@
Pkg_private Xv_opaque dnd_site_get_attr();
Pkg_private int dnd_site_destroy();
-#endif ~xview_site_impl_DEFINED
+#endif /* ~xview_site_impl_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/dnd/site_pblc.c xview-3.2p1.4/lib/libxview/dnd/site_pblc.c
--- xview-3.2p1.4.orig/lib/libxview/dnd/site_pblc.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/dnd/site_pblc.c 2013-08-25 12:04:12.416380145 +0200
@@ -44,7 +44,7 @@
status_reset(site, is_window_region);
#else
status_reset(site, is_window_region);
-#endif WINDOW_SITES
+#endif /* WINDOW_SITES */
site->owner = owner;
site->owner_xid = (Window) xv_get(owner, XV_XID);
site->region.windows = NULL;
@@ -73,7 +73,7 @@
else
status_reset(site, is_window_region);
break;
-#endif WINDOW_SITES
+#endif /* WINDOW_SITES */
case DROP_SITE_ID:
site->site_id = (long)attrs[1];
status_set(site, site_id_set);
@@ -132,7 +132,7 @@
#ifdef WINDOW_SITES
if (!status(site, window_set) && status(site, is_window_region))
(void) DndDropAreaOps(site, Dnd_Add_Window, site->owner);
-#endif WIDNOW_SITES
+#endif /* WIDNOW_SITES */
status_set(site, created);
xv_set(site->owner, WIN_ADD_DROP_ITEM, DND_SITE_PUBLIC(site), 0);
}
@@ -176,7 +176,7 @@
else
value = (Xv_opaque)DND_RECT_SITE;
break;
-#endif WINDOW_SITES
+#endif /* WINDOW_SITES */
case DROP_SITE_SIZE:
value = (Xv_opaque)site->site_size;
break;
diff -rNu xview-3.2p1.4.orig/lib/libxview/file_chooser/Imakefile xview-3.2p1.4/lib/libxview/file_chooser/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/file_chooser/Imakefile 2013-08-25 12:02:12.892378393 +0200
+++ xview-3.2p1.4/lib/libxview/file_chooser/Imakefile 2013-08-25 12:04:12.524380147 +0200
@@ -6,8 +6,8 @@
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.10 90/01/11 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.10 90/01/11 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/file_chooser/file_list.c xview-3.2p1.4/lib/libxview/file_chooser/file_list.c
--- xview-3.2p1.4.orig/lib/libxview/file_chooser/file_list.c 2013-08-25 12:02:12.892378393 +0200
+++ xview-3.2p1.4/lib/libxview/file_chooser/file_list.c 2013-08-25 12:04:12.520380147 +0200
@@ -48,7 +48,7 @@
static void flist_error();
#endif
-
+static int flist_match_regex( char *s, File_list_private *private );
/*
* xv_create() method
@@ -426,7 +426,12 @@
case FILE_LIST_ROW_TYPE:
return xv_get( FILE_LIST_PUBLIC(private),
PANEL_LIST_EXTENSION_DATA,
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ va_arg(valist, int *)
+#else
va_arg(valist, int)
+#endif
);
case FILE_LIST_DIRECTORY:
@@ -521,9 +526,9 @@
if (status == DESTROY_CLEANUP) {
xv_free_ref( private->directory );
xv_free_ref( private->regex_pattern );
-#ifdef __linux
- if (private->regex_compile != NULL && private->regex_compile->allocated)
- xv_free_ref( private->regex_compile->buffer);
+#ifdef __linux__
+ if (private->regex_compile != NULL && private->regex_compile->__REPB_PREFIX(allocated))
+ xv_free_ref( private->regex_compile->__REPB_PREFIX(buffer));
#endif
xv_free_ref( private->regex_compile );
xv_free_ref( private->dotdot_string );
@@ -1142,7 +1147,7 @@
/****************************************************************************/
-#ifndef __linux
+#ifndef __linux__
/*
* Front end to regexp(3).
*
@@ -1213,7 +1218,7 @@
return step(s, private->regex_compile);
}
-#else /* __linux */
+#else /* __linux__ */
/* Linux does not have regexp.h or compile()/step(). Use regex.h and
* re_compile_pattern()/re_match() instead. */
@@ -1225,11 +1230,11 @@
if (private->regex_compile == NULL) {
private->regex_compile = xv_alloc_n(regex_t, 1);
- private->regex_compile->translate = NULL;
+ private->regex_compile->__REPB_PREFIX(translate) = NULL;
}
- if (private->regex_compile->allocated == 0) {
- private->regex_compile->buffer = xv_alloc_n(char, MAXPATHLEN + 1);
- private->regex_compile->allocated = MAXPATHLEN + 1;
+ if (private->regex_compile->__REPB_PREFIX(allocated) == 0) {
+ private->regex_compile->__REPB_PREFIX(buffer) = xv_alloc_n(char, MAXPATHLEN + 1);
+ private->regex_compile->__REPB_PREFIX(allocated) = MAXPATHLEN + 1;
}
re_compile_pattern(private->regex_pattern, strlen(private->regex_pattern),
private->regex_compile);
@@ -1240,11 +1245,11 @@
char *s;
File_list_private *private;
{
- if (private->regex_compile == NULL || private->regex_compile->allocated == 0)
+ if (private->regex_compile == NULL || private->regex_compile->__REPB_PREFIX(allocated) == 0)
return 0;
return (re_match(private->regex_compile, s, strlen(s), 0, NULL) != -1);
}
-#endif /* __linux */
+#endif /* __linux__ */
/****************************************************************************/
diff -rNu xview-3.2p1.4.orig/lib/libxview/file_chooser/flist_impl.h xview-3.2p1.4/lib/libxview/file_chooser/flist_impl.h
--- xview-3.2p1.4.orig/lib/libxview/file_chooser/flist_impl.h 2013-08-25 12:02:12.892378393 +0200
+++ xview-3.2p1.4/lib/libxview/file_chooser/flist_impl.h 2013-08-25 12:04:12.524380147 +0200
@@ -9,7 +9,7 @@
#include <sys/param.h>
#include <dirent.h>
-#ifdef __linux
+#ifdef __linux__
#include <regex.h>
#endif
#include <xview_private/xv_path_util.h>
@@ -25,7 +25,7 @@
DIR * dir_ptr; /* cached directory pointer */
char * previous_dir; /* last directory displayed */
char * regex_pattern; /* regular expression */
-#ifndef __linux
+#ifndef __linux__
char * regex_compile; /* compiled form of regex */
#else
regex_t * regex_compile; /* compiled form of regex */
diff -rNu xview-3.2p1.4.orig/lib/libxview/filter/Imakefile xview-3.2p1.4/lib/libxview/filter/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/filter/Imakefile 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/filter/Imakefile 2013-08-25 12:04:12.512380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/filter/filter.c xview-3.2p1.4/lib/libxview/filter/filter.c
--- xview-3.2p1.4.orig/lib/libxview/filter/filter.c 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/filter/filter.c 2013-08-25 12:04:12.512380147 +0200
@@ -39,10 +39,9 @@
char *stream_fgets();
-enum CharClass
- breakProc();
-struct CharAction
- digits();
+static enum CharClass breakProc(char c);
+static struct CharAction digits(char c);
+static any_shell_meta(char *s);
struct filter_rec **
diff -rNu xview-3.2p1.4.orig/lib/libxview/filter/filter.h xview-3.2p1.4/lib/libxview/filter/filter.h
--- xview-3.2p1.4.orig/lib/libxview/filter/filter.h 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/filter/filter.h 2013-08-25 12:04:12.512380147 +0200
@@ -38,4 +38,4 @@
EXTERN_FUNCTION (void xv_free_filter_table, (struct filter_rec **table));
-#endif ~xview_filter_DEFINED
+#endif /* ~xview_filter_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/font/Imakefile xview-3.2p1.4/lib/libxview/font/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/font/Imakefile 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/font/Imakefile 2013-08-25 12:04:12.432380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/font/font.c xview-3.2p1.4/lib/libxview/font/font.c
--- xview-3.2p1.4.orig/lib/libxview/font/font.c 2013-08-25 12:02:12.836378392 +0200
+++ xview-3.2p1.4/lib/libxview/font/font.c 2013-08-25 12:04:12.432380146 +0200
@@ -11,6 +11,7 @@
*/
#include <sys/types.h>
+#include <string.h>
#include <pixrect/pixrect.h>
#include <pixrect/pixfont.h>
#include <X11/Xlib.h>
@@ -33,7 +34,6 @@
extern Pixfont *xv_pf_sys;
extern char *defaults_get_string();
-extern char *strcpy();
extern Xv_opaque xv_default_server;
extern Display *xv_default_display;
@@ -355,6 +355,10 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
+static int font_setup_defaults(Font_locale_info *linfo);
+static int font_construct_name(Font_return_attrs font_attrs);
+static int font_init_create_attrs(Font_return_attrs font_attrs);
+
/*
* Normalize font name.
* - get rid of sunview style file name
@@ -3462,7 +3466,7 @@
linfo->default_xlarge_font =
strdup("-b&h-lucida-medium-r-*-*-*-190-*-*-*-*-*-*");
}
-#endif OW_I18N
+#endif /* OW_I18N */
/*
* font_convert_style - checks if given style name is 'known'
diff -rNu xview-3.2p1.4.orig/lib/libxview/font/font_get.c xview-3.2p1.4/lib/libxview/font/font_get.c
--- xview-3.2p1.4.orig/lib/libxview/font/font_get.c 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/font/font_get.c 2013-08-25 12:04:12.428380146 +0200
@@ -43,7 +43,10 @@
XFontStruct *x_font_info = (XFontStruct *)font->x_font_info;
Xv_opaque v;
int attr_is_char_width = 0;
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
Attr_avlist avlist = (Attr_avlist) args;
+#endif
#ifdef OW_I18N
if (font->type == FONT_TYPE_TEXT) {
@@ -138,8 +141,14 @@
}
case FONT_STRING_DIMS:{
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ char *string = (char *) va_arg(args, char *);
+ Font_string_dims *size = (Font_string_dims *) va_arg(args, Font_string_dims *);
+#else
char *string = (char *) avlist[0];
Font_string_dims *size = (Font_string_dims *) avlist[1];
+#endif
struct pr_size my_pf_size;
if (string) {
my_pf_size = xv_pf_textwidth(strlen(string), font_public, string);
@@ -264,8 +273,14 @@
#ifdef OW_I18N
case FONT_STRING_DIMS_WC:{
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ wchar_t *ws = (wchar_t *) va_arg(args, wchar_t *);
+ Font_string_dims *size = (Font_string_dims *) va_arg(args, Font_string_dims *);
+#else
wchar_t *ws = (wchar_t *) avlist[0];
Font_string_dims *size = (Font_string_dims *) avlist[1];
+#endif
struct pr_size my_pf_size;
if (ws) {
diff -rNu xview-3.2p1.4.orig/lib/libxview/font/font_x.c xview-3.2p1.4/lib/libxview/font/font_x.c
--- xview-3.2p1.4.orig/lib/libxview/font/font_x.c 2013-08-25 12:02:12.832378392 +0200
+++ xview-3.2p1.4/lib/libxview/font/font_x.c 2013-08-25 12:04:12.428380146 +0200
@@ -127,8 +127,21 @@
*/
*default_x = font->max_bounds.width;
*default_y = font->ascent + font->descent;
+#if 0
if (font->min_byte1 || font->max_byte1)
ERROR;
+#else
+ /* Why should we reject fonts with more than one row? I guess row 0
+ * being there is the only thing we depend on; if there are more rows,
+ * we simply ignore them. With this change, we're able to run on
+ * X-servers that have unicode fonts (aka iso10646-1 encoding) in their
+ * font path in front of the iso8859-1 ones.
+ *
+ * mbuck@debian.org
+ */
+ if (font->min_byte1)
+ ERROR;
+#endif
*max_char = MIN(255, font->max_char_or_byte2); /* pixfont compat */
*min_char = MIN(255, font->min_char_or_byte2); /* pixfont compat */
return (font->fid);
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/Imakefile xview-3.2p1.4/lib/libxview/frame/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/frame/Imakefile 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/Imakefile 2013-08-25 12:04:12.560380148 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_cmdline.c xview-3.2p1.4/lib/libxview/frame/fm_cmdline.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_cmdline.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_cmdline.c 2013-08-25 12:04:12.560380148 +0200
@@ -456,7 +456,7 @@
/* Free any malloc'ed strings */
if (defaults_string)
free(defaults_string);
-#endif RECLAIM_STRINGS
+#endif /* RECLAIM_STRINGS */
if (new_hints) {
Xv_Drawable_info *info;
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_get.c xview-3.2p1.4/lib/libxview/frame/fm_get.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_get.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_get.c 2013-08-25 12:04:12.556380147 +0200
@@ -369,8 +369,14 @@
return((Xv_opaque)status_get(frame, compose_led));
case FRAME_MIN_SIZE: {
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ int *width = (int *)va_arg(valist, int *),
+ *height = (int *)va_arg(valist, int *),
+#else
int *width = (int *)va_arg(valist, int),
*height = (int *)va_arg(valist, int),
+#endif
footer_height = 0;
if (status_get(frame, show_footer) && frame->footer &&
@@ -388,8 +394,13 @@
}
case FRAME_MAX_SIZE: {
+#if 1
+ int *width = (int *)va_arg(valist, int *),
+ *height = (int *)va_arg(valist, int *),
+#else
int *width = (int *)va_arg(valist, int),
*height = (int *)va_arg(valist, int),
+#endif
footer_height = 0;
if (status_get(frame, show_footer) && frame->footer &&
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_impl.h xview-3.2p1.4/lib/libxview/frame/fm_impl.h
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_impl.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_impl.h 2013-08-25 12:04:12.560380148 +0200
@@ -18,11 +18,11 @@
/* standard includes */
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/time.h>
#ifdef OW_I18N
#endif /* OW_I18N */
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_input.c xview-3.2p1.4/lib/libxview/frame/fm_input.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_input.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_input.c 2013-08-25 12:04:12.560380148 +0200
@@ -359,6 +359,10 @@
*/
Xv_private void
frame_set_accept_default_focus(frame_public, flag)
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ Frame frame_public;
+#endif
{
Frame_class_info *frame = FRAME_CLASS_PRIVATE(frame_public);
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_layout.c xview-3.2p1.4/lib/libxview/frame/fm_layout.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_layout.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_layout.c 2013-08-25 12:04:12.560380148 +0200
@@ -28,7 +28,12 @@
Frame frame_public;
register Xv_Window child;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org, FIXME: I don't understand this */
+#if defined(__alpha)
+ unsigned long d1, d2, d3, d4, d5;
+#else
int d1, d2, d3, d4, d5;
+#endif
{
register Frame_class_info *frame = NULL;
int is_subframe;
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_props.h xview-3.2p1.4/lib/libxview/frame/fm_props.h
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_props.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_props.h 2013-08-25 12:04:12.560380148 +0200
@@ -14,11 +14,11 @@
/* standard includes */
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/time.h>
#include <xview/notify.h>
#include <xview/rect.h>
@@ -45,7 +45,7 @@
#include <pixrect/pixfont.h>
#include <rasterfile.h>
#include <pixrect/pr_io.h>
-#endif pixrect_hs_DEFINED
+#endif /* pixrect_hs_DEFINED */
#include <xview/win_struct.h> /* for WL_ links */
#include <xview/win_input.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_rescale.c xview-3.2p1.4/lib/libxview/frame/fm_rescale.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_rescale.c 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_rescale.c 2013-08-25 12:04:12.556380147 +0200
@@ -43,7 +43,7 @@
*/
window_default_event_func(frame_public, (Event *) 0, scale, (Notify_event_type) 0);
window_calculate_new_size(frame_public, frame_public, &frame_height, &frame_width);
-#ifndef __linux
+#ifndef __linux__
xv_set(frame_public, WIN_RECT, 0); /* This looks like a XView bug to me */
#endif
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_win.c xview-3.2p1.4/lib/libxview/frame/fm_win.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_win.c 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_win.c 2013-08-25 12:04:12.560380148 +0200
@@ -12,7 +12,7 @@
#ifdef SVR4
#include <sys/types.h>
-#endif SVR4
+#endif /* SVR4 */
#include <sys/file.h>
#include <X11/Xlib.h>
#include <xview_private/i18n_impl.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fm_xutil.h xview-3.2p1.4/lib/libxview/frame/fm_xutil.h
--- xview-3.2p1.4.orig/lib/libxview/frame/fm_xutil.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fm_xutil.h 2013-08-25 12:04:12.556380147 +0200
@@ -39,4 +39,4 @@
/* frame_xutil.c */
Xv_private void frame_setwmhints();
-#endif frame_xutil_h_already_included
+#endif /* frame_xutil_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/fmcmd_set.c xview-3.2p1.4/lib/libxview/frame/fmcmd_set.c
--- xview-3.2p1.4.orig/lib/libxview/frame/fmcmd_set.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/fmcmd_set.c 2013-08-25 12:04:12.556380147 +0200
@@ -18,6 +18,8 @@
#include <xview/panel.h>
#include <xview/server.h>
+static int update_default_pin_state();
+
Pkg_private Xv_opaque
frame_cmd_set_avlist(frame_public, avlist)
Frame frame_public;
@@ -30,7 +32,6 @@
int result = XV_OK;
int add_decor, delete_decor, set_win_attr;
Atom add_decor_list[WM_MAX_DECOR], delete_decor_list[WM_MAX_DECOR];
- int update_default_pin_state();
DRAWABLE_INFO_MACRO(frame_public, info);
server_public = xv_server(info);
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/frame_base.h xview-3.2p1.4/lib/libxview/frame/frame_base.h
--- xview-3.2p1.4.orig/lib/libxview/frame/frame_base.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/frame_base.h 2013-08-25 12:04:12.560380148 +0200
@@ -18,11 +18,11 @@
/* standard includes */
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/time.h>
#include <xview/notify.h>
#include <xview/rect.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/frame_cmd.h xview-3.2p1.4/lib/libxview/frame/frame_cmd.h
--- xview-3.2p1.4.orig/lib/libxview/frame/frame_cmd.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/frame_cmd.h 2013-08-25 12:04:12.560380148 +0200
@@ -18,11 +18,11 @@
/* standard includes */
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/time.h>
#include <xview/notify.h>
#include <xview/rect.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/frame/frame_help.h xview-3.2p1.4/lib/libxview/frame/frame_help.h
--- xview-3.2p1.4.orig/lib/libxview/frame/frame_help.h 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/frame/frame_help.h 2013-08-25 12:04:12.556380147 +0200
@@ -18,11 +18,11 @@
/* standard includes */
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/time.h>
#include <xview/notify.h>
#include <xview/rect.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/fullscreen/Imakefile xview-3.2p1.4/lib/libxview/fullscreen/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/fullscreen/Imakefile 2013-08-25 12:02:12.836378392 +0200
+++ xview-3.2p1.4/lib/libxview/fullscreen/Imakefile 2013-08-25 12:04:12.520380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/help/Imakefile xview-3.2p1.4/lib/libxview/help/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/help/Imakefile 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/help/Imakefile 2013-08-25 12:04:12.496380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/help/help.h xview-3.2p1.4/lib/libxview/help/help.h
--- xview-3.2p1.4.orig/lib/libxview/help/help.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/help/help.h 2013-08-25 12:04:12.496380147 +0200
@@ -14,4 +14,4 @@
*/
EXTERN_FUNCTION (int xv_help_show, (Xv_Window client_window, char *client_data, Event *client_event));
-#endif __xv_help_h
+#endif /* __xv_help_h */
diff -rNu xview-3.2p1.4.orig/lib/libxview/help/help_file.c xview-3.2p1.4/lib/libxview/help/help_file.c
--- xview-3.2p1.4.orig/lib/libxview/help/help_file.c 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/help/help_file.c 2013-08-25 12:04:12.496380147 +0200
@@ -18,11 +18,15 @@
#include <xview_private/i18n_impl.h>
-#ifndef __linux
+#ifndef __linux__
#define DEFAULT_HELP_DIRECTORY "/usr/lib/help"
#else
+#if 1 /* FHS compliance, but search the old directories, too - mbuck@debian.org */
+#define DEFAULT_HELP_DIRECTORY "/usr/share/openwin/help:/usr/X11R6/lib/help"
+#else
#define DEFAULT_HELP_DIRECTORY "/usr/openwin/lib/help"
#endif
+#endif
#define MAX_MORE_HELP_CMD 128
Xv_private char *xv_strtok();
@@ -86,7 +90,7 @@
/*
* Need to fix this to get the XV_LC_DISPLAY_LANG from server
*/
-#ifndef __linux
+#ifndef __linux__
if (_xv_use_locale)
xv_lc_display_lang = setlocale(LC_MESSAGES, NULL);
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/icon/Imakefile xview-3.2p1.4/lib/libxview/icon/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/icon/Imakefile 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/icon/Imakefile 2013-08-25 12:04:12.500380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/imcb/Imakefile xview-3.2p1.4/lib/libxview/imcb/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/imcb/Imakefile 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/imcb/Imakefile 2013-08-25 12:04:12.416380145 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.7 28 Apr 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.7 28 Apr 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/imcb/aux.h xview-3.2p1.4/lib/libxview/imcb/aux.h
--- xview-3.2p1.4.orig/lib/libxview/imcb/aux.h 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/imcb/aux.h 2013-08-25 12:04:12.420380146 +0200
@@ -85,4 +85,4 @@
int f_height;
} AuxInfo;
-#endif ~aux_DEFINED
+#endif /* ~aux_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/imcb/stat_imcb.c xview-3.2p1.4/lib/libxview/imcb/stat_imcb.c
--- xview-3.2p1.4.orig/lib/libxview/imcb/stat_imcb.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/imcb/stat_imcb.c 2013-08-25 12:04:12.416380145 +0200
@@ -130,4 +130,4 @@
NULL);
#endif /* notdef */
}
-#endif OW_I18N
+#endif /* OW_I18N */
diff -rNu xview-3.2p1.4.orig/lib/libxview/io_stream/Imakefile xview-3.2p1.4/lib/libxview/io_stream/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/io_stream/Imakefile 2013-08-25 12:02:12.836378392 +0200
+++ xview-3.2p1.4/lib/libxview/io_stream/Imakefile 2013-08-25 12:04:12.492380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/io_stream/input.c xview-3.2p1.4/lib/libxview/io_stream/input.c
--- xview-3.2p1.4.orig/lib/libxview/io_stream/input.c 2013-08-25 12:02:12.836378392 +0200
+++ xview-3.2p1.4/lib/libxview/io_stream/input.c 2013-08-25 12:04:12.468380146 +0200
@@ -22,7 +22,7 @@
XV_MSG("input stream not of type input"), 0); \
ops = in->ops.input_ops
-char *stream_getstring();
+static char *stream_getstring();
/* GENERIC INPUT FUNCTIONS */
diff -rNu xview-3.2p1.4.orig/lib/libxview/menu/Imakefile xview-3.2p1.4/lib/libxview/menu/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/menu/Imakefile 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/menu/Imakefile 2013-08-25 12:04:12.516380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/menu/om_impl.h xview-3.2p1.4/lib/libxview/menu/om_impl.h
--- xview-3.2p1.4.orig/lib/libxview/menu/om_impl.h 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/menu/om_impl.h 2013-08-25 12:04:12.516380147 +0200
@@ -22,7 +22,7 @@
#ifdef OW_I18N
#include <X11/Xlib.h>
#include <X11/Xresource.h>
-#endif OW_I18N
+#endif /* OW_I18N */
/***** Definitions *****/
#ifndef TRUE
@@ -198,7 +198,7 @@
pin_window_header;
#else
char *pin_window_header;
-#endif OW_I18N
+#endif /* OW_I18N */
Xv_Window window; /* window containing menu items */
Xv_Window shadow_window; /* gray shadow window */
#ifdef OW_I18N
@@ -300,4 +300,4 @@
} Xv_menu_item_info;
-#endif _xview_walkmenu_impl_h_already_included
+#endif /* _xview_walkmenu_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/menu/om_public.c xview-3.2p1.4/lib/libxview/menu/om_public.c
--- xview-3.2p1.4.orig/lib/libxview/menu/om_public.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/menu/om_public.c 2013-08-25 12:04:12.516380147 +0200
@@ -18,7 +18,7 @@
#include <fcntl.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
#include <pixrect/pixrect.h>
#include <pixrect/pr_util.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/menu/omi.h xview-3.2p1.4/lib/libxview/menu/omi.h
--- xview-3.2p1.4.orig/lib/libxview/menu/omi.h 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/menu/omi.h 2013-08-25 12:04:12.516380147 +0200
@@ -103,4 +103,4 @@
extern void image_destroy();
extern void image_render();
-#endif ~xview_image_DEFINED
+#endif /* ~xview_image_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/menu/omi_impl.h xview-3.2p1.4/lib/libxview/menu/omi_impl.h
--- xview-3.2p1.4.orig/lib/libxview/menu/omi_impl.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/menu/omi_impl.h 2013-08-25 12:04:12.516380147 +0200
@@ -15,9 +15,9 @@
#ifndef pixrect_DEFINED
#ifndef _TYPES_
#include <sys/types.h>
-#endif _TYPES_
+#endif /* _TYPES_ */
#include <pixrect/pixrect.h>
-#endif pixrect_DEFINED
+#endif /* pixrect_DEFINED */
#include <xview/font.h>
#include <xview/svrimage.h>
#ifdef OW_I18N
@@ -87,4 +87,4 @@
#define image_vector(x1,y1,x2,y2) \
(xv_vector(window,x1,y1,x2,y2,PIX_SET,0))
-#endif _xview_image_impl_h_already_included
+#endif /* _xview_image_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/menu/openmenu.h xview-3.2p1.4/lib/libxview/menu/openmenu.h
--- xview-3.2p1.4.orig/lib/libxview/menu/openmenu.h 2013-08-25 12:02:12.860378392 +0200
+++ xview-3.2p1.4/lib/libxview/menu/openmenu.h 2013-08-25 12:04:12.516380147 +0200
@@ -63,6 +63,16 @@
#define ATTR_IMAGE ATTR_OPAQUE
#define ATTR_MENU_ITEM ATTR_OPAQUE
#define ATTR_MENU_ITEM_PAIR ATTR_INT_PAIR
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+#define ATTR_STRING_VALUE_PAIR ATTR_OPAQUE_PAIR
+#define ATTR_IMAGE_VALUE_PAIR ATTR_OPAQUE_PAIR
+#define ATTR_STRING_MENU_PAIR ATTR_OPAQUE_PAIR
+#define ATTR_IMAGE_MENU_PAIR ATTR_OPAQUE_PAIR
+#define ATTR_STRING_FUNCTION_PAIR ATTR_OPAQUE_PAIR
+#define ATTR_IMAGE_FUNCTION_PAIR ATTR_OPAQUE_PAIR
+#define ATTR_INT_MENU_ITEM_PAIR ATTR_OPAQUE_PAIR
+#else
#define ATTR_STRING_VALUE_PAIR ATTR_INT_PAIR
#define ATTR_IMAGE_VALUE_PAIR ATTR_INT_PAIR
#define ATTR_STRING_MENU_PAIR ATTR_INT_PAIR
@@ -70,6 +80,7 @@
#define ATTR_STRING_FUNCTION_PAIR ATTR_INT_PAIR
#define ATTR_IMAGE_FUNCTION_PAIR ATTR_INT_PAIR
#define ATTR_INT_MENU_ITEM_PAIR ATTR_INT_PAIR
+#endif
/* Reserved for future use */
#define MENU_ATTR_UNUSED_FIRST 0
@@ -107,7 +118,12 @@
MENU_DONE_PROC = MENU_ATTR(ATTR_FUNCTION_PTR, 31),
MENU_FEEDBACK = MENU_ATTR(ATTR_BOOLEAN, 33),
/*--G*/ MENU_FIRST_EVENT = MENU_ATTR(ATTR_NO_VALUE, 36),
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ MENU_GEN_PIN_WINDOW = MENU_ATTR(ATTR_OPAQUE_PAIR, 39),
+#else
MENU_GEN_PIN_WINDOW = MENU_ATTR(ATTR_INT_PAIR, 39),
+#endif
MENU_GEN_PROC = MENU_ATTR(ATTR_FUNCTION_PTR, 42),
MENU_GEN_PROC_IMAGE = MENU_ATTR(ATTR_IMAGE_FUNCTION_PAIR, 45),
MENU_GEN_PROC_ITEM = MENU_ATTR(ATTR_STRING_FUNCTION_PAIR, 48),
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/Imakefile xview-3.2p1.4/lib/libxview/misc/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/misc/Imakefile 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/Imakefile 2013-08-25 12:04:12.504380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.7 24 Mar 1992 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.7 24 Mar 1992 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/bitmask.h xview-3.2p1.4/lib/libxview/misc/bitmask.h
--- xview-3.2p1.4.orig/lib/libxview/misc/bitmask.h 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/bitmask.h 2013-08-25 12:04:12.508380147 +0200
@@ -32,6 +32,6 @@
extern int xv_bitss_cmp_mask();
extern Bitmask * xv_bitss_copy_mask();
-#endif bitmask_c
+#endif /* bitmask_c */
-#endif bitmask_h
+#endif /* bitmask_h */
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/drop.c xview-3.2p1.4/lib/libxview/misc/drop.c
--- xview-3.2p1.4.orig/lib/libxview/misc/drop.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/drop.c 2013-08-25 12:04:12.504380147 +0200
@@ -11,7 +11,7 @@
#include <xview_private/portable.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
#define DD_FAILED -1
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/expandname.c xview-3.2p1.4/lib/libxview/misc/expandname.c
--- xview-3.2p1.4.orig/lib/libxview/misc/expandname.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/expandname.c 2013-08-25 12:04:12.508380147 +0200
@@ -22,17 +22,20 @@
#include <stdio.h>
#include <string.h>
-#ifdef sparc
+#if defined(sparc) && !defined(linux)
#ifdef SVR4
#include <unistd.h>
#else
#include <vfork.h>
-#endif SVR4
+#endif /* SVR4 */
+#endif
+#ifdef __linux__
+#include <unistd.h>
#endif
#ifdef SVR4
#include <sys/signal.h>
-#endif SVR4
+#endif /* SVR4 */
#include <xview_private/i18n_impl.h>
#include <xview_private/portable.h>
#include <xview/expandname.h>
@@ -120,9 +123,9 @@
(void) close(pivec[0]);
#ifndef SVR4
while (wait((union wait *) & status) != pid);
-#else SVR4
+#else /* SVR4 */
while (wait( & status) != pid);
-#endif SVR4
+#endif /* SVR4 */
;
status &= 0377;
if (status != 0 && status != SIGPIPE) {
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/getlogindr.c xview-3.2p1.4/lib/libxview/misc/getlogindr.c
--- xview-3.2p1.4.orig/lib/libxview/misc/getlogindr.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/getlogindr.c 2013-08-25 12:04:12.504380147 +0200
@@ -24,7 +24,7 @@
xv_getlogindir()
{
extern char *getlogin(), *getenv();
-#ifndef __linux
+#ifndef __linux__
extern struct passwd *getpwnam(), *getpwuid();
#endif
struct passwd *passwdent;
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/gettext.c xview-3.2p1.4/lib/libxview/misc/gettext.c
--- xview-3.2p1.4.orig/lib/libxview/misc/gettext.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/gettext.c 2013-08-25 12:04:12.504380147 +0200
@@ -7,13 +7,15 @@
#endif
#endif
+#include <string.h>
#include <xview_private/gettext.h>
-char *strdup();
-char * dgettext(), *bindtextdomain();
-char *_gettext();
+char * dgettext(char *, char *), *bindtextdomain();
+static char *_gettext();
char *fgets(), *getenv();
+#if !defined(__linux__) || !defined(__GLIBC__)
caddr_t mmap();
+#endif
static struct domain_binding *firstbind=0, *lastbind=0;
@@ -74,7 +76,7 @@
#ifdef OS_HAS_LOCALE
current_locale = setlocale(LC_MESSAGES, NULL);
-#endif OS_HAS_LOCALE
+#endif /* OS_HAS_LOCALE */
if (!current_locale) {
current_locale = "C";
}
@@ -310,7 +312,7 @@
#ifdef OS_HAS_LOCALE
current_locale = setlocale(LC_MESSAGES, NULL);
-#endif OS_HAS_LOCALE
+#endif /* OS_HAS_LOCALE */
if (!current_locale) {
current_locale = "C";
}
@@ -423,7 +425,7 @@
free(addr);
return(msg_id);
}
-#endif OS_HAS_MMAP
+#endif /* OS_HAS_MMAP */
close(fd);
messages_so[first_free].mess_file_info = (struct struct_mo_info *) addr;
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/gettext.h xview-3.2p1.4/lib/libxview/misc/gettext.h
--- xview-3.2p1.4.orig/lib/libxview/misc/gettext.h 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/gettext.h 2013-08-25 12:04:12.504380147 +0200
@@ -1,7 +1,7 @@
/* @(#)gettext.h 50.11 93/06/28 SMI */
#define DEFAULT_DOMAIN "default"
-#ifndef __linux
+#ifndef __linux__
#define DEFAULT_BINDING "/usr/lib/locale\n"
#else
#define DEFAULT_BINDING "/usr/openwin/lib/locale\n"
@@ -17,10 +17,10 @@
#include <errno.h>
#ifdef OS_HAS_LOCALE
#include <locale.h>
-#if defined(__linux) && !defined(LC_MESSAGES) && defined(LC_RESPONSE)
+#if defined(__linux__) && !defined(LC_MESSAGES) && defined(LC_RESPONSE)
#define LC_MESSAGES LC_RESPONSE
#endif
-#endif OS_HAS_LOCALE
+#endif /* OS_HAS_LOCALE */
#include <stdio.h>
#include <sys/types.h>
#include <sys/param.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/hashfn.h xview-3.2p1.4/lib/libxview/misc/hashfn.h
--- xview-3.2p1.4.orig/lib/libxview/misc/hashfn.h 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/hashfn.h 2013-08-25 12:04:12.504380147 +0200
@@ -49,5 +49,5 @@
extern caddr_t /* key pointer */ hashfn_first_key();
extern caddr_t /* key pointer */ hashfn_next_key();
-#endif hashfn_c
-#endif hashfn_h
+#endif /* hashfn_c */
+#endif /* hashfn_h */
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/i18n_impl.h xview-3.2p1.4/lib/libxview/misc/i18n_impl.h
--- xview-3.2p1.4.orig/lib/libxview/misc/i18n_impl.h 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/i18n_impl.h 2013-08-25 12:04:12.504380147 +0200
@@ -26,7 +26,7 @@
#include <locale.h>
/* Linux: gcc 2.4.x does not have LC_MESSAGES, but it has LC_RESPONSE instead */
-#if defined(__linux) && !defined(LC_MESSAGES) && defined(LC_RESPONSE)
+#if defined(__linux__) && !defined(LC_MESSAGES) && defined(LC_RESPONSE)
#define LC_MESSAGES LC_RESPONSE
#endif
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/portable.h xview-3.2p1.4/lib/libxview/misc/portable.h
--- xview-3.2p1.4.orig/lib/libxview/misc/portable.h 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/portable.h 2013-08-25 12:04:12.500380147 +0200
@@ -49,7 +49,7 @@
#define const
#endif
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
#define XV_BCOPY(a,b,c) memmove(b,a,c)
#define XV_BZERO(a,b) memset(a,0,b)
#define XV_INDEX(a,b) strchr(a,b)
@@ -66,7 +66,7 @@
* Defines governing tty mode and pty behavior. (These are relevant to the
* ttysw code.)
*/
-#ifdef __linux
+#ifdef __linux__
#define XV_USE_TERMIOS
#undef XV_USE_SVR4_PTYS
#else
@@ -77,6 +77,6 @@
#undef XV_USE_TERMIOS
#undef XV_USE_SVR4_PTYS
#endif /* SVR4 */
-#endif /* __linux */
+#endif /* __linux__ */
#endif /* xview_portable_h_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/quark.c xview-3.2p1.4/lib/libxview/misc/quark.c
--- xview-3.2p1.4.orig/lib/libxview/misc/quark.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/quark.c 2013-08-25 12:04:12.504380147 +0200
@@ -16,7 +16,7 @@
#include <xview/xview.h>
#include <xview/pkg.h>
-Xv_opaque resource_type_conv();
+static Xv_opaque resource_type_conv();
/*
* Utilities to deal with quark lists and such.
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/setlocale.c xview-3.2p1.4/lib/libxview/misc/setlocale.c
--- xview-3.2p1.4.orig/lib/libxview/misc/setlocale.c 2013-08-25 12:02:12.864378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/setlocale.c 2013-08-25 12:04:12.504380147 +0200
@@ -59,4 +59,4 @@
}
-#endif OS_HAS_LOCALE
+#endif /* OS_HAS_LOCALE */
diff -rNu xview-3.2p1.4.orig/lib/libxview/misc/xv_icccm.c xview-3.2p1.4/lib/libxview/misc/xv_icccm.c
--- xview-3.2p1.4.orig/lib/libxview/misc/xv_icccm.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/misc/xv_icccm.c 2013-08-25 12:04:12.504380147 +0200
@@ -64,4 +64,4 @@
(XEvent *)&evt));
}
-#endif PRE_R4_ICCCM
+#endif /* PRE_R4_ICCCM */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notice/Imakefile xview-3.2p1.4/lib/libxview/notice/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/notice/Imakefile 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/notice/Imakefile 2013-08-25 12:04:12.552380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/notice/notice_get.c xview-3.2p1.4/lib/libxview/notice/notice_get.c
--- xview-3.2p1.4.orig/lib/libxview/notice/notice_get.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/notice/notice_get.c 2013-08-25 12:04:12.548380147 +0200
@@ -29,7 +29,10 @@
va_list valist;
{
Notice_info *notice = NOTICE_PRIVATE(notice_public);
+/* Alpha compatibility, mbuck@debian.org */
+#if 0
Attr_avlist avlist = (Attr_avlist) valist;
+#endif
Xv_opaque v = (Xv_opaque)NULL;
switch (attr) {
diff -rNu xview-3.2p1.4.orig/lib/libxview/notice/notice_pt.c xview-3.2p1.4/lib/libxview/notice/notice_pt.c
--- xview-3.2p1.4.orig/lib/libxview/notice/notice_pt.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/notice/notice_pt.c 2013-08-25 12:04:12.548380147 +0200
@@ -29,7 +29,7 @@
/*
* Table containing valid values for OpenWindows.KeyboardCommands resource
*/
-#ifndef __linux
+#ifndef __linux__
Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
#else
/* Global already defined and initialized in server/server.c */
@@ -74,6 +74,8 @@
#define NOTICE_NORMAL_BUTTON 0
static notice_buttons_handle notice_get_prev_button();
+static int notice_quadrant(Rect notice_screen_rect, int x, int y);
+
/*
* --------------------------- Externals ----------------------------
*/
diff -rNu xview-3.2p1.4.orig/lib/libxview/notice/notice_set.c xview-3.2p1.4/lib/libxview/notice/notice_set.c
--- xview-3.2p1.4.orig/lib/libxview/notice/notice_set.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/notice/notice_set.c 2013-08-25 12:04:12.548380147 +0200
@@ -22,7 +22,6 @@
#include <xview/win_input.h>
#include <xview/cms.h>
-extern char *strchr();
Pkg_private Xv_opaque notice_generic_set();
#ifdef OW_I18N
static CHAR **notice_string_set();
diff -rNu xview-3.2p1.4.orig/lib/libxview/notice/noticeimpl.h xview-3.2p1.4/lib/libxview/notice/noticeimpl.h
--- xview-3.2p1.4.orig/lib/libxview/notice/noticeimpl.h 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/notice/noticeimpl.h 2013-08-25 12:04:12.548380147 +0200
@@ -204,4 +204,4 @@
Pkg_private int notice_context_key;
Pkg_private Defaults_pairs bell_types[];
-#endif notice_impl_h_already_defined
+#endif /* notice_impl_h_already_defined */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/Imakefile xview-3.2p1.4/lib/libxview/notify/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/notify/Imakefile 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/Imakefile 2013-08-25 12:04:12.412380145 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/linux_select.c xview-3.2p1.4/lib/libxview/notify/linux_select.c
--- xview-3.2p1.4.orig/lib/libxview/notify/linux_select.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/linux_select.c 2013-08-25 12:04:12.404380145 +0200
@@ -1,11 +1,27 @@
+#ifdef __linux__
+
+
/* Function for calling the select(2) system call in linux.
* Linux doesn't have a syscall() function, this replaces it
* for select(), fcntl() and read().
* Kudos to Rick Sladkey (jrs@world.std.com) for suggesting
* this method. */
-#include <sys/time.h>
+/* GNU libc uses weak symbols for system calls and puts two underscores
+ * before the names of the `real' symbols. So we can provide our own
+ * versions of the system calls but still call the original versions
+ * without having to mess around with the syscall-macros. This simplifies
+ * things quite a bit. It might have worked with libc5 as well, but it
+ * looks like nobody noticed it back then...
+ *
+ * martin.buck@bigfoot.com
+ */
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#ifndef __GLIBC__
/* #define __LIBRARY__ */
#include <syscall.h>
/* #undef __LIBRARY__ */
@@ -13,6 +29,21 @@
#ifdef DEBUG
#include <stdio.h>
#endif
+#endif
+
+#ifdef __GLIBC__
+
+int linux_select(int width, fd_set *readfds, fd_set *writefds,
+ fd_set *exceptfds, struct timeval *timeout) {
+ static struct timeval tout_copy;
+
+ if (timeout != NULL) {
+ tout_copy = *timeout;
+ }
+ return __select(width, readfds, writefds, exceptfds, timeout ? &tout_copy : NULL);
+}
+
+#else /* __GLIBC__ */
#define SYS_sys_select SYS_select
#define SYS_sys_fcntl SYS_fcntl
@@ -61,3 +92,6 @@
/* Replacement for syscall(SYS_read,...) */
_syscall3(int, sys_read, int, fildes, char *, buf, off_t, cnt);
+#endif /* !__GLIBC__ */
+
+#endif
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/linux_select.h xview-3.2p1.4/lib/libxview/notify/linux_select.h
--- xview-3.2p1.4.orig/lib/libxview/notify/linux_select.h 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/linux_select.h 2013-08-25 12:04:12.404380145 +0200
@@ -2,15 +2,19 @@
* called through syscall() in XView. We don't use syscall,
* but the unistd.h macros in the kernel sources. */
-#ifndef __LINUX_SELECT_H
+#if defined(__linux__) && !defined(__LINUX_SELECT_H)
#define __LINUX_SELECT_H
+#include <unistd.h>
+#include <fcntl.h>
#include <sys/types.h>
#include <sys/time.h>
int linux_select(int width, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout);
+#ifndef __GLIBC__
int sys_fcntl(int fildes, int cmd, int arg);
int sys_read(int fildes, char * buf, off_t cnt);
+#endif
-#endif __LINUX_SELECT_H
+#endif /* __LINUX_SELECT_H */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndet.h xview-3.2p1.4/lib/libxview/notify/ndet.h
--- xview-3.2p1.4.orig/lib/libxview/notify/ndet.h 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndet.h 2013-08-25 12:04:12.408380145 +0200
@@ -380,5 +380,5 @@
immediate client events.
*/
-#endif NDET_DEFINED
+#endif /* NDET_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndet_auto.c xview-3.2p1.4/lib/libxview/notify/ndet_auto.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndet_auto.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndet_auto.c 2013-08-25 12:04:12.408380145 +0200
@@ -23,7 +23,7 @@
#include <signal.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
extern errno;
@@ -73,7 +73,7 @@
/* Auto sig is async */);
/* Sweep all conditions & send notifications (recursive enumeration) */
switch (condition->data.signal) {
-#ifndef __linux
+#ifndef __linux__
/* In linux SIGIO == SIGURG */
case SIGIO:
#endif
@@ -151,12 +151,12 @@
enum_send->wait3 = &wd;
/* Look for as many children as have changed state */
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
while ((wd.pid = wait3(&wd.status, WNOHANG | WUNTRACED,
&wd.rusage)) > 0)
#else
while ((wd.pid = waitpid(-1, &wd.status, WNOHANG|WUNTRACED)) > 0)
-#endif SVR4
+#endif /* SVR4 */
(void) ntfy_enum_conditions(ndet_clients,
ndet_auto_sigchld, context);
break;
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndet_fcntl.c xview-3.2p1.4/lib/libxview/notify/ndet_fcntl.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndet_fcntl.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndet_fcntl.c 2013-08-25 12:04:12.404380145 +0200
@@ -21,23 +21,23 @@
#include <fcntl.h>
#ifdef SVR4
#include <sys/file.h>
-#endif SVR4
-#ifdef __linux
+#endif /* SVR4 */
+#ifdef __linux__
#include <stdarg.h>
#endif
int
-#ifndef __linux
+#ifndef __linux__
#ifdef SVR4
xv_fcntl(fd, cmd, arg)
#else
fcntl(fd, cmd, arg)
-#endif SVR4
+#endif /* SVR4 */
int fd, cmd, arg;
{
fd_set bit;
int res;
-#else /* __linux */
+#else /* __linux__ */
/* fcntl() is declared using variable args in linux */
fcntl(int fd, int cmd, ...) {
fd_set bit;
@@ -48,7 +48,7 @@
va_start(args, cmd);
arg = va_arg(args, int);
va_end(args);
-#endif /* __linux */
+#endif /* __linux__ */
/* Set fd bit */
FD_ZERO(&bit);
@@ -74,7 +74,7 @@
if (cmd == F_GETFL)
arg = res;
NTFY_BEGIN_CRITICAL;
-#if defined(__linux) && !defined(FNDELAY)
+#if defined(__linux__) && !defined(FNDELAY)
if (arg & O_NONBLOCK)
FD_SET(fd, &ndet_fndelay_mask);
#else
@@ -87,7 +87,7 @@
#endif
else
FD_CLR(fd, &ndet_fndelay_mask);
-#if !defined(__linux) || defined(FASYNC)
+#if !defined(__linux__) || defined(FASYNC)
if (arg & FASYNC)
FD_SET(fd, &ndet_fndelay_mask);
else
@@ -96,7 +96,7 @@
/* Make sure that are catching async related signals now */
if (ntfy_fd_anyset(&ndet_fasync_mask)) {
ndet_enable_sig(SIGIO);
-#ifndef __linux
+#ifndef __linux__
ndet_enable_sig(SIGURG);
#endif
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndet_fd.c xview-3.2p1.4/lib/libxview/notify/ndet_fd.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndet_fd.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndet_fd.c 2013-08-25 12:04:12.412380145 +0200
@@ -19,7 +19,7 @@
#include <xview_private/ndet.h>
#ifdef SVR4
#include <unistd.h>
-#endif SVR4
+#endif /* SVR4 */
/* performance: global cache of getdtablesize() */
extern int dtablesize_cache;
@@ -29,7 +29,7 @@
#else
#define GETDTABLESIZE() \
(dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
-#endif SVR4
+#endif /* SVR4 */
static int ndet_fd_table_size; /* Number of descriptor slots
* available */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndet_loop.c xview-3.2p1.4/lib/libxview/notify/ndet_loop.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndet_loop.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndet_loop.c 2013-08-25 12:04:12.404380145 +0200
@@ -19,14 +19,14 @@
#include <xview_private/ndet.h>
#include <xview_private/nint.h>
#include <xview_private/ndis.h> /* For ndis_dispatch */
-#ifndef __linux
+#ifndef __linux__
#ifndef SVR4
#include <syscall.h>
-#else SVR4
+#else /* SVR4 */
#include <sys/syscall.h>
#include <sys/poll.h>
-#endif SVR4
-#else /* __linux */
+#endif /* SVR4 */
+#else /* __linux__ */
#include "linux_select.h"
#endif
#include <fcntl.h>
@@ -35,7 +35,7 @@
#ifdef SVR4
#include <sys/user.h>
#include <sys/ucontext.h>
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h> /* For temp debugging */
#include <rpc/rpc.h>
@@ -59,7 +59,7 @@
/* NOTE! This assumes NSIG is 32. Not very portable */
/* ndet_prev_sigvec needs to start off at all zeros */
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
pkg_private_data struct sigvec ndet_prev_sigvec[NSIG] = {
{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
@@ -70,9 +70,9 @@
{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0},
};
-#else SVR4
+#else /* SVR4 */
pkg_private_data struct sigaction ndet_prev_sigvec[NSIG];
-#endif SVR4
+#endif /* SVR4 */
#ifdef vax /* vax signal handlers return ints */
pkg_private int ndet_signal_catcher();
@@ -80,20 +80,20 @@
pkg_private void ndet_signal_catcher();
#endif
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
pkg_private_data struct sigvec ndet_sigvec = {ndet_signal_catcher, 0, 0};
static int ndet_signal_code;
static struct sigcontext *ndet_signal_context;
-#else SVR4
+#else /* SVR4 */
pkg_private_data struct sigaction ndet_sigvec =
-#ifndef __linux
+#ifndef __linux__
{SA_RESTART, {ndet_signal_catcher}, {0}, {0,0}};
#else
{ndet_signal_catcher,0,SA_RESTART,NULL}; /* handler,mask,flags,restorer */
#endif
static int ndet_signal_code;
static ucontext_t *ndet_signal_context;
-#endif SVR4
+#endif /* SVR4 */
static void ndet_update_itimer();
static void ndet_send_async_sigs();
@@ -233,7 +233,7 @@
* select, not ON THE WAY into select).
*/
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
nfds = syscall(SYS_select,
FD_SETSIZE, &ibits, &obits, &ebits,
(sigisempty(&ndet_sigs_received)) ? timer : &ndet_polling_tv);
@@ -241,10 +241,10 @@
nfds = linux_select(FD_SETSIZE, &ibits, &obits, &ebits,
(sigisempty(&ndet_sigs_received)) ? timer : &ndet_polling_tv);
#endif
-#else SVR4
+#else /* SVR4 */
nfds = notify_select(FD_SETSIZE, &ibits, &obits, &ebits,
(sigisempty(&ndet_sigs_received)) ? timer : &ndet_polling_tv);
-#endif SVR4
+#endif /* SVR4 */
errno_remember = errno;
/* See if select returned unconventionally */
if (nfds == -1) {
@@ -414,7 +414,7 @@
FD_ZERO(&ndet_obits);
FD_ZERO(&ndet_ebits);
sigdelset( &ndet_sigs_auto, SIGIO );
-#ifndef __linux
+#ifndef __linux__
sigdelset( &ndet_sigs_auto, SIGURG );
#endif
/* Recompute all bits */
@@ -426,7 +426,7 @@
ndet_fd_change, NTFY_ENUM_DATA_NULL);
/* Toggle notifier auto signal catching if situation changed */
ndet_toggle_auto(&sigs_tmp, SIGIO);
-#ifndef __linux
+#ifndef __linux__
ndet_toggle_auto(&sigs_tmp, SIGURG);
#endif
}
@@ -732,15 +732,15 @@
/*
* Don't catch this signal, currently we are
*/
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
n = sigvec(sig, &ndet_prev_sigvec[sig],
(struct sigvec *) 0); /* SYSTEM CALL */
ntfy_assert(n == 0, 6 /* Unexpected error: sigvec */);
-#else SVR4
+#else /* SVR4 */
n = sigaction(sig, &ndet_prev_sigvec[sig],
(struct sigaction *) 0); /* SYSTEM CALL */
ntfy_assert(n == 0, 7 /* Unexpected error: sigaction */);
-#endif SVR4
+#endif /* SVR4 */
} else
ntfy_set_errno(NOTIFY_INTERNAL_ERROR);
}
@@ -760,15 +760,15 @@
int n;
/* Arrange to catch this signal, currently we are not */
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
n = sigvec(sig, &ndet_sigvec, &ndet_prev_sigvec[sig]);
/* SYSTEM CALL */
ntfy_assert(n == 0, 8 /* Unexpected error: sigvec */);
-#else SVR4
+#else /* SVR4 */
n = sigaction(sig, &ndet_sigvec, &ndet_prev_sigvec[sig]);
/* SYSTEM CALL */
ntfy_assert(n == 0, 9 /* Unexpected error: sigaction */);
-#endif SVR4
+#endif /* SVR4 */
sigaddset( &ndet_sigs_managing, sig );
}
}
@@ -785,14 +785,14 @@
ndet_signal_catcher(sig, code, scp)
int sig;
int code;
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
struct sigcontext *scp;
-#else SVR4
+#else /* SVR4 */
ucontext_t *scp;
-#endif SVR4
+#endif /* SVR4 */
{
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
void (*old_handler) () = ndet_prev_sigvec[sig].sa_handler;
#else
void (*old_handler) () = ndet_prev_sigvec[sig].sv_handler;
@@ -1048,11 +1048,11 @@
return (ndet_signal_code);
}
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
extern struct sigcontext *
-#else SVR4
+#else /* SVR4 */
extern ucontext_t *
-#endif SVR4
+#endif /* SVR4 */
notify_get_signal_context()
{
/* Could put check to see if in interrupt (should be) */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndet_s_poll.c xview-3.2p1.4/lib/libxview/notify/ndet_s_poll.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndet_s_poll.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndet_s_poll.c 2013-08-25 12:04:12.408380145 +0200
@@ -28,4 +28,4 @@
{
return (ndet_set_fd_func(nclient, func, poll_fd, NTFY_FD));
}
-#endif POLL
+#endif /* POLL */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndetitimer.c xview-3.2p1.4/lib/libxview/notify/ndetitimer.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndetitimer.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndetitimer.c 2013-08-25 12:04:12.408380145 +0200
@@ -23,7 +23,7 @@
#include <xview_private/nint.h> /* For nint_get_func */
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
extern struct itimerval NOTIFY_NO_ITIMER;
extern struct itimerval NOTIFY_POLLING_ITIMER;
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndetpoll.c xview-3.2p1.4/lib/libxview/notify/ndetpoll.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndetpoll.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndetpoll.c 2013-08-25 12:04:12.412380145 +0200
@@ -148,4 +148,4 @@
return (NOTIFY_DONE);
}
-#endif POLL
+#endif /* POLL */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndis.h xview-3.2p1.4/lib/libxview/notify/ndis.h
--- xview-3.2p1.4.orig/lib/libxview/notify/ndis.h 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndis.h 2013-08-25 12:04:12.412380145 +0200
@@ -125,5 +125,5 @@
int use_data) */
void ndis_flush_wait3(); /* Flush all conditions for pid
(Notify_client client, int pid) */
-#endif NDIS_DEFINED
+#endif /* NDIS_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndis_d_pri.c xview-3.2p1.4/lib/libxview/notify/ndis_d_pri.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndis_d_pri.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndis_d_pri.c 2013-08-25 12:04:12.416380145 +0200
@@ -16,9 +16,12 @@
#include <xview_private/ntfy.h>
#include <xview_private/ndis.h>
#include <signal.h>
-#if defined(__linux) && !defined(NBBY)
+#ifdef __linux__
+#include <sys/param.h> /* for howmany(), NBBY */
+#ifndef NBBY
#define NBBY 8
#endif
+#endif
typedef enum notify_error (*Notify_error_func) ();
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndisd_wait.c xview-3.2p1.4/lib/libxview/notify/ndisd_wait.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndisd_wait.c 2013-08-25 12:02:12.892378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndisd_wait.c 2013-08-25 12:04:12.404380145 +0200
@@ -24,9 +24,9 @@
int pid;
#ifndef SVR4
union wait *status;
-#else SVR4
+#else /* SVR4 */
int *status;
-#endif SVR4
+#endif /* SVR4 */
struct rusage *rusage;
{
return (NOTIFY_IGNORED);
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ndisdispch.c xview-3.2p1.4/lib/libxview/notify/ndisdispch.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ndisdispch.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ndisdispch.c 2013-08-25 12:04:12.408380145 +0200
@@ -22,7 +22,7 @@
#include <signal.h>
#ifdef SVR4
#include <unistd.h>
-#endif SVR4
+#endif /* SVR4 */
/* performance: global cache of getdtablesize() */
int dtablesize_cache = 0;
@@ -32,7 +32,7 @@
#else
#define GETDTABLESIZE() \
(dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
-#endif SVR4
+#endif /* SVR4 */
pkg_private_data u_int ndis_flags = 0;
pkg_private_data NTFY_CLIENT *ndis_clients = 0;
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/nint.h xview-3.2p1.4/lib/libxview/notify/nint.h
--- xview-3.2p1.4.orig/lib/libxview/notify/nint.h 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/nint.h 2013-08-25 12:04:12.408380145 +0200
@@ -127,5 +127,5 @@
nint_pop_callout exceptdoes
assumes in critical section*/
-#endif NINT_DEFINED
+#endif /* NINT_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/nint_copy.c xview-3.2p1.4/lib/libxview/notify/nint_copy.c
--- xview-3.2p1.4.orig/lib/libxview/notify/nint_copy.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/nint_copy.c 2013-08-25 12:04:12.412380145 +0200
@@ -20,7 +20,7 @@
#include <xview_private/portable.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
pkg_private Notify_error
nint_copy_callout(new_cond, old_cond)
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/nint_next.c xview-3.2p1.4/lib/libxview/notify/nint_next.c
--- xview-3.2p1.4.orig/lib/libxview/notify/nint_next.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/nint_next.c 2013-08-25 12:04:12.412380145 +0200
@@ -39,7 +39,12 @@
stack_cond->func_next > stack_cond->func_count ||
stack_cond->func_next + 1 > NTFY_FUNCS_MAX ||
stack_cond->type != type ||
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ stack_cond->data.an_u_int != (unsigned long) nclient) {
+#else
stack_cond->data.an_u_int != (u_int) nclient) {
+#endif
ntfy_set_errno(NOTIFY_INVAL);
goto Error;
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/nint_stack.c xview-3.2p1.4/lib/libxview/notify/nint_stack.c
--- xview-3.2p1.4.orig/lib/libxview/notify/nint_stack.c 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/nint_stack.c 2013-08-25 12:04:12.404380145 +0200
@@ -21,7 +21,7 @@
#include <xview_private/portable.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
pkg_private_data NTFY_CONDITION *nint_stack = 0;
pkg_private_data int nint_stack_size = 0;
@@ -65,7 +65,12 @@
* jam client->nclient into the data field in order to do some
* consistency checking later.
*/
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ stack_cond->data.an_u_int = (unsigned long) client->nclient;
+#else
stack_cond->data.an_u_int = (u_int) client->nclient;
+#endif
stack_cond->next = NTFY_CONDITION_NULL;
/* Bump stack pointer */
nint_stack_next++;
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/nintn_wait.c xview-3.2p1.4/lib/libxview/notify/nintn_wait.c
--- xview-3.2p1.4.orig/lib/libxview/notify/nintn_wait.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/nintn_wait.c 2013-08-25 12:04:12.408380145 +0200
@@ -24,9 +24,9 @@
int pid;
#ifndef SVR4
union wait *status;
-#else SVR4
+#else /* SVR4 */
int *status;
-#endif SVR4
+#endif /* SVR4 */
struct rusage *rusage;
{
Notify_func func;
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/notify.h xview-3.2p1.4/lib/libxview/notify/notify.h
--- xview-3.2p1.4.orig/lib/libxview/notify/notify.h 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/notify.h 2013-08-25 12:04:12.400380145 +0200
@@ -18,21 +18,21 @@
#include <stdio.h>
#include <sys/types.h>
+#include <sys/signal.h> /* sigset_t */
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <xview/base.h>
-#ifndef __linux
-#ifdef SYSV_WAIT
-#include <sys/rusage.h>
-#endif
+#ifndef __linux__
+# ifdef SYSV_WAIT
+# include <sys/rusage.h>
+# endif
+#endif
#ifdef SYSV_UCONTEXT
-#include <sys/ucontext.h>
-#endif
-#else /* __linux */
-#include <sys/signal.h> /* sigset_t */
+# include <sys/ucontext.h>
+#else
typedef int ucontext_t;
-#endif
+#endif
/*
***********************************************************************
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ntfy.h xview-3.2p1.4/lib/libxview/notify/ntfy.h
--- xview-3.2p1.4.orig/lib/libxview/notify/ntfy.h 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ntfy.h 2013-08-25 12:04:12.408380145 +0200
@@ -15,6 +15,19 @@
#ifndef NTFY_DEFINED
#define NTFY_DEFINED
+#if defined(__linux__) && defined(__GLIBC__)
+/* sigisemptyset gets prototyped in /usr/include/signal.h iff __USE_GNU is
+ * defined. So we only prototype it ourselves if __USE_GNU isn't defined.
+ * I'd prefer a cleaner solution, but I can't think of one at the moment :-(
+ *
+ * martin.buck@bigfoot.com
+ */
+#ifndef __USE_GNU
+#include <signal.h>
+extern int sigisemptyset(const sigset_t *);
+#endif
+#endif
+
#include <sys/types.h>
#include <xview_private/ultrix_cpt.h>
#include <sys/time.h>
@@ -124,8 +137,13 @@
int fd; /* NTFY_INPUT, NTFY_OUTPUT,
NTFY_EXCEPTION */
int signal; /* NTFY_*_SIGNAL */
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ unsigned long an_u_int;
+#else
u_int an_u_int; /* Generic unsigned int used for
instance matching */
+#endif
Notify_event event; /* NTFY_*_EVENT */
Destroy_status status; /* NTFY_DESTROY */
struct ntfy_itimer *ntfy_itimer;
@@ -149,9 +167,9 @@
*/
typedef struct ntfy_wait3_data {
int pid; /* Process waiting for */
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
union wait status; /* Return value from wait3 */
-#else SVR4
+#else /* SVR4 */
int status; /* Return value from wait3 */
#endif
struct rusage rusage; /* Return value from wait3 */
@@ -184,12 +202,17 @@
extern sigset_t ntfy_sigs_delayed;/* Bit mask of signals received while in
critical section */
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#define sigisempty(s) sigisemptyset(s)
+#else
#ifdef SVR4
#define sigisempty(s) (!(((s)->__sigbits[0]) | ((s)->__sigbits[1]) \
| ((s)->__sigbits[2]) | ((s)->__sigbits[3])))
#else
#define sigisempty(s) (!(*(s)))
#endif
+#endif
/*
* Critical section protection macros. A critical section is any section
@@ -466,9 +489,9 @@
#ifdef NTFY_DEBUG
#define ntfy_set_errno(err) ntfy_set_errno_debug((err))
void ntfy_set_errno_debug();
-#else NTFY_DEBUG
+#else /* NTFY_DEBUG */
#define ntfy_set_errno(err) notify_errno = err
-#endif NTFY_DEBUG
+#endif /* NTFY_DEBUG */
/*
* Ntfy_set_warning is for setting notify_errno when you don't usually want
* to generate a message; the caller may be using the call in a valid manner
@@ -479,21 +502,21 @@
#ifdef NTFY_DEBUG
#define ntfy_set_warning(err) ntfy_set_warning_debug((err))
void ntfy_set_warning_debug();
-#else NTFY_DEBUG
+#else /* NTFY_DEBUG */
#define ntfy_set_warning(err) notify_errno = err
-#endif NTFY_DEBUG
+#endif /* NTFY_DEBUG */
#ifdef NTFY_DEBUG
#define ntfy_assert(bool, code) if (!(bool)) ntfy_assert_debug(code)
void ntfy_assert_debug();
-#else NTFY_DEBUG
+#else /* NTFY_DEBUG */
#define ntfy_assert(bool, code) {}
-#endif NTFY_DEBUG
+#endif /* NTFY_DEBUG */
void ntfy_fatal_error();
#define pkg_private extern
#define pkg_private_data
-#endif NTFY_DEFINED
+#endif /* NTFY_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ntfy_ctbl.c xview-3.2p1.4/lib/libxview/notify/ntfy_ctbl.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_ctbl.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ntfy_ctbl.c 2013-08-25 12:04:12.408380145 +0200
@@ -109,9 +109,8 @@
NTFY_ENUM_DATA context;
{
#if 1
- /* See comment below */
- /* martin-2.buck@student.uni-ulm.de */
- NTFY_CNDTBL *orig_cnd_list = cnd_list;
+ /* See comment below. mbuck@debian.org */
+ NTFY_CNDTBL *last_cnd_list = cnd_list;
#endif
if (!cnd_list)
return (NTFY_ENUM_NEXT);
@@ -134,25 +133,36 @@
}
}
#if 1
- /* The call to enum_func above might result in a call to
+ /* The call to enum_func below might result in a call to
* ndet_itimer_change which might call ndet_itimer_expired which in
- * turn might call notify_set_itimer_func. This however can change
- * our cnd_list. A comment in ndet_itimer_expired says that
- * ntfy_new_enum_conditions is designed to survive this, which, of
- * course, it is not. So before dereferencing any further cnd_list
- * entries, we first check if the original cnd_list we got passed
- * is still valid.
+ * turn might call notify_set_itimer_func. This however could remove
+ * the current condition from our cnd_list, which would make our
+ * cnd_list pointer invalid. A comment in ndet_itimer_expired says
+ * that ntfy_new_enum_conditions is designed to survive this, which,
+ * of course, it is not.
+ * So, to find the next condition in the list, we have to check
+ * whether the previous condition's next pointer still points to the
+ * current condition. If it doesn't, this means that the current
+ * condition was removed and we have to use the previous condition's
+ * next pointer to find the next condition. If it didn't change, we
+ * can simply use the current condition's next pointer.
+ *
* Oh, BTW: I've got absolutely no idea what's going on here, but I
* hope this is a suitable fix. At least it prevents fullscreen-
* programs like vi from causing cmdtool to dump core.
*
- * martin-2.buck@student.uni-ulm.de
+ * mbuck@debian.org
*/
- if (!orig_cnd_list->next) {
- break;
+
+ if (cnd_list != last_cnd_list->next) {
+ cnd_list = last_cnd_list->next;
+ } else {
+ last_cnd_list = cnd_list;
+ cnd_list = cnd_list->next;
}
-#endif
+#else
cnd_list = cnd_list->next;
+#endif
}
return (NTFY_ENUM_NEXT);
}
@@ -172,6 +182,10 @@
NTFY_ENUM_FUNC enum_func;
NTFY_ENUM_DATA context;
{
+#if 1
+ /* See comment above. mbuck@debian.org */
+ NTFY_CNDTBL *last_cnd_list = cnd_list;
+#endif
extern NTFY_CLIENT *ntfy_enum_client;
extern NTFY_CLIENT *ntfy_enum_client_next;
NTFY_ENUM return_code = NTFY_ENUM_NEXT;
@@ -213,7 +227,17 @@
if (ntfy_enum_client == NTFY_CLIENT_NULL)
goto BreakOut;
}
+#if 1
+ /* See comment above. mbuck@debian.org */
+ if (cnd_list != last_cnd_list->next) {
+ cnd_list = last_cnd_list->next;
+ } else {
+ last_cnd_list = cnd_list;
+ cnd_list = cnd_list->next;
+ }
+#else
cnd_list = cnd_list->next;
+#endif
}
BreakOut:
{
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ntfy_fd_op.c xview-3.2p1.4/lib/libxview/notify/ntfy_fd_op.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_fd_op.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ntfy_fd_op.c 2013-08-25 12:04:12.412380145 +0200
@@ -10,8 +10,9 @@
* file for terms of the license.
*/
-#ifdef __linux
+#ifdef __linux__
#include <sys/time.h>
+#include <sys/param.h> /* for howmany() */
#endif
#include <sys/types.h>
#include <xview_private/ultrix_cpt.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ntfy_test.c xview-3.2p1.4/lib/libxview/notify/ntfy_test.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_test.c 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ntfy_test.c 2013-08-25 12:04:12.412380145 +0200
@@ -598,9 +598,9 @@
int pid;
#ifndef SVR4
union wait *status;
-#else SVR4
+#else /* SVR4 */
int *status;
-#endif SVR4
+#endif /* SVR4 */
struct rusage *rusage;
{
CONDITION *cond;
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ntfyclient.c xview-3.2p1.4/lib/libxview/notify/ntfyclient.c
--- xview-3.2p1.4.orig/lib/libxview/notify/ntfyclient.c 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ntfyclient.c 2013-08-25 12:04:12.404380145 +0200
@@ -56,7 +56,22 @@
tmp = key2a >> 16;
tmp1 = key2a << 21;
key2a = tmp1 | ((key2a << 5) & 0x001f0000) | tmp;
+#if 1
+ /* OUCH, trying to store the result of the subtraction of two unsigned
+ * ints (which potentially can use the whole range of an unsigned int, due
+ * to the bit-shifting above) in a signed int is not a very clever idea.
+ * But we only have to return *any* positive value if key1a is greater than
+ * key2a, 0 if they're equal or *any* negatve value if key1a is less than
+ * key2a; the actual difference doesn't matter. So let's use a simple
+ * comparison.
+ * <mbuck@debian.org>
+ */
+ return (key1a < key2a) ? -1 :
+ ((key1a > key2a) ? 1 :
+ 0);
+#else
return key1a - key2a;
+#endif
}
#endif /* HAVE_TSEARCH */
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/sys_fcntl.c xview-3.2p1.4/lib/libxview/notify/sys_fcntl.c
--- xview-3.2p1.4.orig/lib/libxview/notify/sys_fcntl.c 2013-08-25 12:02:12.904378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/sys_fcntl.c 2013-08-25 12:04:12.412380145 +0200
@@ -15,23 +15,27 @@
*/
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
#include <syscall.h>
#else
#include "linux_select.h"
#endif
-#else SVR4
+#else /* SVR4 */
#include <sys/syscall.h>
-#endif SVR4
+#endif /* SVR4 */
#include <xview_private/ntfy.h>
pkg_private int
notify_fcntl(fd, cmd, arg)
int fd, cmd, arg;
{
-#ifndef __linux
+#ifndef __linux__
return (syscall(SYS_fcntl, fd, cmd, arg));
#else
+#ifdef __GLIBC__
+ return (__fcntl(fd, cmd, arg));
+#else
return (sys_fcntl(fd, cmd, arg));
#endif
+#endif
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/sys_read.c xview-3.2p1.4/lib/libxview/notify/sys_read.c
--- xview-3.2p1.4.orig/lib/libxview/notify/sys_read.c 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/sys_read.c 2013-08-25 12:04:12.404380145 +0200
@@ -15,14 +15,14 @@
*/
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
#include <syscall.h>
#else
#include "linux_select.h"
#endif
-#else SVR4
+#else /* SVR4 */
#include <sys/syscall.h>
-#endif SVR4
+#endif /* SVR4 */
#include <xview_private/ntfy.h>
pkg_private int
@@ -31,9 +31,13 @@
char *buf;
int nbytes;
{
-#ifndef __linux
+#ifndef __linux__
return (syscall(SYS_read, fd, buf, nbytes));
#else
+#ifdef __GLIBC__
+ return (__read(fd, buf, (off_t)nbytes));
+#else
return (sys_read(fd, buf, (off_t)nbytes));
#endif
+#endif
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/sys_select.c xview-3.2p1.4/lib/libxview/notify/sys_select.c
--- xview-3.2p1.4.orig/lib/libxview/notify/sys_select.c 2013-08-25 12:02:12.900378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/sys_select.c 2013-08-25 12:04:12.400380145 +0200
@@ -15,19 +15,19 @@
*/
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
#include <syscall.h>
#else
#include "linux_select.h"
#endif
-#else SVR4
+#else /* SVR4 */
#include <values.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/poll.h>
#include <sys/select.h>
-#endif SVR4
+#endif /* SVR4 */
#include <xview_private/ntfy.h> /* For ntfy_assert */
#include <errno.h> /* For debugging */
#include <stdio.h> /* For debugging */
@@ -41,25 +41,25 @@
pkg_private int
#ifndef SVR4
notify_select(nfds, readfds, writefds, exceptfds, tv)
-#else SVR4
+#else /* SVR4 */
notify_select(nfds, in0, out0, ex0, tv)
-#endif SVR4
+#endif /* SVR4 */
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
int nfds, *readfds, *writefds, *exceptfds;
#else
int nfds;
fd_set *readfds, *writefds, *exceptfds;
-#endif /* __linux */
-#else SVR4
+#endif /* __linux__ */
+#else /* SVR4 */
int nfds;
fd_set *in0, *out0, *ex0;
-#endif SVR4
+#endif /* SVR4 */
struct timeval *tv;
{
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
nfds = syscall(SYS_select, nfds, readfds, writefds, exceptfds, tv);
ntfy_assert(!(nfds == 0 && tv == (struct timeval *) 0 &&
*readfds == 0 && *writefds == 0 && *exceptfds == 0), 39
@@ -72,7 +72,7 @@
/* SYS_select returned when no stimuli */);
#endif
return (nfds);
-#else SVR4
+#else /* SVR4 */
/* register declarations ordered by expected frequency of use */
register long *in, *out, *ex;
register u_long m; /* bit mask */
@@ -241,5 +241,5 @@
ntfy_assert(!(nfds == 0 && tv == (struct timeval *) 0), 40
/* select returned when no stimuli */);
return (rv);
-#endif SVR4
+#endif /* SVR4 */
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/notify/ultrix_cpt.h xview-3.2p1.4/lib/libxview/notify/ultrix_cpt.h
--- xview-3.2p1.4.orig/lib/libxview/notify/ultrix_cpt.h 2013-08-25 12:02:12.896378393 +0200
+++ xview-3.2p1.4/lib/libxview/notify/ultrix_cpt.h 2013-08-25 12:04:12.400380145 +0200
@@ -49,6 +49,6 @@
#define FD_ISSET(n, p) ((p)->fds_bits[0] & (1 << ((n) % NFDBITS)))
#define FD_ZERO(p) ((p)->fds_bits[0] = 0)
-#endif OLD_BSD_FDSETS
+#endif /* OLD_BSD_FDSETS */
-#endif ~xview_ultrix_compat_DEFINED
+#endif /* ~xview_ultrix_compat_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/Imakefile xview-3.2p1.4/lib/libxview/openwin/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/openwin/Imakefile 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/Imakefile 2013-08-25 12:04:12.556380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/openwin.c xview-3.2p1.4/lib/libxview/openwin/openwin.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/openwin.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/openwin.c 2013-08-25 12:04:12.552380147 +0200
@@ -84,7 +84,7 @@
#ifdef SELECTABLE_VIEWS
owin->seln_client = seln_create(openwin_seln_function, openwin_seln_reply,
(char *) owin);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
STATUS_SET(owin, auto_clear);
STATUS_SET(owin, show_borders);
@@ -127,7 +127,7 @@
WIN_NOTIFY_IMMEDIATE_EVENT_PROC, openwin_event,
#ifdef SELECTABLE_VIEWS
WIN_CONSUME_EVENT, ACTION_SELECT,
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
/*
WIN_INHERIT_COLORS, TRUE,
*/
@@ -173,7 +173,12 @@
Openwin owin_public;
Xv_Window child;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org, FIXME: I don't understand this */
+#if defined(__alpha)
+ unsigned long d1, d2, d3, d4, d5;
+#else
int d1, d2, d3, d4, d5;
+#endif
{
Xv_openwin_info *owin = OPENWIN_PRIVATE(owin_public);
Openwin_view_info *view;
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_evt.c xview-3.2p1.4/lib/libxview/openwin/ow_evt.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_evt.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_evt.c 2013-08-25 12:04:12.552380147 +0200
@@ -48,7 +48,7 @@
if (event_is_down(event))
openwin_select(owin_public, event);
break;
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
case ACTION_RESCALE:
openwin_rescale(owin_public, (int) arg);
@@ -65,7 +65,7 @@
#ifdef SELECTABLE_VIEWS
if (STATUS(owin, show_borders))
openwin_paint_borders(owin_public);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
break;
default:
break;
@@ -133,7 +133,7 @@
#ifdef SELECTABLE_VIEWS
if (view->owin->seln_view != NULL)
openwin_select_view(OPENWIN_PUBLIC(view->owin), NULL);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
if (openwin_count_views(view->owin) > 1)
xv_destroy_safe(window_public);
return (NOTIFY_DONE);
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_get.c xview-3.2p1.4/lib/libxview/openwin/ow_get.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_get.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_get.c 2013-08-25 12:04:12.552380147 +0200
@@ -111,7 +111,7 @@
#else
v = (Xv_opaque) NULL;
break;
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
case OPENWIN_SPLIT_INIT_PROC:
v = (Xv_opaque) (owin->split_init_proc);
break;
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_impl.h xview-3.2p1.4/lib/libxview/openwin/ow_impl.h
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_impl.h 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_impl.h 2013-08-25 12:04:12.552380147 +0200
@@ -91,7 +91,7 @@
#ifdef SELECTABLE_VIEWS
Seln_client seln_client; /* selection svc client id */
Openwin_view_info *seln_view; /* selected view, if any */
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
struct {
BOOLEAN_FIELD(auto_clear);
BOOLEAN_FIELD(adjust_vertical);
@@ -153,7 +153,7 @@
extern Xv_opaque openwin_seln_reply();
extern void openwin_select();
extern void openwin_select_view();
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
/* openwin_view.c */
extern void openwin_create_initial_view();
@@ -165,4 +165,4 @@
extern int openwin_fill_view_gap();
extern void openwin_copy_scrollbar();
-#endif __openwin_impl_h
+#endif /* __openwin_impl_h */
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_paint.c xview-3.2p1.4/lib/libxview/openwin/ow_paint.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_paint.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_paint.c 2013-08-25 12:04:12.552380147 +0200
@@ -41,7 +41,7 @@
Pkg_private void openwin_paint_borders();
Pkg_private void openwin_hilite_view();
Pkg_private void openwin_lolite_view();
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
/******************************************************************/
@@ -164,7 +164,7 @@
xv_vector(owin_public, x + 0, y + 0, x + 0, y + h, PIX_SRC, 0);
xv_vector(owin_public, x + w, y + 0, x + w, y + h, PIX_SRC, 0);
}
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_resize.c xview-3.2p1.4/lib/libxview/openwin/ow_resize.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_resize.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_resize.c 2013-08-25 12:04:12.556380147 +0200
@@ -215,13 +215,13 @@
/* clear borders if painted */
if (STATUS(owin, show_borders))
openwin_paint_border(OPENWIN_PUBLIC(owin), view, FALSE);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
xv_set(view->view, WIN_RECT, view_rect, 0);
#ifdef SELECTABLE_VIEWS
/* repaint borders is shown */
if (STATUS(owin, show_borders))
openwin_paint_border(OPENWIN_PUBLIC(owin), view, TRUE);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
if (vsb != NULL) {
xv_set(vsb,
@@ -285,9 +285,9 @@
} else {
#ifndef SVR4
n_vmargins = n_hmargins = 1;
-#else SVR4
+#else /* SVR4 */
n_vmargins = n_hmargins = 2;
-#endif SVR4
+#endif /* SVR4 */
}
/* get rid of margin if view is on one of the edges, or if there is
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_seln.c xview-3.2p1.4/lib/libxview/openwin/ow_seln.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_seln.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_seln.c 2013-08-25 12:04:12.552380147 +0200
@@ -114,4 +114,4 @@
}
}
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_set.c xview-3.2p1.4/lib/libxview/openwin/ow_set.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_set.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_set.c 2013-08-25 12:04:12.552380147 +0200
@@ -55,7 +55,7 @@
Xv_Window view;
#ifdef SELECTABLE_VIEWS
Openwin_view_info *viewinfo;
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
Xv_opaque result = XV_OK;
@@ -144,7 +144,7 @@
else
openwin_viewdata_for_view((Xv_Window) avlist[1], &viewinfo);
openwin_select_view(OPENWIN_PUBLIC(owin), viewinfo);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
/* This is just a no-op until proper selection is implemented */
ATTR_CONSUME(avlist[0]);
break;
diff -rNu xview-3.2p1.4.orig/lib/libxview/openwin/ow_view.c xview-3.2p1.4/lib/libxview/openwin/ow_view.c
--- xview-3.2p1.4.orig/lib/libxview/openwin/ow_view.c 2013-08-25 12:02:12.868378392 +0200
+++ xview-3.2p1.4/lib/libxview/openwin/ow_view.c 2013-08-25 12:04:12.556380147 +0200
@@ -58,6 +58,7 @@
static openwin_locate_top_viewers();
static openwin_expand_viewers();
static openwin_register_initial_sb();
+static int openwin_check_view(Openwin_view_info *view);
/******************************************************************/
@@ -105,7 +106,7 @@
* called from anywhere. openwin_check_view() is made redundant at the same
* time. Is this a xview bug or can these routines be removed altogether??
* Change static to Pkg_private on linux, for now. */
-#ifndef __linux
+#ifndef __linux__
static int
#else
Pkg_private int
@@ -276,7 +277,7 @@
/* paint borders if needed */
if (STATUS(owin, show_borders))
openwin_paint_border(OPENWIN_PUBLIC(owin), new_view, TRUE);
-#endif SELECTABLE_VIEWS
+#endif /* SELECTABLE_VIEWS */
if (owin->split_init_proc) {
(owin->split_init_proc) (view->view, new_view->view, pos);
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/Imakefile xview-3.2p1.4/lib/libxview/panel/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/panel/Imakefile 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/Imakefile 2013-08-25 12:04:12.460380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.12 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.12 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/item_set.c xview-3.2p1.4/lib/libxview/panel/item_set.c
--- xview-3.2p1.4.orig/lib/libxview/panel/item_set.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/item_set.c 2013-08-25 12:04:12.452380146 +0200
@@ -25,6 +25,7 @@
Xv_private Graphics_info *xv_init_olgx();
static void item_adjust_label_size();
+static fix_positions(Item_info *ip);
extern Notify_value panel_base_event_handler();
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_btn.c xview-3.2p1.4/lib/libxview/panel/p_btn.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_btn.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_btn.c 2013-08-25 12:04:12.456380146 +0200
@@ -203,7 +203,12 @@
if (pin_is_default) {
image.im_type = PIT_STRING;
image_string(&image) = NULL;
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ label = (char *)"";
+#else
label = "";
+#endif
} else if (!(image_string(&image) = (char *) xv_get(default_menu_item,
MENU_STRING))) {
olgx_state |= OLGX_LABEL_IS_PIXMAP;
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_choice.c xview-3.2p1.4/lib/libxview/panel/p_choice.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_choice.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_choice.c 2013-08-25 12:04:12.460380146 +0200
@@ -121,6 +121,10 @@
static void update_value_rect();
static Xv_opaque choice_do_menu_item();
+static int find_choice(Item_info *ip, Event *event);
+static int modify_choice(Item_info *ip, int type, int which_choice, Xv_opaque choice_info);
+static int move_specified(Item_info *ip, Attr_avlist avlist);
+static int re_alloc_choices(Item_info *ip, int type, Xv_opaque choices[]);
static Panel_ops ops = {
panel_default_handle_event, /* handle_event() */
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_gauge.c xview-3.2p1.4/lib/libxview/panel/p_gauge.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_gauge.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_gauge.c 2013-08-25 12:04:12.460380146 +0200
@@ -92,6 +92,7 @@
unsigned int vertical:1;
} Gauge_info;
+static int etoi();
/* ========================================================================= */
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_get.c xview-3.2p1.4/lib/libxview/panel/p_get.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_get.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_get.c 2013-08-25 12:04:12.460380146 +0200
@@ -20,6 +20,7 @@
#define MAX_NEGATIVE_SHRINK 2000
#define SHRINK_MARGIN 4
+static panel_shrink_margin(Panel_info *panel);
/*ARGSUSED*/
Pkg_private Xv_opaque
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_list.c xview-3.2p1.4/lib/libxview/panel/p_list.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_list.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_list.c 2013-08-25 12:04:12.452380146 +0200
@@ -1239,7 +1239,12 @@
return ((Xv_opaque) dp->choose_one);
case PANEL_ITEM_NTH_WINDOW:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ if (va_arg(valist, int) == 0)
+#else
if (*(int *) valist == 0)
+#endif
return (Xv_opaque) dp->list_sb;
else
return (Xv_opaque) NULL;
@@ -1266,7 +1271,12 @@
return (Xv_opaque) dp->list_sb;
case PANEL_LIST_SELECTED:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
return (node ? (Xv_opaque) node->f.selected : (Xv_opaque) XV_ERROR);
@@ -1278,7 +1288,12 @@
return -1; /* no rows selected */
case PANEL_LIST_NEXT_SELECTED:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
if (!node)
return -1; /* specified row doesn't exist */
@@ -1289,7 +1304,12 @@
return -1; /* no subsequent row selected */
case PANEL_LIST_CLIENT_DATA:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
return (node ? (Xv_opaque) node->client_data : (Xv_opaque) XV_ERROR);
@@ -1297,7 +1317,12 @@
#ifdef OW_I18N
case PANEL_LIST_STRING_WCS:
#endif
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
#ifdef OW_I18N
if (node != NULL)
@@ -1312,7 +1337,12 @@
#endif /* OW_I18N */
case PANEL_LIST_GLYPH:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
return (node ? (Xv_opaque) node->glyph : (Xv_opaque) XV_ERROR);
@@ -1328,7 +1358,12 @@
#endif /* OW_I18N */
case PANEL_LIST_FONT:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
return (node ? (Xv_opaque) node->font : (Xv_opaque) XV_ERROR);
@@ -1352,7 +1387,12 @@
case PANEL_LIST_INACTIVE:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
return (node ? (Xv_opaque) node->f.row_inactive : (Xv_opaque) XV_ERROR);
@@ -1407,7 +1447,12 @@
}
case PANEL_LIST_EXTENSION_DATA:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ row = va_arg(valist, int);
+#else
row = *(int *) valist;
+#endif
node = find_or_create_nth_row(dp, row, FALSE);
return (node ? (Xv_opaque) node->exten_data : (Xv_opaque) XV_ERROR);
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_mlinetxt.c xview-3.2p1.4/lib/libxview/panel/p_mlinetxt.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_mlinetxt.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_mlinetxt.c 2013-08-25 12:04:12.464380146 +0200
@@ -356,7 +356,12 @@
xv_set ( dp->textsw, TEXTSW_READ_ONLY, FALSE, NULL );
textsw_reset(dp->textsw,0,0);
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ xv_set(dp->textsw, TEXTSW_CONTENTS, (unsigned long) avlist[1], 0);
+#else
xv_set(dp->textsw, TEXTSW_CONTENTS, avlist[1], 0);
+#endif
if ( dp->read_only )
xv_set ( dp->textsw, TEXTSW_READ_ONLY, TRUE, NULL );
@@ -449,7 +454,12 @@
return (Xv_opaque) dp->rows_displayed;
case PANEL_ITEM_NTH_WINDOW:
+/* Alpha compatibility, mbuck@debian.org */
+#if 1
+ switch (va_arg(valist, int)) {
+#else
switch (*(int *) valist) {
+#endif
case 0:
return dp->view;
case 1:
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_num_btn.c xview-3.2p1.4/lib/libxview/panel/p_num_btn.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_num_btn.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_num_btn.c 2013-08-25 12:04:12.456380146 +0200
@@ -23,7 +23,7 @@
*/
#ifndef SVR4
static short up_button_10_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short up_button_10_image[] = {
#endif
#include <images/up_button_10.pr>
@@ -32,27 +32,27 @@
#ifndef SVR4
static short up_button_12_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short up_button_12_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/up_button_12.pr>
};
static mpr_static(up_button_12_pr, 16, 15, 1, up_button_12_image);
#ifndef SVR4
static short up_button_14_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short up_button_14_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/up_button_14.pr>
};
static mpr_static(up_button_14_pr, 16, 17, 1, up_button_14_image);
#ifndef SVR4
static short up_button_19_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short up_button_19_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/up_button_19.pr>
};
static mpr_static(up_button_19_pr, 32, 25, 1, up_button_19_image);
@@ -63,36 +63,36 @@
*/
#ifndef SVR4
static short down_button_10_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short down_button_10_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/down_button_10.pr>
};
static mpr_static(down_button_10_pr, 16, 13, 1, down_button_10_image);
#ifndef SVR4
static short down_button_12_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short down_button_12_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/down_button_12.pr>
};
static mpr_static(down_button_12_pr, 16, 15, 1, down_button_12_image);
#ifndef SVR4
static short down_button_14_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short down_button_14_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/down_button_14.pr>
};
static mpr_static(down_button_14_pr, 16, 17, 1, down_button_14_image);
#ifndef SVR4
static short down_button_19_image[] = {
-#else SVR4
+#else /* SVR4 */
static unsigned short down_button_19_image[] = {
-#endif SVR4
+#endif /* SVR4 */
#include <images/down_button_19.pr>
};
static mpr_static(down_button_19_pr, 32, 25, 1, down_button_19_image);
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_select.c xview-3.2p1.4/lib/libxview/panel/p_select.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_select.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_select.c 2013-08-25 12:04:12.448380146 +0200
@@ -604,7 +604,7 @@
if (event_is_up(event))
panel->current = NULL;
} else
-#endif NO_BINARY_COMPATIBILITY
+#endif /* NO_BINARY_COMPATIBILITY */
(void) panel_accept_menu(client_object, event);
break;
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_set.c xview-3.2p1.4/lib/libxview/panel/p_set.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_set.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_set.c 2013-08-25 12:04:12.456380146 +0200
@@ -23,6 +23,8 @@
Xv_private char *xv_font_regular_cmdline();
static void panel_set_fonts();
+static int column_from_absolute_x(int x_position, int col_gap, int left_margin, Xv_Font font);
+static int row_from_absolute_y(int y_position, int col_gap, int left_margin, Xv_Font font);
Pkg_private Xv_opaque
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_slider.c xview-3.2p1.4/lib/libxview/panel/p_slider.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_slider.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_slider.c 2013-08-25 12:04:12.448380146 +0200
@@ -54,6 +54,8 @@
static Panel_setting get_value();
static void paint_slider();
static void update_rects();
+static int etoi();
+static int itoe();
static Panel_ops ops = {
panel_default_handle_event, /* handle_event() */
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_txt.c xview-3.2p1.4/lib/libxview/panel/p_txt.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_txt.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_txt.c 2013-08-25 12:04:12.456380146 +0200
@@ -5863,7 +5863,7 @@
#ifdef INTERM_SCROLL
int value_right_len;
int value_right_display_len;
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
/* Get the column position from current caret position */
caret_offset = dp->saved_caret_offset;
@@ -5907,7 +5907,7 @@
real_display_len-=dp->scroll_btn_width;
temp_last_char = 1;
}
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
if (interm_display_len + dp->saved_caret_offset <
@@ -5985,7 +5985,7 @@
real_display_len-=dp->scroll_btn_width;
temp_first_char = 1;
}
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
display_length = real_display_len - interm_display_len;
@@ -6049,7 +6049,7 @@
if ((dp->first_char) || (temp_first_char))
#else
if (dp->first_char)
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
draw_scroll_btn(ip, OLGX_SCROLL_BACKWARD);
@@ -6062,7 +6062,7 @@
if ((dp->first_char) || (temp_first_char))
#else
if (dp->first_char)
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
x += dp->scroll_btn_width;
if (dp->mask_wc == '\0') { /* not masked */
if (str_left) {
@@ -6116,7 +6116,7 @@
if ((dp->first_char) || (temp_first_char))
#else
if (dp->first_char)
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
dp->caret_offset = x - ip->value_rect.r_left - dp->scroll_btn_width;
else
dp->caret_offset = x - ip->value_rect.r_left;;
@@ -6167,7 +6167,7 @@
if ((dp->last_char < (wslen(dp->value_wc) - 1)) || (temp_last_char))
#else
if (dp->last_char < (wslen(dp->value_wc) - 1))
-#endif INTERM_SCROLL
+#endif /* INTERM_SCROLL */
draw_scroll_btn(ip, OLGX_SCROLL_FORWARD);
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/p_utl.c xview-3.2p1.4/lib/libxview/panel/p_utl.c
--- xview-3.2p1.4.orig/lib/libxview/panel/p_utl.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/p_utl.c 2013-08-25 12:04:12.452380146 +0200
@@ -169,7 +169,7 @@
xv_free(image_string_wc(dest));
}
#else
-#ifndef __linux
+#ifndef __linux__
{
if (image_string(dest))
xv_free(image_string(dest));
@@ -197,7 +197,7 @@
value_str = "";
if (!(str = (char *) panel_strsave((u_char *) value_str)))
return (size);
-#ifdef __linux
+#ifdef __linux__
/* XView bug: This routine sometimes used a value that was already freed,
* leading to clobbered menu items. The problem is the
* 'xv_free(image_string(dest))' above. In some cases the new 'value'
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/panel.c xview-3.2p1.4/lib/libxview/panel/panel.c
--- xview-3.2p1.4.orig/lib/libxview/panel/panel.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/panel.c 2013-08-25 12:04:12.460380146 +0200
@@ -28,7 +28,7 @@
static int panel_layout();
-#ifndef __linux
+#ifndef __linux__
Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
#else
extern Defaults_pairs xv_kbd_cmds_value_pairs[4];
@@ -47,6 +47,7 @@
Attr_attribute panel_context_key;
+static panel_unregister_view(Panel_info *panel, Xv_Window view);
/*ARGSUSED*/
Pkg_private int
@@ -292,7 +293,12 @@
Panel panel_public;
Xv_Window child;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org, FIXME: I don't understand this */
+#if defined(__alpha)
+ unsigned long d1, d2, d3, d4, d5;
+#else
int d1, d2, d3, d4, d5;
+#endif
{
Panel_info *panel = PANEL_PRIVATE(panel_public);
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/panel_impl.h xview-3.2p1.4/lib/libxview/panel/panel_impl.h
--- xview-3.2p1.4.orig/lib/libxview/panel/panel_impl.h 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/panel_impl.h 2013-08-25 12:04:12.460380146 +0200
@@ -10,11 +10,11 @@
#define panel_impl_defined
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/types.h>
#include <X11/Xlib.h>
#include <xview_private/i18n_impl.h>
@@ -89,7 +89,7 @@
#ifdef OW_I18N
Atom compound_text;
Atom length_chars;
-#endif /*OW_I18N*/
+#endif /* OW_I18N */
} atom;
Xv_Font bold_font;
#ifdef OW_I18N
diff -rNu xview-3.2p1.4.orig/lib/libxview/panel/panel_seln.c xview-3.2p1.4/lib/libxview/panel/panel_seln.c
--- xview-3.2p1.4.orig/lib/libxview/panel/panel_seln.c 2013-08-25 12:02:12.872378392 +0200
+++ xview-3.2p1.4/lib/libxview/panel/panel_seln.c 2013-08-25 12:04:12.448380146 +0200
@@ -15,7 +15,7 @@
#include <xview/sel_attrs.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
extern void (*panel_seln_inform_proc) (),
(*panel_seln_destroy_proc) ();
diff -rNu xview-3.2p1.4.orig/lib/libxview/pw/Imakefile xview-3.2p1.4/lib/libxview/pw/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/pw/Imakefile 2013-08-25 12:02:12.836378392 +0200
+++ xview-3.2p1.4/lib/libxview/pw/Imakefile 2013-08-25 12:04:12.524380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/pw/xv_rop.c xview-3.2p1.4/lib/libxview/pw/xv_rop.c
--- xview-3.2p1.4.orig/lib/libxview/pw/xv_rop.c 2013-08-25 12:02:12.836378392 +0200
+++ xview-3.2p1.4/lib/libxview/pw/xv_rop.c 2013-08-25 12:04:12.524380147 +0200
@@ -301,7 +301,7 @@
else
ximage->bitmap_bit_order = MSBFirst;
#else
-#ifdef ultrix
+#if defined(ultrix) || defined(__alpha)
ximage->byte_order = LSBFirst;
ximage->bitmap_bit_order = MSBFirst;
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/rect/Imakefile xview-3.2p1.4/lib/libxview/rect/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/rect/Imakefile 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/rect/Imakefile 2013-08-25 12:04:12.524380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/rect/rect_util.c xview-3.2p1.4/lib/libxview/rect/rect_util.c
--- xview-3.2p1.4.orig/lib/libxview/rect/rect_util.c 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/rect/rect_util.c 2013-08-25 12:04:12.524380147 +0200
@@ -16,6 +16,8 @@
#include <xview/rect.h>
+static int rect_nearest_edge(int minimum, int delta, int val);
+
/*
* Compute the distance from rect to (x, y). If (x, y) is in rect, zero is
* returned. If x_used or y_used are non-zero, the projection point is
diff -rNu xview-3.2p1.4.orig/lib/libxview/screen/Imakefile xview-3.2p1.4/lib/libxview/screen/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/screen/Imakefile 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/screen/Imakefile 2013-08-25 12:04:12.524380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/screen/scrn_get.c xview-3.2p1.4/lib/libxview/screen/scrn_get.c
--- xview-3.2p1.4.orig/lib/libxview/screen/scrn_get.c 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/screen/scrn_get.c 2013-08-25 12:04:12.524380147 +0200
@@ -20,6 +20,10 @@
#include <xview/base.h>
#include <xview/font.h>
#include <xview/server.h>
+/* mbuck@debian.org */
+#if 1
+#include <X11/Xlibint.h>
+#endif
/* Bitmap used for the inactive GC */
static unsigned short screen_gray50_bitmap[16] = { /* 50% gray pattern */
diff -rNu xview-3.2p1.4.orig/lib/libxview/screen/scrn_lyout.c xview-3.2p1.4/lib/libxview/screen/scrn_lyout.c
--- xview-3.2p1.4.orig/lib/libxview/screen/scrn_lyout.c 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/screen/scrn_lyout.c 2013-08-25 12:04:12.524380147 +0200
@@ -23,6 +23,10 @@
register Xv_Window root;
register Xv_Window child;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ unsigned long *d1, *d2, *d3, *d4, *d5;
+#endif
{
int top_level = (int) xv_get(child,
(Attr_attribute)WIN_TOP_LEVEL);
diff -rNu xview-3.2p1.4.orig/lib/libxview/scrollbar/Imakefile xview-3.2p1.4/lib/libxview/scrollbar/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/scrollbar/Imakefile 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/scrollbar/Imakefile 2013-08-25 12:04:12.428380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/scrollbar/sb.c xview-3.2p1.4/lib/libxview/scrollbar/sb.c
--- xview-3.2p1.4.orig/lib/libxview/scrollbar/sb.c 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/scrollbar/sb.c 2013-08-25 12:04:12.428380146 +0200
@@ -43,7 +43,7 @@
Xv_private void win_set_no_focus();
Xv_private Graphics_info *xv_init_olgx();
-#ifndef __linux
+#ifndef __linux__
Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
#else
extern Defaults_pairs xv_kbd_cmds_value_pairs[4];
diff -rNu xview-3.2p1.4.orig/lib/libxview/scrollbar/sb_impl.h xview-3.2p1.4/lib/libxview/scrollbar/sb_impl.h
--- xview-3.2p1.4.orig/lib/libxview/scrollbar/sb_impl.h 2013-08-25 12:02:12.876378392 +0200
+++ xview-3.2p1.4/lib/libxview/scrollbar/sb_impl.h 2013-08-25 12:04:12.428380146 +0200
@@ -104,9 +104,9 @@
/* dimensions for extralarge size scrollbar */
#ifndef SVR4
#define SCROLLBAR_XLARGE_THICKNESS 29
-#else SVR4
+#else /* SVR4 */
#define SCROLLBAR_XLARGE_THICKNESS 27
-#endif SVR4
+#endif /* SVR4 */
#define SB_XLARGE_MARGIN 4
#define SB_XLARGE_MARKER_HEIGHT 9
#define SB_XLARGE_ELEVATOR_BOX_HEIGHT 21
@@ -251,4 +251,4 @@
Pkg_private void scrollbar_join_view_from_menu();
Pkg_private void scrollbar_init_delay_values();
-#endif __scrollbar_impl_h
+#endif /* __scrollbar_impl_h */
diff -rNu xview-3.2p1.4.orig/lib/libxview/sel/Imakefile xview-3.2p1.4/lib/libxview/sel/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/sel/Imakefile 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/sel/Imakefile 2013-08-25 12:04:12.520380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/sel/sel_agent.c xview-3.2p1.4/lib/libxview/sel/sel_agent.c
--- xview-3.2p1.4.orig/lib/libxview/sel/sel_agent.c 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/sel/sel_agent.c 2013-08-25 12:04:12.520380147 +0200
@@ -12,7 +12,12 @@
#include <xview/xview.h>
+/* mbuck@debian.org */
+#if 1
+#include <X11/Xlibint.h>
+#else
#include <X11/Xlib.h>
+#endif
#include <X11/Xutil.h>
#include <xview/server.h>
#include <xview/sel_svc.h>
@@ -31,10 +36,10 @@
* Ultrix
*/
#include <xview_private/ultrix_cpt.h>
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
#include <stdlib.h>
#include <unistd.h>
-#endif SVR4
+#endif /* SVR4 */
static void selection_agent_process_functions();
@@ -63,6 +68,7 @@
static void selection_agent_do_function();
static Atom get_atom();
static Seln_attribute save_atom();
+static int waitforReadableTimeout(Display *display, struct timeval *timeout);
Xv_private Seln_result seln_convert_request_to_property();
@@ -309,7 +315,6 @@
struct stat stat_buf;
int count, size;
char *destp;
- extern long lseek();
if (fstat(fd, &stat_buf) != 0) {
perror(XV_MSG("Agent couldn't reply about a file"));
@@ -481,7 +486,7 @@
if (bytes_remaining != 0)
xv_error(NULL,
ERROR_STRING, "Property not deleted on server during selection", 0);
-#endif DEBUG
+#endif /* DEBUG */
text_prop.value = (unsigned char *) buffer;
text_prop.encoding = agent->targets.compound_text;
@@ -1529,7 +1534,7 @@
#else
#define GETDTABLESIZE() \
(dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))
-#endif SVR4
+#endif /* SVR4 */
/*
@@ -1555,9 +1560,9 @@
#ifndef SVR4
result = select(max_fds, &select_ibits,
(fd_set *) NULL, (fd_set *) NULL, timeout);
-#else SVR4
+#else /* SVR4 */
result = select(display->fd + 1, &select_ibits, NULL, NULL, timeout);
-#endif SVR4
+#endif /* SVR4 */
if (result == -1 && errno != EINTR)
{
complain("Select call returned error");
@@ -1685,7 +1690,7 @@
return get_atom(dpy, agent->xid, FIRST_WC(&agent->targets));
if (attr == SELN_REQ_LAST_WC)
return get_atom(dpy, agent->xid, LAST_WC(&agent->targets));
-#endif OW_I18N
+#endif /* OW_I18N */
if (attr == SELN_REQ_CONTENTS_PIECES)
return get_atom(dpy, agent->xid, CONTENTS_PIECES(&agent->targets));
if (attr == SELN_REQ_FIRST)
diff -rNu xview-3.2p1.4.orig/lib/libxview/sel/sel_compat.h xview-3.2p1.4/lib/libxview/sel/sel_compat.h
--- xview-3.2p1.4.orig/lib/libxview/sel/sel_compat.h 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/sel/sel_compat.h 2013-08-25 12:04:12.516380147 +0200
@@ -43,4 +43,4 @@
#define seln_report_event(seln_client, event) \
selection_report_event(xv_default_server, seln_client, event)
-#endif ~xview_selection_compat_DEFINED
+#endif /* ~xview_selection_compat_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/sel/seln.c xview-3.2p1.4/lib/libxview/sel/seln.c
--- xview-3.2p1.4.orig/lib/libxview/sel/seln.c 2013-08-25 12:02:12.840378392 +0200
+++ xview-3.2p1.4/lib/libxview/sel/seln.c 2013-08-25 12:04:12.516380147 +0200
@@ -14,6 +14,10 @@
#include <sys/file.h>
#include <stdio.h>
#include <errno.h>
+#ifndef XVIEW_USE_INSECURE_TMPFILES
+/* martin.buck@bigfoot.com */
+#include <dirent.h>
+#endif
#include <xview_private/i18n_impl.h>
#include <xview/xview_xvin.h>
#include <xview/selection.h>
@@ -133,8 +137,19 @@
{
char *getenv();
char *name;
+#ifndef XVIEW_USE_INSECURE_TMPFILES
+ /* martin.buck@bigfoot.com */
+ static char homename[MAXNAMLEN];
+#endif
if ((name = getenv("SELECTION_FILE")) == NULL)
+#ifdef XVIEW_USE_INSECURE_TMPFILES
name = "/tmp/winselection";
+#else
+ if (!homename[0]) {
+ sprintf(homename, "%s/.winselection", xv_getlogindir());
+ }
+ name = homename;
+#endif
return (name);
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/sel/seln_impl.h xview-3.2p1.4/lib/libxview/sel/seln_impl.h
--- xview-3.2p1.4.orig/lib/libxview/sel/seln_impl.h 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/sel/seln_impl.h 2013-08-25 12:04:12.516380147 +0200
@@ -11,11 +11,11 @@
#include <errno.h>
#ifndef FILE
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
#undef NULL
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
-#endif FILE
+#endif /* FILE */
#include <sys/time.h>
#include <sys/types.h>
#include <netdb.h>
@@ -97,7 +97,7 @@
Time timestamp;
unsigned char format;
} Seln_agent_context;
-#endif OW_I18N
+#endif /* OW_I18N */
typedef struct {
long offset;
@@ -203,7 +203,7 @@
selection.first_wc
#define LAST_WC(selection) "_SUN_SELN_LAST_WC", SELN_REQ_LAST_WC, \
selection.last_wc
-#endif OW_I18N
+#endif /* OW_I18N */
#define IS_READONLY(selection) "_SUN_SELN_IS_READONLY", SELN_REQ_IS_READONLY, \
selection.is_readonly
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/Imakefile xview-3.2p1.4/lib/libxview/selection/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/selection/Imakefile 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/Imakefile 2013-08-25 12:04:12.468380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/sel_impl.h xview-3.2p1.4/lib/libxview/selection/sel_impl.h
--- xview-3.2p1.4.orig/lib/libxview/selection/sel_impl.h 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/sel_impl.h 2013-08-25 12:04:12.464380146 +0200
@@ -112,7 +112,7 @@
Atom integer;
#ifdef OW_I18N
Atom ctext;
-#endif OW_I18N
+#endif /* OW_I18N */
} Sel_atom_list;
@@ -218,7 +218,7 @@
Xv_private void xv_sel_send_old_owner_sel_clear();
Xv_private void xv_sel_set_compat_data();
-#if !defined(__linux) || defined(__DEFINE_SEL_IMPL_VARS)
+#if !defined(__linux__) || defined(__DEFINE_SEL_IMPL_VARS)
XContext selCtx;
XContext reqCtx;
XContext targetCtx;
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/sel_item.c xview-3.2p1.4/lib/libxview/selection/sel_item.c
--- xview-3.2p1.4.orig/lib/libxview/selection/sel_item.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/sel_item.c 2013-08-25 12:04:12.464380146 +0200
@@ -14,7 +14,7 @@
#include <xview_private/sel_impl.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
Pkg_private char *xv_sel_atom_to_str(/* display, atom */);
Pkg_private Atom xv_sel_str_to_atom(/* display, string */);
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/sel_own.c xview-3.2p1.4/lib/libxview/selection/sel_own.c
--- xview-3.2p1.4.orig/lib/libxview/selection/sel_own.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/sel_own.c 2013-08-25 12:04:12.464380146 +0200
@@ -17,7 +17,7 @@
#include <X11/Xproto.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
Pkg_private char *xv_sel_atom_to_str(/* display, atom */);
Pkg_private int xv_sel_add_prop_notify_mask();
@@ -45,6 +45,8 @@
static void OwnerProcessIncr();
static void RegisterSelClient();
+static int SendIncr(Sel_owner_info *seln);
+
extern XContext selCtx;
extern XContext propCtx;
extern XContext reqCtx;
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/sel_req.c xview-3.2p1.4/lib/libxview/selection/sel_req.c
--- xview-3.2p1.4.orig/lib/libxview/selection/sel_req.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/sel_req.c 2013-08-25 12:04:12.464380146 +0200
@@ -17,16 +17,15 @@
#include <xview/notify.h>
#include <sys/time.h>
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
#define ITIMER_NULL ((struct itimercal *)0)
Pkg_private char *xv_sel_atom_to_str(/* display, atom */);
-Pkg_private XID SelGetOwnerXID(/* selReq */);
Pkg_private Atom xv_sel_str_to_atom(/* display, string */);
Pkg_private int xv_sel_add_prop_notify_mask();
Pkg_private Atom xv_sel_get_property();
@@ -56,6 +55,11 @@
static int ProcessReply();
static Requestor *SelGetReq();
+static int XvGetRequestedValue();
+static XID SelGetOwnerXID(Sel_req_info *selReq);
+static int ProcessNonBlkIncr(Sel_req_info *selReq, Sel_reply_info *reply, XSelectionEvent *ev, Atom target);
+static int ProcessReq(Requestor *req, XPropertyEvent *ev);
+static int OldPkgIsOwner(Display *dpy, Atom selection, Window xid, Sel_reply_info *reply, Sel_req_info *selReq);
/*ARGSUSED*/
Pkg_private int
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/sel_util.c xview-3.2p1.4/lib/libxview/selection/sel_util.c
--- xview-3.2p1.4.orig/lib/libxview/selection/sel_util.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/sel_util.c 2013-08-25 12:04:12.468380146 +0200
@@ -17,13 +17,15 @@
#include <xview/server.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
static void tvdiff();
static void FreeMultiProp();
static int SelMatchReply();
static Sel_req_tbl *SelMatchReqTbl();
+static int SelFindReply(Sel_reply_info *r1, Sel_reply_info *r2);
+
Pkg_private struct timeval *
xv_sel_cvt_xtime_to_timeval( XTime )
Time XTime;
@@ -188,7 +190,7 @@
list->integer = (Atom) xv_get( server, SERVER_ATOM, "INTEGER" );
#ifdef OW_I18N
list->ctext = (Atom) xv_get( server, SERVER_ATOM, "COMPOUND_TEXT" );
-#endif OW_I18N
+#endif /* OW_I18N */
(void)XSaveContext( dpy, DefaultRootWindow(dpy), targetCtx,
(caddr_t)list );
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/selection/selection.c xview-3.2p1.4/lib/libxview/selection/selection.c
--- xview-3.2p1.4.orig/lib/libxview/selection/selection.c 2013-08-25 12:02:12.856378392 +0200
+++ xview-3.2p1.4/lib/libxview/selection/selection.c 2013-08-25 12:04:12.464380146 +0200
@@ -10,12 +10,12 @@
* file for terms of the license.
*/
-#ifdef __linux
+#ifdef __linux__
/* Kludge to prevent multiple variables with same name */
#define __DEFINE_SEL_IMPL_VARS
#endif
#include <xview_private/sel_impl.h>
-#ifdef __linux
+#ifdef __linux__
#undef __DEFINE_SEL_IMPL_VARS
#endif
#include <xview/window.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/server/Imakefile xview-3.2p1.4/lib/libxview/server/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/server/Imakefile 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/server/Imakefile 2013-08-25 12:04:12.428380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.12 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.12 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/server/server.c xview-3.2p1.4/lib/libxview/server/server.c
--- xview-3.2p1.4.orig/lib/libxview/server/server.c 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/server/server.c 2013-08-25 12:04:12.424380146 +0200
@@ -24,7 +24,12 @@
#include <xview/notify.h>
#include <xview/win_notify.h>
#include <xview/defaults.h>
+/* mbuck@debian.org */
+#if 1
+#include <X11/Xlibint.h>
+#else
#include <X11/Xlib.h>
+#endif
#include <xview_private/portable.h>
#include <xview_private/svr_atom.h>
#include <xview_private/svr_impl.h>
@@ -58,6 +63,8 @@
Xv_private_data int server_gather_stats;
#endif
+static int xv_set_scheduler();
+
static void load_kbd_cmds();
static void server_init_atoms();
static void destroy_atoms();
@@ -91,7 +98,6 @@
Xv_private void server_refresh_modifiers();
extern char *setlocale();
-char *strdup();
XrmDatabase XrmGetFileDatabase();
static Notify_func default_scheduler;
extern XrmDatabase defaults_rdb;
@@ -100,7 +106,7 @@
Xv_private_data char *xv_shell_prompt;
/* global default server parameters */
-#ifndef __linux
+#ifndef __linux__
Xv_private_data Xv_Server xv_default_server;
Xv_private_data Xv_Screen xv_default_screen;
Xv_private_data Display *xv_default_display;
@@ -774,10 +780,21 @@
*/
/* Used by atom mgr */
+#if 1
+ /* Avoid crash with newer xcb-based xlibs. According to
+ * http://lists.freedesktop.org/archives/xorg/2007-November/030388.html
+ * using XAllocID() this way only worked by chance so far, so use
+ * XAllocIDs() instead which should be safe.
+ *
+ * mbuck@debian.org
+ */
+ XAllocIDs((Display *)server->xdisplay, server->atom_mgr, sizeof(server->atom_mgr) / sizeof(*server->atom_mgr));
+#else
server->atom_mgr[ATOM] = (XID) XAllocID((Display *)server->xdisplay);
server->atom_mgr[NAME] = (XID) XAllocID((Display *)server->xdisplay);
server->atom_mgr[TYPE] = (XID) XAllocID((Display *)server->xdisplay);
server->atom_mgr[DATA] = (XID) XAllocID((Display *)server->xdisplay);
+#endif
/* Key for XV_KEY_DATA. Used in local dnd ops. */
server->dnd_ack_key = xv_unique_key();
diff -rNu xview-3.2p1.4.orig/lib/libxview/server/svr_kmdata.h xview-3.2p1.4/lib/libxview/server/svr_kmdata.h
--- xview-3.2p1.4.orig/lib/libxview/server/svr_kmdata.h 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/server/svr_kmdata.h 2013-08-25 12:04:12.424380146 +0200
@@ -14,7 +14,7 @@
#define MAX_NBR_MAPPINGS 6
-#if defined(__linux) && !defined(NULL)
+#if defined(__linux__) && !defined(NULL)
#define NULL 0
#endif
diff -rNu xview-3.2p1.4.orig/lib/libxview/server/svr_x.c xview-3.2p1.4/lib/libxview/server/svr_x.c
--- xview-3.2p1.4.orig/lib/libxview/server/svr_x.c 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/server/svr_x.c 2013-08-25 12:04:12.424380146 +0200
@@ -28,7 +28,7 @@
#include <X11/keysym.h>
extern Display *XOpenDisplay();
-#ifndef __linux
+#ifndef __linux__
Xv_private_data Defaults_pairs xv_kbd_cmds_value_pairs[4];
#else
/* Global already defined and initialized in in server/server.c */
diff -rNu xview-3.2p1.4.orig/lib/libxview/server_image/Imakefile xview-3.2p1.4/lib/libxview/server_image/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/server_image/Imakefile 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/server_image/Imakefile 2013-08-25 12:04:12.564380148 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/server_image/svrim_impl.h xview-3.2p1.4/lib/libxview/server_image/svrim_impl.h
--- xview-3.2p1.4.orig/lib/libxview/server_image/svrim_impl.h 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/server_image/svrim_impl.h 2013-08-25 12:04:12.560380148 +0200
@@ -40,4 +40,4 @@
Xv_private GC xv_find_proper_gc();
Xv_private Pixrect *xv_mem_create();
-#endif _xview_server_image_impl_h_already_included
+#endif /* _xview_server_image_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/string_utils/Imakefile xview-3.2p1.4/lib/libxview/string_utils/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/string_utils/Imakefile 2013-08-25 12:02:12.844378392 +0200
+++ xview-3.2p1.4/lib/libxview/string_utils/Imakefile 2013-08-25 12:04:12.424380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/Imakefile xview-3.2p1.4/lib/libxview/textsw/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/textsw/Imakefile 2013-08-25 12:02:12.892378393 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/Imakefile 2013-08-25 12:04:12.548380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.12 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.12 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/ei_text.c xview-3.2p1.4/lib/libxview/textsw/ei_text.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/ei_text.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/ei_text.c 2013-08-25 12:04:12.544380147 +0200
@@ -105,12 +105,12 @@
#ifdef OW_I18N
#define ISCNTRL(c) ((c >= 0) && iswcntrl(c))
#else
-#ifndef __linux
+#ifndef __linux__
#define ISCNTRL(c) ((128 <= c && c <= 159) || (iscntrl(c)))
#else
/* Linux: Allow 8-bit chars (do not treat them as control chars) */
#define ISCNTRL(c) (c < 32)
-#endif /* __linux */
+#endif /* __linux__ */
#endif
Pkg_private Ei_handle ei_plain_text_create();
@@ -126,6 +126,7 @@
#endif
static struct ei_span_result ei_plain_text_span_of_group();
static struct ei_process_result ei_plain_text_expand();
+static paint_batch();
struct ei_ops ei_plain_text_ops = {
ei_plain_text_destroy,
@@ -734,7 +735,7 @@
}
batch++;
} else {
-#ifdef __linux
+#ifdef __linux__
/* Problems with 8-bit characters: 'aring' (0xe5) causes coredump in textedit
* because it's regarded as ISCNTRL(), leading to 'special_char 'getting a
* value > 255, leading to out-of-bound access of tempPf->pf_char[c]. Fix
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/es_file.c xview-3.2p1.4/lib/libxview/textsw/es_file.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/es_file.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/es_file.c 2013-08-25 12:04:12.528380147 +0200
@@ -97,7 +97,7 @@
#include <sys/stat.h>
#include <sys/file.h>
#include <stdio.h>
-#ifdef __linux
+#ifdef __linux__
#include <unistd.h>
#endif
#include <xview/pkg.h>
@@ -112,9 +112,13 @@
#include <xview_private/txt_18impl.h>
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#include <errno.h>
+#else
extern int errno, sys_nerr;
extern char *sys_errlist[];
-extern long lseek();
+#endif
static void update_read_buf(); /* update the read buf if overlaps write buf */
static Es_status es_file_commit();
@@ -341,7 +345,7 @@
char name[MAXNAMLEN];
(void) wcstombs(name, name_wc, MAXNAMLEN);
#endif /* OW_I18N */
-#ifdef __linux
+#ifdef __linux__
long int maxlinks;
#endif
@@ -379,11 +383,11 @@
#ifndef BACKUP_AT_HEAD_OF_LINK
/* (2) Chase the symbolic link if 'name' is one. */
-#ifdef __linux
+#ifdef __linux__
maxlinks = pathconf(name, _PC_LINK_MAX);
#endif
for (temp_name = name, link_count = 0;
-#ifndef __linux
+#ifndef __linux__
(link_count < MAXSYMLINKS) &&
#else
(link_count < maxlinks) &&
@@ -393,7 +397,7 @@
temp_name = true_name, link_count++) {
true_name[true_name_len] = '\0';
}
-#ifndef __linux
+#ifndef __linux__
if (link_count == MAXSYMLINKS) {
#else
if (link_count == maxlinks) {
@@ -490,7 +494,7 @@
}
/* ARGSUSED */
-static caddr_t
+caddr_t
#ifdef ANSI_FUNC_PROTO
es_file_get(Es_handle esh, Es_attribute attribute, ...)
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/es_mem.c xview-3.2p1.4/lib/libxview/textsw/es_mem.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/es_mem.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/es_mem.c 2013-08-25 12:04:12.548380147 +0200
@@ -15,6 +15,7 @@
*/
#include <sys/types.h>
+#include <string.h>
#include <xview/pkg.h>
#include <xview/attrol.h>
#include <xview_private/primal.h>
@@ -36,8 +37,6 @@
typedef Es_mem_text *Es_mem_data;
#define ABS_TO_REP(esh) (Es_mem_data)esh->data
-extern CHAR *STRNCPY();
-
Pkg_private Es_handle es_mem_create();
static Es_status es_mem_commit();
static Es_handle es_mem_destroy();
@@ -117,7 +116,7 @@
}
/* ARGSUSED */
-static caddr_t
+caddr_t
#ifdef ANSI_FUNC_PROTO
es_mem_get(Es_handle esh, Es_attribute attribute, ...)
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/ev_display.c xview-3.2p1.4/lib/libxview/textsw/ev_display.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/ev_display.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/ev_display.c 2013-08-25 12:04:12.532380147 +0200
@@ -921,6 +921,7 @@
}
+static void ev_swap_line_table();
Pkg_private Es_index
ev_scroll_lines(view, line_count, scroll_by_display_lines)
@@ -940,7 +941,6 @@
register int i;
Es_index pos, pos_to_remember;
Pkg_private void ev_lt_format();
- static void ev_swap_line_table();
esbuf.esh = chain->esh;
esbuf.buf = buf;
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/ev_edit.c xview-3.2p1.4/lib/libxview/textsw/ev_edit.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/ev_edit.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/ev_edit.c 2013-08-25 12:04:12.540380147 +0200
@@ -502,7 +502,7 @@
delta, position, line_seq[top_of_lc].pos,
view->line_table.last_plus_one, lower_context, auto_scroll_by);
#endif
-#ifndef __linux
+#ifndef __linux__
delta = MIN(delta, position - line_seq[top_of_lc].pos);
#endif
if (delta < 50 * view->line_table.last_plus_one
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/ev_op_bdry.c xview-3.2p1.4/lib/libxview/textsw/ev_op_bdry.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/ev_op_bdry.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/ev_op_bdry.c 2013-08-25 12:04:12.540380147 +0200
@@ -27,6 +27,8 @@
Pkg_private void ev_clear_from_margins();
static Ev_finger_handle ev_insert_finger();
static Ev_mark_object last_generated_id;
+static int ev_find_finger_internal(Ev_finger_table *fingers, Ev_mark mark);
+static ev_remove_finger_internal(Ev_finger_table *fingers, int i);
#define FORALL(index_var) \
for (index_var = 0; index_var < fingers->last_plus_one; index_var++)
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/finger_tbl.c xview-3.2p1.4/lib/libxview/textsw/finger_tbl.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/finger_tbl.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/finger_tbl.c 2013-08-25 12:04:12.528380147 +0200
@@ -23,7 +23,7 @@
#include <xview_private/finger_tbl.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
static void
ft_validate_first_infinity(finger_table)
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/primal.h xview-3.2p1.4/lib/libxview/textsw/primal.h
--- xview-3.2p1.4.orig/lib/libxview/textsw/primal.h 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/primal.h 2013-08-25 12:04:12.544380147 +0200
@@ -35,14 +35,14 @@
#ifndef SVR4
#define IDENTITY(formal)\
formal
-#endif SVR4
+#endif /* SVR4 */
#ifndef SVR4
#define CONCATENATE(formal1,formal2)\
IDENTITY(formal1)formal2
-#else SVR4
+#else /* SVR4 */
#define CONCATENATE(formal1,formal2)\
formal1##formal2
-#endif SVR4
+#endif /* SVR4 */
#define pkg_private extern
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/ps_impl.c xview-3.2p1.4/lib/libxview/textsw/ps_impl.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/ps_impl.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/ps_impl.c 2013-08-25 12:04:12.532380147 +0200
@@ -62,6 +62,9 @@
static Es_index ps_replace(), ps_scratch_replace();
static int ps_set();
+static copy_pieces();
+static int get_current_offset(Piece_table private);
+
static Es_index write_header_etc();
static struct es_ops ps_ops = {
@@ -1575,7 +1578,7 @@
private->last_write_plus_one = ES_INFINITY;
}
-static caddr_t
+caddr_t
#ifdef ANSI_FUNC_PROTO
ps_get(Es_handle esh, Es_attribute attribute, ...)
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_again.c xview-3.2p1.4/lib/libxview/textsw/txt_again.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_again.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_again.c 2013-08-25 12:04:12.544380147 +0200
@@ -19,15 +19,16 @@
#include <xview_private/txt_impl.h>
#include <xview_private/ev_impl.h>
#include <xview_private/txt_18impl.h>
-#ifdef SVR4
+#if defined SVR4 || defined __linux__
#include <stdlib.h>
#include <string.h>
#endif /* SVR4 */
-Pkg_private CHAR *STRNCPY();
Pkg_private Es_index textsw_do_input();
Pkg_private Es_index textsw_do_pending_delete();
+static int textsw_string_min_free(string_t *ptr_to_string, int min_free_desired);
+
string_t null_string = {0, 0, 0};
#define TEXT_DELIMITER "\\"
@@ -178,7 +179,7 @@
* Recording routines
*/
-#ifdef __linux
+#ifdef __linux__
/* The textsw_printf as written created a FILE struct, and called
* _doprnt() to format the text to an XView internal buffer. If I
* understand this correctly, it's just a replacement for vsprintf.
@@ -207,7 +208,7 @@
TXTSW_STRING_FREE(ptr_to_string) += strlen(sfree);
return (result);
}
-#else /* __linux */
+#else /* __linux__ */
/*
* Following is stolen from 3.2ALPHA sprintf(str, fmt, va_alist) SIDE_EFFECT:
* TXTSW_STRING_FREE(ptr_to_string) is modified by this routine.
@@ -354,7 +355,7 @@
}
#endif /* SVR4 */
-#endif /* __linux */
+#endif /* __linux__ */
static void
textsw_record_buf(again, buffer, buffer_length)
@@ -644,7 +645,7 @@
* Replaying routines
*/
-#ifdef __linux
+#ifdef __linux__
/* The textsw_scanf as written created a FILE struct, and called
* _doscan() to do the scanning on the instring.
* This depends heavily on the internal structure of FILE, and is not
@@ -722,7 +723,7 @@
TXTSW_STRING_BASE(ptr_to_string) = sbase;
return (result);
}
-#else /* __linux */
+#else /* __linux__ */
/*
* Following is stolen from sscanf(str, fmt, args) SIDE_EFFECT:
* TXTSW_STRING_BASE(ptr_to_string) is modified by this routine.
@@ -815,7 +816,7 @@
#endif /* OW_I18N */
}
-#endif /* __linux */
+#endif /* __linux__ */
static int
textsw_next_is_delimiter(again)
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_e_menu.c xview-3.2p1.4/lib/libxview/textsw/txt_e_menu.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_e_menu.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_e_menu.c 2013-08-25 12:04:12.548380147 +0200
@@ -75,6 +75,7 @@
static int free_argv();
static int Nargs;
static char *check_filename_locale();
+static any_shell_meta(char *s);
extern int EXTRASMENU_FILENAME_KEY;
@@ -143,6 +144,12 @@
goto found;
}
+#if 1 /* FHS compliance - mbuck@debian.org */
+ (void) sprintf(tmp, "/etc/X11/xview/%s", EXTRASMENU);
+ if ((result = check_filename_locale(NULL, tmp, 1)) != NULL)
+ goto found;
+#endif
+
/*#ifdef notdef*/
/* Gee, still?... We will try the old fashioned way */
(void) sprintf(tmp, "%s/lib/.%s",
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_edit.c xview-3.2p1.4/lib/libxview/textsw/txt_edit.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_edit.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_edit.c 2013-08-25 12:04:12.528380147 +0200
@@ -28,7 +28,7 @@
#define UPDATE_SCROLLBAR(_delta, _old_length)\
((THRESHOLD * _delta) >= _old_length)
-#ifndef __linux
+#ifndef __linux__
Xv_private_data char *xv_shell_prompt;
#else
/* Global already defined in server/server.c */
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_field.c xview-3.2p1.4/lib/libxview/textsw/txt_field.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_field.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_field.c 2013-08-25 12:04:12.540380147 +0200
@@ -98,6 +98,8 @@
}
+static void textsw_get_match_symbol();
+
static int
check_selection(buf, buf_len, first, last_plus_one,
marker1, marker1_len, field_flag)
@@ -121,8 +123,6 @@
CHAR marker2[3];
int marker2_len;
unsigned direction;
- static void textsw_get_match_symbol();
-
buf = buf + (buf_len - marker1_len);
(void) textsw_get_match_symbol(marker1, marker1_len,
marker2, &marker2_len, &direction);
@@ -152,8 +152,6 @@
CHAR marker2[3];
int marker2_len;
unsigned direction;
- static void textsw_get_match_symbol();
-
(void) textsw_get_match_symbol(marker1, marker1_len,
marker2, &marker2_len, &direction);
if (STRNCMP(buf, marker2, marker2_len) == 0) {
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_file.c xview-3.2p1.4/lib/libxview/textsw/txt_file.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_file.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_file.c 2013-08-25 12:04:12.536380147 +0200
@@ -18,10 +18,14 @@
#include <xview_private/txt_impl.h>
#include <xview_private/ev_impl.h>
#include <xview_private/txt_18impl.h>
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
#include <dirent.h>
#include <string.h>
#include <unistd.h>
+#ifdef __linux__
+#include <sys/types.h>
+#include <fcntl.h>
+#endif
#else
#include <sys/dir.h>
#include <sys/file.h>
@@ -43,15 +47,19 @@
if ((unsigned)(to_test) != 0) (flags) |= (flag); \
else (flags) &= ~(flag)
-extern CHAR *STRCAT();
-extern CHAR *STRNCAT();
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
extern char *getcwd();
#else
extern char *getwd();
#endif /* SVR4 */
+
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#include <errno.h>
+#else
extern int errno, sys_nerr;
extern char *sys_errlist[];
+#endif
Pkg_private int textsw_change_directory();
Pkg_private void textsw_display(), textsw_display_view_margins();
@@ -76,8 +84,14 @@
* crash harder - assuming we ever implement replay.
*/
in_here[0] = '\0';
+#ifdef XVIEW_USE_INSECURE_TMPFILES
+ /* martin.buck@bigfoot.com */
(void) SPRINTF(in_here, "%s/Text%d.%d",
"/tmp", getpid(), tmtn_counter++);
+#else
+ (void) SPRINTF(in_here, "%s/.Text%d.%d",
+ xv_getlogindir(), getpid(), tmtn_counter++);
+#endif
}
#define ES_BACKUP_FAILED ES_CLIENT_STATUS(0)
@@ -354,7 +368,7 @@
}
#ifdef OW_I18N
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
if (getcwd(pathname_mb, MAXPATHLEN) == 0)
#else
if (getwd(pathname_mb) == 0)
@@ -364,7 +378,7 @@
#else /* OW_I18N */
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
if (getcwd(pathname, MAXPATHLEN) == 0)
#else
if (getwd(pathname) == 0)
@@ -925,14 +939,14 @@
wc_count = textsw_mbstowcs(buf_ws, buf, &temp_count);
if (temp_count != count) {
/* re-read the incomplete mb character */
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
new_pos = lseek(fd, temp_count - count, SEEK_CUR);
#else
new_pos = lseek(fd, temp_count - count, L_INCR);
#endif
if (new_pos == old_pos) {
/* Invalid char, so advance to next byte */
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
old_pos = lseek(fd, 1L, SEEK_CUR);
#else
old_pos = lseek(fd, 1L, L_INCR);
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_filter.c xview-3.2p1.4/lib/libxview/textsw/txt_filter.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_filter.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_filter.c 2013-08-25 12:04:12.540380147 +0200
@@ -31,13 +31,16 @@
#include <signal.h>
#include <string.h>
-#ifdef sparc
+#if defined(sparc) && !defined(linux)
#ifdef SVR4
#include <unistd.h>
#else
#include <vfork.h>
#endif /* SVR4 */
#endif
+#ifdef __linux__
+#include <unistd.h>
+#endif
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <xview_private/ultrix_cpt.h>
@@ -73,6 +76,8 @@
Pkg_private Es_index textsw_do_input();
static short unsigned type_for_filter_rec();
static int event_code_for_filter_rec();
+static int talk_to_filter();
+static int start_filter();
/*
* WARNING: this is a hack to force the variable to be in memory. this var
@@ -903,7 +908,7 @@
#ifdef SVR4
if (xv_fcntl(to_filter[OUTPUT], F_SETFL, FNDELAY) == -1)
#else
-#if !defined(__linux) || defined(FNDELAY)
+#if !defined(__linux__) || defined(FNDELAY)
if (fcntl(to_filter[OUTPUT], F_SETFL, FNDELAY) == -1)
#else
if (fcntl(to_filter[OUTPUT], F_SETFL, O_NONBLOCK) == -1)
@@ -914,7 +919,7 @@
#ifdef SVR4
if (xv_fcntl(from_filter[INPUT], F_SETFL, FNDELAY) == -1)
#else
-#if !defined(__linux) || defined(FNDELAY)
+#if !defined(__linux__) || defined(FNDELAY)
if (fcntl(from_filter[INPUT], F_SETFL, FNDELAY) == -1)
#else
if (fcntl(from_filter[INPUT], F_SETFL, O_NONBLOCK) == -1)
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_impl.h xview-3.2p1.4/lib/libxview/textsw/txt_impl.h
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_impl.h 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_impl.h 2013-08-25 12:04:12.540380147 +0200
@@ -181,7 +181,12 @@
struct textsw_object *folio;
struct textsw_view_object *next;
Textsw_view public_self;
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ Xv_window window_fd;
+#else
int window_fd;
+#endif
Rect rect;
Ev_handle e_view;
Scrollbar scrollbar;
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_incl.c xview-3.2p1.4/lib/libxview/textsw/txt_incl.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_incl.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_incl.c 2013-08-25 12:04:12.536380147 +0200
@@ -30,7 +30,7 @@
#include <xview/win_screen.h>
#include <xview/file_chsr.h>
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
#include <unistd.h>
#include <string.h>
#endif /* SVR4 */
@@ -108,14 +108,14 @@
/* if "cd" is not disabled and the "cd" dir is not the current dir */
#ifdef OW_I18N
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
(void) getcwd(curr_dir_mb, MAX_STR_LENGTH);
#else
(void) getwd(curr_dir_mb);
#endif /* SVR4 */
(void) mbstowcs(curr_dir, curr_dir_mb, MAX_STR_LENGTH);
#else /* OW_I18N */
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
(void) getcwd(curr_dir, MAX_STR_LENGTH);
#else
(void) getwd(curr_dir);
@@ -272,7 +272,7 @@
include_string[0] = NULL;
(void) textsw_get_selection(view, &dummy, &dummy, include_string,
MAX_STR_LENGTH);
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
(void) getcwd(current_dir_include_string, MAX_STR_LENGTH);
#else
(void) getwd(current_dir_include_string);
@@ -384,14 +384,14 @@
/* if "cd" is not disabled and the "cd" dir is not the current dir */
#ifdef OW_I18N
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
(void) getcwd(curr_dir_mb, MAX_STR_LENGTH);
#else
(void) getwd(curr_dir_mb);
#endif /* SVR4 */
(void) mbstowcs(curr_dir, curr_dir_mb, MAX_STR_LENGTH);
#else /* OW_I18N */
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
(void) getcwd(curr_dir, MAX_STR_LENGTH);
#else
(void) getwd(curr_dir);
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_input.c xview-3.2p1.4/lib/libxview/textsw/txt_input.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_input.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_input.c 2013-08-25 12:04:12.536380147 +0200
@@ -193,6 +193,15 @@
#endif
+static int textsw_scroll_event();
+static int textsw_function_key_event();
+static int textsw_mouse_event();
+static int textsw_edit_function_key_event();
+static int textsw_caret_motion_event();
+static int textsw_field_event();
+static int textsw_file_operation();
+static int textsw_erase_action();
+
Pkg_private int
textsw_process_event(view_public, ie, arg)
Textsw_view view_public;
@@ -200,15 +209,6 @@
Notify_arg arg;
{
Pkg_private void textsw_update_scrollbars();
- static int textsw_scroll_event();
- static int textsw_function_key_event();
- static int textsw_mouse_event();
- static int textsw_edit_function_key_event();
- static int textsw_caret_motion_event();
- static int textsw_field_event();
- static int textsw_file_operation();
- static int textsw_erase_action();
-
int caret_was_up;
int result = TEXTSW_PE_USED;
register Textsw_view_handle view = VIEW_PRIVATE(view_public);
@@ -592,7 +592,7 @@
#ifdef OW_I18N
Pkg_private int
#else
-static int
+int
#endif
textsw_do_newline(view, action)
register Textsw_view_handle view;
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_menu.c xview-3.2p1.4/lib/libxview/textsw/txt_menu.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_menu.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_menu.c 2013-08-25 12:04:12.532380147 +0200
@@ -129,6 +129,8 @@
/* VARARGS0 */
+static int textsw_edit_do_menu_action(), textsw_view_do_menu_action(),
+ textsw_find_do_menu_action();
static void
textsw_new_menu(folio)
Textsw_folio folio;
@@ -140,8 +142,6 @@
Frame frame = xv_get(textsw, WIN_FRAME);
Menu_item break_mode_item, undo_cmds_item, find_sel_cmds_item,
select_field_cmds_item;
- static int textsw_edit_do_menu_action(), textsw_view_do_menu_action(),
- textsw_find_do_menu_action();
int index;
Pkg_private char *textsw_get_extras_filename();
Pkg_private int textsw_build_extras_menu_items();
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_once.c xview-3.2p1.4/lib/libxview/textsw/txt_once.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_once.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_once.c 2013-08-25 12:04:12.528380147 +0200
@@ -436,7 +436,12 @@
Textsw textsw;
Xv_Window child;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ unsigned long d1, d2, d3, d4, d5;
+#else
int d1, d2, d3, d4, d5;
+#endif
{
Textsw_folio folio = TEXTSW_PRIVATE(textsw);
@@ -1352,7 +1357,7 @@
xv_destroy(view->drop_site);
textsw_view_cleanup(view);
- VIEW_PRIVATE(view_public) = NULL; /* WG Mar '95 */
+ ((Xv_textsw_view*)view_public)->private_data = NULL; /* WG Mar '95 */
break;
default: /* Conservative in face of new cases. */
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_popup.c xview-3.2p1.4/lib/libxview/textsw/txt_popup.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_popup.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_popup.c 2013-08-25 12:04:12.540380147 +0200
@@ -104,6 +104,9 @@
Pkg_private open_cmd_proc();
Pkg_private include_cmd_proc();
Pkg_private save_cmd_proc();
+static void add_exten_item();
+static void show_dot_files_proc();
+static int fc_exten_func();
static Notify_value
textsw_popup_destroy_func(client, status)
@@ -135,7 +138,6 @@
Frame popup_frame, base_frame;
Panel panel = NULL;
char *label;
- void add_exten_item();
#ifdef OW_I18N
int win_use_im = ((popup_type != TEXTSW_MENU_SEL_MARK_TEXT) &&
(popup_type != TEXTSW_MENU_NORMALIZE_LINE));
@@ -502,8 +504,6 @@
int frame_width;
int frame_height;
Panel_item item;
- void show_dot_files_proc();
- int fc_exten_func();
panel = xv_get(fc, FRAME_CMD_PANEL);
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_putkey.c xview-3.2p1.4/lib/libxview/textsw/txt_putkey.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_putkey.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_putkey.c 2013-08-25 12:04:12.540380147 +0200
@@ -26,6 +26,7 @@
Pkg_private Es_handle textsw_esh_for_span();
Pkg_private Seln_rank textsw_acquire_seln();
Pkg_private caddr_t textsw_checkpoint_undo();
+static int textsw_do_put(Textsw_view_handle view, int local_operands);
Pkg_private int
textsw_begin_put(view, inform_svc)
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_search.c xview-3.2p1.4/lib/libxview/textsw/txt_search.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_search.c 2013-08-25 12:02:12.892378393 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_search.c 2013-08-25 12:04:12.548380147 +0200
@@ -79,7 +79,7 @@
if (direction == EV_FIND_DEFAULT)
first = last_plus_one;
- STRNCPY(buf, (CHAR *) panel_get(search_panel_items[(int) FIND_STRING_ITEM],
+ (STRNCPY) (buf, (CHAR *) panel_get(search_panel_items[(int) FIND_STRING_ITEM],
#ifdef OW_I18N
PANEL_VALUE_WCS, NULL),
#else
@@ -175,7 +175,7 @@
if (selection_found =
textsw_get_selection(view, &first, &last_plus_one, NULL, 0)) {
- STRNCPY(buf, (CHAR *) panel_get(
+ (STRNCPY) (buf, (CHAR *) panel_get(
search_panel_items[(int) REPLACE_STRING_ITEM],
#ifdef OW_I18N
PANEL_VALUE_WCS, NULL),
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_selsvc.c xview-3.2p1.4/lib/libxview/textsw/txt_selsvc.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_selsvc.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_selsvc.c 2013-08-25 12:04:12.544380147 +0200
@@ -24,7 +24,8 @@
#include <stdlib.h>
#endif /* SVR4 */
-extern int errno;
+
+static int textsw_should_ask_seln_svc(Textsw_folio textsw);
Pkg_private Es_status es_copy();
static Seln_result textsw_seln_yield();
diff -rNu xview-3.2p1.4.orig/lib/libxview/textsw/txt_view.c xview-3.2p1.4/lib/libxview/textsw/txt_view.c
--- xview-3.2p1.4.orig/lib/libxview/textsw/txt_view.c 2013-08-25 12:02:12.888378392 +0200
+++ xview-3.2p1.4/lib/libxview/textsw/txt_view.c 2013-08-25 12:04:12.532380147 +0200
@@ -66,7 +66,12 @@
view_object->private_data = (Xv_opaque) view;
view->public_self = textsw_view_public;
view->magic = TEXTSW_VIEW_MAGIC;
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ view->window_fd = (Xv_Window) xv_get(textsw_view_public, WIN_FD);
+#else
view->window_fd = (int) xv_get(textsw_view_public, WIN_FD);
+#endif
/*
* Must initialize rect here else code elsewhere (e.g., textsw_resize)
* that tries to compute incremental changes gets the wrong answer.
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/Imakefile xview-3.2p1.4/lib/libxview/ttysw/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/ttysw/Imakefile 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/Imakefile 2013-08-25 12:04:12.444380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.11 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.11 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/charscreen.h xview-3.2p1.4/lib/libxview/ttysw/charscreen.h
--- xview-3.2p1.4.orig/lib/libxview/ttysw/charscreen.h 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/charscreen.h 2013-08-25 12:04:12.436380146 +0200
@@ -23,7 +23,7 @@
* Character dimensions (fixed width fonts only!)
* and of screen in pixels.
*/
-#if !defined(__linux) || defined(__DEFINE_CHARSCREEN_VARS)
+#if !defined(__linux__) || defined(__DEFINE_CHARSCREEN_VARS)
int chrheight, chrwidth, chrbase;
int winheightp, winwidthp;
int chrleftmargin;
@@ -36,7 +36,7 @@
* and turn delaypainting off.
*/
int delaypainting;
-#else /* __linux && !__DEFINE_CHARSCREEN_VARS */
+#else /* __linux__ && !__DEFINE_CHARSCREEN_VARS */
extern int chrheight, chrwidth, chrbase;
extern int winheightp, winwidthp;
extern int chrleftmargin;
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/cim_change.c xview-3.2p1.4/lib/libxview/ttysw/cim_change.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/cim_change.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/cim_change.c 2013-08-25 12:04:12.444380146 +0200
@@ -16,6 +16,7 @@
#include <xview_private/i18n_impl.h>
#include <sys/types.h>
+#include <string.h>
#include <pixrect/pixrect.h>
#include <xview_private/ttyansi.h>
#include <xview_private/charimage.h>
@@ -24,8 +25,6 @@
char boldify;
-extern char *strcpy();
-
/* static */ void ttysw_roll();
static void reverse();
/* static */ void ttysw_swap();
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/csr_change.c xview-3.2p1.4/lib/libxview/ttysw/csr_change.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/csr_change.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/csr_change.c 2013-08-25 12:04:12.436380146 +0200
@@ -44,7 +44,7 @@
#include <xview/attrol.h>
#include <xview/server.h>
#include <xview/font.h>
-#ifndef __linux
+#ifndef __linux__
Xv_private_data char *xv_shell_prompt;
#else
/* Global already defined in server/server.c */
@@ -311,7 +311,7 @@
strlen(s) * chrwidth, 1,
(mode & MODE_INVERT) ? PIX_NOT(PIX_SRC) : PIX_SRC);
}
-#endif OW_I18N
+#endif /* OW_I18N */
#ifdef OW_I18N
#undef BUFSIZE
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/csr_init.c xview-3.2p1.4/lib/libxview/ttysw/csr_init.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/csr_init.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/csr_init.c 2013-08-25 12:04:12.444380146 +0200
@@ -31,7 +31,7 @@
#include <xview/window.h>
#include <xview/font.h>
#include <xview_private/charimage.h>
-#ifdef __linux
+#ifdef __linux__
/* charscreen.h defines some variables, and then the header file is included
* by more than one source file. The linux shlib-tools don't like it.
* Kludge around it by setting a define here which makes the variable
@@ -39,7 +39,7 @@
#define __DEFINE_CHARSCREEN_VARS
#endif
#include <xview_private/charscreen.h>
-#ifdef __linux
+#ifdef __linux__
#undef __DEFINE_CHARSCREEN_VARS
#endif
#ifdef OW_I18N
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/term_impl.h xview-3.2p1.4/lib/libxview/ttysw/term_impl.h
--- xview-3.2p1.4.orig/lib/libxview/ttysw/term_impl.h 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/term_impl.h 2013-08-25 12:04:12.436380146 +0200
@@ -251,4 +251,4 @@
#define textsw_delete_i18n textsw_delete
#endif /* OW_I18N */
-#endif _xview_private_termsw_impl_h_already_included
+#endif /* _xview_private_termsw_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/term_ntfy.c xview-3.2p1.4/lib/libxview/ttysw/term_ntfy.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/term_ntfy.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/term_ntfy.c 2013-08-25 12:04:12.436380146 +0200
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-#ifdef SVR4
+#if defined(SVR4) || defined(__linux__)
#include <unistd.h>
#endif
@@ -63,7 +63,7 @@
/* performance: global cache of getdtablesize() */
extern int dtablesize_cache;
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
#define GETDTABLESIZE() \
(dtablesize_cache?dtablesize_cache:(dtablesize_cache=(int)sysconf(_SC_OPEN_MAX)))
#else
@@ -173,7 +173,7 @@
* again, this is the place to start looking.
*/
if (ttysw->pending_remote != ttysw->remote) {
-#if !defined(__linux) || defined(TIOCREMOTE)
+#if !defined(__linux__) || defined(TIOCREMOTE)
if (ioctl(ttysw->ttysw_pty, TIOCREMOTE, &ttysw->pending_remote) < 0)
perror("ioctl: TIOCREMOTE");
else
@@ -202,7 +202,7 @@
/*
* Process pending literal next insertion at end of buffer.
*/
-#ifndef __linux
+#ifndef __linux__
if (termsw->literal_next && action <= ASCII_LAST &&
#else
if (termsw->literal_next && action <= ISO_LAST &&
@@ -280,7 +280,7 @@
* should get the same treatment. For a third, whatever tests we
* make should also apply to the cooked_echo case.
*/
-#ifndef __linux
+#ifndef __linux__
if (action == tty_getintrc(ttysw)) {
(void) xv_set(textsw, TEXTSW_INSERTION_POINT_I18N,
TEXTSW_INFINITY, 0);
@@ -301,7 +301,7 @@
(Notify_event) (event), arg, type);
}
} else if (!termsw->cooked_echo && down_event &&
-#ifndef __linux
+#ifndef __linux__
action >= ASCII_FIRST && action <= ASCII_LAST) {
#else
action >= ASCII_FIRST && action <= ISO_LAST) {
@@ -373,7 +373,7 @@
* Even if cooked echo is off, we still have to handle
* keyboard signals.
*/
-#ifndef __linux
+#ifndef __linux__
if (!termsw->cooked_echo && !tty_issig(ttysw))
break;
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/termsw.c xview-3.2p1.4/lib/libxview/ttysw/termsw.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/termsw.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/termsw.c 2013-08-25 12:04:12.444380146 +0200
@@ -127,7 +127,12 @@
Termsw termsw_public;
Xv_Window termsw_view_public;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ unsigned long d1, d2, d3, d4, d5;
+#else
int d1, d2, d3, d4, d5;
+#endif
{
Termsw_folio termsw_folio = TERMSW_PRIVATE(termsw_public);
@@ -413,7 +418,7 @@
/* Set the PTY to operate as a "remote terminal". */
fd = (int) xv_get(termsw_public, TTY_PTY_FD);
-#if !defined(__linux) || defined(TIOCREMOTE)
+#if !defined(__linux__) || defined(TIOCREMOTE)
(void) ioctl(fd, TIOCREMOTE, &on);
#endif
ttysw_folio->remote = ttysw_folio->pending_remote = on;
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_gtty.c xview-3.2p1.4/lib/libxview/ttysw/tty_gtty.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_gtty.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_gtty.c 2013-08-25 12:04:12.444380146 +0200
@@ -34,7 +34,7 @@
*/
#ifdef XV_USE_TERMIOS
-#if defined(__linux) && !defined(CINTR)
+#if defined(__linux__) && !defined(CINTR)
/* The following values have been obtained from /usr/include/linux/tty.h.
* They represent the default tty modes on linux.
intr=^C quit=^| erase=del kill=^U
@@ -61,15 +61,27 @@
#define CWERASE 027
#define CLNEXT 026
#define CEOL2 0
-#endif /* __linux && !CINTR */
+#endif /* __linux__ && !CINTR */
+
+#ifdef __linux__
+/* martin.buck@bigfoot.com */
+#ifndef CSWTC
+#define CSWTC 0
+#endif
+#ifndef CEOL2
+#define CEOL2 0
+#endif
-#ifdef __linux
static struct termios default_modes = {
ICRNL|IXON, /* input modes */
OPOST|ONLCR, /* output modes */
B38400|CS8|CREAD, /* control modes */
ISIG|ICANON|ECHO|ECHOCTL|ECHOKE, /* local modes */
+#if 1
+/* martin.buck@bigfoot.com */
+ 0, /* line discipline */
+#endif
CINTR, CQUIT, CERASE, CKILL,
CEOF, CTIME, CMIN, CSWTC,
CSTART, CSTOP, CSUSP, CEOL,
@@ -77,7 +89,7 @@
CEOL2
};
-#else /* __linux */
+#else /* __linux__ */
static struct termios default_modes = {
BRKINT|ICRNL|IXON|IGNPAR|IMAXBEL, /* input modes */
OPOST|ONLCR, /* output modes */
@@ -101,7 +113,7 @@
CWERASE, /* VWERASE */
CLNEXT, /* VLNEXT */
};
-#endif /* __linux */
+#endif /* __linux__ */
#else /* XV_USE_TERMIOS */
@@ -267,7 +279,7 @@
struct termios *tp;
{
char str[WE_TTYPARMSLEN];
-#ifndef __linux
+#ifndef __linux__
short temps[16];
#else
short temps[17];
@@ -278,7 +290,7 @@
else {
register int i;
-#ifndef __linux
+#ifndef __linux__
if (sscanf(str,
"%ld,%ld,%ld,%ld,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd",
&tp->c_iflag, &tp->c_oflag, &tp->c_cflag, &tp->c_lflag,
@@ -296,7 +308,7 @@
(void) putenv(WE_TTYPARMS_E);
return (0);
}
-#else /* __linux */
+#else /* __linux__ */
if (sscanf(str,
"%ld,%ld,%ld,%ld,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd",
&tp->c_iflag, &tp->c_oflag, &tp->c_cflag, &tp->c_lflag,
@@ -314,7 +326,7 @@
(void) putenv(WE_TTYPARMS_E);
return (0);
}
-#endif /* __linux */
+#endif /* __linux__ */
}
#else /* XV_USE_TERMIOS */
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_impl.h xview-3.2p1.4/lib/libxview/ttysw/tty_impl.h
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_impl.h 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_impl.h 2013-08-25 12:04:12.444380146 +0200
@@ -182,7 +182,7 @@
XIMCallback done_pecb_struct;
#ifdef FULL_R5
XIMStyle xim_style;
-#endif /* FULL_R5 */
+#endif /* FULL_R5 */
#endif
int pass_thru_modifiers; /* Modifiers we don't interpret */
int eight_bit_output; /* Print eight bit characters? */
@@ -211,7 +211,7 @@
*/
#ifdef XV_USE_TERMIOS
#define tty_gettabs(t) ((t)->termios.c_oflag & XTABS)
-#if !defined(__linux) || defined(VDSUSP)
+#if !defined(__linux__) || defined(VDSUSP)
#define tty_getdsuspc(t) ((int) ((t)->termios.c_cc[VDSUSP]))
#else
#define tty_getdsuspc(t) ((int) -1)
@@ -390,7 +390,8 @@
xv_new_tty_chr_font(),
xv_tty_free_image_and_mode(),
xv_tty_imagealloc(),
- xv_tty_new_size();
+ xv_tty_new_size(),
+ ttysw_pty_output(); /* mbuck@debian.org: Moved here from int-returning functions */
#ifdef OW_I18N
Pkg_private void
@@ -419,7 +420,7 @@
ttysw_mapsetim(),
ttysw_output_it(),
ttysw_print_bold_options(),
- ttysw_pty_output(),
+/* ttysw_pty_output(), mbuck@debian.org: moved to void-returning functions */
ttysw_pty_output_ok(),
ttysw_restoreparms(),
ttysw_saveparms(),
@@ -463,6 +464,6 @@
ttysw_input(Tty ttysw_public, char *addr, int len);
/* Add string to the input queue. */
-#endif cplus
+#endif /* cplus */
-#endif _xview_private_ttysw_impl_h_already_included
+#endif /* _xview_private_ttysw_impl_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_init.c xview-3.2p1.4/lib/libxview/ttysw/tty_init.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_init.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_init.c 2013-08-25 12:04:12.440380146 +0200
@@ -20,6 +20,7 @@
#include <sys/file.h>
#include <errno.h>
#include <signal.h>
+#include <string.h>
#include <xview_private/portable.h> /* for XV* defines and termios */
@@ -43,6 +44,16 @@
#include <ctype.h>
#include <fcntl.h>
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+#include <ioctls.h>
+#else
+#include <sys/ioctl.h>
+#endif
+#include <pty.h>
+#endif
+
#include <pixrect/pixrect.h>
#include <pixrect/pr_util.h>
@@ -80,8 +91,6 @@
#endif
-extern char *strncpy();
-extern char *strcpy();
extern long lseek();
char *textsw_checkpoint_undo();
@@ -138,6 +147,8 @@
NULL, -1
};
+static int ttyinit(Ttysw *ttysw);
+
Pkg_private int
ttysw_lookup_boldstyle(str)
char *str;
@@ -434,7 +445,7 @@
if ((fdflags = fcntl(fd, F_GETFL, 0)) == -1)
#endif
return (-1);
-#if !defined(__linux) || defined(FNDELAY)
+#if !defined(__linux__) || defined(FNDELAY)
fdflags |= FNDELAY;
#else
fdflags |= O_NONBLOCK;
@@ -462,11 +473,11 @@
char appname[20];
char *p;
unsigned ttysw_error_sleep = 1;
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
struct sigvec vec, ovec;
#else
struct sigaction vec, ovec;
-#ifndef __linux
+#ifndef __linux__
extern char *ptsname();
#endif
@@ -493,7 +504,7 @@
}
/* Set up the child characteristics */
-#if !defined(SVR4) && !defined(__linux) /* SunOS4.x code */
+#if !defined(SVR4) && !defined(__linux__) /* SunOS4.x code */
vec.sv_handler = SIG_DFL;
vec.sv_mask = vec.sv_onstack = 0;
sigvec(SIGWINCH, &vec, 0);
@@ -529,7 +540,7 @@
vec.sa_flags = SA_RESTART;
sigaction(SIGTTOU, &vec, &ovec);
-#ifndef __linux
+#ifndef __linux__
if (unlockpt(ttysw->ttysw_pty) == -1)
perror("unlockpt (2)");
if ((ttysw->ttysw_tty = open(ptsname(ttysw->ttysw_pty),O_RDWR))<0)
@@ -576,7 +587,7 @@
offset++;
}
-#if defined(SVR4) || defined(__linux)
+#if defined(SVR4) || defined(__linux__)
#ifdef BSD_TTY_COMPAT
/*
* ttcompat seems to leave things in a funny state and assumes
@@ -710,6 +721,12 @@
int tmpfd;
int pty = 0, tty = 0;
int on = 1;
+#ifdef __linux__
+ if (openpty(&pty, &tty, ttysw->tty_name, NULL, NULL) == -1) {
+ fprintf(stderr, XV_MSG("All pty's in use\n"));
+ return XV_ERROR;
+ }
+#else /* __linux__ */
#ifndef SVR4
int ptynum = 0;
char linebuf[20], *line = &linebuf[0];
@@ -899,7 +916,7 @@
ok:
-#endif SB_NO_DROPS
+#endif /* SB_NO_DROPS */
if (ioctl(pty, I_PUSH, "pckt") == -1) { /* must use getmsg for read */
@@ -925,6 +942,7 @@
#endif
#endif /* SVR4 */
+#endif /* __linux__ */
if (ttysw_restoreparms(tty))
(void) putenv(WE_TTYPARMS_E);
@@ -972,7 +990,7 @@
*/
#ifndef SVR4
-#ifndef __linux
+#ifndef __linux__
/*
* Make entry in /etc/utmp for ttyfd. Note: this is dubious usage of
* /etc/utmp but many programs (e.g. sccs) look there when determining who is
@@ -1056,7 +1074,7 @@
}
return (ttyslotuse);
}
-#else /* __linux */
+#else /* __linux__ */
/* Linux version of updateutmp uses the getutXX functions, we don't
* need no ttyslot() or direct writing to /etc/utmp */
int
@@ -1118,6 +1136,6 @@
endutent();
return 1; /* Return dummy value for ttyslot number */
}
-#endif /* __linux */
-#endif SVR4
+#endif /* __linux__ */
+#endif /* SVR4 */
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_main.c xview-3.2p1.4/lib/libxview/ttysw/tty_main.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_main.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_main.c 2013-08-25 12:04:12.440380146 +0200
@@ -65,6 +65,11 @@
#endif /* FULL_R5 */
#endif
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#include <sys/ioctl.h>
+#endif
+
#ifdef OW_I18N
/*
* If there are committed chars and pre_edit chars returned by XIM,
@@ -99,6 +104,11 @@
#define oebp ttysw->ttysw_obuf.cb_ebp
#define obuf ttysw->ttysw_obuf.cb_buf
+static int ttysw_process_point(Ttysw_folio ttysw, struct inputevent *ie);
+static int ttysw_process_adjust(Ttysw_folio ttysw, struct inputevent *ie);
+static int ttysw_process_motion(Ttysw_folio ttysw, struct inputevent *ie);
+static int ttysw_process_keyboard(Ttysw_folio ttysw, struct inputevent *ie);
+
/* #ifdef TERMSW */
/*
* The basic strategy for building a line-oriented command subwindow
@@ -199,7 +209,10 @@
*/
#ifdef OW_I18N
#define MB_BUF_MAX 8192
-Pkg_private int
+/* mbuck@debian.org: ttysw_pty_output() was declared to return int before, but
+ * none of its return statements returned a value.
+ */
+Pkg_private void
ttysw_pty_output(ttysw, pty)
register Ttysw_folio ttysw;
int pty;
@@ -355,7 +368,10 @@
}
#endif /* DEBUG */
-Pkg_private int
+/* mbuck@debian.org: ttysw_pty_output() was declared to return int before, but
+ * none of its return statements returned a value.
+ */
+Pkg_private void
ttysw_pty_output(ttysw, pty)
register Ttysw_folio ttysw;
int pty;
@@ -901,7 +917,7 @@
if (cc > 0) {
int_ucntl = (unsigned) ucntl;
-#ifdef __linux
+#ifdef __linux__
/* Under Linux, int_ucntl doesn't get set when enabling/disabling
* ECHO mode. So we always have to read the current tty settings :-(
* martin-2.buck@student.uni-ulm.de
@@ -921,7 +937,7 @@
(void)tcgetattr(ttysw->ttysw_tty, &ttysw->termios);
#endif
ttysw_getp(TTY_VIEW_HANDLE_FROM_TTY_FOLIO(ttysw)); /* jcb for nng */
-#ifdef __linux
+#ifdef __linux__
}
if (int_ucntl == 0)
#else
@@ -1532,7 +1548,7 @@
* Otherwise, we use the winsize struct and TIOCSWINSZ ioctl.
*/
struct winsize ws;
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
struct sigvec vec, ovec;
vec.sv_handler = SIG_IGN;
@@ -1545,7 +1561,7 @@
if ((ioctl(ttysw->ttysw_tty, TIOCSWINSZ, &ws)) == -1)
perror(XV_MSG("ttysw-TIOCSWINSZ"));
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
(void) sigvec(SIGTTOU, &ovec, 0);
#endif
#endif /* sun */
@@ -1645,7 +1661,7 @@
ttysw_flush_input(ttysw)
Ttysw_folio ttysw;
{
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
struct sigvec vec, ovec; /* Sys V compatibility */
int flushf = 0;
@@ -1676,7 +1692,7 @@
# endif /* XV_USE_TERMIOS */
perror(XV_MSG("TIOCFLUSH"));
-#if !defined(SVR4) && !defined(__linux)
+#if !defined(SVR4) && !defined(__linux__)
(void) sigvec(SIGTTOU, &ovec, (struct sigvec *) 0);
#else
sigaction(SIGTTOU, &ovec, (struct sigaction *) 0);
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_mapkey.c xview-3.2p1.4/lib/libxview/ttysw/tty_mapkey.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_mapkey.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_mapkey.c 2013-08-25 12:04:12.436380146 +0200
@@ -12,9 +12,10 @@
#include <stdio.h>
#include <ctype.h>
-#ifdef SVR4
+#if defined SVR4 || defined __linux__
#include <string.h>
#endif
+#include <unistd.h> /* for access(2) - mbuck@debian.org */
#include <sys/types.h>
#include <sys/file.h>
#include <sys/time.h>
@@ -34,7 +35,6 @@
extern Notify_error win_post_event();
extern char *getenv();
-extern char *strcpy();
extern char *strcat();
/* static routines */
@@ -76,6 +76,11 @@
char *altrc;
XV_BZERO(rc, 1024);
+#if 1 /* FHS compliance - mbuck@debian.org */
+ if (!access("/etc/X11/xview/ttyswrc", R_OK)) {
+ (void)strcpy(rc, "/etc/X11/xview/ttyswrc");
+ } else
+#endif
if ((p=(char*)getenv("OPENWINHOME")) != (char *)NULL) {
(void)strcpy(rc, p);
(void) strcat(rc, "/lib/.ttyswrc");
@@ -508,7 +513,7 @@
* have more time.
*/
-#if defined(i386) && !defined(__linux)
+#if defined(i386) && !defined(__linux__)
static void
ttysw_arrow_keys_to_string(xv_id, str)
unsigned xv_id;
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_modes.c xview-3.2p1.4/lib/libxview/ttysw/tty_modes.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_modes.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_modes.c 2013-08-25 12:04:12.440380146 +0200
@@ -125,7 +125,7 @@
/*
* Switch the pty out of remote mode.
*/
-#if !defined(__linux) || defined(TIOCREMOTE)
+#if !defined(__linux__) || defined(TIOCREMOTE)
if (ioctl(ttysw->ttysw_pty, TIOCREMOTE, &off) < 0)
perror("ioctl: TIOCREMOTE");
else
@@ -278,7 +278,7 @@
*/
ttysw_getp((Ttysw_view_handle) ttysw_view);
ttysw->pending_remote = termsw->cooked_echo;
-#if !defined(__linux) || defined(TIOCREMOTE)
+#if !defined(__linux__) || defined(TIOCREMOTE)
if (ioctl(ttysw->ttysw_pty, TIOCREMOTE, &ttysw->pending_remote) < 0)
perror("ioctl: TIOCREMOTE");
else
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_newtxt.c xview-3.2p1.4/lib/libxview/ttysw/tty_newtxt.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_newtxt.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_newtxt.c 2013-08-25 12:04:12.444380146 +0200
@@ -34,6 +34,10 @@
*/
+/* mbuck@debian.org */
+#if 1
+#include <X11/Xlibint.h>
+#endif
#include <xview/window.h>
#include <xview_private/pw_impl.h>
#include <pixrect/pixrect.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_ntfy.c xview-3.2p1.4/lib/libxview/ttysw/tty_ntfy.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_ntfy.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_ntfy.c 2013-08-25 12:04:12.432380146 +0200
@@ -44,6 +44,15 @@
#include <xview_private/term_impl.h>
#include <xview_private/ultrix_cpt.h>
+#if defined(__linux__) && defined(__GLIBC__)
+/* martin.buck@bigfoot.com */
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0
+#include <ioctls.h>
+#else
+#include <sys/ioctl.h>
+#endif
+#endif
+
#define PTY_OFFSET (int) &(((Ttysw_folio)0)->ttysw_pty)
extern void textsw_display();
@@ -171,7 +180,7 @@
* SIGWINCHes on resize.
*/
/* Notify process group that terminal has changed. */
-#ifdef __linux
+#ifdef __linux__
/* Under Linux, we can use this ioctl only on the master pty,
* otherwise we'll get ENOTTY. It seems to return the right process
* group nevertheless.
@@ -187,7 +196,7 @@
* Only killpg when pgrp is not tool's. This is the case of haven't
* completed ttysw_fork yet (or even tried to do it yet).
*/
-#ifndef __linux
+#ifndef __linux__
if (getpgrp(0) != pgrp)
#else
if (getpgrp() != pgrp)
@@ -216,7 +225,7 @@
return;
}
/* Send the signal to the process group of the controlling tty */
-#ifdef __linux
+#ifdef __linux__
/* See the comment in ttysw_sigwinch */
if (ioctl(ttysw->ttysw_pty, TIOCGPGRP, &control_pg) >= 0) {
#else
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/tty_stty.c xview-3.2p1.4/lib/libxview/ttysw/tty_stty.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_stty.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/tty_stty.c 2013-08-25 12:04:12.444380146 +0200
@@ -122,7 +122,7 @@
* often have a value of \0.
*/
strcpy( str, WE_TTYPARMS_E );
-#ifndef __linux
+#ifndef __linux__
(void) sprintf(str + strlen( str ),
"%ld,%ld,%ld,%ld,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd",
tp->c_iflag, tp->c_oflag, tp->c_cflag, tp->c_lflag,
@@ -130,7 +130,7 @@
tp->c_cc[4], tp->c_cc[5], tp->c_cc[6], tp->c_cc[7],
tp->c_cc[8], tp->c_cc[9], tp->c_cc[10], tp->c_cc[11],
tp->c_cc[12], tp->c_cc[13], tp->c_cc[14], tp->c_cc[15]);
-#else /* __linux */
+#else /* __linux__ */
(void) sprintf(str + strlen( str ),
"%ld,%ld,%ld,%ld,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd,%hd",
tp->c_iflag, tp->c_oflag, tp->c_cflag, tp->c_lflag,
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/ttyansi.c xview-3.2p1.4/lib/libxview/ttysw/ttyansi.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/ttyansi.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/ttyansi.c 2013-08-25 12:04:12.436380146 +0200
@@ -14,6 +14,7 @@
#include <xview/xv_i18n.h>
#endif
#include <stdio.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/signal.h>
@@ -31,7 +32,6 @@
#include <xview/sel_attrs.h>
-char *strncpy();
char *textsw_checkpoint_undo();
Textsw_index textsw_replace_i18n(), textsw_erase_i18n();
@@ -48,7 +48,7 @@
#define ERROR_RETURN(val) return(val);
#endif /* DEBUG */
-#ifndef __linux
+#ifndef __linux__
#define notcontrol(c) (((c&0177) >= ' ') && (c != '\177'))
#else
#define notcontrol(c) ((c >= ' ') && (c != '\177'))
@@ -82,6 +82,10 @@
int pre_edit_rows_scrolled; /* updated in ansi_lf, used in ttysw callbacks */
#endif
+static int send_input_to_textsw(Textsw textsw, CHAR *buf, long buf_len, Textsw_index end_transcript);
+static int ansi_lf(Ttysw_view_handle ttysw_view, CHAR *addr, int len);
+static int ansi_char(Ttysw_view_handle ttysw_view, CHAR *addr, int olen);
+
/*
* Interpret a string of characters of length <len>. Stash and restore the
* cursor indicator.
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/ttyselect.c xview-3.2p1.4/lib/libxview/ttysw/ttyselect.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/ttyselect.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/ttyselect.c 2013-08-25 12:04:12.440380146 +0200
@@ -16,6 +16,10 @@
#include <sys/types.h>
#include <sys/file.h>
#include <sys/time.h>
+#ifndef XVIEW_USE_INSECURE_TMPFILES
+/* martin.buck@bigfoot.com */
+#include <dirent.h>
+#endif
#include <pixrect/pixrect.h>
#include <pixrect/pixfont.h>
@@ -102,7 +106,14 @@
static struct timeval maxinterval = {0, 400000}; /* XXX - for now */
+#ifdef XVIEW_USE_INSECURE_TMPFILES
+/* martin.buck@bigfoot.com */
static char *ttysel_filename = "/tmp/ttyselection";
+#else
+static char ttysel_filename[MAXNAMLEN];
+#endif
+
+static ttysel_resynch(struct ttysubwindow *ttysw, Seln_function_buffer *buffer);
/* static */ int
ttysw_is_seln_nonzero(ttysw, rank)
@@ -1258,6 +1269,12 @@
if (!ttysel->sel_made) {
return;
}
+#ifndef XVIEW_USE_INSECURE_TMPFILES
+ /* martin.buck@bigfoot.com */
+ if (!ttysel_filename[0]) {
+ sprintf(ttysel_filename, "%s/.ttyselection", xv_getlogindir());
+ }
+#endif
if ((held_file = fopen(ttysel_filename, "w")) == (FILE *) NULL) {
return;
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/ttysw/ttytl.c xview-3.2p1.4/lib/libxview/ttysw/ttytl.c
--- xview-3.2p1.4.orig/lib/libxview/ttysw/ttytl.c 2013-08-25 12:02:12.880378392 +0200
+++ xview-3.2p1.4/lib/libxview/ttysw/ttytl.c 2013-08-25 12:04:12.432380146 +0200
@@ -16,6 +16,7 @@
*/
#include <stdio.h>
+#include <string.h>
#ifdef SVR4
#include <sys/types.h>
#endif
@@ -35,8 +36,6 @@
#include <xview_private/term_impl.h>
#include <xview_private/charscreen.h>
-extern char *strncpy();
-
/* BUG ALERT: This entire procedure should be rewritten! */
/* BUG ALERT: No XView prefix */
diff -rNu xview-3.2p1.4.orig/lib/libxview/win/Imakefile xview-3.2p1.4/lib/libxview/win/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/win/Imakefile 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/win/Imakefile 2013-08-25 12:04:12.512380147 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/win/win_ascii.h xview-3.2p1.4/lib/libxview/win/win_ascii.h
--- xview-3.2p1.4.orig/lib/libxview/win/win_ascii.h 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/win/win_ascii.h 2013-08-25 12:04:12.508380147 +0200
@@ -1872,4 +1872,4 @@
};
-#endif win_ascii_data_DEFINED
+#endif /* win_ascii_data_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/win/win_bldkmp.c xview-3.2p1.4/lib/libxview/win/win_bldkmp.c
--- xview-3.2p1.4.orig/lib/libxview/win/win_bldkmp.c 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/win/win_bldkmp.c 2013-08-25 12:04:12.508380147 +0200
@@ -261,12 +261,12 @@
unshifted_char = *ksym & 0x7f;
shifted_char = *(ksym + 1) & 0x7f;
-#else SVR4
+#else /* SVR4 */
/* all other keysyms are masked to 8 bits */
unshifted_char = *ksym;
shifted_char = *(ksym + 1);
-#endif SVR4
+#endif /* SVR4 */
#ifdef notdef /* This test seems obsolete */
if (unshifted_char & ASCII_UNSHIFTED_MASK) {
diff -rNu xview-3.2p1.4.orig/lib/libxview/win/win_input.c xview-3.2p1.4/lib/libxview/win/win_input.c
--- xview-3.2p1.4.orig/lib/libxview/win/win_input.c 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/win/win_input.c 2013-08-25 12:04:12.508380147 +0200
@@ -17,7 +17,12 @@
#include <stdio.h>
#include <errno.h>
#include <sys/time.h>
+/* mbuck@debian.org */
+#if 1
+#include <X11/Xlibint.h> /* required by Xutil.h */
+#else
#include <X11/Xlib.h> /* required by Xutil.h */
+#endif
#include <X11/keysym.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
@@ -77,7 +82,7 @@
Xv_private int win_handle_menu_accel();
/* ACC_XVIEW */
-#ifndef __linux
+#ifndef __linux__
FILE *fopen(), *fexp;
#endif
@@ -88,6 +93,7 @@
static int process_property_events();
static int process_wm_pushpin_state();
Pkg_private int win_handle_compose();
+static int xevent_to_event(Display *display, XEvent *xevent, Event *event, Xv_object *pwindow);
struct _XKeytrans {
struct _XKeytrans *next;/* next on list */
@@ -2333,8 +2339,13 @@
/* XView does a passive grab on the SELECT button! */
window_x_allow_events(display);
+#if 1 /* mbuck@debian.org */
+ return BlockForEvent(display, &xevent, timeout * 1000, GetButtonEvent,
+ (char *) bEvent);
+#else
return BlockForEvent(display, xevent, timeout * 1000, GetButtonEvent,
(char *) bEvent);
+#endif
}
diff -rNu xview-3.2p1.4.orig/lib/libxview/win/win_keymap.h xview-3.2p1.4/lib/libxview/win/win_keymap.h
--- xview-3.2p1.4.orig/lib/libxview/win/win_keymap.h 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/win/win_keymap.h 2013-08-25 12:04:12.512380147 +0200
@@ -53,4 +53,4 @@
-#endif win_keymap_DEFINED
+#endif /* win_keymap_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/win/win_kmdata.h xview-3.2p1.4/lib/libxview/win/win_kmdata.h
--- xview-3.2p1.4.orig/lib/libxview/win/win_kmdata.h 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/win/win_kmdata.h 2013-08-25 12:04:12.512380147 +0200
@@ -48,7 +48,7 @@
#else
/* BUG: Only in R4. */
XK_Scroll_Lock, /* XK_Scroll_Lock */
-#endif XK_Scroll_Lock
+#endif /* XK_Scroll_Lock */
NULL, NULL, NULL, NULL, NULL, NULL,
XK_Escape,
@@ -211,4 +211,4 @@
};
-#endif win_keymap_data_DEFINED
+#endif /* win_keymap_data_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/libxview/window/Imakefile xview-3.2p1.4/lib/libxview/window/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/window/Imakefile 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/window/Imakefile 2013-08-25 12:04:12.424380146 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/window/window.c xview-3.2p1.4/lib/libxview/window/window.c
--- xview-3.2p1.4.orig/lib/libxview/window/window.c 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/window/window.c 2013-08-25 12:04:12.420380146 +0200
@@ -16,7 +16,7 @@
#ifdef SVR4
#include <sys/types.h>
-#endif SVR4
+#endif /* SVR4 */
#include <stdio.h>
#include <sys/file.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/window/window_get.c xview-3.2p1.4/lib/libxview/window/window_get.c
--- xview-3.2p1.4.orig/lib/libxview/window/window_get.c 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/window/window_get.c 2013-08-25 12:04:12.420380146 +0200
@@ -960,4 +960,4 @@
return(xic);
}
-#endif OW_I18N
+#endif /* OW_I18N */
diff -rNu xview-3.2p1.4.orig/lib/libxview/window/window_set.c xview-3.2p1.4/lib/libxview/window/window_set.c
--- xview-3.2p1.4.orig/lib/libxview/window/window_set.c 2013-08-25 12:02:12.848378392 +0200
+++ xview-3.2p1.4/lib/libxview/window/window_set.c 2013-08-25 12:04:12.420380146 +0200
@@ -23,7 +23,7 @@
#include <xview/defaults.h>
#ifdef SVR4
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
/*
* Extern
@@ -52,6 +52,7 @@
Pkg_private void sync_rect();
static Xv_opaque window_set_avlist_tier2();
static Xv_opaque window_set_avlist_tier3();
+static void window_set_softkey_labels(Xv_Drawable_info *info, char *string);
static Defaults_pairs setinput_pairs[] = {
"select", FALSE,
@@ -1072,7 +1073,6 @@
case WIN_SOFT_FNKEY_LABELS: {
register Xv_Drawable_info *info;
- static void window_set_softkey_labels();
DRAWABLE_INFO_MACRO(win_public, info);
win->softkey_flag = TRUE;
diff -rNu xview-3.2p1.4.orig/lib/libxview/window/windowlayt.c xview-3.2p1.4/lib/libxview/window/windowlayt.c
--- xview-3.2p1.4.orig/lib/libxview/window/windowlayt.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/window/windowlayt.c 2013-08-25 12:04:12.420380146 +0200
@@ -25,6 +25,10 @@
Xv_Window parent;
register Xv_Window child;
Window_layout_op op;
+/* Alpha compatibility, mbuck@debian.org */
+#if defined(__alpha)
+ unsigned long *d1, *d2, *d3, *d4, *d5;
+#endif
{
Rect rect;
diff -rNu xview-3.2p1.4.orig/lib/libxview/window/windowutil.c xview-3.2p1.4/lib/libxview/window/windowutil.c
--- xview-3.2p1.4.orig/lib/libxview/window/windowutil.c 2013-08-25 12:02:12.852378392 +0200
+++ xview-3.2p1.4/lib/libxview/window/windowutil.c 2013-08-25 12:04:12.420380146 +0200
@@ -18,7 +18,7 @@
#ifdef SVR4
#include <sys/types.h>
#include <stdlib.h>
-#endif SVR4
+#endif /* SVR4 */
#include <sys/file.h>
#include <xview/notify.h>
#include <xview_private/windowimpl.h>
diff -rNu xview-3.2p1.4.orig/lib/libxview/wmgr/Imakefile xview-3.2p1.4/lib/libxview/wmgr/Imakefile
--- xview-3.2p1.4.orig/lib/libxview/wmgr/Imakefile 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/wmgr/Imakefile 2013-08-25 12:04:12.400380145 +0200
@@ -5,8 +5,8 @@
#endif
#include <Library.tmpl>
-/**/###########################################################################
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM ###########################################################################
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
#ifndef SubdirHasTextObjs
#define SubdirHasTextObjs YES
diff -rNu xview-3.2p1.4.orig/lib/libxview/wmgr/wmgr_decor.h xview-3.2p1.4/lib/libxview/wmgr/wmgr_decor.h
--- xview-3.2p1.4.orig/lib/libxview/wmgr/wmgr_decor.h 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/wmgr/wmgr_decor.h 2013-08-25 12:04:12.396380145 +0200
@@ -59,13 +59,13 @@
/* value for pushpin_initial_state */
#ifndef WMPushpinIsOut
#define WMPushpinIsOut 0
-#endif WMPushpinIsOut
+#endif /* WMPushpinIsOut */
#ifndef WMPushpinIsIn
#define WMPushpinIsIn 1
-#endif WMPushpinIsIn
+#endif /* WMPushpinIsIn */
/* value for WM_WINDOW_BUSY property */
#define WMWindowNotBusy 0
#define WMWindowIsBusy 1
-#endif _wmgr_decor_h_already_included
+#endif /* _wmgr_decor_h_already_included */
diff -rNu xview-3.2p1.4.orig/lib/libxview/wmgr/wmgr_menu.c xview-3.2p1.4/lib/libxview/wmgr/wmgr_menu.c
--- xview-3.2p1.4.orig/lib/libxview/wmgr/wmgr_menu.c 2013-08-25 12:02:12.884378392 +0200
+++ xview-3.2p1.4/lib/libxview/wmgr/wmgr_menu.c 2013-08-25 12:04:12.400380145 +0200
@@ -14,12 +14,12 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
-#if defined(sparc) || defined(__linux)
-#if defined(SVR4) || defined(__linux)
+#if defined(sparc) || defined(__linux__)
+#if defined(SVR4) || defined(__linux__)
#include <unistd.h>
#else
#include <vfork.h>
-#endif SVR4
+#endif /* SVR4 */
#endif
#include <xview/frame.h>
diff -rNu xview-3.2p1.4.orig/lib/pixrect/Imakefile xview-3.2p1.4/lib/pixrect/Imakefile
--- xview-3.2p1.4.orig/lib/pixrect/Imakefile 2013-08-25 12:02:12.912378393 +0200
+++ xview-3.2p1.4/lib/pixrect/Imakefile 2013-08-25 12:04:12.572380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.1 89/07/21 SMI
-/**/# Imakefile for lib/pixrect directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.1 89/07/21 SMI
+XCOMM # Imakefile for lib/pixrect directory.
HEADERS= \
bw2var.h \
diff -rNu xview-3.2p1.4.orig/lib/pixrect/bw2var.h xview-3.2p1.4/lib/pixrect/bw2var.h
--- xview-3.2p1.4.orig/lib/pixrect/bw2var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/bw2var.h 2013-08-25 12:04:12.568380148 +0200
@@ -37,4 +37,4 @@
int bw2_destroy();
#endif
-#endif bw2var_DEFINED
+#endif /* bw2var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg12_var.h xview-3.2p1.4/lib/pixrect/cg12_var.h
--- xview-3.2p1.4.orig/lib/pixrect/cg12_var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg12_var.h 2013-08-25 12:04:12.564380148 +0200
@@ -13,17 +13,17 @@
#include <sun/fbio.h>
#else
#include <sys/fbio.h>
-#endif SVR4
+#endif /* SVR4 */
#include <pixrect/pixrect.h>
#ifndef SVR4
#include <sbusdev/cg12reg.h>
-#endif SVR4
+#endif /* SVR4 */
#include <pixrect/memvar.h>
#ifndef SVR4
#include <sunwindow/cms.h> /* colormapseg */
#else
#include <sys/cms.h>
-#endif SVR4
+#endif /* SVR4 */
#define CG12_NFBS 6 /* number of frame buffers in a CG12 */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg2reg.h xview-3.2p1.4/lib/pixrect/cg2reg.h
--- xview-3.2p1.4.orig/lib/pixrect/cg2reg.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg2reg.h 2013-08-25 12:04:12.568380148 +0200
@@ -310,4 +310,4 @@
#define cg2_touch(a) ((a)=0)
-#endif cg2reg_DEFINED
+#endif /* cg2reg_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg2var.h xview-3.2p1.4/lib/pixrect/cg2var.h
--- xview-3.2p1.4.orig/lib/pixrect/cg2var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg2var.h 2013-08-25 12:04:12.568380148 +0200
@@ -83,6 +83,6 @@
Pixrect *cg2_region();
int cg2_getcolormap();
int cg2_getattributes();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif cg2var_DEFINED
+#endif /* cg2var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg3var.h xview-3.2p1.4/lib/pixrect/cg3var.h
--- xview-3.2p1.4.orig/lib/pixrect/cg3var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg3var.h 2013-08-25 12:04:12.572380148 +0200
@@ -45,6 +45,6 @@
Pixrect *cg3_region();
int cg3_putcolormap();
int cg3_getcolormap();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif !cg3var_DEFINED
+#endif /* !cg3var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg4var.h xview-3.2p1.4/lib/pixrect/cg4var.h
--- xview-3.2p1.4.orig/lib/pixrect/cg4var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg4var.h 2013-08-25 12:04:12.564380148 +0200
@@ -54,6 +54,6 @@
Pixrect *cg4_region();
int cg4_getcolormap();
int cg4_getattributes();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif !cg4var_DEFINED
+#endif /* !cg4var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg8var.h xview-3.2p1.4/lib/pixrect/cg8var.h
--- xview-3.2p1.4.orig/lib/pixrect/cg8var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg8var.h 2013-08-25 12:04:12.564380148 +0200
@@ -14,7 +14,7 @@
#include <sunwindow/cms.h>
#else
#include <sys/cms.h>
-#endif SVR4
+#endif /* SVR4 */
/* FBIOSATTR device specific array indices, copied from cg4var.h */
#define FB_ATTR_CG8_SETOWNER_CMD 0 /* 1 indicates PID is valid */
@@ -90,6 +90,6 @@
int cg8_put();
int cg8_rop();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif cg8var_DEFINED
+#endif /* cg8var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/cg9var.h xview-3.2p1.4/lib/pixrect/cg9var.h
--- xview-3.2p1.4.orig/lib/pixrect/cg9var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/cg9var.h 2013-08-25 12:04:12.564380148 +0200
@@ -13,13 +13,13 @@
#ifndef SVR4
#include <sundev/cg9reg.h>
-#endif SVR4
+#endif /* SVR4 */
#include <pixrect/memvar.h>
#ifndef SVR4
#include <sunwindow/cms.h> /* colormapseg */
#else
#include <sys/cms.h>
-#endif SVR4
+#endif /* SVR4 */
/* description of single CG9 frame buffer */
@@ -92,6 +92,6 @@
int cg9_get();
int cg9_put();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif cg9var_DEFINED
+#endif /* cg9var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/gp1cmds.h xview-3.2p1.4/lib/pixrect/gp1cmds.h
--- xview-3.2p1.4.orig/lib/pixrect/gp1cmds.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/gp1cmds.h 2013-08-25 12:04:12.568380148 +0200
@@ -374,7 +374,7 @@
#define GP1_GET_I(p, a) ((a) = * (int *) (p), \
(p) += sizeof (int) / sizeof *(p))
-#else mc68000
+#else /* mc68000 */
#define GP1_PUT_F(p, a) (((short *) (p))[0] = ((short *)&(a))[0], \
((short *) (p))[1] = ((short *) &(a))[1] , \
@@ -392,7 +392,7 @@
((short *) &(a))[1] = ((short *) (p))[1], \
(p) += sizeof (int) / sizeof *(p))
-#endif mc68000
+#endif /* mc68000 */
/* The names of these macros have been changed to avoid
@@ -403,4 +403,4 @@
#define gp1_pw_offset_X(p) (gp1_d((p)->pw_clipdata->pwcd_prmulti)->cgpr_offset.x)
#define gp1_pw_offset_Y(p) (gp1_d((p)->pw_clipdata->pwcd_prmulti)->cgpr_offset.y)
-#endif gp1cmds_DEFINED
+#endif /* gp1cmds_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/gp1var.h xview-3.2p1.4/lib/pixrect/gp1var.h
--- xview-3.2p1.4.orig/lib/pixrect/gp1var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/gp1var.h 2013-08-25 12:04:12.564380148 +0200
@@ -15,7 +15,7 @@
#include <sun/fbio.h>
#else
#include <sys/fbio.h>
-#endif SVR4
+#endif /* SVR4 */
#include <pixrect/cg2var.h>
#include <pixrect/cg9var.h>
@@ -106,10 +106,10 @@
int gp1_stencil();
int gp1_polypoint();
-#endif !KERNEL
+#endif /* !KERNEL */
#define GP1IO_SATTR _IOW(G, 101, struct fbgattr)
#define GP1IO_SCMAP _IO(G, 102)
#define GP_SHMEMSIZE 5
-#endif gp1var_DEFINED
+#endif /* gp1var_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/mem32_var.h xview-3.2p1.4/lib/pixrect/mem32_var.h
--- xview-3.2p1.4.orig/lib/pixrect/mem32_var.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/mem32_var.h 2013-08-25 12:04:12.564380148 +0200
@@ -13,7 +13,7 @@
#include <sunwindow/cms.h> /* colormapseg */
#else
#include <sys/cms.h>
-#endif SVR4
+#endif /* SVR4 */
#define MEM32_8BIT_CMAPSIZE 256
diff -rNu xview-3.2p1.4.orig/lib/pixrect/mem_rop_impl_util.h xview-3.2p1.4/lib/pixrect/mem_rop_impl_util.h
--- xview-3.2p1.4.orig/lib/pixrect/mem_rop_impl_util.h 2013-08-25 12:02:12.912378393 +0200
+++ xview-3.2p1.4/lib/pixrect/mem_rop_impl_util.h 2013-08-25 12:04:12.564380148 +0200
@@ -58,4 +58,4 @@
#define UFAST IFKERNEL(SLOW,FAST)
#define UFASTT IFKERNEL(SLOWT,FASTT)
-#endif mem_rop_impl_util_DEFINED
+#endif /* mem_rop_impl_util_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/memreg.h xview-3.2p1.4/lib/pixrect/memreg.h
--- xview-3.2p1.4.orig/lib/pixrect/memreg.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/memreg.h 2013-08-25 12:04:12.564380148 +0200
@@ -61,4 +61,4 @@
#define mrc_lmask(x) (0xffff0000 >> (x))
#define mrc_rmask(x) (0x7fff >> (x))
-#endif memreg_DEFINED
+#endif /* memreg_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/memvar.h xview-3.2p1.4/lib/pixrect/memvar.h
--- xview-3.2p1.4.orig/lib/pixrect/memvar.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/memvar.h 2013-08-25 12:04:12.568380148 +0200
@@ -48,7 +48,7 @@
#ifdef i386
#define MP_I386 8 /* Pixrect is for 386 architecture */
#define MP_STATIC 16 /* Pixrect is a static pixrect */
-#endif i386
+#endif /* i386 */
#define MP_FONT 32 /* Pixrect is a part of a Pixfont */
/* (hint to pr_batchrop) */
@@ -144,18 +144,18 @@
int mem_put();
int mem_vector();
Pixrect *mem_region();
-#endif KERNEL
+#endif /* KERNEL */
int mem_putcolormap();
int mem_putattributes();
#ifndef KERNEL
int mem_getcolormap();
int mem_getattributes();
-#endif KERNEL
+#endif /* KERNEL */
#else /* NEWPIXMEM */
#define MP_NOTMPR(pr) (0)
extern struct pixrectops mem_ops;
int mem_destroy();
-#endif NEWPIXMEM
+#endif /* NEWPIXMEM */
-#endif !memvar_DEFINED
+#endif /* !memvar_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pixfont.h xview-3.2p1.4/lib/pixrect/pixfont.h
--- xview-3.2p1.4.orig/lib/pixrect/pixfont.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pixfont.h 2013-08-25 12:04:12.568380148 +0200
@@ -43,7 +43,7 @@
#define prs_ttext(prpos, op, pf, str) \
pr_ttext((prpos).pr, (prpos).pos.x, (prpos).pos.y, pf, str)
-#endif lint
+#endif /* lint */
Pixfont *pf_open();
Pixfont *pf_open_private();
@@ -53,4 +53,4 @@
#define PIXFONT Pixfont
-#endif pixfont_DEFINED
+#endif /* pixfont_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pixrect.h xview-3.2p1.4/lib/pixrect/pixrect.h
--- xview-3.2p1.4.orig/lib/pixrect/pixrect.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pixrect.h 2013-08-25 12:04:12.572380148 +0200
@@ -101,7 +101,7 @@
* Takes device file name. This is how a screen pixrect is created.
*/
extern Pixrect *pr_open();
-#endif !KERNEL
+#endif /* !KERNEL */
/*
* Pixrect ops vector, used by pr_ macros below to call the appropriate
@@ -118,18 +118,18 @@
int (*pro_put)();
int (*pro_vector)();
Pixrect * (*pro_region)();
-#endif !KERNEL
+#endif /* !KERNEL */
int (*pro_putcolormap)();
#ifndef KERNEL
int (*pro_getcolormap)();
-#endif !KERNEL
+#endif /* !KERNEL */
int (*pro_putattributes)();
#ifndef KERNEL
int (*pro_getattributes)();
-#endif !KERNEL
+#endif /* !KERNEL */
#ifdef KERNEL
int (*pro_nop)(); /* place holder */
-#endif KERNEL
+#endif /* KERNEL */
};
#if !defined(lint) || defined(KERNEL)
@@ -169,9 +169,9 @@
(red), (grn), (blu))
#define pr_getattributes(pr, planes) \
(*(pr)->pr_ops->pro_getattributes)((pr), (planes))
-#endif !KERNEL
+#endif /* !KERNEL */
-#else !lint || KERNEL
+#else /* !lint || KERNEL */
extern pr_rop();
extern pr_stencil();
@@ -186,7 +186,7 @@
extern pr_putattributes();
extern pr_getattributes();
-#endif lint
+#endif /* lint */
/*
* Several of the above operations return a common, distinguished value when
@@ -277,7 +277,7 @@
#define pr_line(pr, x0, y0, x1, y1, brush, tex, op) \
pro_line((pr), (x0), (y0), (x1), (y1), (brush), (tex), (op), 0)
-#else !lint || KERNEL
+#else /* !lint || KERNEL */
extern prs_rop();
extern prs_stencil();
@@ -296,7 +296,7 @@
extern pr_close();
extern pr_line();
-#endif !lint || KERNEL
+#endif /* !lint || KERNEL */
@@ -329,7 +329,7 @@
#define pr_getlut(pr, ind, cnt, red, grn, blu) \
(*(pr)->pr_ops->pro_getcolormap)((pr), PR_FORCE_UPDATE | (ind), \
(cnt), (red), (grn), (blu))
-#endif !KERNEL
+#endif /* !KERNEL */
#endif /* !_pixrect_pixrect_h */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pixrect_hs.h xview-3.2p1.4/lib/pixrect/pixrect_hs.h
--- xview-3.2p1.4.orig/lib/pixrect/pixrect_hs.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pixrect_hs.h 2013-08-25 12:04:12.568380148 +0200
@@ -18,7 +18,7 @@
#include <pixrect/pr_dblbuf.h>
#include <pixrect/pr_line.h>
#include <pixrect/pr_planegroups.h>
-#endif NEWPIXMEM
+#endif /* NEWPIXMEM */
#include <pixrect/pr_util.h>
@@ -32,7 +32,7 @@
#include <pixrect/cg8var.h>
#include <pixrect/cg9var.h>
#include <pixrect/cg12_var.h>
-#endif NEWPIXMEM
+#endif /* NEWPIXMEM */
#include <pixrect/memvar.h>
@@ -40,9 +40,9 @@
#include <pixrect/mem32_var.h>
#include <pixrect/pixfont.h>
-#endif NEWPIXMEM
+#endif /* NEWPIXMEM */
#include <rasterfile.h>
#include <pixrect/pr_io.h>
-#endif pixrect_hs_DEFINED
+#endif /* pixrect_hs_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_dblbuf.h xview-3.2p1.4/lib/pixrect/pr_dblbuf.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_dblbuf.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_dblbuf.h 2013-08-25 12:04:12.564380148 +0200
@@ -33,4 +33,4 @@
#define PR_DBL_NONE 5
/* can only be returned by pr_dbl_get with PR_DBL_WRITE attribute. */
-#endif pr_dblbuf_DEFINED
+#endif /* pr_dblbuf_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_impl_make.h xview-3.2p1.4/lib/pixrect/pr_impl_make.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_impl_make.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_impl_make.h 2013-08-25 12:04:12.564380148 +0200
@@ -25,6 +25,6 @@
#ifndef KERNEL
Pixrect *pr_makefromfd();
Pixrect *pr_makefromfd_2();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif pr_impl_make_DEFINED
+#endif /* pr_impl_make_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_impl_util.h xview-3.2p1.4/lib/pixrect/pr_impl_util.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_impl_util.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_impl_util.h 2013-08-25 12:04:12.572380148 +0200
@@ -55,14 +55,14 @@
#define _ONE_ (!_ZERO_)
int _loop; /* "_loop redefinition hides earlier one" */
-#else lint
+#else /* lint */
#define IFLINT IFFALSE
#define _ZERO_ 0
#define _ONE_ 1
-#endif lint
+#endif /* lint */
/*
* portability aids
@@ -77,7 +77,7 @@
#define LOOP_DECR(var) (--(var) != -1)
-#else mc68000
+#else /* mc68000 */
#define IF68000 IFFALSE
@@ -87,7 +87,7 @@
#define LOOP_DECR(var) (--(var) >= 0)
-#endif mc68000
+#endif /* mc68000 */
#ifdef sparc
#define IFSPARC IFTRUE
@@ -124,13 +124,13 @@
#if defined(sun) && !defined(SUNOS)
#ifdef _sys_types_h
#define SUNOS 41
-#else _sys_types_h
+#else /* _sys_types_h */
#ifdef NFDBITS
#define SUNOS 40
-#else NFDBITS
+#else /* NFDBITS */
#define SUNOS 35
-#endif NFDBITS
-#endif _sys_types_h
+#endif /* NFDBITS */
+#endif /* _sys_types_h */
#endif
#if SUNOS >= 40
@@ -188,4 +188,4 @@
typedef short MPR_T; /* type used for memory pixrect data */
typedef u_short UMPR_T; /* unsigned equivalent of MPR_T */
-#endif pr_impl_util_DEFINED
+#endif /* pr_impl_util_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_io.h xview-3.2p1.4/lib/pixrect/pr_io.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_io.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_io.h 2013-08-25 12:04:12.568380148 +0200
@@ -52,4 +52,4 @@
extern Pixrect * pr_load_image();
extern Pixrect * pr_load_std_image();
-#endif pr_io_DEFINED
+#endif /* pr_io_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_line.h xview-3.2p1.4/lib/pixrect/pr_line.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_line.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_line.h 2013-08-25 12:04:12.564380148 +0200
@@ -47,7 +47,7 @@
int width;
} Pr_brush;
-#endif pr_line_h_DEFINED
+#endif /* pr_line_h_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_planegroups.h xview-3.2p1.4/lib/pixrect/pr_planegroups.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_planegroups.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_planegroups.h 2013-08-25 12:04:12.572380148 +0200
@@ -47,4 +47,4 @@
extern void pr_set_plane_group();
extern void pr_set_planes();
-#endif pr_planegroups_DEFINED
+#endif /* pr_planegroups_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/pr_util.h xview-3.2p1.4/lib/pixrect/pr_util.h
--- xview-3.2p1.4.orig/lib/pixrect/pr_util.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/pr_util.h 2013-08-25 12:04:12.568380148 +0200
@@ -66,11 +66,11 @@
op; \
}; \
asm("dbra d6,label");
-#else mc68000
+#else /* mc68000 */
#define rop_slowloop(n, op) \
{ register int _loop = (n); \
while (--_loop >= 0) { op; } }
-#endif mc68000
+#endif /* mc68000 */
#ifdef mc68010
#define cases8(n, op) \
@@ -88,9 +88,9 @@
cases8(0, op); \
case 0: break; \
} }
-#else mc68010
+#else /* mc68010 */
#define rop_fastloop rop_slowloop
-#endif mc68010
+#endif /* mc68010 */
/*
* Alloctype(datatype) allocates a datatype structure using calloc
@@ -133,6 +133,6 @@
#ifndef KERNEL
Pixrect *pr_makefromfd();
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif pr_util_DEFINED
+#endif /* pr_util_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/traprop.h xview-3.2p1.4/lib/pixrect/traprop.h
--- xview-3.2p1.4.orig/lib/pixrect/traprop.h 2013-08-25 12:02:12.908378393 +0200
+++ xview-3.2p1.4/lib/pixrect/traprop.h 2013-08-25 12:04:12.568380148 +0200
@@ -23,4 +23,4 @@
int y0, y1; /* top+bottom boundaries */
};
-#endif traprop_DEFINED
+#endif /* traprop_DEFINED */
diff -rNu xview-3.2p1.4.orig/lib/pixrect/tv1var.h xview-3.2p1.4/lib/pixrect/tv1var.h
--- xview-3.2p1.4.orig/lib/pixrect/tv1var.h 2013-08-25 12:02:12.912378393 +0200
+++ xview-3.2p1.4/lib/pixrect/tv1var.h 2013-08-25 12:04:12.568380148 +0200
@@ -10,7 +10,7 @@
#include <sys/types.h>
#ifndef SVR4
#include <sundev/tv1reg.h>
-#endif SVR4
+#endif /* SVR4 */
#include <pixrect/pixrect.h>
#include <pixrect/memvar.h>
#include <pixrect/cg4var.h>
@@ -59,6 +59,6 @@
#define ROUNDUP(val, gran) (((val) - 1 | (gran) - 1) + 1)
#endif
-#endif !KERNEL
+#endif /* !KERNEL */
-#endif tv1var_DEFINED
+#endif /* tv1var_DEFINED */
diff -rNu xview-3.2p1.4.orig/misc/Imakefile xview-3.2p1.4/misc/Imakefile
--- xview-3.2p1.4.orig/misc/Imakefile 2013-08-25 12:02:12.824378392 +0200
+++ xview-3.2p1.4/misc/Imakefile 2013-08-25 12:04:12.572380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.1 89/07/21 SMI
-/**/# Imakefile for misc directory.
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.1 89/07/21 SMI
+XCOMM # Imakefile for misc directory.
#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
diff -rNu xview-3.2p1.4.orig/misc/support/Imakefile xview-3.2p1.4/misc/support/Imakefile
--- xview-3.2p1.4.orig/misc/support/Imakefile 2013-08-25 12:02:12.824378392 +0200
+++ xview-3.2p1.4/misc/support/Imakefile 2013-08-25 12:04:12.572380148 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/#########################################################################
-/**/# @(#)Imakefile 1.6 90/07/17 SMI
-/**/# Imakefile for misc/support files.
+XCOMM #########################################################################
+XCOMM # @(#)Imakefile 1.6 90/07/17 SMI
+XCOMM # Imakefile for misc/support files.
SUPPORTFILES = text_extras_menu textswrc ttyswrc
INFOFILES = textsw.info ttysw.info xview.info clock.info olwm.info props.info \
diff -rNu xview-3.2p1.4.orig/util/Imakefile xview-3.2p1.4/util/Imakefile
--- xview-3.2p1.4.orig/util/Imakefile 2013-08-25 12:02:12.824378392 +0200
+++ xview-3.2p1.4/util/Imakefile 2013-08-25 12:04:11.832380137 +0200
@@ -1,5 +1,5 @@
-/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI
-/**/# Imakefile for util
+XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI
+XCOMM # Imakefile for util
#include <XView.tmpl>
diff -rNu xview-3.2p1.4.orig/util/conversion/Imakefile xview-3.2p1.4/util/conversion/Imakefile
--- xview-3.2p1.4.orig/util/conversion/Imakefile 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/conversion/Imakefile 2013-08-25 12:04:11.836380137 +0200
@@ -1,8 +1,8 @@
#include <XView.tmpl>
-/**/##########################################################################
-/**/# @(#)Imakefile 1.3 89/12/29 SMI
-/**/# Imakefile for util/conversion
+XCOMM ##########################################################################
+XCOMM # @(#)Imakefile 1.3 89/12/29 SMI
+XCOMM # Imakefile for util/conversion
SEDFILES= full1.sed \
full2.sed \
@@ -18,6 +18,10 @@
COPIES = convert_to_Xdefaults convert_to_Xdefaults.README \
convert_to_xview convert_to_xview.README
+XCOMM # install -s in GNU fileutils 4.x is stupid enough to fail if the file to
+XCOMM # be installed isn't stripable (like the shell scripts below).
+INSTPGMFLAGS =
+
all::
#if InstallConversion
diff -rNu xview-3.2p1.4.orig/util/cpp/Imakefile xview-3.2p1.4/util/cpp/Imakefile
--- xview-3.2p1.4.orig/util/cpp/Imakefile 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/cpp/Imakefile 2013-08-25 12:04:11.836380137 +0200
@@ -1,10 +1,10 @@
#include <XView.tmpl>
-/**/#
-/**/# There is a bit of a catch-22 here. You might need cpp in order to
-/**/# generate cpp.... But, for systems on which that isn't a problem, here
-/**/# is the proper Imakefile.
-/**/#
+XCOMM #
+XCOMM # There is a bit of a catch-22 here. You might need cpp in order to
+XCOMM # generate cpp.... But, for systems on which that isn't a problem, here
+XCOMM # is the proper Imakefile.
+XCOMM #
#if defined(SystemV)
STRINGDEFS =
diff -rNu xview-3.2p1.4.orig/util/msgfmt/Imakefile xview-3.2p1.4/util/msgfmt/Imakefile
--- xview-3.2p1.4.orig/util/msgfmt/Imakefile 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/msgfmt/Imakefile 2013-08-25 12:04:11.836380137 +0200
@@ -1,5 +1,5 @@
-/**/# @(#)Imakefile 1.5 28 Jun 1993 SMI
-/**/# Imakefile for util/msgfmt
+XCOMM # @(#)Imakefile 1.5 28 Jun 1993 SMI
+XCOMM # Imakefile for util/msgfmt
#include <XView.tmpl>
diff -rNu xview-3.2p1.4.orig/util/xgettext/Imakefile xview-3.2p1.4/util/xgettext/Imakefile
--- xview-3.2p1.4.orig/util/xgettext/Imakefile 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/xgettext/Imakefile 2013-08-25 12:04:11.836380137 +0200
@@ -1,5 +1,5 @@
-/**/# @(#)Imakefile 1.5 28 Jun 1993 SMI
-/**/# Imakefile for util/xgettext
+XCOMM # @(#)Imakefile 1.5 28 Jun 1993 SMI
+XCOMM # Imakefile for util/xgettext
#include <XView.tmpl>
diff -rNu xview-3.2p1.4.orig/util/xgettext/xgettext.c xview-3.2p1.4/util/xgettext/xgettext.c
--- xview-3.2p1.4.orig/util/xgettext/xgettext.c 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/xgettext/xgettext.c 2013-08-25 12:04:11.836380137 +0200
@@ -193,7 +193,7 @@
switch (*cp) {
- case NULL:
+ case 0:
readstd++;
break;
diff -rNu xview-3.2p1.4.orig/util/xgettext/xgettext.h xview-3.2p1.4/util/xgettext/xgettext.h
--- xview-3.2p1.4.orig/util/xgettext/xgettext.h 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/xgettext/xgettext.h 2013-08-25 12:04:11.836380137 +0200
@@ -12,7 +12,7 @@
#include <sys/dir.h>
#else
#include <dirent.h>
-#endif SVR4
+#endif /* SVR4 */
#include <sys/param.h>
#include <sys/stat.h>
@@ -54,4 +54,4 @@
struct list_head *next_list;
};
-#endif XGETTEXT_H_DEFINED
+#endif /* XGETTEXT_H_DEFINED */
diff -rNu xview-3.2p1.4.orig/util/xgettext/xgettext.man xview-3.2p1.4/util/xgettext/xgettext.man
--- xview-3.2p1.4.orig/util/xgettext/xgettext.man 2013-08-25 12:02:12.820378391 +0200
+++ xview-3.2p1.4/util/xgettext/xgettext.man 2013-08-25 12:04:11.836380137 +0200
@@ -30,7 +30,7 @@
.I filename \|.\|.\|.
]
.br
-... gwen please check indexes.
+.\"... gwen please check indexes.
.IX xgettext "" "\fLxgettext\fP \(em conditionally extract strings"
.IX messages "conditionally extract strings" "" "conditionally extract strings"
.SH DESCRIPTION
diff -rNu xview-3.2p1.4.orig/xview.man xview-3.2p1.4/xview.man
--- xview-3.2p1.4.orig/xview.man 2013-08-25 12:02:12.940378393 +0200
+++ xview-3.2p1.4/xview.man 2013-08-25 12:04:11.832380137 +0200
@@ -1818,7 +1818,7 @@
.TP
.B Description
This resource takes as a value a list of modifier keys. Any semantic
-meaning (mouseless command or keyboard accelerater) that would normally
+meaning (mouseless command or keyboard accelerator) that would normally
be associated with the listed modifiers when the keyboard focus is in
a ttysw or termsw would be removed.
.sp