debian/0000755000000000000000000000000012102231162007154 5ustar debian/olwm.prerm0000644000000000000000000000027512075400114011211 0ustar #!/bin/sh set -e #DEBHELPER# case "$1" in upgrade) ;; remove|failed-upgrade|deconfigure) update-alternatives --remove x-window-manager /usr/bin/olwm-x-window-manager ;; esac debian/olvwm.prerm0000644000000000000000000000027612075400076011407 0ustar #!/bin/sh set -e #DEBHELPER# case "$1" in upgrade) ;; remove|failed-upgrade|deconfigure) update-alternatives --remove x-window-manager /usr/bin/olvwm-x-window-manager ;; esac debian/olvwm-x-window-manager0000644000000000000000000000042411532261543013441 0ustar #!/bin/sh # Running olvwm directly through the x-window-manager link seems to cause # problems, because the program name is used to find certain resources. # So we let x-window-manager point to this wrapper and then exec olvwm with # its real name. exec /usr/bin/olvwm "$@" debian/xview-clients.menu0000644000000000000000000000075611532261543012667 0ustar ?package(xview-clients):needs="X11" section="Applications/Editors" title="Textedit" command="/usr/bin/textedit" ?package(xview-clients):needs="X11" section="Applications/Terminal Emulators" title="Command Tool" command="/usr/bin/cmdtool" ?package(xview-clients):needs="X11" section="Applications/Terminal Emulators" title="Shell Tool" command="/usr/bin/shelltool" ?package(xview-clients):needs="X11" section="Applications/System/Administration" title="Property Editor" command="/usr/bin/props" debian/olwm.menu0000644000000000000000000000033611532261543011036 0ustar ?package(olwm):needs="wm" section="Window Managers" \ title="Olwm"\ command="/usr/bin/olwm"\ longtitle="OpenLook window manager"\ description="Olwm: Traditional OpenLook window manager" debian/xview-examples.dirs0000644000000000000000000000006511532261543013032 0ustar usr/lib/xview/examples usr/share/doc/xviewg/examples debian/olvwm.README0000644000000000000000000000212311532261543011211 0ustar olvwm for DEBIAN ================ - Differences to other olvwm's: There's only one little difference: This olvwm also looks in /etc/X11/olvwm for its default menu file (openwin-menu), because there's usually no /usr/openwin on Debian systems, and the Linux filesystem standard requires configuration files to reside under /etc. - Interaction with XView packages: Since olvwm itself doesn't need XView in any way to run, it'd be IMHO nonsense to make it depend on the packages xview or even xview-clients (containing olwm and some other OpenLook tools). For this reason, it's linked statically against libolgx. Because libolgx is rather small, this shouldn't hurt. The manpage olwm.1x normally contained in the olvwm package has been renamed to olwm.1olvwm, because it conflicts with the manpage from the olwm package. Depending on whether you have installed the olwm package, you get one of both pages, but this doesn't matter, because both are identical. Roman Hodek , Tue, 7 Jan 1997 Martin Buck debian/changelog0000644000000000000000000004447512102231162011044 0ustar xview (3.2p1.4-28.1) unstable; urgency=low * Non-maintainer upload. * Correctly remove the x-window-manager alternatives on package removal. (Closes: #656450, #668448) -- Andreas Beckmann Wed, 30 Jan 2013 15:47:14 +0100 xview (3.2p1.4-28) unstable; urgency=low * Adopting (closes: #560744) * remove owplaces since xtoolplaces isn't in debian anymore (closes: #410310) -- Blars Blarson Sun, 21 Aug 2011 20:24:46 -0700 xview (3.2p1.4-27) unstable; urgency=low * QA upload * debian/control: restore armhf support that was lost in 3.2p1.4-26 (closes: #635327) * debian/changelog: restore the changelog entry for 3.2p1.4-25.1 that was lost in version 3.2p1.4-26 -- Ralf Treinen Mon, 25 Jul 2011 20:33:38 +0200 xview (3.2p1.4-26) unstable; urgency=low * QA upload * source format 3.0 (quilt): - add debian/source/format * Patch display_setting: fix setting of the DISPLAY variable in case the original value did not contain a screen number. Thanks a lot to Alan Braslau for submitting the patch! (closes: #617236, #635154) * debian/ol[v]wm.postinst: replace /usr/X11R6/man -> /usr/share/man, /usr/bin/x11 -> /usr/bin (closes: #411131, #617211) * debian/control: added ${misc:Depends} to Depends field of all packages -- Ralf Treinen Sun, 24 Jul 2011 20:58:09 +0200 xview (3.2p1.4-25.1) unstable; urgency=low * NMU, added armhf support. (Closes: #604692) -- Konstantinos Margaritis Thu, 24 Feb 2011 15:37:23 +0000 xview (3.2p1.4-25) unstable; urgency=low * QA upload. * Change maintainer to Debian QA Group (See 560744) * Add amd64 to arch list and drop lpia * Patch lib/libxview/file_chooser/file_list.c to fix FTBFS with some GCC - Patch from Ubuntu -- Scott Kitterman Sun, 20 Dec 2009 23:13:06 -0500 xview (3.2p1.4-24) unstable; urgency=low * Compile with -D_GNU_SOURCE for glibc 2.9 compatibility in regex.h. Closes: #544252 * Added Recommends: xviewg-dev, xutils-dev to xview-examples since the example sources need the header files from these packages for compilation. * Moved /etc/X11/xview/textswrc to /usr/share/doc/xviewg/examples/textswrc since it's never read there by XView and servers only as an example for copying into ~/.textswrc -- Martin Buck Thu, 03 Sep 2009 22:30:13 +0200 xview (3.2p1.4-23) unstable; urgency=low * Use XAllocIDs() instead of XAllocID() similar to Ubuntu's don_t_call_several_XAllocID_instances.diff to fix broken "window close" button handling and for future libX11 compatibility. Closes: #492023 * Upgraded to Standards-Version 3.8.0.0: - Made xviewg & xviewg-dev pre-depend on x11-common as required by policy 11.8.7 - Support DEB_BUILD_OPTIONS -- Martin Buck Thu, 24 Jul 2008 15:54:07 +0200 xview (3.2p1.4-22) unstable; urgency=low * Use FHS-compliant directories. Closes: #34868, #269782 * Don't ship empty directory /usr/lib/menu * Removed obsolete compatibility symlinks * Build depend on x.org version of libx11-dev. Closes: #368762 * Use bitmaps provided by xbitmaps package instead of our own. Closes: #23495, #48912 * Removed obsolete x-dev dependency from xviewg-dev's Depends: * Updated menu files to use the latest section names * Fixed errors in manpages * Don't link olvwm against libm, it's not required. -- Martin Buck Mon, 23 Jun 2008 17:56:16 +0200 xview (3.2p1.4-21.2) unstable; urgency=low * Non-maintainer upload. * Add armeb armel hurd-i386 kfreebsd-i386 lpia sh3 sh4 archs, closes: #408802 * use binary:Version to allow package to be binNMUed * add shlib:Depends to xviewg-dev that ships with elf binaries... -- Riku Voipio Thu, 08 May 2008 12:05:00 +0300 xview (3.2p1.4-21.1) unstable; urgency=low * 0-day NMU * stop installing into /usr/X11R6 (Closes: #364029, #365778) * build-depend on xbitmaps -- Blars Blarson Tue, 16 May 2006 09:06:45 -0700 xview (3.2p1.4-21) unstable; urgency=low * Added libxt-dev and libxpm-dev to Build-Depends. Closes: #346866 -- Martin Buck Sun, 15 Jan 2006 01:57:16 +0100 xview (3.2p1.4-20) unstable; urgency=low * Updated Build-Depends - Replaced obsolete xlibs-dev with libx11-dev, x-dev. Closes: #346866 - Added libncurses5-dev to avoid virtual-only dependency * Replaced obsolete xlibs-dev with libx11-dev, x-dev in xviewg-dev's dependencies. Closes: #347165 * Fixed bad ttysw_pty_output() return value declaration * Switched from old-style BSD-ptys to UNIX98-ptys. Closes: #345545 * Switched to debhelper 5 * Minor tweaks to make lintian slightly less unhappy * Merged changes from NMU (see below). Closes: #294844, #306713 -- Martin Buck Sat, 7 Jan 2006 22:36:43 +0100 xview (3.2p1.4-19.1) unstable; urgency=low * NMU for release-critical bug durring bug squishing party * patch for gcc 4.0 from Andreas Jochens (closes: #294844) * fix typo in man page (closes: #306713) * change section of xviewg-dev to devel to match overrides -- Blars Blarson Fri, 2 Sep 2005 05:35:09 +0000 xview (3.2p1.4-19) unstable; urgency=high * Applied patch from security team to fix security hole: Fixed buffer overflows [lib/libxview/base/xv_parse.c, CAN-2005-0076] * Added note to copyright file stating that the Debian version of XView effectively is the upstream version these days. -- Martin Buck Sat, 22 Jan 2005 12:34:32 +0100 xview (3.2p1.4-18) unstable; urgency=low * Updated ol(v)wm's menu-methods according to Bill Allombert's suggestions. Closes: #234702, #243731 * Fixed build script to not ignore errors of commands run in subshells. Closes: #271055, #271204 * Fixed some prototypes to make gcc 3.4 happy * Fixed memory corruption when handling mouse chording (off by default, so nobody noticed...) * Applied Jeff King's patch to ensure olvwm's hotkeys work right after startup even if no window is focused initially. Closes: #245744 * Ensured that VirtualIconGeometry is always regarded, even if FreeIconSlots is set. Closes: #236103 -- Martin Buck Wed, 28 Jul 2004 10:40:02 +0200 xview (3.2p1.4-17) unstable; urgency=low * Removed now nonexistent xtoolplaces from Suggests: line of xview-clients. Closes: #190834 * Changed /**/ in Imakefiles to XCOMM for compatibility with some cpp/imake versions * Added missing semicolons in olvwmrc.y for compatibility with some flex versions. Closes: #167054 * Don't try to build on ia64 since XView is completely broken there and it's close to impossible to make it work. Closes: #125391 * Fixed spelling error in copyright * Don't run ldconfig in 'postrm purge" -- Martin Buck Thu, 6 Nov 2003 00:55:00 +0100 xview (3.2p1.4-16) unstable; urgency=low * Fixed bogus olvwm cursor font specification resulting in horizontally strechted mouse pointers. This bug was introduced with the upstream olvwm patches in -15. Closes: #137211 -- Martin Buck Fri, 8 Mar 2002 00:59:31 +0100 xview (3.2p1.4-15) unstable; urgency=low * Fixed spelling errors in package description. Closes: #125571 * Applied patch from LaMont Jones to fix warnings in header files when compiling with gcc 3.0. Closes: #108263 * Documented props' inability to display the color selector on some display classes. * Removed workaround for #105934 * Added workaround for stupid new behaviour in Imake.tmpl that prevented "debian/rules clean" from working. Closes: #123901 * Replaced nonexistent app "clipboard" with "xclipboard" in ol(v)wm menu. Closes: #131702 * Applied a few upstram patches to olvwm that were missig up to now. olvwm is now at version 4.4. -- Martin Buck Mon, 11 Feb 2002 01:15:21 +0100 xview (3.2p1.4-14) unstable; urgency=low * Two gcc 3.0 compatibility fixes, temporary workaround for imake bug on hppa (needed until #105934 is fixed). Closes: #105078 * Replaced xterm with x-terminal-emulator in ol(v)wm menus. Closes: #95334 * Fixed XView font handling to make sure Unicode fonts get accepted. Closes: #107408 -- Martin Buck Mon, 6 Aug 2001 00:08:11 +0200 xview (3.2p1.4-13) unstable; urgency=low * Added xutils to Build-Depends. Closes: #90932 -- Martin Buck Sun, 25 Mar 2001 16:58:03 +0000 xview (3.2p1.4-12) unstable; urgency=low * Renamed priority "Optional" to "optional" * Updated Build-Depends for unstable to use xlibs-dev instead of xpm4g-dev; added ed, libncurses-dev. Closes: #89990 * Call dh_shlibdeps properly so it finds our libraries. * Compress changelog in package xview-examples * Also install the props manapge instead of only putting it into the diff. Sigh. * Ignore errors during "make clean" -- Martin Buck Mon, 19 Mar 2001 21:09:44 +0000 xview (3.2p1.4-11) unstable; urgency=medium * No longer build libc5 compatibility libraries * Applied (slightly modified version of) patch from Paul Slootman to allow build with glibc 2.2. Closes: #82524 * Don't try to call helpopen in help windows, because that was never released by Sun. Closes: #85515 -- Martin Buck Sun, 11 Mar 2001 13:54:29 +0100 xview (3.2p1.4-10) unstable; urgency=medium * Recompiled with libs from potato. Closes: #67931 * Finally fixed olvwm icon bug on 16/24/32 bpp displays. Closes: #31104 * Added manpage for props. Finally closes: #6193 * Fixed varargs bug on PPC that caused XView to crash immediately on startup (Patch from Michael Schmitz, closes: #72387) * Don't let x-window-manager point directly to ol(v)wm, but to a wrapper which then execs ol(v)wm with their real name. Closes: #72728 * Fixed notifier bug that sometimes caused notifier to forget some of its clients (causing "Unknown client" warning messages) * Added Build-Depends * Set XvDestDir to /usr/X11R6 in XView.cf to prepare removal of /usr/openwin compatibility link -- Martin Buck Fri, 20 Oct 2000 23:31:59 +0200 xview (3.2p1.4-9) frozen unstable; urgency=medium * Applied patch from Ben Collins to fix Sparc compilation problems (don't include vfork.h but unistd.h). closes: #60536 -- Martin Buck Sun, 19 Mar 2000 17:06:21 +0100 xview (3.2p1.4-8) frozen unstable; urgency=medium * Changed Architecture: any in control file for libc5-compat packages to list only archs that really need libc5-compat. closes: #57924 * No longer build libc5-compat for sparc. closes: #59460 -- Martin Buck Sun, 5 Mar 2000 19:34:50 +0100 xview (3.2p1.4-7) frozen unstable; urgency=medium * fixed debian/fixdeps script to avoid (re)compilation errors. closes: #55099 -- Martin Buck Sat, 15 Jan 2000 18:38:12 +0100 xview (3.2p1.4-6) unstable; urgency=low * Added manpages for capitalize, insert_brackets, remove_brackets, shift_lines. closes: #48386 * SIGCHLD-handling-fix for olvwm * Completely rewrote debian/rules * Moved examples to /usr/share/doc/xviewg/examples. closes: #38586 * Applied glibc2.1/sparc patches from Christian Meder/Harmut Koptein closes: #30411, #32273 * Use register-window-manager. closes: #42476 * Switched from register-window-manager to new Provides: x-window-manager/ update-alternatives. closes: #53692 * Fixed bug in props that caused it to crash when $LANG set. closes: #33572, #38807 * Recompiled with glibc2.1. closes: #47140 * Replaced __linux with __linux__. closes: #52033 * Upgraded to Debian Policy 3.0.1.1 -- Martin Buck Sun, 9 Jan 2000 22:44:09 +0100 xview (3.2p1.4-5) frozen unstable; urgency=medium * Removed cv2xview and cv2Xdefs scripts because they might be regarded as security holes and they are no longer useful nowadays anyway (fixes Bug#23598) * Fixed a few other places in XView and textedit where /tmp was used in an insecure manner * Recompiled to use libncurses4 instead of ncurses3.4 * Changed Architecture: in debian/control to Any, because the packages seem to compile at least on i386, sparc, m68k and alpha (don't know about the others, though) * Fixed calls to ldconfig in postinst/postrm -- Martin Buck Sun, 15 Nov 1998 15:58:26 +0100 xview (3.2p1.4-4) frozen unstable; urgency=medium * Added programs capitalize, insert_brackets, remove_brackets, shift_lines; added Suggests: indent (fixes Bug#20476) * Changed Recommends: xtoolplaces to Suggests: xtoolplaces (fixes Bug#20317) * Fixed broken alpha-patches that made XView unusable even on other architectures :-( * Fixed glibc-bugfix that is no longer needed with glibc >= 2.0.6 * Finally fixed a nasty notifier bug -- Martin Buck Sat, 30 May 1998 18:32:47 +0200 xview (3.2p1.4-3) unstable; urgency=low * Fixed some dependency problems (fixes Bug#16448) * Applied alpha-patches done by Christian Meder (fixes Bug#18423) -- Martin Buck Wed, 25 Mar 1998 22:42:14 +0100 xview (3.2p1.4-2) unstable; urgency=low * Use pristine sources * Don't use aboslute paths in ol(v)wm's menu-files (fixes Bug#15212) * Switched to debhelper * Copyright-files are no longer compressed (fixes Bug#14485, Bug#14501, Bug#14507) * Renamed xgettext, msgfmt to xview_xgettext, xview_msgfmt to avoid confusion * Removed recursive dependencies for xviewg, xviewg (fixes Bug#16726, partially fixes Bug#16448) * Removed bogus dependency on libc6 from xview by not building with fakeroot (partially fixes Bug#16448). * xviewg-dev now also depends on libc6-dev, xlib6g-dev. xview-altdev now also depends on libc5-altdev, xlib6-altdev. -- Martin Buck Thu, 8 Jan 1998 00:32:04 +0100 xview (3.2p1.4-1) unstable; urgency=low * New upstream version (fixes bugs #4506, #9248, #11201): - Fixed bug in Notifier that caused cmdtool to dump core when running fullscreen-programs like vi or emacs. - ttysw/termsw (cmdtool) now correctly handles NOECHO mode - NumLock no longer causes X protocol error - Numeric keypad should work - Caret now is (re)drawn correctly in PANEL_TEXT_ITEMs - Fixed bug that caused menu items to become invisible when XView ran out of colors - Fixed BadMatch error when using colored icons - Fixed bug that caused random SIGSEGVs when drawing lines with pixwin - Fixed olgx bug that caused height miscalculation for PANEL_LABEL_IMAGEs - olvwm no longer dumps core when no menu-file is found - olvwm now displays accelerators in its menus - props no longer complains about missing localization files - $OPENWINHOME no longer required -- everything now uses /usr/openwin by default, if $OPENWINHOME is unset - All installation-rules in the Imake-config-files now use the $DESTDIR- prefix for the installation-directories - Using Ncurses, libtermcap is no longer required - Removed /usr/openwin/bin/sunview (executables now in /usr/openwin/bin, scripts in /usr/openwin/lib/xview) - Fixed some compilation problems * All config files moved to /etc/X11/{xview,olwm,olvwm} * Static libraries now compiled without -fPIC * olvwm now also compiled from xview source package * Merged in changes from previous olvwm package (menu-files in /etc/X11/olvwm, bugfix for missing fonts, olvwm linked statically against libolgx) * Fixed minor security bug in ol(v)wm-postrm * olwm manpage contained in olvwm package now called olwm(1olvwm) (fixes bug #8987) * olwm now in a separate binary package * New binary package xview-examples * Added menu-support to olwm & xview-clients * Recompiled for libc6, added libc5 compatibility packages (fixes #12899, #13089, #12920) * Fixed xview's postinst to call ldconfig (fixes #12472) * New maintainer -- Martin Buck Sat, 27 Sep 1997 02:29:37 +0200 xview (3.2p1.3-2) frozen unstable; urgency=low * lib/libxview/win/win_input.c: fixed handling of numerical keyboard -- Sven Rudolph Wed, 9 Apr 1997 01:09:21 +0200 xview (3.2p1.3-1) unstable; urgency=low * new upstream version: Patchlevel 3 adds the TrueColor-patches for ol(v)wm, fixes the buffer-overrun problem with cmdtool (that caused cmdtool's output to be written to the terminal cmdtool was started from), fixes a GC-problem when using 2D buttons (that showed up when attaching a menu to a canvas using all 256 colors on a 8 bpp display, for example), fixes a resource problem with olvwm, changes the default location for the text-extras-menu from /usr/lib to /usr/openwin/lib and contains some other minor enhancements. Also, olvwm now is included in the source-package and the diffs only contain the patches for the additional clients (instead of the whole clients-sourcecode). * util/conversion/cv2xview: OPENWINHOME fallback changed * debian/rules: install owplaces (#4570) * config/XView.tmpl.in: don't set MKDIRHIER (#4507) -- Sven Rudolph Wed, 9 Apr 1997 01:09:21 +0200 xview (3.2p1.2-4) unstable; urgency=low * debian/rules: strip shared libraries (Bug#5162) * debian/rules: gzipped manual pages (Bug#6068, Bug#6078) -- Sven Rudolph Tue, 29 Oct 1996 22:11:52 +0100 xview (3.2p1.2-3) unstable; urgency=low * corrected XVDestDir in XView.cf (Bug#4506) * debian/rules: created additional shared lib links (Bug#4571) * corrected shared library packaging (removed ldconfig calls, add shlibs) * converted to new source package format (Bug#4283) -- Sven Rudolph Tue, 29 Oct 1996 19:12:37 +0100 xview (3.2p1.2-2) unstable; urgency=low * clients/olwm/openwin-menu-programs: replaced $OPENWINHOME by /usr/openwin ($OPENWINHOME not set by default) * {textsw,ttysw}/Imakefile: removed -ltermcap * config/XView.cf.in: fixed i386-dependency (Bug#4283) * debian.control-* : changed Priority: to Optional -- Sven Rudolph Wed, 18 Sep 1996 22:51:50 +0200 xview (3.2p1.2-1) unstable; urgency=low * many hacks, read diff for details * added Debian GNU/Linux package maintenance system files -- Sven Rudolph Tue, 6 Aug 1996 12:58:43 +0200 debian/olwm-x-window-manager0000644000000000000000000000042111532261543013250 0ustar #!/bin/sh # Running olwm directly through the x-window-manager link seems to cause # problems, because the program name is used to find certain resources. # So we let x-window-manager point to this wrapper and then exec olwm with # its real name. exec /usr/bin/olwm "$@" debian/compat0000644000000000000000000000000211532261543010366 0ustar 5 debian/olwm.menu-method0000644000000000000000000000133111532261543012310 0ustar #!/usr/bin/install-menu compat="menu-1" !include menu.h outputencoding="ISO-8859-1" # There's no way to escape " in a menu title, so replace it with ' function esctitle()=replacewith(title(),"\"","'") supported x11 = " \"" esctitle() "\" exec " $command "\n" text= " \"" esctitle() "\" exec " term() "\n" olwmcmd=" \"" esctitle() "\" " $command "\n" endsupported startmenu="\"" esctitle() "\" TITLE\n" endmenu="\"" esctitle() "\" END PIN\n" submenutitle="\n\"" esctitle() "\" MENU\n" treewalk="(M)" mainmenutitle="Debian" genmenu="openwin-menu-debian" rootprefix="/etc/X11/olwm/" userprefix=".olwm" preoutput="# Automatically generated file. DO NOT EDIT (see /usr/share/doc/menu/README)\n\n" debian/olvwm.menu0000644000000000000000000000046311532261543011225 0ustar ?package(olvwm):needs="wm" section="Window Managers" \ title="Olvwm"\ command="/usr/bin/olvwm"\ longtitle="OpenLook virtual window manager"\ description="Olvwm: extended version of olwm, the original\ OpenLook window manager, enhanced for handling of virtual desktops." debian/olvwm.menu-method0000644000000000000000000000133611532261543012503 0ustar #!/usr/bin/install-menu compat="menu-1" !include menu.h outputencoding="ISO-8859-1" # There's no way to escape " in a menu title, so replace it with ' function esctitle()=replacewith(title(),"\"","'") supported x11 = " \"" esctitle() "\" exec " $command "\n" text= " \"" esctitle() "\" exec " term() "\n" olvwmcmd=" \"" esctitle() "\" " $command "\n" endsupported startmenu="\"" esctitle() "\" TITLE\n" endmenu="\"" esctitle() "\" END PIN\n" submenutitle="\n\"" esctitle() "\" MENU\n" treewalk="(M)" mainmenutitle="Debian" genmenu="openwin-menu-debian" rootprefix="/etc/X11/olvwm/" userprefix=".olvwm" preoutput="# Automatically generated file. DO NOT EDIT (see /usr/share/doc/menu/README)\n\n" debian/olvwm.openwin-menu0000644000000000000000000000222611532261543012701 0ustar # # example olvwm root menu # "Root Menu" TITLE "Shells" MENU "Shells" TITLE "bash" exec x-terminal-emulator -title bash -e bash "csh" exec x-terminal-emulator -title csh -e csh "tcsh" exec x-terminal-emulator -title tcsh -e tcsh "sh" exec x-terminal-emulator -title sh -e sh "Shells" END PIN "Tools" MENU "Tools" TITLE "Manual Pages.." exec xman "Edit resources..." exec editres "View resources..." exec viewres "Font Selector..." exec xfontsel "Clipboard..." exec xclipboard "Magnifying glass..." exec xmag "Calculator..." exec xcalc "Tools" END PIN "Debian" INCLUDE /etc/X11/olvwm/openwin-menu-debian "WM Utilities" MENU "Refresh" DEFAULT REFRESH "Properties..." PROPERTIES "Window Controls" MENU "Open/Close" DEFAULT OPEN_CLOSE_SELN "Full/Restore Size" FULL_RESTORE_SIZE_SELN "Back" BACK_SELN "Quit" QUIT_SELN "Window Controls" END PIN "Window Menu..." WINMENU "Save Workspace" SAVE_WORKSPACE "Restart olvwm" RESTART "WM Utilities" END PIN "X binaries..." DIRMENU /usr/bin/X11 "Exit from X..." EXIT debian/source/0000755000000000000000000000000011613017556010473 5ustar debian/source/format0000644000000000000000000000001411613017556011701 0ustar 3.0 (quilt) debian/olvwm.postrm0000644000000000000000000000020711532261543011601 0ustar #!/bin/sh set -e #DEBHELPER# if [ "$1" = purge ]; then rm -f /etc/X11/olvwm/openwin-menu-debian rmdir /etc/X11/olvwm || true fi debian/xviewg.postinst0000644000000000000000000000011411532261543012302 0ustar #!/bin/sh set -e #DEBHELPER# if [ "$1" = configure ]; then ldconfig fi debian/olwm.README0000644000000000000000000000067311532261543011033 0ustar olwm for DEBIAN =============== - Differences to other olwm's: There's only one little difference: This olwm also looks in /etc/X11/olwm for its default menu file (openwin-menu), because there's usually no /usr/openwin on Debian systems, and the Linux filesystem standard requires configuration files to reside under /etc. Roman Hodek , Tue, 7 Jan 1997 Martin Buck debian/xview-clients.dirs0000644000000000000000000000011311532261543012647 0ustar usr/bin usr/share/locale/C/props usr/share/man/man1 usr/share/openwin/help debian/fixinfo0000644000000000000000000000023711532261543010557 0ustar # Comment out all lines that try to call "helpopen", because that's # not available on Linux perl -p -i -e 's/^(:[^:]+):.*\/bin\/helpopen .*$/#$&\n$1/;' "$@" debian/xviewg-dev.dirs0000644000000000000000000000025511532261543012142 0ustar usr/bin usr/include/olgx usr/include/olgx_private usr/include/xview usr/include/xview_private usr/include/pixrect usr/lib/X11/config usr/share/doc/xviewg usr/share/man/man1 debian/olwm.postinst0000644000000000000000000000074111613065152011753 0ustar #!/bin/sh set -e #DEBHELPER# if [ "$1" = configure ]; then # Remove old alternative (if it's still there) update-alternatives --remove x-window-manager /usr/bin/X11/olwm > /dev/null 2>&1 || true # ...and install new one that now points to the wrapper update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/olwm-x-window-manager 44 \ --slave /usr/share/man/man1/x-window-manager.1.gz x-window-manager.1.gz /usr/share/man/man1/olwm.1.gz fi debian/olvwm.dirs0000644000000000000000000000017011532261543011215 0ustar etc/X11/olvwm etc/menu-methods usr/bin usr/share/doc/olvwm usr/share/man/man1 usr/share/man/man5 usr/share/openwin/help debian/xviewg.dirs0000644000000000000000000000023311532261543011362 0ustar etc/X11/xview usr/bin usr/include/X11/bitmaps usr/include/images usr/lib usr/share/doc/xviewg usr/share/man/man1 usr/share/man/man7 usr/share/openwin/help debian/olvwm.changelog.old0000644000000000000000000000521111532261543012761 0ustar This is the old changelog for olvwm. It dates back to the time when olvwm was built from a separate source package. olvwm (4.1-7) unstable; urgency=low * Remove xserver and xfntbase from dependency list; olvwm doesn't require a local X server or fonts, those can be on a remote machine, too. (Fixes #8780) * Don't use files in /tmp in postinst anymore, cause they're a potential security hole. (Fixes #11790) * Changed menu entry to long format supported by menu-1.3. Also added suggestion of menu. * Replace -I/usr/include/bsd in MORECCFLAGS by -D__USE_BSD and -D__USE_BSD_SIGNAL. /usr/include/bsd doesn't exist anymore in a libc6 environment. (But, BTW, olvwm is still libc5, libc6 X libs and xpm are still missing...) * olvwm crashed when it couldn't load a font... I now patched it so that it tries to load "fixed" as a default and print a warning (resource.c, function cvtFont, line 1139). -- Roman Hodek Wed, 13 Aug 1997 16:50:26 +0200 olvwm (4.1-6) unstable; urgency=low * Search /etc/X11/olvwm before other system directories for openwin-menu, so that xview's file doesn't get precedence over olvwm's own one. (fixes Bug #... don't have the number at hand :-() -- Roman Hodek Sun, 30 Mar 1997 14:22:28 +0200 olvwm (4.1-5) unstable; urgency=low * Added TrueColor patch (don't fall back to black&white mode) (Bug #6626) * Changed optimization options to include -fomit-frame-pointer -- Roman Hodek Tue, 11 Feb 1997 08:53:16 +0100 olvwm (4.1-4) unstable; urgency=low * Removed database: line in /etc/menu-methods/olvwm * Priority changed to optional -- Roman Hodek Mon, 13 Jan 1997 10:21:14 +0100 olvwm (4.1-3) unstable; urgency=low * Typo in /etc/menu-methods/olvwm fixed (create user menu files with correct names) * Remove obsolete diversion of /usr/X11R6/lib/openwin-menu, if present. -- Roman Hodek Thu, 9 Jan 1997 19:12:39 +0100 olvwm (4.1-2) unstable; urgency=low * openwin-menu can be seen as config file, thus it has been moved to /etc/X11/olvwm/openwin-menu. Also listed as conffile. * Provide description and method for menu package (thanks Joost for great support with this!). -- Roman Hodek Wed, 8 Jan 1997 17:11:59 +0100 olvwm (4.1-1) unstable; urgency=low * Initial Release. -- Roman Hodek Sat, 21 Dec 1996 11:38:06 +0100 Local variables: mode: debian-changelog End: debian/NOTES0000644000000000000000000000464411532261543010013 0ustar Rationale for dependcies: Package: xviewg Depends: ${shlibs:Depends} Suggests: indent Conflicts: xview (<< 3.2p1.4-1) /*Replaces: xview*/ Replaces old libc5 xview package. Suggests indent because /usr/openwin/lib/text_extras_menu may call it. Package: xviewg-dev Depends: xviewg (= ${Source-Version}), libc6-dev, xlib6g-dev Conflicts: xview-dev (<< 3.2p1.4-1) /*Replaces: xview-dev*/ Replaces old libc5 xview-dev package. Make sure corresponding shared library package (xviewg), libc6-development and xlib-development packages are installed. Package: xview Depends: ${shlibs:Depends}, xviewg (= ${Source-Version}) Contains only libc5-compatibility libraries, xviewg required for other support/config files. Package: xview-altdev Depends: xview (= ${Source-Version}), xviewg (= ${Source-Version}), xviewg-dev (= ${Source-Version}), libc5-altdev, xlib6-altdev (>= 3.3.5-2) Contains only libc5-compatibility libraries, xviewg-dev required for other support/header files. Make sure corresponding shared library package (xview) libc5-development and xlib-development packages are installed. xlib6-altdev must be 3.3.5-2 or above, because earlier versions containted /usr/*-linuxlibc1/include/X11/bitmaps as a directory, while it's a symlink in later versions (don't know when exactly the switch happened). If it's a symlink, we don't have to put our own bitmaps in there, because the link points to the directory where xviewg already installed them. Package: xview-clients Depends: ${shlibs:Depends} Suggests: xtoolplaces Suggests xtoolplaces because it contains a wrapper script called `owplaces' that calls xtoolplaces. Package: xview-examples Depends: ${shlibs:Depends} Suggests: xview-dev Suggests xview-dev because you probably only want the examples if you actually do XView development. Package: olwm Depends: ${shlibs:Depends} Suggests: menu (>= 1.3), xview-clients Conflicts: xview (<< 3.2p1.4-1), olvwm (<< 4.1.3.2p1.4-1) Suggests xview-clients because olwm can use owplaces to store the current desktop. Conflicts with old xview packages because olwm was contained in them back then. Conflicts with old olvwm because it contained a broken diversion that caused olvwm to overwrite olwm's manpage. Package: olvwm Depends: ${shlibs:Depends} Suggests: menu (>= 1.3), xview-clients, olwm Suggests xview-clients because olvwm can use owplaces to store the current desktop. Suggests olwm because it contains olwmslave which can be used by olvwm. debian/xviewg.postrm0000644000000000000000000000020111532261543011740 0ustar #!/bin/sh set -e #DEBHELPER# case "$1" in purge) rmdir /etc/X11/xview || true ;; remove) ldconfig ;; esac debian/olwm.openwin-menu0000644000000000000000000000211511532261543012510 0ustar # # example olwm root menu # "Root Menu" TITLE "Shells" MENU "Shells" TITLE "bash" exec x-terminal-emulator -title bash -e bash "csh" exec x-terminal-emulator -title csh -e csh "tcsh" exec x-terminal-emulator -title tcsh -e tcsh "sh" exec x-terminal-emulator -title sh -e sh "Shells" END PIN "Tools" MENU "Tools" TITLE "Manual Pages.." exec xman "Edit resources..." exec editres "View resources..." exec viewres "Font Selector..." exec xfontsel "Clipboard..." exec xclipboard "Magnifying glass..." exec xmag "Calculator..." exec xcalc "Tools" END PIN "Debian" INCLUDE /etc/X11/olwm/openwin-menu-debian "WM Utilities" MENU "Refresh" DEFAULT REFRESH "Properties..." PROPERTIES "Window Controls" MENU "Open/Close" DEFAULT OPEN_CLOSE_SELN "Full/Restore Size" FULL_RESTORE_SIZE_SELN "Back" BACK_SELN "Quit" QUIT_SELN "Window Controls" END PIN "Save Workspace" SAVE_WORKSPACE "Restart olwm" RESTART "WM Utilities" END PIN "Exit from X..." EXIT debian/xviewg.preinst0000644000000000000000000000151311532261543012107 0ustar #!/bin/sh set -e #DEBHELPER# # Remove a no-longer used conffile. Borrowed from # http://wiki.debian.org/DpkgConffileHandling rm_conffile() { local PKGNAME="$1" local CONFFILE="$2" [ -e "$CONFFILE" ] || return 0 local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')" local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \ sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")" if [ "$md5sum" != "$old_md5sum" ]; then echo "Obsolete conffile $CONFFILE has been modified by you." echo "Saving as $CONFFILE.dpkg-bak ..." mv -f "$CONFFILE" "$CONFFILE".dpkg-bak else echo "Removing obsolete conffile $CONFFILE ..." rm -f "$CONFFILE" fi } case "$1" in install|upgrade) if dpkg --compare-versions "$2" le "3.2p1.4-23"; then rm_conffile xviewg "/etc/X11/xview/textswrc" fi esac debian/olwm.dirs0000644000000000000000000000014311532261543011027 0ustar etc/X11/olwm etc/menu-methods usr/bin usr/share/doc/olwm usr/share/man/man1 usr/share/openwin/help debian/olwm.postrm0000644000000000000000000000020511532261543011411 0ustar #!/bin/sh set -e #DEBHELPER# if [ "$1" = purge ]; then rm -f /etc/X11/olwm/openwin-menu-debian rmdir /etc/X11/olwm || true fi debian/rules0000755000000000000000000001762211624347410010260 0ustar #!/usr/bin/make -f instdir = debian/tmpinst export OPENWINHOME = /usr export X11DIR= /usr ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) export EXTRA_CFLAGS = -O0 else export EXTRA_CFLAGS = endif define clean -rm -f build-clean build-other build-stamp install-stamp bash Build-LinuxXView.bash clean dh_clean -rm -fr $(instdir) -rm -f debian/copyright endef build: build-stamp build-stamp: build-clean build-other touch build-stamp build-clean: $(clean) touch build-clean build-other: dh_testdir bash Build-LinuxXView.bash libs bash Build-LinuxXView.bash clients bash Build-LinuxXView.bash contrib bash Build-LinuxXView.bash olvwm touch build-other clean: dh_testdir dh_testroot $(clean) install: install-stamp install-stamp: install-clean install-other install-pkg-other touch install-stamp install-clean: dh_testdir dh_testroot dh_clean -rm -fr $(instdir) # Install compiled files into one common hierarchy install-other: build-stamp dh_testdir dh_testroot -rm -fr $(instdir) DESTDIR="`pwd`/$(instdir)" bash Build-LinuxXView.bash instlibs mv $(instdir)$(OPENWINHOME)/share/openwin/help/clock.info $(instdir)$(OPENWINHOME)/share/openwin/help/clock.info.keep DESTDIR="`pwd`/$(instdir)" bash Build-LinuxXView.bash instclients DESTDIR="`pwd`/$(instdir)" bash Build-LinuxXView.bash instcontrib DESTDIR="`pwd`/$(instdir)" bash Build-LinuxXView.bash instolvwm mv $(instdir)$(OPENWINHOME)/share/openwin/help/clock.info.keep $(instdir)$(OPENWINHOME)/share/openwin/help/clock.info sh debian/fixinfo $(instdir)$(OPENWINHOME)/share/openwin/help/*.info # Shuffle files around from single install hierarchy into package subdirectories install-pkg-other: build-stamp dh_testdir dh_testroot dh_clean dh_installdirs # xviewg set -e && for file in text_extras_menu ttyswrc; do \ mv $(instdir)$(OPENWINHOME)/lib/.$$file debian/xviewg/etc/X11/xview/$$file; \ done mv $(instdir)$(OPENWINHOME)/lib/lib*.so.*.*.* $(instdir)$(OPENWINHOME)/lib/lib*.so.? debian/xviewg$(OPENWINHOME)/lib # We depend on xbitmaps, so only move the bitmaps not provided by it. set -e && for file in txtdup txtdupmask txtdupmore txtdupok txtdupokmask txtdupokmore \ txtmv txtmvmask txtmvmore txtmvok txtmvokmask txtmvokmore wierd_size; do\ mv $(instdir)$(OPENWINHOME)/include/bitmaps/$$file debian/xviewg$(OPENWINHOME)/include/X11/bitmaps; \ done mv $(instdir)$(OPENWINHOME)/include/images/* debian/xviewg$(OPENWINHOME)/include/images set -e && for prog in capitalize insert_brackets remove_brackets shift_lines; do \ cp contrib/misc/$$prog debian/xviewg$(OPENWINHOME)/bin; \ chmod +x debian/xviewg$(OPENWINHOME)/bin/$$prog; \ cp contrib/misc/$$prog.1 debian/xviewg$(OPENWINHOME)/share/man/man1; \ done set -e && for info in textsw ttysw xview; do \ mv $(instdir)$(OPENWINHOME)/share/openwin/help/$$info.info debian/xviewg$(OPENWINHOME)/share/openwin/help; \ done mv $(instdir)$(OPENWINHOME)/man/man1/xview.1x debian/xviewg$(OPENWINHOME)/share/man/man7/xview.7 mv $(instdir)$(OPENWINHOME)/share/doc/xview/whats_new.ps debian/xviewg/usr/share/doc/xviewg cat debian/xview-info.head $(instdir)$(OPENWINHOME)/share/doc/xview/xview-info \ > debian/xviewg/usr/share/doc/xviewg/xview-info # xviewg-dev mv $(instdir)$(OPENWINHOME)/lib/lib*.a $(instdir)$(OPENWINHOME)/lib/lib*.so debian/xviewg-dev$(OPENWINHOME)/lib set -e && for file in xgettext msgfmt; do \ mv $(instdir)$(OPENWINHOME)/bin/$$file debian/xviewg-dev$(OPENWINHOME)/bin/xview_$$file; \ mv $(instdir)$(OPENWINHOME)/man/man1/$$file.1 debian/xviewg-dev$(OPENWINHOME)/share/man/man1/xview_$$file.1; \ done set -e && for dir in olgx pixrect xview_private olgx_private xview; do \ mv $(instdir)$(OPENWINHOME)/include/$$dir/* debian/xviewg-dev$(OPENWINHOME)/include/$$dir; \ done mv $(instdir)$(OPENWINHOME)/lib/X11/config/* debian/xviewg-dev$(OPENWINHOME)/lib/X11/config mv $(instdir)$(OPENWINHOME)/share/doc/xview/*api* debian/xviewg-dev/usr/share/doc/xviewg # xview-clients set -e && for file in clock cmdtool shelltool props textedit; do \ mv $(instdir)$(OPENWINHOME)/bin/$$file debian/xview-clients$(OPENWINHOME)/bin; \ mv $(instdir)$(OPENWINHOME)/man/man1/$$file.1x debian/xview-clients$(OPENWINHOME)/share/man/man1/$$file.1; \ done # cp contrib/misc/owplaces debian/xview-clients$(OPENWINHOME)/bin set -e && for file in clock.info props.info textedit.info; do \ mv $(instdir)$(OPENWINHOME)/share/openwin/help/$$file debian/xview-clients$(OPENWINHOME)/share/openwin/help/$$file; \ done cp contrib/misc/props-locale.C debian/xview-clients$(OPENWINHOME)/share/locale/C/props/C cp contrib/misc/props-locale.basic_setting debian/xview-clients$(OPENWINHOME)/share/locale/C/props/basic_setting # xview-examples mv $(instdir)$(OPENWINHOME)/share/src/xview/examples/bin/* debian/xview-examples/usr/lib/xview/examples rmdir $(instdir)$(OPENWINHOME)/share/src/xview/examples/bin chmod +x debian/xview-examples/usr/lib/xview/examples/* mv $(instdir)$(OPENWINHOME)/share/src/xview/examples/* debian/xview-examples/usr/share/doc/xviewg/examples ln -s ../../../../lib/xview/examples debian/xview-examples/usr/share/doc/xviewg/examples/bin mv $(instdir)$(OPENWINHOME)/lib/.textswrc debian/xview-examples/usr/share/doc/xviewg/examples/textswrc # olvwm mv $(instdir)$(OPENWINHOME)/bin/olvwm debian/olvwm$(OPENWINHOME)/bin mv $(instdir)$(OPENWINHOME)/man/man1/olvwm.1x debian/olvwm$(OPENWINHOME)/share/man/man1/olvwm.1 mv $(instdir)$(OPENWINHOME)/man/man1/olvwmrc.1x debian/olvwm$(OPENWINHOME)/share/man/man5/olvwmrc.5 sed -e 's/TH olwm 1/TH olwm 1olvwm/' < $(instdir)$(OPENWINHOME)/man/man1/olwm.1x > debian/olvwm$(OPENWINHOME)/share/man/man1/olwm.1olvwm mv $(instdir)$(OPENWINHOME)/share/openwin/help/olvwm.info debian/olvwm$(OPENWINHOME)/share/openwin/help cp debian/olvwm-x-window-manager debian/olvwm$(OPENWINHOME)/bin chmod +x debian/olvwm$(OPENWINHOME)/bin/olvwm-x-window-manager cp debian/olvwm.openwin-menu debian/olvwm/etc/X11/olvwm/openwin-menu cp debian/olvwm.changelog.old debian/olvwm/usr/share/doc/olvwm/changelog.Debian-old cp debian/olvwm.README debian/olvwm/usr/share/doc/olvwm/README.debian # olwm mv $(instdir)$(OPENWINHOME)/bin/olwm* debian/olwm$(OPENWINHOME)/bin set -e && for file in olwm olwmslave; do \ mv $(instdir)$(OPENWINHOME)/man/man1/$$file.1x debian/olwm$(OPENWINHOME)/share/man/man1/$$file.1; \ done set -e && for file in olwm.info workspace.info; do \ mv $(instdir)$(OPENWINHOME)/share/openwin/help/$$file debian/olwm$(OPENWINHOME)/share/openwin/help/$$file; \ done cp debian/olwm-x-window-manager debian/olwm$(OPENWINHOME)/bin chmod +x debian/olwm$(OPENWINHOME)/bin/olwm-x-window-manager cp debian/olwm.openwin-menu debian/olwm/etc/X11/olwm/openwin-menu mv $(instdir)$(OPENWINHOME)/lib/openwin-menu debian/olwm/etc/X11/olwm/openwin-menu.orig mv $(instdir)$(OPENWINHOME)/lib/openwin-menu-programs debian/olwm/etc/X11/olwm cp debian/olwm.README debian/olwm/usr/share/doc/olwm/README.debian binary: binary-indep binary-arch binary-indep: build dh_testdir dh_testroot binary-arch: binary-other binary-other: install cat debian/copyright.head LEGAL_NOTICE > debian/copyright dh_installdocs dh_installchangelogs dh_installmenu dh_strip dh_link # Don't compress source code/Makefiles in the examples directory, because having a # mixture of compressed/uncompressed files there is really stupid. dh_compress -Xusr/share/doc/xviewg/examples/ dh_fixperms dh_installdeb install -m 644 debian/shlibs.local debian/xviewg/DEBIAN/shlibs dh_shlibdeps -ldebian/xviewg$(OPENWINHOME)/lib # Prevent xviewg from depending on itself (this happens most likely because libxview # needs libolgx and nobody notices that it's in the same package) sh debian/fixdeps xviewg debian/xviewg.substvars dh_gencontrol -Nolvwm # Concatenate olvwm's and XView's version number to make both dpkg and our users happy. :-) dh_gencontrol -polvwm -u-v"4.4.`dpkg-parsechangelog | grep '^Version: ' | cut -d' ' -f2`" dh_md5sums dh_builddeb .PHONY: build clean install binary binary-arch binary-indep debian/copyright.head0000644000000000000000000000167411532261543012033 0ustar This is Debian GNU/Linux's prepackaged version of Sun's xview/olwm/olvwm. Miscellaneous patches were contributed by: Kenneth Osterberg Joern Lubkoll Oleg Kibirev Wolfram Gloger E. Zimmermann Rainer Wiesner Sven Rudolph Sebastiano Suraci Frodo Looijaard Roman Hodek Martin Buck This package was put together by Sven Rudolph , from sources obtained from: sunsite.unc.edu:/pub/Linux/libs/X/xview/xview3.2p1-X11R6-LinuxELF.2.src.tar.gz Starting with xview-3.2p1.4-1, the XView packages are maintained by Martin Buck , who also maintains the upstream version ftp://sunsite.unc.edu/pub/Linux/libs/X/xview/xview3.2p1.4.src.tar.gz at the moment. Copyright: debian/xview-info.head0000644000000000000000000000036111532261543012106 0ustar Please note that the sections "Reporting Bugs" and "Getting Help" are mostly obsolete these days. The E-mail addresses mentioned there no longer seem to work. ------------------------------------------------------------------------------- debian/olvwm.postinst0000644000000000000000000000171211613025137012137 0ustar #!/bin/sh set -e # remove obsolete diversions if dpkg-divert --list | \ grep -q '^diversion of /usr/X11R6/lib/openwin-menu to .* by olvwm$'; then dpkg-divert --package olvwm --remove --rename \ --divert /usr/X11R6/lib/openwin-menu.xview /usr/X11R6/lib/openwin-menu fi if dpkg-divert --list | \ grep -q '^diversion of /usr/share/man/man1/olwm.1x to .* by olvwm$'; then dpkg-divert --package olvwm --remove --rename \ --divert /usr/share/man/man1/olwm.1x.xview /usr/share/man/man1/olwm.1x fi #DEBHELPER# if [ "$1" = configure ]; then # Remove old alternative (if it's still there) update-alternatives --remove x-window-manager /usr/bin/X11/olvwm > /dev/null 2>&1 || true # ...and install new one that now points to the wrapper update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/olvwm-x-window-manager 45 \ --slave /usr/share/man/man1/x-window-manager.1.gz x-window-manager.1.gz /usr/share/man/man1/olvwm.1.gz fi debian/patches/0000755000000000000000000000000011613070531010612 5ustar debian/patches/series0000644000000000000000000000005211613067266012037 0ustar debian-changes-3.2p1.4-26 display_setting debian/patches/debian-changes-3.2p1.4-260000644000000000000000000122306311613070531014524 0ustar Description: Upstream changes introduced in version 3.2p1.4-26 This patch has been created by dpkg-source during the package build. Here's the last changelog entry, hopefully it gives details on why those changes were made: . xview (3.2p1.4-26) unstable; urgency=low . * QA upload * source format 3.0 (quilt): - add debian/source/format * Patch display_setting: fix setting of the DISPLAY variable in case the original value did not contain a screen number. Thanks a lot to Alan Braslau for submitting the patch! (closes: #617236, #635154) * debian/ol[v]wm.postinst: replace /usr/X11R6/man -> /usr/share/man, /usr/bin/x11 -> /usr/bin (closes: #411131, #617211) * debian/control: added ${misc:Depends} to Depends field of all packages . The person named in the Author field signed this changelog entry. Author: Ralf Treinen Bug-Debian: http://bugs.debian.org/411131 Bug-Debian: http://bugs.debian.org/617211 Bug-Debian: http://bugs.debian.org/617236 Bug-Debian: http://bugs.debian.org/635154 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Bug-Ubuntu: https://launchpad.net/bugs/ Forwarded: Reviewed-By: Last-Update: --- xview-3.2p1.4.orig/Build-LinuxXView.bash +++ xview-3.2p1.4/Build-LinuxXView.bash @@ -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 @@ fi # 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 < ../$DIRNAME.bin.tar.gz ;; srctar) @@ -134,13 +139,13 @@ while [ $# -gt 0 ]; do 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 @@ while [ $# -gt 0 ]; do ( cd .. diff --context --recursive --new-file xview3.2p1-X11R6 $DIRNAME | gzip -9 > $DIRNAME.diff.gz - ) + ) || exit $? ;; esac shift --- xview-3.2p1.4.orig/imake +++ xview-3.2p1.4/imake @@ -7,4 +7,12 @@ echo "imake-wrapper: running imake $* in 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 --- xview-3.2p1.4.orig/xview.man +++ xview-3.2p1.4/xview.man @@ -1818,7 +1818,7 @@ ttysw.yieldModifiers .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 --- xview-3.2p1.4.orig/Imakefile +++ xview-3.2p1.4/Imakefile @@ -1,8 +1,14 @@ #include -/**/######################################################################### -/**/# 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. +#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 @@ CFLAGS = -O #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 @@ CFLAGS = -O #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 @@ MakeLintSubdirs(lib,install.ln,install.l 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 @@ World:: #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 @@ Clients:: @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 @@ Contrib:: @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..." --- xview-3.2p1.4.orig/util/Imakefile +++ xview-3.2p1.4/util/Imakefile @@ -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-3.2p1.4.orig/util/conversion/Imakefile +++ xview-3.2p1.4/util/conversion/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 @@ ALLFILES = $(SEDFILES) $(SCRIPTS) $(MAN_ 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 --- xview-3.2p1.4.orig/util/xgettext/xgettext.h +++ xview-3.2p1.4/util/xgettext/xgettext.h @@ -12,7 +12,7 @@ #include #else #include -#endif SVR4 +#endif /* SVR4 */ #include #include @@ -54,4 +54,4 @@ struct list_head { struct list_head *next_list; }; -#endif XGETTEXT_H_DEFINED +#endif /* XGETTEXT_H_DEFINED */ --- xview-3.2p1.4.orig/util/xgettext/xgettext.c +++ xview-3.2p1.4/util/xgettext/xgettext.c @@ -193,7 +193,7 @@ get_arguments(argc, argv, envp) switch (*cp) { - case NULL: + case 0: readstd++; break; --- xview-3.2p1.4.orig/util/xgettext/xgettext.man +++ xview-3.2p1.4/util/xgettext/xgettext.man @@ -30,7 +30,7 @@ xgettext \- conditionally extract string .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 --- xview-3.2p1.4.orig/util/xgettext/Imakefile +++ xview-3.2p1.4/util/xgettext/Imakefile @@ -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-3.2p1.4.orig/util/msgfmt/Imakefile +++ xview-3.2p1.4/util/msgfmt/Imakefile @@ -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-3.2p1.4.orig/util/cpp/Imakefile +++ xview-3.2p1.4/util/cpp/Imakefile @@ -1,10 +1,10 @@ #include -/**/# -/**/# 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 = --- xview-3.2p1.4.orig/config/XView.lib +++ xview-3.2p1.4/config/XView.lib @@ -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 --- xview-3.2p1.4.orig/config/XView.rules.xstr +++ xview-3.2p1.4/config/XView.rules.xstr @@ -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. /* *********************************************************************** --- xview-3.2p1.4.orig/config/XView.rules +++ xview-3.2p1.4/config/XView.rules @@ -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 @@ install:: @@\ * 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 @@ lib/**/libname.so.rev:: solist @@\ @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 @@ lib/**/libname.so.rev:: solist @@\ * 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 @@ lib/**/libname.sa.rev:: salist @@\ 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 @@ lib/**/libname.sa.rev:: salist @@\ * 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 @@ lib/**/libname.so.rev:: solist @@\ clean:: @@\ $(RM) lib/**/libname.so.rev sodir/?*.o strings* -#endif /* !__linux */ +#endif /* !__linux__ */ #endif /* SubdirBuildNormalSharedLibraryTarget */ @@ -190,12 +204,12 @@ clean:: @@\ * 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 @@ lib/**/libname.so.rev:: solist @@\ clean:: @@\ $(RM) lib/**/libname.so.rev sodir/?*.o strings* xstrings* -#endif /* !__linux */ +#endif /* !__linux__ */ #endif /* SubdirBuildSortedSharedLibraryTarget */ /* @@ -226,10 +240,10 @@ clean:: @@\ #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 @@ lib/**/libname.sa.rev:: @@\ 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 @@ clean:: @@\ #endif /* SubdirBuildNormalSharedLibraryDataTarget */ -#endif /* !__linux */ +#endif /* !__linux__ */ #endif /* DoRanlibCmd */ /* @@ -277,6 +291,26 @@ clean:: @@\ * 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 @@ clean:: @@\ -@if [ -d shared ]; then echo " $(RM) shared/?*.o"; \ @@\ $(RM) shared/?*.o; else exit 0; fi @@\ +#endif /* !__linux__ */ #endif /* SubdirSharedLibraryObjectRule */ /* @@ -380,9 +415,9 @@ objs: depends @@\ * 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 @@ install:: @@\ #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 @@ install:: @@\ (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 @@ NamedTargetSubdirs(populate,dirs,"popula #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 */ --- xview-3.2p1.4.orig/config/XView.obj +++ xview-3.2p1.4/config/XView.obj @@ -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 @@ NormalLibraryObjectRule() */ #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 @@ SubdirSpecialSharedObjectRule($(DATA_OBJ SubdirNormalSharedLibraryDataTarget(${LIBTARGET},${SOREV},$(DATA_OBJS),$(UNSHARED_DIR),.) # endif -#endif /* __linux */ +#endif /* __linux__ */ # if DebugLibXView --- xview-3.2p1.4.orig/config/XView.prog +++ xview-3.2p1.4/config/XView.prog @@ -1,4 +1,4 @@ -/**/# @(#)XView.prog 1.6 28 Jun 1993 SMI +XCOMM # @(#)XView.prog 1.6 28 Jun 1993 SMI PopulateSCCSTree(h,$(ALLFILES)) --- xview-3.2p1.4.orig/config/XView.cf +++ xview-3.2p1.4/config/XView.cf @@ -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 --- xview-3.2p1.4.orig/config/Imakefile +++ xview-3.2p1.4/config/Imakefile @@ -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 --- xview-3.2p1.4.orig/config/XView.tmpl +++ xview-3.2p1.4/config/XView.tmpl @@ -2,10 +2,10 @@ #define XViewTmpl YES #include -/**/########################################################################### -/**/# @(#)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 --- xview-3.2p1.4.orig/clients/Imakefile +++ xview-3.2p1.4/clients/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/clients/olwm/winframe.c +++ xview-3.2p1.4/clients/olwm/winframe.c @@ -72,6 +72,7 @@ void FrameUpdateShape(); static void setIMStatusText(); #endif static void updateResizePositions(); +static int headerHeight(Client *cli, Graphics_info *gis); /*************************************************************************** * sizing and decoration positioning functions @@ -930,7 +931,7 @@ Client *cli; 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 @@ XWindowAttributes *paneattrs; /* 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. */ --- xview-3.2p1.4.orig/clients/olwm/mem.c +++ xview-3.2p1.4/clients/olwm/mem.c @@ -137,7 +137,7 @@ MemAlloc(sz { void *p; -#ifdef __linux +#ifdef __linux__ if (!sz) /* Linux malloc(0) returns NULL, unlike BSD */ sz = 1; #endif --- xview-3.2p1.4.orig/clients/olwm/menu.c +++ xview-3.2p1.4/clients/olwm/menu.c @@ -109,6 +109,7 @@ static Bool isClick(); int MenuTrack(); void DrawLocCursor(); +static Bool isEnabled(MenuInfo *mInfo, int item); /* ***************************************************************************** --- xview-3.2p1.4.orig/clients/olwm/events.c +++ xview-3.2p1.4/clients/olwm/events.c @@ -579,7 +579,7 @@ AwaitEvents(dpy, timeout) if (timeout->tv_sec < 0) return False; -#ifndef __linux +#ifndef __linux__ (void) gettimeofday(&starttime, NULL); #endif @@ -615,7 +615,7 @@ AwaitEvents(dpy, timeout) * 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); --- xview-3.2p1.4.orig/clients/olwm/olwm.c +++ xview-3.2p1.4/clients/olwm/olwm.c @@ -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 @@ ExitOLWM() static void handleChildSignal() { -#ifdef __linux +#ifdef __linux__ /* Reinitialize signal catcher */ signal(SIGCHLD, handleChildSignal); #endif --- xview-3.2p1.4.orig/clients/olwm/mem.h +++ xview-3.2p1.4/clients/olwm/mem.h @@ -36,7 +36,7 @@ extern int AcctTag; #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 @@ extern int AcctTag; #define MemNewText(s) MemNewString((char *)s) -#endif OW_I18N_L4 +#endif /* OW_I18N_L4 */ -#endif _OLWM_MEM_H +#endif /* _OLWM_MEM_H */ --- xview-3.2p1.4.orig/clients/olwm/slave.c +++ xview-3.2p1.4/clients/olwm/slave.c @@ -44,7 +44,7 @@ static SlaveInfo slaveInfo = { * Local Forward Declarations * ---------------------------------------------------------------------*/ -void SlaveFailure(); +static void SlaveFailure(); /* ---------------------------------------------------------------------- @@ -87,7 +87,7 @@ SlaveStart(argv) case 0: /* Slave */ dup2(input[0],0); dup2(output[1],1); -#ifndef __linux +#ifndef __linux__ if (getrlimit(RLIMIT_NOFILE,&rlimit) == -1) maxfd = 0; else --- xview-3.2p1.4.orig/clients/olwm/services.c +++ xview-3.2p1.4/clients/olwm/services.c @@ -80,7 +80,7 @@ execCommand(winInfo,cmd) 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 @@ PshFunc(dpy, winInfo, menuInfo, idx) 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()); --- xview-3.2p1.4.orig/clients/olwm/gettext.c +++ xview-3.2p1.4/clients/olwm/gettext.c @@ -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; --- xview-3.2p1.4.orig/clients/olwm/screen.c +++ xview-3.2p1.4/clients/olwm/screen.c @@ -111,6 +111,12 @@ static XrmQuark reverseVideoIQ; 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 --- xview-3.2p1.4.orig/clients/olwm/cmdstream.c +++ xview-3.2p1.4/clients/olwm/cmdstream.c @@ -51,10 +51,10 @@ static CmdInfo cmdInfo = { * Local Forward Declarations * ---------------------------------------------------------------------*/ -Command *MatchCommand(); -CmdAttr *MatchAttr(); -int EncodeAttrValue(); -int DecodeAttrValue(); +static Command *MatchCommand(); +static CmdAttr *MatchAttr(); +static int EncodeAttrValue(); +static int DecodeAttrValue(); /* ---------------------------------------------------------------------- * SetCmdStream --- xview-3.2p1.4.orig/clients/olwm/st.c +++ xview-3.2p1.4/clients/olwm/st.c @@ -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)(); --- xview-3.2p1.4.orig/clients/olwm/usermenu.c +++ xview-3.2p1.4/clients/olwm/usermenu.c @@ -719,7 +719,7 @@ expandPath(pin, messages) /* * Menu Search Path */ -#define NUM_SEARCH_PATH 7 +#define NUM_SEARCH_PATH 8 static char **menuSearchPath; /* @@ -755,6 +755,11 @@ makeMenuSearchPath() /* $HOME/. */ sprintf(buf, "%s/.%%s", home); menuSearchPath[i++] = MemNewString(buf); + +#ifdef __linux__ + /* ++roman: /etc/X11/olwm/ */ + menuSearchPath[i++] = MemNewString("/etc/X11/olwm/%s"); +#endif #ifdef OW_I18N_L3 /* $OPENWINHOME/share/locale//olwm/ */ --- xview-3.2p1.4.orig/clients/olwm/resources.c +++ xview-3.2p1.4/clients/olwm/resources.c @@ -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 --- xview-3.2p1.4.orig/clients/olwm/winicon.c +++ xview-3.2p1.4/clients/olwm/winicon.c @@ -43,6 +43,10 @@ extern Bool PropGetWMIconName(); /* Class function vector */ static ClassIconFrame classIconFrame; +static int heightTopIcon(WinIconFrame *win); +static int heightBottomIcon(WinIconFrame *win); +static int widthBothIcon(WinIconFrame *win); + /*************************************************************************** * private event functions ***************************************************************************/ --- xview-3.2p1.4.orig/clients/olwm/usleep.c +++ xview-3.2p1.4/clients/olwm/usleep.c @@ -76,7 +76,7 @@ olwm_usleep(usec) setitimer(ITIMER_REAL, &old, (struct itimerval *)0); return 0; -#else SYSV +#else /* SYSV */ return usleep(usec); --- xview-3.2p1.4.orig/clients/olwm/Imakefile +++ xview-3.2p1.4/clients/olwm/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################### -/**/# @(#)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) --- xview-3.2p1.4.orig/clients/olwm/defaults.c +++ xview-3.2p1.4/clients/olwm/defaults.c @@ -57,7 +57,7 @@ GetUserDefaults(dpy) char *homedir = getenv("HOME"); char *envfile = getenv("XENVIRONMENT"); char hostname[100]; -#ifndef __linux +#ifndef __linux__ int namelen; #endif @@ -82,7 +82,7 @@ GetUserDefaults(dpy) 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))) { --- xview-3.2p1.4.orig/clients/olwm/i18n.c +++ xview-3.2p1.4/clients/olwm/i18n.c @@ -207,6 +207,6 @@ register unsigned char *s; s++; } } -#endif DEBUG +#endif /* DEBUG */ -#endif OW_I18N_L4 +#endif /* OW_I18N_L4 */ --- xview-3.2p1.4.orig/clients/textedit/textedit.c +++ xview-3.2p1.4/clients/textedit/textedit.c @@ -41,7 +41,7 @@ static char sccsid[] = "@(#)textedit.c 1 long textsw_store_file(); */ char *getwd(); -#ifndef __linux +#ifndef __linux__ char *sprintf(); #endif void frame_cmdline_help(); @@ -117,6 +117,8 @@ static char *option_names[] = { #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 @@ main(argc, argv) } 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 @@ textedit_main(argc, argv) * 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 @@ mysigproc(me, sig, when) 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 @@ mysigproc(me, sig, when) (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 @@ mysigproc(me, sig, when) (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 @@ Die: #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(); --- xview-3.2p1.4.orig/clients/textedit/Imakefile +++ xview-3.2p1.4/clients/textedit/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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) --- xview-3.2p1.4.orig/clients/textedit/textedit.man +++ xview-3.2p1.4/clients/textedit/textedit.man @@ -555,7 +555,7 @@ For more information see the .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; --- xview-3.2p1.4.orig/clients/olwmslave/i18n.h +++ xview-3.2p1.4/clients/olwmslave/i18n.h @@ -24,8 +24,8 @@ extern wchar_t *mbstowcsdup(); extern wchar_t *ctstowcsdup(); extern char *ctstombsdup(); extern char *wcstoctsdup(); -#endif OW_I18N_L4 +#endif /* OW_I18N_L4 */ -#endif i18n_DEFINED +#endif /* i18n_DEFINED */ --- xview-3.2p1.4.orig/clients/olwmslave/olwmslave.c +++ xview-3.2p1.4/clients/olwmslave/olwmslave.c @@ -44,9 +44,9 @@ char cmdBuf[CMDBUFLEN]; /* ---------------------------------------------------------------------- * Forward Definitions * ----------------------------------------------------------------------*/ -void InitScreenInfo(); -void ParseScreenArgs(); -Notify_value InputReader(); +static void InitScreenInfo(); +static void ParseScreenArgs(); +static Notify_value InputReader(); /* ---------------------------------------------------------------------- * main --- xview-3.2p1.4.orig/clients/olwmslave/propswin.c +++ xview-3.2p1.4/clients/olwmslave/propswin.c @@ -38,9 +38,9 @@ static WindowProps *winPropsList = 0; / * 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(); --- xview-3.2p1.4.orig/clients/olwmslave/mem.h +++ xview-3.2p1.4/clients/olwmslave/mem.h @@ -16,4 +16,4 @@ extern void MemFree(); /* free frontend #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 */ --- xview-3.2p1.4.orig/clients/olwmslave/cmdstream.c +++ xview-3.2p1.4/clients/olwmslave/cmdstream.c @@ -50,10 +50,10 @@ static CmdInfo cmdInfo = { * Local Forward Declarations * ---------------------------------------------------------------------*/ -Command *MatchCommand(); -CmdAttr *MatchAttr(); -int EncodeAttrValue(); -int DecodeAttrValue(); +static Command *MatchCommand(); +static CmdAttr *MatchAttr(); +static int EncodeAttrValue(); +static int DecodeAttrValue(); /* ---------------------------------------------------------------------- * SetCmdStream --- xview-3.2p1.4.orig/clients/olwmslave/helpwin.c +++ xview-3.2p1.4/clients/olwmslave/helpwin.c @@ -128,14 +128,15 @@ char *help_get_text(); * 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 --- xview-3.2p1.4.orig/clients/olwmslave/Imakefile +++ xview-3.2p1.4/clients/olwmslave/Imakefile @@ -1,12 +1,12 @@ #include -/**/######################################################################### -/**/# @(#)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 --- xview-3.2p1.4.orig/clients/olwmslave/helprecv.c +++ xview-3.2p1.4/clients/olwmslave/helprecv.c @@ -15,7 +15,7 @@ static char sccsid[] = "@(#) helprecv.c #include "helpcmd.h" extern int ShowHelpWindow(); - void ReceiveHelpCmd(); +static void ReceiveHelpCmd(); /* ---------------------------------------------------------------------- * RegisterHelpWindow --- xview-3.2p1.4.orig/clients/olwmslave/propsrecv.c +++ xview-3.2p1.4/clients/olwmslave/propsrecv.c @@ -15,7 +15,7 @@ static char sccsid[] = "@(#) propsre #include "propscmd.h" extern int ShowWindowProps(); - void ReceivePropsCmd(); +static void ReceivePropsCmd(); /* ---------------------------------------------------------------------- * RegisterPropsWindow --- xview-3.2p1.4.orig/clients/olwmslave/i18n.c +++ xview-3.2p1.4/clients/olwmslave/i18n.c @@ -143,6 +143,6 @@ register unsigned char *s; s++; } } -#endif DEBUG +#endif /* DEBUG */ #endif --- 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 @@ -1793,4 +1793,4 @@ olgx_draw_accel_choice_item(info, win, x } } -#endif SVR4 +#endif /* SVR4 */ --- xview-3.2p1.4.orig/clients/olvwm-4.1/atom.c +++ xview-3.2p1.4/clients/olvwm-4.1/atom.c @@ -73,11 +73,11 @@ Atom AtomSunOLWinAttr5; 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 @@ Display *dpy; 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); --- xview-3.2p1.4.orig/clients/olvwm-4.1/images.c +++ xview-3.2p1.4/clients/olvwm-4.1/images.c @@ -465,7 +465,7 @@ static unsigned char Move_bits[] = { 0x01, 0x00, 0xaa, 0x00, }; -#else SMALL_IMAGES +#else /* SMALL_IMAGES */ #define Back_width 32 #define Back_height 32 @@ -658,7 +658,7 @@ static unsigned char UnStick_bits[] = { 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 --- xview-3.2p1.4.orig/clients/olvwm-4.1/patchlevel.h +++ xview-3.2p1.4/clients/olvwm-4.1/patchlevel.h @@ -1 +1 @@ -#define PATCHLEVELv4 1 +#define PATCHLEVELv4 4 --- xview-3.2p1.4.orig/clients/olvwm-4.1/st.h +++ xview-3.2p1.4/clients/olvwm-4.1/st.h @@ -64,4 +64,4 @@ st_table *st_init_table(), *st_init_tabl int st_strhash(); -#endif ST_INCLUDED +#endif /* ST_INCLUDED */ --- xview-3.2p1.4.orig/clients/olvwm-4.1/evbind.c +++ xview-3.2p1.4/clients/olvwm-4.1/evbind.c @@ -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 @@ establishModBindings(dpy, newDB) */ typedef struct { - int state; + unsigned int state; int button; SemanticAction action; } MouseBinding; --- xview-3.2p1.4.orig/clients/olvwm-4.1/winframe.c +++ xview-3.2p1.4/clients/olvwm-4.1/winframe.c @@ -84,6 +84,7 @@ void FrameUpdateShape(); static void setIMStatusText(); #endif static void updateResizePositions(); +static int headerHeight(Client *cli, Graphics_info *gis); /*************************************************************************** * sizing and decoration positioning functions @@ -1048,7 +1049,7 @@ Client *cli; OLGX_NORMAL | TextOLGX); } } -#endif OW_I18N_L4 +#endif /* OW_I18N_L4 */ @@ -1908,7 +1909,7 @@ XWindowAttributes *paneattrs; /* 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. */ --- xview-3.2p1.4.orig/clients/olvwm-4.1/menu.c +++ xview-3.2p1.4/clients/olvwm-4.1/menu.c @@ -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 @@ calcmenusize(menuInfo, winInfo, menu) 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 @@ calcmenusize(menuInfo, winInfo, menu) 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 @@ drawCommonButton(dpy, menuInfo, idx, fDe 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 @@ drawCommonButton(dpy, menuInfo, idx, fDe 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) { --- xview-3.2p1.4.orig/clients/olvwm-4.1/olwm.c +++ xview-3.2p1.4/clients/olvwm-4.1/olwm.c @@ -340,6 +340,24 @@ olvwm: Warning: '%s' is invalid locale f 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. + * + * + */ + 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 @@ ExitOLWM() 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; } --- xview-3.2p1.4.orig/clients/olvwm-4.1/mem.h +++ xview-3.2p1.4/clients/olvwm-4.1/mem.h @@ -39,7 +39,7 @@ extern int AcctTag; #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 @@ extern int AcctTag; #define MemNewText(s) MemNewString((char *)s) -#endif OW_I18N_L4 +#endif /* OW_I18N_L4 */ -#endif _OLWM_MEM_H +#endif /* _OLWM_MEM_H */ --- xview-3.2p1.4.orig/clients/olvwm-4.1/winipane.c +++ xview-3.2p1.4/clients/olvwm-4.1/winipane.c @@ -118,6 +118,39 @@ WinIconPane *winInfo; 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. + * + * + */ + 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 @@ WinIconPane *winInfo; break; } #endif +#endif if (winInfo->iconMask != None) { XSetClipMask(dpy, gc, None); --- xview-3.2p1.4.orig/clients/olvwm-4.1/properties.c +++ xview-3.2p1.4/clients/olvwm-4.1/properties.c @@ -63,8 +63,8 @@ extern Atom AtomRightFooter; extern Atom AtomDecorIMStatus; extern Atom AtomLeftIMStatus; extern Atom AtomRightIMStatus; -extern Atom AtomCompoundText; #endif +extern Atom AtomCompoundText; /*************************************************************************** * GetWindowProperty @@ -147,8 +147,9 @@ propGetTextProp(dpy,win,property,text) } #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 { --- xview-3.2p1.4.orig/clients/olvwm-4.1/services.c +++ xview-3.2p1.4/clients/olvwm-4.1/services.c @@ -82,7 +82,7 @@ ExecCommand(env,cmd) 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 @@ PshFunc(dpy, winInfo, menuInfo, idx) 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()); --- xview-3.2p1.4.orig/clients/olvwm-4.1/gettext.c +++ xview-3.2p1.4/clients/olvwm-4.1/gettext.c @@ -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; --- xview-3.2p1.4.orig/clients/olvwm-4.1/virtual.c +++ xview-3.2p1.4/clients/olvwm-4.1/virtual.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -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 @@ static unsigned char pixdata[] = { 0xaa, #define CEIL(a,b) (((a)+(b)-1)/(b)) +static rexMatch(char *string); +static rexInit(char *pattern); + /* * ========================================================================== * @@ -1165,6 +1187,23 @@ static XTextProperty iName = {(unsigned 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... + * + * + */ +{ + 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 @@ int slot; MenuInfoCreate(cache, winInfo, menu, depth, slot); } -static -regerr(val) +static regexp_err(val) int val; { switch(val) { @@ -2154,6 +2192,13 @@ char newPattern[256]; #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 } --- xview-3.2p1.4.orig/clients/olvwm-4.1/pixmap.c +++ xview-3.2p1.4/clients/olvwm-4.1/pixmap.c @@ -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 -#endif XPM +#include +#endif /* XPM */ #include "i18n.h" #include @@ -77,9 +77,10 @@ unsigned ImageSize(image) 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 **colors; 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 @@ XColor **colors; /* 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 @@ XColor **colors; 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 @@ XColor **colors; { 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 @@ int i; } } -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 @@ register XImage *in_image, *out_image; } } +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 @@ Bool half_of_last; return False; return True; } -#endif SUNICON +#endif /* SUNICON */ #ifdef NOT /* @@ -448,11 +485,11 @@ int dummy; #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 @@ XpmAttributes xpmAttr; &(pixinfo->pixmap), (Pixmap *)0, /* ignore shape mask for now */ &xpmAttr)) != PixmapSuccess) { + rval = False; goto FAILURE; } pixinfo->width = xpmAttr.width; @@ -637,7 +675,7 @@ XpmAttributes xpmAttr; 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) --- xview-3.2p1.4.orig/clients/olvwm-4.1/screen.c +++ xview-3.2p1.4/clients/olvwm-4.1/screen.c @@ -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 virtualGridIQ; 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 *-------------------------------------------------------------------------*/ --- xview-3.2p1.4.orig/clients/olvwm-4.1/olgx_impl.h +++ xview-3.2p1.4/clients/olvwm-4.1/olgx_impl.h @@ -114,7 +114,7 @@ void hsv_to_xcolor(); void xcolor_to_hsv(); void olgx_hsv_to_3D(); -#endif !OL_PRIVATE_DEFINED +#endif /* !OL_PRIVATE_DEFINED */ --- xview-3.2p1.4.orig/clients/olvwm-4.1/olvwmrc.y +++ xview-3.2p1.4/clients/olvwm-4.1/olvwmrc.y @@ -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 @@ -37,7 +37,7 @@ extern CheckForKeyProg(); char *LookupToken(); char *FindOlvwmRC(); void resetKeys(); -char *strexpand(); +static char *strexpand(); typedef struct progscreen { char *target; @@ -81,6 +81,7 @@ List *ProgKeyList = NULL; List *WinMenuActionsList = NULL; static Display *dpy; +static unsigned int NumLockMask; %} @@ -155,6 +156,7 @@ file : /* empty */ | file WinMenuProg | file Assignment | error CLOSEBRACE +; Assignment : WORD EQUALS String { @@ -173,6 +175,7 @@ Assignment : WORD EQUALS String VariableList = ListCons(v, VariableList); } } +; KeyProg : KeySpec OPENBRACE Actions CLOSEBRACE { @@ -191,6 +194,7 @@ KeyProg : KeySpec OPENBRACE Actions CLOS AddKeyBinding(p->keycode, p->modmask, d); ProgKeyList = ListCons($1, ProgKeyList); } +; ScreenProg : ScreenStart List CLOSEBRACE { @@ -201,6 +205,7 @@ ScreenProg : ScreenStart List CLOSEBRACE p->target = $2; ProgScreenList = ListCons(p, ProgScreenList); } +; WinMenuProg : WINMENU OPENBRACE WinMenuActions CLOSEBRACE { @@ -212,6 +217,7 @@ WinMenuProg : WINMENU OPENBRACE WinMenuA } WinMenuActionsList = $3; } +; WinMenuActions : /* empty */ { $$ = NULL; } @@ -224,6 +230,7 @@ WinMenuActions : /* empty */ p->actions = $4; $$ = ListCons(p, $1); } +; Actions : /* empty */ { $$ = NULL; } @@ -257,6 +264,7 @@ Actions : /* empty */ { $$ = ListCons($2, $1); } | Actions IfElseAction { $$ = ListCons($2, $1); } +; WarpAction : WARP COLON String { @@ -267,6 +275,7 @@ WarpAction : WARP COLON String p->parameter = strdup($3); $$ = p; } +; CloseAction: CLOSE COLON List { @@ -277,6 +286,7 @@ CloseAction: CLOSE COLON List p->parameter = $3; $$ = p; } +; QuitAction: QUIT COLON List { @@ -287,6 +297,7 @@ QuitAction: QUIT COLON List p->parameter = $3; $$ = p; } +; OpenAction: OPEN COLON List { @@ -297,6 +308,7 @@ OpenAction: OPEN COLON List p->parameter = $3; $$ = p; } +; RaiseLowerAction: RAISELOWER COLON List { @@ -307,6 +319,7 @@ RaiseLowerAction: RAISELOWER COLON List p->parameter = $3; $$ = p; } +; LowerAction: LOWER COLON List { @@ -317,6 +330,7 @@ LowerAction: LOWER COLON List p->parameter = $3; $$ = p; } +; RaiseAction: RAISE COLON List { @@ -327,6 +341,7 @@ RaiseAction: RAISE COLON List p->parameter = $3; $$ = p; } +; ExecuteAction: EXECUTE COLON List { @@ -337,6 +352,7 @@ ExecuteAction: EXECUTE COLON List p->parameter = $3; $$ = p; } +; GotoAction: GOTO COLON String { @@ -358,7 +374,7 @@ GotoAction: GOTO COLON String p->parameter = strdup(s); $$ = p; } - +; GeometryAction : GEOMETRY COLON String { @@ -369,6 +385,7 @@ GeometryAction : GEOMETRY COLON String p->parameter = strdup($3); $$ = p; } +; RebindAction : REBIND COLON { @@ -388,6 +405,7 @@ RebindAction : REBIND COLON p->parameter = strdup($3); $$ = p; } +; StickAction : STICK COLON String { @@ -398,6 +416,7 @@ StickAction : STICK COLON String p->parameter = strdup($3); $$ = p; } +; SetSizeAction : SETSIZE COLON String { @@ -408,6 +427,7 @@ SetSizeAction : SETSIZE COLON String p->parameter = strdup($3); $$ = p; } +; FocusAction : FOCUS COLON String { @@ -418,6 +438,7 @@ FocusAction : FOCUS COLON String p->parameter = strdup($3); $$ = p; } +; IfElseAction: IFELSE COLON String OPENBRACE Actions CLOSEBRACE OPENBRACE Actions CLOSEBRACE @@ -436,6 +457,7 @@ IfElseAction: IFELSE COLON String OPENBR $$ = p; } +; KeySpec : Key Modifier { @@ -467,9 +489,11 @@ KeySpec : Key Modifier $$ = p; free($1); } +; Key : String { $$ = strdup($1); } +; Modifier : /* empty */ { $$ = 0; } @@ -492,6 +516,7 @@ Modifier : /* empty */ } $$ |= FindModifierMask(kc); } +; List : String { $$ = $1; } @@ -505,11 +530,13 @@ List : String free($3); $$ = s; } +; ScreenStart : SCREEN INT OPENBRACE { $$ = $2; } +; String : WORD { @@ -524,6 +551,7 @@ String : WORD $$ = strexpand(t); free($1); } +; %% /* Programs */ #define YYDEBUG 1 @@ -712,7 +740,8 @@ matchProgKey(p, ev) { 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 @@ struct stat statbuf; 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 @@ InitOlvwmRC(ldpy, path) return; olvwmOldBuf = olvwmBuf; dpy = ldpy; + NumLockMask = FindModifierMask(XKeysymToKeycode(dpy, XK_Num_Lock)); yyparse(); #ifdef DEBUG DumpProgKeyList(); --- xview-3.2p1.4.orig/clients/olvwm-4.1/st.c +++ xview-3.2p1.4/clients/olvwm-4.1/st.c @@ -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) :\ --- xview-3.2p1.4.orig/clients/olvwm-4.1/usermenu.c +++ xview-3.2p1.4/clients/olvwm-4.1/usermenu.c @@ -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 -#endif XPM +#include +#endif /* XPM */ #include #include @@ -878,7 +878,7 @@ ExpandPath(pin, messages) /* * Menu Search Path */ -#define NUM_SEARCH_PATH 7 +#define NUM_SEARCH_PATH 8 static char **menuSearchPath; /* @@ -915,6 +915,11 @@ makeMenuSearchPath() /* $HOME/. */ sprintf(buf, "%s/.%%s", home); menuSearchPath[i++] = MemNewString(buf); + +#ifdef __linux__ + /* ++roman: /etc/X11/olvwm/ */ + menuSearchPath[i++] = MemNewString("/etc/X11/olvwm/%s"); +#endif #ifdef OW_I18N_L3 /* $OPENWINHOME/share/locale//olwm/ */ @@ -1019,7 +1024,7 @@ menuFromFile(file, menu, messages) 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; --- xview-3.2p1.4.orig/clients/olvwm-4.1/moveresize.c +++ xview-3.2p1.4/clients/olvwm-4.1/moveresize.c @@ -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 @@ moveDone(mstuff) 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 --- xview-3.2p1.4.orig/clients/olvwm-4.1/cursors.c +++ xview-3.2p1.4/clients/olvwm-4.1/cursors.c @@ -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 @@ initPointer(dpy, cmap, data, pointer) 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. + * + */ + 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 { --- xview-3.2p1.4.orig/clients/olvwm-4.1/resources.c +++ xview-3.2p1.4/clients/olvwm-4.1/resources.c @@ -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 @@ ResourceItem MainItemTable[] = { { "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 @@ ResourceItem MainItemTable[] = { 0L }, { "virtualIconic", "VirtualIconic", "False", &(GRV.VirtualIconic), cvtBoolean, NULL, - RI_IMMUTABLE }, + 0L }, { "virtualSticky", "VirtualSticky", "", &(GRV.StickyList), cvtStringList, NULL, 0L }, @@ -620,13 +620,13 @@ ResourceItem MainItemTable[] = { 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 @@ cvtFont(dpy, item, string, addr) 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; --- xview-3.2p1.4.orig/clients/olvwm-4.1/winicon.c +++ xview-3.2p1.4/clients/olvwm-4.1/winicon.c @@ -52,6 +52,10 @@ static ClassIconFrame classIconFrame; * forward-declared functions ***************************************************************************/ +static int heightTopIcon(WinIconFrame *win); +static int heightBottomIcon(WinIconFrame *win); +static int widthBothIcon(WinIconFrame *win); + /*************************************************************************** * private event functions ***************************************************************************/ --- xview-3.2p1.4.orig/clients/olvwm-4.1/usleep.c +++ xview-3.2p1.4/clients/olvwm-4.1/usleep.c @@ -76,7 +76,7 @@ olwm_usleep(usec) setitimer(ITIMER_REAL, &old, (struct itimerval *)0); return 0; -#else SYSV +#else /* SYSV */ return usleep(usec); --- xview-3.2p1.4.orig/clients/olvwm-4.1/Imakefile +++ xview-3.2p1.4/clients/olvwm-4.1/Imakefile @@ -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 -/**/######################################################################### -/**/# @(#)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 @@ ALLFILES = \ ${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 --- xview-3.2p1.4.orig/clients/olvwm-4.1/defaults.c +++ xview-3.2p1.4/clients/olvwm-4.1/defaults.c @@ -90,7 +90,7 @@ GetUserDefaults(dpy) #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)) { --- 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 @@ -723,7 +723,7 @@ olgx_draw_text(info, win, string, x, y, 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 @@ olgx_draw_numscroll_button(info, win, x, TextScrollButton_Width(info) - 2, NumScrollButton_Height(info)); } -#endif SVR4 +#endif /* SVR4 */ --- xview-3.2p1.4.orig/clients/olvwm-4.1/CHANGES +++ xview-3.2p1.4/clients/olvwm-4.1/CHANGES @@ -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 --- xview-3.2p1.4.orig/clients/olvwm-4.1/gif.c +++ xview-3.2p1.4/clients/olvwm-4.1/gif.c @@ -56,7 +56,10 @@ struct { 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; --- xview-3.2p1.4.orig/clients/olvwm-4.1/i18n.c +++ xview-3.2p1.4/clients/olvwm-4.1/i18n.c @@ -209,6 +209,6 @@ register unsigned char *s; s++; } } -#endif DEBUG +#endif /* DEBUG */ -#endif OW_I18N_L4 +#endif /* OW_I18N_L4 */ --- xview-3.2p1.4.orig/clients/cmdtool/cmdtool.man +++ xview-3.2p1.4/clients/cmdtool/cmdtool.man @@ -361,7 +361,7 @@ and a more restricted menu appears. Sele 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 --- xview-3.2p1.4.orig/clients/cmdtool/cmdtool.c +++ xview-3.2p1.4/clients/cmdtool/cmdtool.c @@ -18,7 +18,7 @@ static char sccsid[] = "@(#)cmdtool.c 1 #include #else #include -#endif SVR4 +#endif /* SVR4 */ #include #include @@ -353,7 +353,7 @@ main(argc,argv) 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")); --- xview-3.2p1.4.orig/clients/cmdtool/Imakefile +++ xview-3.2p1.4/clients/cmdtool/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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) --- xview-3.2p1.4.orig/clients/clock/Imakefile +++ xview-3.2p1.4/clients/clock/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/clients/clock/clock.c +++ xview-3.2p1.4/clients/clock/clock.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -146,6 +147,10 @@ static Notify_value timer_expired (); 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 @@ static void 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 @@ static void 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 @@ paint_second_hand (c) 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 @@ analog_repaint (canvas, pw, area) 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 @@ static Notify_value 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 @@ icon_timer_expired (me, which) 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 @@ dig_repaint (canvas, pw, area) 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 @@ dig_repaint (canvas, pw, area) 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 @@ init_options (c) 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_gray_patch() 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; --- /dev/null +++ xview-3.2p1.4/clients/props/props.man @@ -0,0 +1,80 @@ +.\" Copyright (C) 2000 by Martin Buck +.\" 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 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. --- xview-3.2p1.4.orig/clients/props/l10n_read.c +++ xview-3.2p1.4/clients/props/l10n_read.c @@ -25,7 +25,7 @@ static char *sccsid = "@(#)l10n_read.c 1 #define ITEM_SEPARATOR ';' -#ifndef __linux +#ifndef __linux__ #ifndef ultrix extern char *malloc(); #endif @@ -99,7 +99,7 @@ l10n_config_read(locale, file_name, a_li if ((config_file = fopen(fullpath, "r")) == NULL) { perror(fullpath); - goto ret; + goto fileerr_ret; } /* @@ -297,6 +297,7 @@ l10n_config_read(locale, file_name, a_li ret: (void) fclose(config_file); +fileerr_ret: return rcode; } --- xview-3.2p1.4.orig/clients/props/l10n_props.h +++ xview-3.2p1.4/clients/props/l10n_props.h @@ -70,7 +70,7 @@ typedef struct l10n_config_list { * format for strftime, not string itself). */ wchar_t *(*convert_label)(); -#endif OW_I18N +#endif /* OW_I18N */ int default_value; --- xview-3.2p1.4.orig/clients/props/l10n_props.c +++ xview-3.2p1.4/clients/props/l10n_props.c @@ -22,7 +22,7 @@ static char *sccsid = "@(#)l10n_props.c #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 @@ l10n_config_list_t l10n_config_initial_s #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; --- xview-3.2p1.4.orig/clients/props/Imakefile +++ xview-3.2p1.4/clients/props/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################### -/**/# @(#)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 @@ LOCAL_LIBRARIES = XViewClientLibs 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-3.2p1.4.orig/contrib/Imakefile +++ xview-3.2p1.4/contrib/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- /dev/null +++ xview-3.2p1.4/contrib/misc/insert_brackets @@ -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 +# Licensed under the GNU General Public License + +if ($#ARGV != 1) { + die "Usage: $0 \n"; +} + +print "$ARGV[0]"; +while () { + print $_; +} +print "$ARGV[1]"; --- /dev/null +++ xview-3.2p1.4/contrib/misc/shift_lines.1 @@ -0,0 +1,34 @@ +.\" Copyright (C) 1999 by Martin Buck +.\" 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 for Debian GNU/Linux + +.SH "SEE ALSO" +.BR xview (7), +.BR capitalize (1), +.BR insert_brackets (1), +.BR remove_brackets (1) --- /dev/null +++ xview-3.2p1.4/contrib/misc/capitalize.1 @@ -0,0 +1,35 @@ +.\" Copyright (C) 1999 by Martin Buck +.\" 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 for Debian GNU/Linux + +.SH "SEE ALSO" +.BR xview (7), +.BR insert_brackets (1), +.BR remove_brackets (1), +.BR shift_lines (1) --- /dev/null +++ xview-3.2p1.4/contrib/misc/insert_brackets.1 @@ -0,0 +1,29 @@ +.\" Copyright (C) 1999 by Martin Buck +.\" 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 for Debian GNU/Linux + +.SH "SEE ALSO" +.BR xview (7), +.BR capitalize (1), +.BR remove_brackets (1), +.BR shift_lines (1) --- /dev/null +++ xview-3.2p1.4/contrib/misc/remove_brackets @@ -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 +# Licensed under the GNU General Public License + +if ($#ARGV != 1) { + die "Usage: $0 \n"; +} + +undef $/; +$_ = ; + +if (substr($_, 0, 1) eq $ARGV[0] && substr($_, -1) eq $ARGV[1]) { + $_ = substr($_, 1, -1); +} +print $_; --- /dev/null +++ xview-3.2p1.4/contrib/misc/remove_brackets.1 @@ -0,0 +1,30 @@ +.\" Copyright (C) 1999 by Martin Buck +.\" 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 for Debian GNU/Linux + +.SH "SEE ALSO" +.BR xview (7), +.BR capitalize (1), +.BR insert_brackets (1), +.BR shift_lines (1) --- /dev/null +++ xview-3.2p1.4/contrib/misc/capitalize @@ -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 +# 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 () { + &$capitalize; + print $_; +} --- /dev/null +++ xview-3.2p1.4/contrib/misc/shift_lines @@ -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 +# Licensed under the GNU General Public License + +$shift = 1; +if ($#ARGV >= 0) { + if ($#ARGV != 1 || $ARGV[0] ne "-t") { + die "Usage: $0 [-t ]\n"; + } + $shift = $ARGV[1]; +} + +$spaces = ""; +if ($shift >= 0) { + for ($s = 1; $s <= $shift; $s++) { + $spaces = $spaces . " "; + } +} + +while () { + if ($shift < 0) { + print substr($_, -$shift); + } else { + print $spaces . $_; + } +} --- xview-3.2p1.4.orig/contrib/examples/Imakefile +++ xview-3.2p1.4/contrib/examples/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/contrib/examples/dnd/source2.c +++ xview-3.2p1.4/contrib/examples/dnd/source2.c @@ -20,7 +20,7 @@ unsigned short drop_icon[] = { #include "./drop.icon" }; -#if defined(__linux) && !defined(NBBY) +#if defined(__linux__) && !defined(NBBY) #define NBBY 8 #endif --- xview-3.2p1.4.orig/contrib/examples/dnd/source1.c +++ xview-3.2p1.4/contrib/examples/dnd/source1.c @@ -20,7 +20,7 @@ unsigned short drop_icon[] = { #include "./drop.icon" }; -#if defined(__linux) && !defined(NBBY) +#if defined(__linux__) && !defined(NBBY) #define NBBY 8 #endif --- xview-3.2p1.4.orig/contrib/examples/dnd/Imakefile +++ xview-3.2p1.4/contrib/examples/dnd/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/panels/Imakefile +++ xview-3.2p1.4/contrib/examples/panels/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/notifier/animate.c +++ xview-3.2p1.4/contrib/examples/notifier/animate.c @@ -83,7 +83,7 @@ char *argv[]; 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", --- xview-3.2p1.4.orig/contrib/examples/notifier/ntfy_pipe.c +++ xview-3.2p1.4/contrib/examples/notifier/ntfy_pipe.c @@ -169,13 +169,11 @@ union wait *status; /* the status of the 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); --- xview-3.2p1.4.orig/contrib/examples/notifier/notify.c +++ xview-3.2p1.4/contrib/examples/notifier/notify.c @@ -15,7 +15,7 @@ char kbd_msg[128], ptr_msg[128], but_ 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 @@ char *argv[]; while (RUN) { FD_SET(fd, &readfds); -#ifdef __linux +#ifdef __linux__ timeout.tv_sec = 0; timeout.tv_usec = 250000; #endif --- xview-3.2p1.4.orig/contrib/examples/notifier/Imakefile +++ xview-3.2p1.4/contrib/examples/notifier/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/color/animate.c +++ xview-3.2p1.4/contrib/examples/color/animate.c @@ -82,7 +82,7 @@ char *argv[]; 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", --- xview-3.2p1.4.orig/contrib/examples/color/Imakefile +++ xview-3.2p1.4/contrib/examples/color/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/cursor/Imakefile +++ xview-3.2p1.4/contrib/examples/cursor/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/defaults/Imakefile +++ xview-3.2p1.4/contrib/examples/defaults/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/scrollbar/scroll_cells.c +++ xview-3.2p1.4/contrib/examples/scrollbar/scroll_cells.c @@ -96,7 +96,7 @@ char *argv[]; 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", --- xview-3.2p1.4.orig/contrib/examples/scrollbar/Imakefile +++ xview-3.2p1.4/contrib/examples/scrollbar/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/menus/menu_dir.c +++ xview-3.2p1.4/contrib/examples/menus/menu_dir.c @@ -14,7 +14,12 @@ #include #include #include +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#include +#else #include +#endif #include #ifndef MAXPATHLEN #include /* probably sun/BSD specific */ --- xview-3.2p1.4.orig/contrib/examples/menus/menu_dir2.c +++ xview-3.2p1.4/contrib/examples/menus/menu_dir2.c @@ -14,7 +14,12 @@ #include #include #include +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#include +#else #include +#endif #include #ifndef MAXPATHLEN #include --- xview-3.2p1.4.orig/contrib/examples/menus/Imakefile +++ xview-3.2p1.4/contrib/examples/menus/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/frames/Imakefile +++ xview-3.2p1.4/contrib/examples/frames/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/ttysw/Imakefile +++ xview-3.2p1.4/contrib/examples/ttysw/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/extensions/Imakefile +++ xview-3.2p1.4/contrib/examples/extensions/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/extensions/panel_items/wizzy.c +++ xview-3.2p1.4/contrib/examples/extensions/panel_items/wizzy.c @@ -41,7 +41,7 @@ static void wizzy_layout(); #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 @@ static Panel_ops ops = { #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 @@ typedef struct wizzy_info { 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 @@ wizzy_init(panel, item, avlist) 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 @@ wizzy_destroy(item, status) 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 @@ wizzy_remove(item) 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 @@ wizzy_restore(item) /* 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 @@ wizzy_yield_kbd_focus(item) 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 */ --- xview-3.2p1.4.orig/contrib/examples/extensions/panel_items/Imakefile +++ xview-3.2p1.4/contrib/examples/extensions/panel_items/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/selection/Imakefile +++ xview-3.2p1.4/contrib/examples/selection/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/misc/Imakefile +++ xview-3.2p1.4/contrib/examples/misc/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/fonts/Imakefile +++ xview-3.2p1.4/contrib/examples/fonts/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/fonts/simple_font.c +++ xview-3.2p1.4/contrib/examples/fonts/simple_font.c @@ -38,7 +38,7 @@ char *argv[]; 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); --- xview-3.2p1.4.orig/contrib/examples/canvas/Imakefile +++ xview-3.2p1.4/contrib/examples/canvas/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/sv_compat/Imakefile +++ xview-3.2p1.4/contrib/examples/sv_compat/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/icons/Imakefile +++ xview-3.2p1.4/contrib/examples/icons/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/textsw/Imakefile +++ xview-3.2p1.4/contrib/examples/textsw/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/notice/Imakefile +++ xview-3.2p1.4/contrib/examples/notice/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/contrib/examples/seln_svc/Imakefile +++ xview-3.2p1.4/contrib/examples/seln_svc/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 --- xview-3.2p1.4.orig/lib/Imakefile +++ xview-3.2p1.4/lib/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/lib/libxview/Imakefile +++ xview-3.2p1.4/lib/libxview/Imakefile @@ -5,9 +5,9 @@ #endif #include -/**/########################################################################### -/**/# @(#)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 @@ PopulateSubdirs($(SUBDIRS)) MakeLintLibSubdirs($(SUBDIRS)) #include + +#ifdef __linux__ +XVIEW_DEPLIBS = $(LDPRELIBS) $(XLIB) -L../../libolgx -lolgx -lutil -lc +#endif --- xview-3.2p1.4.orig/lib/libxview/wmgr/wmgr_decor.h +++ xview-3.2p1.4/lib/libxview/wmgr/wmgr_decor.h @@ -59,13 +59,13 @@ typedef struct { /* new _OL_WIN_ATTR f /* 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 */ --- xview-3.2p1.4.orig/lib/libxview/wmgr/wmgr_menu.c +++ xview-3.2p1.4/lib/libxview/wmgr/wmgr_menu.c @@ -14,12 +14,12 @@ static char sccsid[] = "@(#)wmgr_men #include #include #include -#if defined(sparc) || defined(__linux) -#if defined(SVR4) || defined(__linux) +#if defined(sparc) || defined(__linux__) +#if defined(SVR4) || defined(__linux__) #include #else #include -#endif SVR4 +#endif /* SVR4 */ #endif #include --- xview-3.2p1.4.orig/lib/libxview/wmgr/Imakefile +++ xview-3.2p1.4/lib/libxview/wmgr/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/attr/attr.c +++ xview-3.2p1.4/lib/libxview/attr/attr.c @@ -17,7 +17,7 @@ static char sccsid[] = "@(#)attr.c 2 #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ Xv_private FILE *xv_help_find_file(); @@ -91,7 +91,11 @@ Xv_private Attr_avlist copy_va_to_av( va /* 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 ) --- xview-3.2p1.4.orig/lib/libxview/attr/attr_copy.c +++ xview-3.2p1.4/lib/libxview/attr/attr_copy.c @@ -12,6 +12,11 @@ static char sccsid[] = "@(#)attr_cop #include +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 */ --- xview-3.2p1.4.orig/lib/libxview/attr/attr_impl.h +++ xview-3.2p1.4/lib/libxview/attr/attr_impl.h @@ -45,4 +45,4 @@ extern Attr_avlist attr_copy_avlist(); extern int attr_count_avlist(); extern Attr_avlist attr_copy_valist(); -#endif _attr_impl_h_already_included +#endif /* _attr_impl_h_already_included */ --- xview-3.2p1.4.orig/lib/libxview/attr/Imakefile +++ xview-3.2p1.4/lib/libxview/attr/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/notify/notify.h +++ xview-3.2p1.4/lib/libxview/notify/notify.h @@ -18,21 +18,21 @@ #include #include +#include /* sigset_t */ #include #include #include #include -#ifndef __linux -#ifdef SYSV_WAIT -#include -#endif +#ifndef __linux__ +# ifdef SYSV_WAIT +# include +# endif +#endif #ifdef SYSV_UCONTEXT -#include -#endif -#else /* __linux */ -#include /* sigset_t */ +# include +#else typedef int ucontext_t; -#endif +#endif /* *********************************************************************** --- xview-3.2p1.4.orig/lib/libxview/notify/sys_select.c +++ xview-3.2p1.4/lib/libxview/notify/sys_select.c @@ -15,19 +15,19 @@ static char sccsid[] = "@(#)sys_sele */ #ifndef SVR4 -#ifndef __linux +#ifndef __linux__ #include #else #include "linux_select.h" #endif -#else SVR4 +#else /* SVR4 */ #include #include #include #include #include #include -#endif SVR4 +#endif /* SVR4 */ #include /* For ntfy_assert */ #include /* For debugging */ #include /* For debugging */ @@ -41,25 +41,25 @@ extern errno; 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 @@ notify_select(nfds, in0, out0, ex0, tv) /* 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 @@ done: ntfy_assert(!(nfds == 0 && tv == (struct timeval *) 0), 40 /* select returned when no stimuli */); return (rv); -#endif SVR4 +#endif /* SVR4 */ } --- xview-3.2p1.4.orig/lib/libxview/notify/ultrix_cpt.h +++ xview-3.2p1.4/lib/libxview/notify/ultrix_cpt.h @@ -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 */ --- xview-3.2p1.4.orig/lib/libxview/notify/ndet_loop.c +++ xview-3.2p1.4/lib/libxview/notify/ndet_loop.c @@ -19,14 +19,14 @@ static char sccsid[] = "@(#)ndet_loo #include #include #include /* For ndis_dispatch */ -#ifndef __linux +#ifndef __linux__ #ifndef SVR4 #include -#else SVR4 +#else /* SVR4 */ #include #include -#endif SVR4 -#else /* __linux */ +#endif /* SVR4 */ +#else /* __linux__ */ #include "linux_select.h" #endif #include @@ -35,7 +35,7 @@ static char sccsid[] = "@(#)ndet_loo #ifdef SVR4 #include #include -#endif SVR4 +#endif /* SVR4 */ #include /* For temp debugging */ #include @@ -59,7 +59,7 @@ extern NTFY_CNDTBL *ntfy_cndtbl[NTFY_LAS /* 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 @@ pkg_private_data struct sigvec ndet_prev {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 int ndet_signal_catcher(); 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 @@ notify_start() * 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 @@ notify_start() 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 @@ ndet_fig_fd_change() 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_fig_fd_change() 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 @@ ndet_fig_sig_change() /* * 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 @@ ndet_enable_sig(sig) 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 @@ pkg_private void /* Should be static bu 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 @@ notify_get_signal_code() 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) */ --- xview-3.2p1.4.orig/lib/libxview/notify/nint_stack.c +++ xview-3.2p1.4/lib/libxview/notify/nint_stack.c @@ -21,7 +21,7 @@ static char sccsid[] = "@(#)nint_sta #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ pkg_private_data NTFY_CONDITION *nint_stack = 0; pkg_private_data int nint_stack_size = 0; @@ -65,7 +65,12 @@ nint_push_callout(client, cond) * 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++; --- xview-3.2p1.4.orig/lib/libxview/notify/linux_select.h +++ xview-3.2p1.4/lib/libxview/notify/linux_select.h @@ -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 +#include #include #include 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 */ --- xview-3.2p1.4.orig/lib/libxview/notify/ndisd_wait.c +++ xview-3.2p1.4/lib/libxview/notify/ndisd_wait.c @@ -24,9 +24,9 @@ notify_default_wait3(client, pid, status int pid; #ifndef SVR4 union wait *status; -#else SVR4 +#else /* SVR4 */ int *status; -#endif SVR4 +#endif /* SVR4 */ struct rusage *rusage; { return (NOTIFY_IGNORED); --- xview-3.2p1.4.orig/lib/libxview/notify/linux_select.c +++ xview-3.2p1.4/lib/libxview/notify/linux_select.c @@ -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 +/* 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 +#include +#include + +#ifndef __GLIBC__ /* #define __LIBRARY__ */ #include /* #undef __LIBRARY__ */ @@ -13,6 +29,21 @@ #ifdef DEBUG #include #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 @@ _syscall3(int, sys_fcntl, int, fildes, i /* Replacement for syscall(SYS_read,...) */ _syscall3(int, sys_read, int, fildes, char *, buf, off_t, cnt); +#endif /* !__GLIBC__ */ + +#endif --- xview-3.2p1.4.orig/lib/libxview/notify/ndet_fcntl.c +++ xview-3.2p1.4/lib/libxview/notify/ndet_fcntl.c @@ -21,23 +21,23 @@ static char sccsid[] = "@(#)ndet_fcn #include #ifdef SVR4 #include -#endif SVR4 -#ifdef __linux +#endif /* SVR4 */ +#ifdef __linux__ #include #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 @@ fcntl(int fd, int cmd, ...) { 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 @@ fcntl(int fd, int cmd, ...) { 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 @@ fcntl(int fd, int cmd, ...) { #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 @@ fcntl(int fd, int cmd, ...) { /* 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 } --- xview-3.2p1.4.orig/lib/libxview/notify/sys_read.c +++ xview-3.2p1.4/lib/libxview/notify/sys_read.c @@ -15,14 +15,14 @@ static char sccsid[] = "@(#)sys_read */ #ifndef SVR4 -#ifndef __linux +#ifndef __linux__ #include #else #include "linux_select.h" #endif -#else SVR4 +#else /* SVR4 */ #include -#endif SVR4 +#endif /* SVR4 */ #include pkg_private int @@ -31,9 +31,13 @@ notify_read(fd, buf, nbytes) 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 } --- xview-3.2p1.4.orig/lib/libxview/notify/ntfyclient.c +++ xview-3.2p1.4/lib/libxview/notify/ntfyclient.c @@ -56,7 +56,22 @@ static int ndet_compar( key1, key2 ) 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. + * + */ + return (key1a < key2a) ? -1 : + ((key1a > key2a) ? 1 : + 0); +#else return key1a - key2a; +#endif } #endif /* HAVE_TSEARCH */ --- xview-3.2p1.4.orig/lib/libxview/notify/ndisdispch.c +++ xview-3.2p1.4/lib/libxview/notify/ndisdispch.c @@ -22,7 +22,7 @@ static char sccsid[] = "@(#)ndisdisp #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ /* performance: global cache of getdtablesize() */ int dtablesize_cache = 0; @@ -32,7 +32,7 @@ int dtablesize_cache = 0; #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; --- xview-3.2p1.4.orig/lib/libxview/notify/ndet_s_poll.c +++ xview-3.2p1.4/lib/libxview/notify/ndet_s_poll.c @@ -28,4 +28,4 @@ notify_set_fd_func(nclient, func, poll_f { return (ndet_set_fd_func(nclient, func, poll_fd, NTFY_FD)); } -#endif POLL +#endif /* POLL */ --- xview-3.2p1.4.orig/lib/libxview/notify/ndet_auto.c +++ xview-3.2p1.4/lib/libxview/notify/ndet_auto.c @@ -23,7 +23,7 @@ static char sccsid[] = "@(#)ndet_aut #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ extern errno; @@ -73,7 +73,7 @@ ndet_auto_sig_send(client, condition, co /* 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 @@ ndet_auto_sig_send(client, condition, co 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; --- xview-3.2p1.4.orig/lib/libxview/notify/nint.h +++ xview-3.2p1.4/lib/libxview/notify/nint.h @@ -127,5 +127,5 @@ extern void nint_unprotected_pop_callout nint_pop_callout exceptdoes assumes in critical section*/ -#endif NINT_DEFINED +#endif /* NINT_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/notify/ndet.h +++ xview-3.2p1.4/lib/libxview/notify/ndet.h @@ -380,5 +380,5 @@ worry about safety himself, e.g., asynch immediate client events. */ -#endif NDET_DEFINED +#endif /* NDET_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/notify/nintn_wait.c +++ xview-3.2p1.4/lib/libxview/notify/nintn_wait.c @@ -24,9 +24,9 @@ notify_next_wait3_func(nclient, pid, sta int pid; #ifndef SVR4 union wait *status; -#else SVR4 +#else /* SVR4 */ int *status; -#endif SVR4 +#endif /* SVR4 */ struct rusage *rusage; { Notify_func func; --- xview-3.2p1.4.orig/lib/libxview/notify/ntfy.h +++ xview-3.2p1.4/lib/libxview/notify/ntfy.h @@ -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 +extern int sigisemptyset(const sigset_t *); +#endif +#endif + #include #include #include @@ -124,8 +137,13 @@ typedef struct ntfy_condition { 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_condition { */ 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 int ntfy_nodes_avail; /* count of 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 @@ as well as asynchronous signal condition #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 @@ void ntfy_set_errno_debug(); #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 */ --- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_ctbl.c +++ xview-3.2p1.4/lib/libxview/notify/ntfy_ctbl.c @@ -109,9 +109,8 @@ ntfy_new_enum_conditions(cnd_list, enum_ 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 @@ ntfy_new_enum_conditions(cnd_list, enum_ } } #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_new_paranoid_enum_conditions(cnd_li 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 @@ ntfy_new_paranoid_enum_conditions(cnd_li 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: { --- xview-3.2p1.4.orig/lib/libxview/notify/ndetitimer.c +++ xview-3.2p1.4/lib/libxview/notify/ndetitimer.c @@ -23,7 +23,7 @@ static char sccsid[] = "@(#)ndetitim #include /* For nint_get_func */ #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ extern struct itimerval NOTIFY_NO_ITIMER; extern struct itimerval NOTIFY_POLLING_ITIMER; --- xview-3.2p1.4.orig/lib/libxview/notify/ndetpoll.c +++ xview-3.2p1.4/lib/libxview/notify/ndetpoll.c @@ -148,4 +148,4 @@ ndet_select_itimer_func(nclient, which) return (NOTIFY_DONE); } -#endif POLL +#endif /* POLL */ --- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_test.c +++ xview-3.2p1.4/lib/libxview/notify/ntfy_test.c @@ -598,9 +598,9 @@ nt_wait3_func(client, pid, status, rusag int pid; #ifndef SVR4 union wait *status; -#else SVR4 +#else /* SVR4 */ int *status; -#endif SVR4 +#endif /* SVR4 */ struct rusage *rusage; { CONDITION *cond; --- xview-3.2p1.4.orig/lib/libxview/notify/sys_fcntl.c +++ xview-3.2p1.4/lib/libxview/notify/sys_fcntl.c @@ -15,23 +15,27 @@ static char sccsid[] = "@(#)sys_fcnt */ #ifndef SVR4 -#ifndef __linux +#ifndef __linux__ #include #else #include "linux_select.h" #endif -#else SVR4 +#else /* SVR4 */ #include -#endif SVR4 +#endif /* SVR4 */ #include 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 } --- xview-3.2p1.4.orig/lib/libxview/notify/ndet_fd.c +++ xview-3.2p1.4/lib/libxview/notify/ndet_fd.c @@ -19,7 +19,7 @@ static char sccsid[] = "@(#)ndet_fd. #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ /* performance: global cache of getdtablesize() */ extern int dtablesize_cache; @@ -29,7 +29,7 @@ extern int dtablesize_cache; #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 */ --- xview-3.2p1.4.orig/lib/libxview/notify/nint_copy.c +++ xview-3.2p1.4/lib/libxview/notify/nint_copy.c @@ -20,7 +20,7 @@ static char sccsid[] = "@(#)nint_cop #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ pkg_private Notify_error nint_copy_callout(new_cond, old_cond) --- xview-3.2p1.4.orig/lib/libxview/notify/ndis.h +++ xview-3.2p1.4/lib/libxview/notify/ndis.h @@ -125,5 +125,5 @@ void ndis_flush_condition(); /* Flush c int use_data) */ void ndis_flush_wait3(); /* Flush all conditions for pid (Notify_client client, int pid) */ -#endif NDIS_DEFINED +#endif /* NDIS_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/notify/Imakefile +++ xview-3.2p1.4/lib/libxview/notify/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/notify/nint_next.c +++ xview-3.2p1.4/lib/libxview/notify/nint_next.c @@ -39,7 +39,12 @@ nint_next_callout(nclient, type) 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; } --- xview-3.2p1.4.orig/lib/libxview/notify/ntfy_fd_op.c +++ xview-3.2p1.4/lib/libxview/notify/ntfy_fd_op.c @@ -10,8 +10,9 @@ static char sccsid[] = "@(#)ntfy_fd_ * file for terms of the license. */ -#ifdef __linux +#ifdef __linux__ #include +#include /* for howmany() */ #endif #include #include --- xview-3.2p1.4.orig/lib/libxview/notify/ndis_d_pri.c +++ xview-3.2p1.4/lib/libxview/notify/ndis_d_pri.c @@ -16,9 +16,12 @@ static char sccsid[] = "@(#)ndis_d_p #include #include #include -#if defined(__linux) && !defined(NBBY) +#ifdef __linux__ +#include /* for howmany(), NBBY */ +#ifndef NBBY #define NBBY 8 #endif +#endif typedef enum notify_error (*Notify_error_func) (); --- xview-3.2p1.4.orig/lib/libxview/dnd/site_impl.h +++ xview-3.2p1.4/lib/libxview/dnd/site_impl.h @@ -81,4 +81,4 @@ Pkg_private Xv_opaque dnd_site_set_avlis Pkg_private Xv_opaque dnd_site_get_attr(); Pkg_private int dnd_site_destroy(); -#endif ~xview_site_impl_DEFINED +#endif /* ~xview_site_impl_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/dnd/dndimpl.h +++ xview-3.2p1.4/lib/libxview/dnd/dndimpl.h @@ -112,4 +112,4 @@ Pkg_private Xv_opaque dnd_set_avlist(); Pkg_private Xv_opaque dnd_get_attr(); Pkg_private int dnd_destroy(); -#endif ~xview_dndimpl_DEFINED +#endif /* ~xview_dndimpl_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/dnd/site_pblc.c +++ xview-3.2p1.4/lib/libxview/dnd/site_pblc.c @@ -44,7 +44,7 @@ dnd_site_init(owner, site_public, avlist 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 @@ dnd_site_set_avlist(site_public, avlist) 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 @@ dnd_site_set_avlist(site_public, avlist) #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 @@ dnd_site_get_attr(site_public, error, at 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; --- xview-3.2p1.4.orig/lib/libxview/dnd/dnd_dsdm.c +++ xview-3.2p1.4/lib/libxview/dnd/dnd_dsdm.c @@ -28,6 +28,8 @@ static char sccsid[] = "@(#)dnd_dsdm Xv_private int DndSendPreviewEvent(); +static void ReplyProc(); + Xv_private int DndContactDSDM(dnd) Dnd_info *dnd; @@ -40,8 +42,6 @@ DndContactDSDM(dnd) 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); --- xview-3.2p1.4.orig/lib/libxview/dnd/dnd_pblc.c +++ xview-3.2p1.4/lib/libxview/dnd/dnd_pblc.c @@ -19,7 +19,7 @@ static char sccsid[] = "@(#)dnd_pblc #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ static void BuildDefaults(); --- xview-3.2p1.4.orig/lib/libxview/dnd/dnd.c +++ xview-3.2p1.4/lib/libxview/dnd/dnd.c @@ -39,6 +39,18 @@ extern int DndContactDSDM(); 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; --- xview-3.2p1.4.orig/lib/libxview/dnd/site.c +++ xview-3.2p1.4/lib/libxview/dnd/site.c @@ -18,7 +18,7 @@ static char sccsid[] = "@(#)site.c 1 #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ static void TransCoords(); Xv_private Xv_Window win_get_top_level(); @@ -241,13 +241,13 @@ DndDropAreaOps(site, mode, area) 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); } --- xview-3.2p1.4.orig/lib/libxview/dnd/Imakefile +++ xview-3.2p1.4/lib/libxview/dnd/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/imcb/stat_imcb.c +++ xview-3.2p1.4/lib/libxview/imcb/stat_imcb.c @@ -130,4 +130,4 @@ _xv_status_done(ic, client_data, cb_data NULL); #endif /* notdef */ } -#endif OW_I18N +#endif /* OW_I18N */ --- xview-3.2p1.4.orig/lib/libxview/imcb/Imakefile +++ xview-3.2p1.4/lib/libxview/imcb/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.7 28 Apr 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.7 28 Apr 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/imcb/aux.h +++ xview-3.2p1.4/lib/libxview/imcb/aux.h @@ -85,4 +85,4 @@ typedef struct _aux_info { int f_height; } AuxInfo; -#endif ~aux_DEFINED +#endif /* ~aux_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/window/windowutil.c +++ xview-3.2p1.4/lib/libxview/window/windowutil.c @@ -18,7 +18,7 @@ static char sccsid[] = "@(#)windowut #ifdef SVR4 #include #include -#endif SVR4 +#endif /* SVR4 */ #include #include #include --- xview-3.2p1.4.orig/lib/libxview/window/window_set.c +++ xview-3.2p1.4/lib/libxview/window/window_set.c @@ -23,7 +23,7 @@ static char sccsid[] = "@(#)window_s #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ /* * Extern @@ -52,6 +52,7 @@ Pkg_private void window_set_cmap_propert 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 @@ window_set_avlist_tier3(win_public, attr 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; --- xview-3.2p1.4.orig/lib/libxview/window/window.c +++ xview-3.2p1.4/lib/libxview/window/window.c @@ -16,7 +16,7 @@ static char sccsid[] = "@(#)window.c #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #include --- xview-3.2p1.4.orig/lib/libxview/window/window_get.c +++ xview-3.2p1.4/lib/libxview/window/window_get.c @@ -960,4 +960,4 @@ xv_window_create_ic(win_public, im, xid, return(xic); } -#endif OW_I18N +#endif /* OW_I18N */ --- xview-3.2p1.4.orig/lib/libxview/window/windowlayt.c +++ xview-3.2p1.4/lib/libxview/window/windowlayt.c @@ -25,6 +25,10 @@ window_layout(parent, child, op, d1, d2, 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; --- xview-3.2p1.4.orig/lib/libxview/window/Imakefile +++ xview-3.2p1.4/lib/libxview/window/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/color/Imakefile +++ xview-3.2p1.4/lib/libxview/color/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/color/cms_pblc.c +++ xview-3.2p1.4/lib/libxview/color/cms_pblc.c @@ -316,14 +316,22 @@ cms_get_attr(cms_public, status, attr, a { 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 @@ cms_get_attr(cms_public, status, attr, a 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 @@ cms_get_attr(cms_public, status, attr, a } 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 @@ cms_get_attr(cms_public, status, attr, a } 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; --- xview-3.2p1.4.orig/lib/libxview/string_utils/Imakefile +++ xview-3.2p1.4/lib/libxview/string_utils/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/server/svr_x.c +++ xview-3.2p1.4/lib/libxview/server/svr_x.c @@ -28,7 +28,7 @@ static char sccsid[] = "@(#)svr_x.c #include 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 */ --- xview-3.2p1.4.orig/lib/libxview/server/svr_kmdata.h +++ xview-3.2p1.4/lib/libxview/server/svr_kmdata.h @@ -14,7 +14,7 @@ #define MAX_NBR_MAPPINGS 6 -#if defined(__linux) && !defined(NULL) +#if defined(__linux__) && !defined(NULL) #define NULL 0 #endif --- xview-3.2p1.4.orig/lib/libxview/server/server.c +++ xview-3.2p1.4/lib/libxview/server/server.c @@ -24,7 +24,12 @@ static char sccsid[] = "@(#)server.c #include #include #include +/* mbuck@debian.org */ +#if 1 +#include +#else #include +#endif #include #include #include @@ -58,6 +63,8 @@ static char sccsid[] = "@(#)server.c 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 int xv_has_been_initia 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 @@ extern char *getenv(); 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 @@ server_init(parent, server_public, avlis */ /* 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(); --- xview-3.2p1.4.orig/lib/libxview/server/Imakefile +++ xview-3.2p1.4/lib/libxview/server/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.12 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.12 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/cursor/Imakefile +++ xview-3.2p1.4/lib/libxview/cursor/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/defaults/Imakefile +++ xview-3.2p1.4/lib/libxview/defaults/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/defaults/defaults.c +++ xview-3.2p1.4/lib/libxview/defaults/defaults.c @@ -24,7 +24,12 @@ static char sccsid[] = "@(#)defaults #include #endif #include +/* mbuck@debian.org */ +#if 1 +#include +#else #include +#endif #include #include #include --- xview-3.2p1.4.orig/lib/libxview/scrollbar/sb_impl.h +++ xview-3.2p1.4/lib/libxview/scrollbar/sb_impl.h @@ -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_split_view_fr Pkg_private void scrollbar_join_view_from_menu(); Pkg_private void scrollbar_init_delay_values(); -#endif __scrollbar_impl_h +#endif /* __scrollbar_impl_h */ --- xview-3.2p1.4.orig/lib/libxview/scrollbar/sb.c +++ xview-3.2p1.4/lib/libxview/scrollbar/sb.c @@ -43,7 +43,7 @@ Attr_attribute sb_join_view_menu_item_k 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]; --- xview-3.2p1.4.orig/lib/libxview/scrollbar/Imakefile +++ xview-3.2p1.4/lib/libxview/scrollbar/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/font/font_get.c +++ xview-3.2p1.4/lib/libxview/font/font_get.c @@ -43,7 +43,10 @@ font_get_attr(font_public, status, attr, 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 @@ font_get_attr(font_public, status, attr, } 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 @@ font_get_attr(font_public, status, attr, #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) { --- xview-3.2p1.4.orig/lib/libxview/font/font_x.c +++ xview-3.2p1.4/lib/libxview/font/font_x.c @@ -127,8 +127,21 @@ xv_load_x_font(display, name, font_opaqu */ *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); --- xview-3.2p1.4.orig/lib/libxview/font/font.c +++ xview-3.2p1.4/lib/libxview/font/font.c @@ -11,6 +11,7 @@ static char sccsid[] = "@(#)font.c 2 */ #include +#include #include #include #include @@ -33,7 +34,6 @@ static char sccsid[] = "@(#)font.c 2 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 @@ static Wildcards known_wildcards[] = { 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 @@ Font_locale_info *linfo; 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' --- xview-3.2p1.4.orig/lib/libxview/font/Imakefile +++ xview-3.2p1.4/lib/libxview/font/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_ntfy.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_ntfy.c @@ -44,6 +44,15 @@ static char sccsid[] = "@(#)tty_ntfy #include #include +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0 +#include +#else +#include +#endif +#endif + #define PTY_OFFSET (int) &(((Ttysw_folio)0)->ttysw_pty) extern void textsw_display(); @@ -171,7 +180,7 @@ ttysw_sigwinch(ttysw) * 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 @@ ttysw_sigwinch(ttysw) * 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 @@ ttysw_sendsig(ttysw, textsw, sig) 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 --- xview-3.2p1.4.orig/lib/libxview/ttysw/ttytl.c +++ xview-3.2p1.4/lib/libxview/ttysw/ttytl.c @@ -16,6 +16,7 @@ static char sccsid[] = "@(#)ttytl.c */ #include +#include #ifdef SVR4 #include #endif @@ -35,8 +36,6 @@ static char sccsid[] = "@(#)ttytl.c #include #include -extern char *strncpy(); - /* BUG ALERT: This entire procedure should be rewritten! */ /* BUG ALERT: No XView prefix */ --- xview-3.2p1.4.orig/lib/libxview/ttysw/csr_change.c +++ xview-3.2p1.4/lib/libxview/ttysw/csr_change.c @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)csr_chan #include #include #include -#ifndef __linux +#ifndef __linux__ Xv_private_data char *xv_shell_prompt; #else /* Global already defined in server/server.c */ @@ -311,7 +311,7 @@ ttysw_pstring(s, mode, col, row, op) strlen(s) * chrwidth, 1, (mode & MODE_INVERT) ? PIX_NOT(PIX_SRC) : PIX_SRC); } -#endif OW_I18N +#endif /* OW_I18N */ #ifdef OW_I18N #undef BUFSIZE --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_mapkey.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_mapkey.c @@ -12,9 +12,10 @@ static char sccsid[] = "@(#)tty_mapk #include #include -#ifdef SVR4 +#if defined SVR4 || defined __linux__ #include #endif +#include /* for access(2) - mbuck@debian.org */ #include #include #include @@ -34,7 +35,6 @@ static char sccsid[] = "@(#)tty_mapk extern Notify_error win_post_event(); extern char *getenv(); -extern char *strcpy(); extern char *strcat(); /* static routines */ @@ -76,6 +76,11 @@ ttysw_readrc(ttysw) 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 @@ ttysw_remove_caps(label, label_ptr) * 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; --- xview-3.2p1.4.orig/lib/libxview/ttysw/term_ntfy.c +++ xview-3.2p1.4/lib/libxview/ttysw/term_ntfy.c @@ -22,7 +22,7 @@ static char sccsid[] = "@(#)term_ntf #include #include #include -#ifdef SVR4 +#if defined(SVR4) || defined(__linux__) #include #endif @@ -63,7 +63,7 @@ Pkg_private void ttysw_print_debug_strin /* 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 @@ ttysw_text_event(textsw, event, arg, typ * 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 @@ ttysw_text_event(textsw, event, arg, typ /* * 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 @@ ttysw_text_event(textsw, event, arg, typ * 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 @@ ttysw_text_event(textsw, event, arg, typ (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 @@ ttysw_text_event(textsw, event, arg, typ * 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 --- xview-3.2p1.4.orig/lib/libxview/ttysw/ttyansi.c +++ xview-3.2p1.4/lib/libxview/ttysw/ttyansi.c @@ -14,6 +14,7 @@ static char sccsid[] = "@(#)ttyansi. #include #endif #include +#include #include #include #include @@ -31,7 +32,6 @@ static char sccsid[] = "@(#)ttyansi. #include -char *strncpy(); char *textsw_checkpoint_undo(); Textsw_index textsw_replace_i18n(), textsw_erase_i18n(); @@ -48,7 +48,7 @@ int tty_new_cursor_row, tty_ #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 scroll_bottom = 0; /* to implement s 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 . Stash and restore the * cursor indicator. --- xview-3.2p1.4.orig/lib/libxview/ttysw/term_impl.h +++ xview-3.2p1.4/lib/libxview/ttysw/term_impl.h @@ -251,4 +251,4 @@ Pkg_private int tty_notice_key; #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 */ --- xview-3.2p1.4.orig/lib/libxview/ttysw/charscreen.h +++ xview-3.2p1.4/lib/libxview/ttysw/charscreen.h @@ -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 @@ struct pixfont *pixfont; * 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; --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_init.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_init.c @@ -20,6 +20,7 @@ static char sccsid[] = "@(#)tty_init #include #include #include +#include #include /* for XV* defines and termios */ @@ -43,6 +44,16 @@ static char sccsid[] = "@(#)tty_init #include #include +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 0 +#include +#else +#include +#endif +#include +#endif + #include #include @@ -80,8 +91,6 @@ static char sccsid[] = "@(#)tty_init #endif -extern char *strncpy(); -extern char *strcpy(); extern long lseek(); char *textsw_checkpoint_undo(); @@ -138,6 +147,8 @@ static Defaults_pairs inverse_and_underl NULL, -1 }; +static int ttyinit(Ttysw *ttysw); + Pkg_private int ttysw_lookup_boldstyle(str) char *str; @@ -434,7 +445,7 @@ ttysw_add_FNDELAY(fd) 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 @@ ttysw_fork_it(ttysw0, argv, wfd) 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 @@ ttysw_fork_it(ttysw0, argv, wfd) } /* 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 @@ ttysw_fork_it(ttysw0, argv, wfd) 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 @@ ttysw_fork_it(ttysw0, argv, wfd) 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 @@ ttyinit(ttysw) 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 @@ gotpty: 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 @@ gotpty: #endif #endif /* SVR4 */ +#endif /* __linux__ */ if (ttysw_restoreparms(tty)) (void) putenv(WE_TTYPARMS_E); @@ -972,7 +990,7 @@ gotpty: */ #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 @@ updateutmp(username, ttyslotuse, ttyfd) } 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 @@ updateutmp(username, ttyslotuse, ttyfd) endutent(); return 1; /* Return dummy value for ttyslot number */ } -#endif /* __linux */ -#endif SVR4 +#endif /* __linux__ */ +#endif /* SVR4 */ --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_main.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_main.c @@ -65,6 +65,11 @@ static char sccsid[] = "@(#)tty_main #endif /* FULL_R5 */ #endif +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#include +#endif + #ifdef OW_I18N /* * If there are committed chars and pre_edit chars returned by XIM, @@ -99,6 +104,11 @@ extern int tty_has_new_bufmod; #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 @@ ttysw_pty_output_ok(ttysw) */ #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 @@ ttysw_print_debug_string(cp, len) } #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 @@ ttysw_pty_input(ttysw, pty) 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 @@ ttysw_pty_input(ttysw, pty) (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 @@ xv_tty_new_size(ttysw, cols, lines) * 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 @@ xv_tty_new_size(ttysw, cols, lines) 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 @@ Pkg_private void 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 @@ ttysw_flush_input(ttysw) # 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); --- xview-3.2p1.4.orig/lib/libxview/ttysw/ttyselect.c +++ xview-3.2p1.4/lib/libxview/ttysw/ttyselect.c @@ -16,6 +16,10 @@ static char sccsid[] = "@(#)ttyselec #include #include #include +#ifndef XVIEW_USE_INSECURE_TMPFILES +/* martin.buck@bigfoot.com */ +#include +#endif #include #include @@ -102,7 +106,14 @@ static struct ttyselection *ttysel_ttyse 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 @@ ttysel_function(ttysw, buffer) 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; } --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_modes.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_modes.c @@ -125,7 +125,7 @@ ttysw_be_ttysw(ttysw_view) /* * 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_be_termsw(ttysw_view) */ 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 --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_impl.h +++ xview-3.2p1.4/lib/libxview/ttysw/tty_impl.h @@ -182,7 +182,7 @@ typedef struct ttysubwindow { 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 @@ typedef Ttysw_view_object* Ttysw_view_h */ #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 @@ Pkg_private void 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 @@ Pkg_private int 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 @@ int 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 */ --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_stty.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_stty.c @@ -122,7 +122,7 @@ we_setptyparms(tp) * 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 @@ we_setptyparms(tp) 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, --- xview-3.2p1.4.orig/lib/libxview/ttysw/csr_init.c +++ xview-3.2p1.4/lib/libxview/ttysw/csr_init.c @@ -31,7 +31,7 @@ static char sccsid[] = "@(#)csr_init #include #include #include -#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 @@ static char sccsid[] = "@(#)csr_init #define __DEFINE_CHARSCREEN_VARS #endif #include -#ifdef __linux +#ifdef __linux__ #undef __DEFINE_CHARSCREEN_VARS #endif #ifdef OW_I18N --- xview-3.2p1.4.orig/lib/libxview/ttysw/termsw.c +++ xview-3.2p1.4/lib/libxview/ttysw/termsw.c @@ -127,7 +127,12 @@ termsw_layout(termsw_public, termsw_view 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 @@ termsw_folio_init_internal(parent, terms /* 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; --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_newtxt.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_newtxt.c @@ -34,6 +34,10 @@ static char sccsid[] = "@(#)tty_newt */ +/* mbuck@debian.org */ +#if 1 +#include +#endif #include #include #include --- xview-3.2p1.4.orig/lib/libxview/ttysw/Imakefile +++ xview-3.2p1.4/lib/libxview/ttysw/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.11 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.11 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/ttysw/cim_change.c +++ xview-3.2p1.4/lib/libxview/ttysw/cim_change.c @@ -16,6 +16,7 @@ static char sccsid[] = "@(#)cim_chan #include #include +#include #include #include #include @@ -24,8 +25,6 @@ static char sccsid[] = "@(#)cim_chan char boldify; -extern char *strcpy(); - /* static */ void ttysw_roll(); static void reverse(); /* static */ void ttysw_swap(); --- xview-3.2p1.4.orig/lib/libxview/ttysw/tty_gtty.c +++ xview-3.2p1.4/lib/libxview/ttysw/tty_gtty.c @@ -34,7 +34,7 @@ static char sccsid[] = "@(#)tty_gtty.c */ #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 @@ static char sccsid[] = "@(#)tty_gtty.c #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 @@ static struct termios default_modes = 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 @@ static struct termios default_modes = { CWERASE, /* VWERASE */ CLNEXT, /* VLNEXT */ }; -#endif /* __linux */ +#endif /* __linux__ */ #else /* XV_USE_TERMIOS */ @@ -267,7 +279,7 @@ we_getptyparms(tp) struct termios *tp; { char str[WE_TTYPARMSLEN]; -#ifndef __linux +#ifndef __linux__ short temps[16]; #else short temps[17]; @@ -278,7 +290,7 @@ we_getptyparms(tp) 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 @@ we_getptyparms(tp) (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 @@ we_getptyparms(tp) (void) putenv(WE_TTYPARMS_E); return (0); } -#endif /* __linux */ +#endif /* __linux__ */ } #else /* XV_USE_TERMIOS */ --- xview-3.2p1.4.orig/lib/libxview/panel/panel_seln.c +++ xview-3.2p1.4/lib/libxview/panel/panel_seln.c @@ -15,7 +15,7 @@ static char sccsid[] = "@(#)panel_se #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ extern void (*panel_seln_inform_proc) (), (*panel_seln_destroy_proc) (); --- xview-3.2p1.4.orig/lib/libxview/panel/p_select.c +++ xview-3.2p1.4/lib/libxview/panel/p_select.c @@ -604,7 +604,7 @@ panel_default_handle_event(client_object 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; --- xview-3.2p1.4.orig/lib/libxview/panel/p_slider.c +++ xview-3.2p1.4/lib/libxview/panel/p_slider.c @@ -54,6 +54,8 @@ static void check_endbox_entered(); 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() */ --- xview-3.2p1.4.orig/lib/libxview/panel/p_list.c +++ xview-3.2p1.4/lib/libxview/panel/p_list.c @@ -1239,7 +1239,12 @@ panel_list_get_attr(panel_list_public, s 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 @@ panel_list_get_attr(panel_list_public, s 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 @@ panel_list_get_attr(panel_list_public, s 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 @@ panel_list_get_attr(panel_list_public, s 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 @@ panel_list_get_attr(panel_list_public, s #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 @@ panel_list_get_attr(panel_list_public, s #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 @@ panel_list_get_attr(panel_list_public, s #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 @@ panel_list_get_attr(panel_list_public, s 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 @@ panel_list_get_attr(panel_list_public, s } 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); --- xview-3.2p1.4.orig/lib/libxview/panel/p_utl.c +++ xview-3.2p1.4/lib/libxview/panel/p_utl.c @@ -169,7 +169,7 @@ panel_make_image(font, dest, type_code, xv_free(image_string_wc(dest)); } #else -#ifndef __linux +#ifndef __linux__ { if (image_string(dest)) xv_free(image_string(dest)); @@ -197,7 +197,7 @@ panel_make_image(font, dest, type_code, 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' --- xview-3.2p1.4.orig/lib/libxview/panel/item_set.c +++ xview-3.2p1.4/lib/libxview/panel/item_set.c @@ -25,6 +25,7 @@ Xv_private void win_set_no_focus(); 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(); --- xview-3.2p1.4.orig/lib/libxview/panel/p_txt.c +++ xview-3.2p1.4/lib/libxview/panel/p_txt.c @@ -5863,7 +5863,7 @@ paint_value_and_interm(ip, interm_str, i #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 @@ paint_value_and_interm(ip, interm_str, i 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 @@ paint_value_and_interm(ip, interm_str, i 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 @@ paint_value_and_interm(ip, interm_str, i 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 @@ paint_value_and_interm(ip, interm_str, i 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 @@ paint_value_and_interm(ip, interm_str, i 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 @@ paint_value_and_interm(ip, interm_str, i 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); --- xview-3.2p1.4.orig/lib/libxview/panel/p_btn.c +++ xview-3.2p1.4/lib/libxview/panel/p_btn.c @@ -203,7 +203,12 @@ btn_begin_preview(item_public, event) 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; --- xview-3.2p1.4.orig/lib/libxview/panel/p_num_btn.c +++ xview-3.2p1.4/lib/libxview/panel/p_num_btn.c @@ -23,7 +23,7 @@ Pkg_private int panel_num_down_button_in */ #ifndef SVR4 static short up_button_10_image[] = { -#else SVR4 +#else /* SVR4 */ static unsigned short up_button_10_image[] = { #endif #include @@ -32,27 +32,27 @@ static mpr_static(up_button_10_pr, 16, 1 #ifndef SVR4 static short up_button_12_image[] = { -#else SVR4 +#else /* SVR4 */ static unsigned short up_button_12_image[] = { -#endif SVR4 +#endif /* SVR4 */ #include }; 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 }; 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 }; static mpr_static(up_button_19_pr, 32, 25, 1, up_button_19_image); @@ -63,36 +63,36 @@ static mpr_static(up_button_19_pr, 32, 2 */ #ifndef SVR4 static short down_button_10_image[] = { -#else SVR4 +#else /* SVR4 */ static unsigned short down_button_10_image[] = { -#endif SVR4 +#endif /* SVR4 */ #include }; 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 }; 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 }; 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 }; static mpr_static(down_button_19_pr, 32, 25, 1, down_button_19_image); --- xview-3.2p1.4.orig/lib/libxview/panel/p_set.c +++ xview-3.2p1.4/lib/libxview/panel/p_set.c @@ -23,6 +23,8 @@ Xv_private char *xv_font_bold(); 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 --- xview-3.2p1.4.orig/lib/libxview/panel/panel_impl.h +++ xview-3.2p1.4/lib/libxview/panel/panel_impl.h @@ -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 -#endif FILE +#endif /* FILE */ #include #include #include @@ -89,7 +89,7 @@ typedef struct panel_info { #ifdef OW_I18N Atom compound_text; Atom length_chars; -#endif /*OW_I18N*/ +#endif /* OW_I18N */ } atom; Xv_Font bold_font; #ifdef OW_I18N --- xview-3.2p1.4.orig/lib/libxview/panel/p_choice.c +++ xview-3.2p1.4/lib/libxview/panel/p_choice.c @@ -121,6 +121,10 @@ static void update_item_rect(); 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() */ --- xview-3.2p1.4.orig/lib/libxview/panel/panel.c +++ xview-3.2p1.4/lib/libxview/panel/panel.c @@ -28,7 +28,7 @@ Pkg_private int panel_destroy(); 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 @@ static Defaults_pairs shiftmasks[] = { Attr_attribute panel_context_key; +static panel_unregister_view(Panel_info *panel, Xv_Window view); /*ARGSUSED*/ Pkg_private int @@ -292,7 +293,12 @@ panel_layout(panel_public, child, op, d1 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); --- xview-3.2p1.4.orig/lib/libxview/panel/Imakefile +++ xview-3.2p1.4/lib/libxview/panel/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.12 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.12 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/panel/p_get.c +++ xview-3.2p1.4/lib/libxview/panel/p_get.c @@ -20,6 +20,7 @@ static int shrink_to_fit(); #define MAX_NEGATIVE_SHRINK 2000 #define SHRINK_MARGIN 4 +static panel_shrink_margin(Panel_info *panel); /*ARGSUSED*/ Pkg_private Xv_opaque --- xview-3.2p1.4.orig/lib/libxview/panel/p_gauge.c +++ xview-3.2p1.4/lib/libxview/panel/p_gauge.c @@ -92,6 +92,7 @@ typedef struct { /* data for a gauge */ unsigned int vertical:1; } Gauge_info; +static int etoi(); /* ========================================================================= */ --- xview-3.2p1.4.orig/lib/libxview/panel/p_mlinetxt.c +++ xview-3.2p1.4/lib/libxview/panel/p_mlinetxt.c @@ -356,7 +356,12 @@ panel_mltxt_set_avlist(item_public, avli 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 @@ panel_mltxt_get_attr(item_public, status 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: --- xview-3.2p1.4.orig/lib/libxview/selection/sel_req.c +++ xview-3.2p1.4/lib/libxview/selection/sel_req.c @@ -17,16 +17,15 @@ static char sccsid[] = "@(#)sel_req. #include #include -#if defined(SVR4) || defined(__linux) +#if defined(SVR4) || defined(__linux__) #include -#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 GetSelection(); 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 --- xview-3.2p1.4.orig/lib/libxview/selection/sel_item.c +++ xview-3.2p1.4/lib/libxview/selection/sel_item.c @@ -14,7 +14,7 @@ static char sccsid[] = "@(#)sel_item #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ Pkg_private char *xv_sel_atom_to_str(/* display, atom */); Pkg_private Atom xv_sel_str_to_atom(/* display, string */); --- xview-3.2p1.4.orig/lib/libxview/selection/sel_own.c +++ xview-3.2p1.4/lib/libxview/selection/sel_own.c @@ -17,7 +17,7 @@ static char sccsid[] = "@(#)sel_own. #include #ifdef SVR4 #include -#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 SetupPropInfo(); static void OwnerProcessIncr(); static void RegisterSelClient(); +static int SendIncr(Sel_owner_info *seln); + extern XContext selCtx; extern XContext propCtx; extern XContext reqCtx; --- xview-3.2p1.4.orig/lib/libxview/selection/sel_impl.h +++ xview-3.2p1.4/lib/libxview/selection/sel_impl.h @@ -112,7 +112,7 @@ typedef struct sel_atom_list { Atom integer; #ifdef OW_I18N Atom ctext; -#endif OW_I18N +#endif /* OW_I18N */ } Sel_atom_list; @@ -218,7 +218,7 @@ Xv_private int xv_seln_handle_req(); 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; --- xview-3.2p1.4.orig/lib/libxview/selection/selection.c +++ xview-3.2p1.4/lib/libxview/selection/selection.c @@ -10,12 +10,12 @@ static char sccsid[] = "@(#)selectio * 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 -#ifdef __linux +#ifdef __linux__ #undef __DEFINE_SEL_IMPL_VARS #endif #include --- xview-3.2p1.4.orig/lib/libxview/selection/sel_util.c +++ xview-3.2p1.4/lib/libxview/selection/sel_util.c @@ -17,13 +17,15 @@ static char sccsid[] = "@(#)sel_util #include #ifdef SVR4 #include -#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 @@ Window xid; 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 ); } --- xview-3.2p1.4.orig/lib/libxview/selection/Imakefile +++ xview-3.2p1.4/lib/libxview/selection/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/io_stream/input.c +++ xview-3.2p1.4/lib/libxview/io_stream/input.c @@ -22,7 +22,7 @@ static char sccsid[] = "@(#)input.c XV_MSG("input stream not of type input"), 0); \ ops = in->ops.input_ops -char *stream_getstring(); +static char *stream_getstring(); /* GENERIC INPUT FUNCTIONS */ --- xview-3.2p1.4.orig/lib/libxview/io_stream/Imakefile +++ xview-3.2p1.4/lib/libxview/io_stream/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/help/help_file.c +++ xview-3.2p1.4/lib/libxview/help/help_file.c @@ -18,11 +18,15 @@ static char sccsid[] = "@(#)help_fil #include -#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 @@ xv_help_find_file(filename) /* * 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 --- xview-3.2p1.4.orig/lib/libxview/help/help.h +++ xview-3.2p1.4/lib/libxview/help/help.h @@ -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 */ --- xview-3.2p1.4.orig/lib/libxview/help/Imakefile +++ xview-3.2p1.4/lib/libxview/help/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/base/generic.c +++ xview-3.2p1.4/lib/libxview/base/generic.c @@ -251,7 +251,12 @@ generic_set_avlist(object, avlist) 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 @@ generic_set_avlist(object, avlist) 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 @@ generic_get(object, status, attr, args) case XV_IM: result = NULL; break; -#endif OW_I18N +#endif /* OW_I18N */ default: if (xv_check_bad_attr(XV_GENERIC_OBJECT, attr) == XV_ERROR) { --- xview-3.2p1.4.orig/lib/libxview/base/base.h +++ xview-3.2p1.4/lib/libxview/base/base.h @@ -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 --- xview-3.2p1.4.orig/lib/libxview/base/generic.h +++ xview-3.2p1.4/lib/libxview/base/generic.h @@ -247,8 +247,14 @@ typedef struct { } 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) --- xview-3.2p1.4.orig/lib/libxview/base/xv_list.h +++ xview-3.2p1.4/lib/libxview/base/xv_list.h @@ -91,4 +91,4 @@ xv_sl_remove(); 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 */ --- xview-3.2p1.4.orig/lib/libxview/base/xv_error.c +++ xview-3.2p1.4/lib/libxview/base/xv_error.c @@ -16,12 +16,17 @@ static char sccsid[] = "@(#)xv_error #include #include +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#include +#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 --- xview-3.2p1.4.orig/lib/libxview/base/qualifyx.h +++ xview-3.2p1.4/lib/libxview/base/qualifyx.h @@ -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 */ --- xview-3.2p1.4.orig/lib/libxview/base/xv_parse.c +++ xview-3.2p1.4/lib/libxview/base/xv_parse.c @@ -29,7 +29,7 @@ static char sccsid[] = "@(#)xv_parse #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ extern XrmDatabase defaults_rdb; @@ -312,7 +312,7 @@ xv_parse_one(app_name, argc, argv) 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 @@ xv_parse_one(app_name, argc, argv) 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 @@ NegArg: { 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, --- xview-3.2p1.4.orig/lib/libxview/base/Imakefile +++ xview-3.2p1.4/lib/libxview/base/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/base/xv_debug.h +++ xview-3.2p1.4/lib/libxview/base/xv_debug.h @@ -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 -#endif FILE +#endif /* FILE */ #include /* needed to get definition of Xv_private */ /* * Not strictly necessary to include here, but eliminates @@ -88,7 +88,7 @@ typedef enum { * 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 @@ typedef enum { #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 */ --- xview-3.2p1.4.orig/lib/libxview/base/gen_impl.h +++ xview-3.2p1.4/lib/libxview/base/gen_impl.h @@ -39,4 +39,4 @@ typedef struct { char *instance_name; } Generic_info; -#endif _gen_impl_h_already_included +#endif /* _gen_impl_h_already_included */ --- xview-3.2p1.4.orig/lib/libxview/base/xv_xlib.h +++ xview-3.2p1.4/lib/libxview/base/xv_xlib.h @@ -27,5 +27,5 @@ typedef struct { int count; } Xv_xrectlist; -#endif _view2_private_xv_xlib_h_already_included +#endif /* _view2_private_xv_xlib_h_already_included */ --- xview-3.2p1.4.orig/lib/libxview/base/xv.c +++ xview-3.2p1.4/lib/libxview/base/xv.c @@ -112,7 +112,7 @@ void *xv_calloc( num, size ) */ #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 @@ va_dcl 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 @@ va_dcl * 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); --- xview-3.2p1.4.orig/lib/libxview/icon/Imakefile +++ xview-3.2p1.4/lib/libxview/icon/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/misc/portable.h +++ xview-3.2p1.4/lib/libxview/misc/portable.h @@ -49,7 +49,7 @@ EXTERN_FUNCTION (Attr_avlist copy_va_to_ #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 @@ EXTERN_FUNCTION (Attr_avlist copy_va_to_ * 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 @@ EXTERN_FUNCTION (Attr_avlist copy_va_to_ #undef XV_USE_TERMIOS #undef XV_USE_SVR4_PTYS #endif /* SVR4 */ -#endif /* __linux */ +#endif /* __linux__ */ #endif /* xview_portable_h_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/misc/xv_icccm.c +++ xview-3.2p1.4/lib/libxview/misc/xv_icccm.c @@ -64,4 +64,4 @@ xv_withdraw_window(dpy, win, scrn) (XEvent *)&evt)); } -#endif PRE_R4_ICCCM +#endif /* PRE_R4_ICCCM */ --- xview-3.2p1.4.orig/lib/libxview/misc/getlogindr.c +++ xview-3.2p1.4/lib/libxview/misc/getlogindr.c @@ -24,7 +24,7 @@ char * xv_getlogindir() { extern char *getlogin(), *getenv(); -#ifndef __linux +#ifndef __linux__ extern struct passwd *getpwnam(), *getpwuid(); #endif struct passwd *passwdent; --- xview-3.2p1.4.orig/lib/libxview/misc/hashfn.h +++ xview-3.2p1.4/lib/libxview/misc/hashfn.h @@ -49,5 +49,5 @@ extern caddr_t /* payload pointer */ has 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 */ --- xview-3.2p1.4.orig/lib/libxview/misc/setlocale.c +++ xview-3.2p1.4/lib/libxview/misc/setlocale.c @@ -59,4 +59,4 @@ char *locale; } -#endif OS_HAS_LOCALE +#endif /* OS_HAS_LOCALE */ --- xview-3.2p1.4.orig/lib/libxview/misc/i18n_impl.h +++ xview-3.2p1.4/lib/libxview/misc/i18n_impl.h @@ -26,7 +26,7 @@ #include /* 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 --- xview-3.2p1.4.orig/lib/libxview/misc/quark.c +++ xview-3.2p1.4/lib/libxview/misc/quark.c @@ -16,7 +16,7 @@ static char sccsid[] = "@(#) quark.c #include #include -Xv_opaque resource_type_conv(); +static Xv_opaque resource_type_conv(); /* * Utilities to deal with quark lists and such. --- xview-3.2p1.4.orig/lib/libxview/misc/drop.c +++ xview-3.2p1.4/lib/libxview/misc/drop.c @@ -11,7 +11,7 @@ #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #define DD_FAILED -1 --- xview-3.2p1.4.orig/lib/libxview/misc/gettext.c +++ xview-3.2p1.4/lib/libxview/misc/gettext.c @@ -7,13 +7,15 @@ static char sccsid[] = "@(#)gettext. #endif #endif +#include #include -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 @@ lookupdefbind(domain_name) #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 @@ dgettext(domain_name, msg_id) #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 @@ dgettext(domain_name, msg_id) 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; --- xview-3.2p1.4.orig/lib/libxview/misc/gettext.h +++ xview-3.2p1.4/lib/libxview/misc/gettext.h @@ -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 #ifdef OS_HAS_LOCALE #include -#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 #include #include --- xview-3.2p1.4.orig/lib/libxview/misc/Imakefile +++ xview-3.2p1.4/lib/libxview/misc/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.7 24 Mar 1992 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.7 24 Mar 1992 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/misc/bitmask.h +++ xview-3.2p1.4/lib/libxview/misc/bitmask.h @@ -32,6 +32,6 @@ extern unsigned int xv_bitss_get_mask(); extern int xv_bitss_cmp_mask(); extern Bitmask * xv_bitss_copy_mask(); -#endif bitmask_c +#endif /* bitmask_c */ -#endif bitmask_h +#endif /* bitmask_h */ --- xview-3.2p1.4.orig/lib/libxview/misc/expandname.c +++ xview-3.2p1.4/lib/libxview/misc/expandname.c @@ -22,17 +22,20 @@ static char sccsid[] = "@(#)expandna #include #include -#ifdef sparc +#if defined(sparc) && !defined(linux) #ifdef SVR4 #include #else #include -#endif SVR4 +#endif /* SVR4 */ +#endif +#ifdef __linux__ +#include #endif #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #include #include @@ -120,9 +123,9 @@ xv_expand_name(name) (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) { --- xview-3.2p1.4.orig/lib/libxview/win/win_bldkmp.c +++ xview-3.2p1.4/lib/libxview/win/win_bldkmp.c @@ -261,12 +261,12 @@ win_build_xv_map(display, count) 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) { --- xview-3.2p1.4.orig/lib/libxview/win/win_ascii.h +++ xview-3.2p1.4/lib/libxview/win/win_ascii.h @@ -1872,4 +1872,4 @@ unsigned char win_ascii_sem[] = { }; -#endif win_ascii_data_DEFINED +#endif /* win_ascii_data_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/win/win_input.c +++ xview-3.2p1.4/lib/libxview/win/win_input.c @@ -17,7 +17,12 @@ static char sccsid[] = "@(#)win_inpu #include #include #include +/* mbuck@debian.org */ +#if 1 +#include /* required by Xutil.h */ +#else #include /* required by Xutil.h */ +#endif #include #include #include @@ -77,7 +82,7 @@ Xv_private int win_handle_window_accel( Xv_private int win_handle_menu_accel(); /* ACC_XVIEW */ -#ifndef __linux +#ifndef __linux__ FILE *fopen(), *fexp; #endif @@ -88,6 +93,7 @@ static int process_clientmessage_ev 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 @@ chording(display, bEvent, timeout) /* 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 } --- xview-3.2p1.4.orig/lib/libxview/win/win_kmdata.h +++ xview-3.2p1.4/lib/libxview/win/win_kmdata.h @@ -48,7 +48,7 @@ const unsigned int win_keymap[] = { #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 @@ const unsigned int win_keymap[] = { }; -#endif win_keymap_data_DEFINED +#endif /* win_keymap_data_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/win/win_keymap.h +++ xview-3.2p1.4/lib/libxview/win/win_keymap.h @@ -53,4 +53,4 @@ typedef enum { -#endif win_keymap_DEFINED +#endif /* win_keymap_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/win/Imakefile +++ xview-3.2p1.4/lib/libxview/win/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/filter/filter.h +++ xview-3.2p1.4/lib/libxview/filter/filter.h @@ -38,4 +38,4 @@ EXTERN_FUNCTION (struct filter_rec **xv_ EXTERN_FUNCTION (void xv_free_filter_table, (struct filter_rec **table)); -#endif ~xview_filter_DEFINED +#endif /* ~xview_filter_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/filter/filter.c +++ xview-3.2p1.4/lib/libxview/filter/filter.c @@ -39,10 +39,9 @@ static char sccsid[] = "@(#)filter.c 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 ** --- xview-3.2p1.4.orig/lib/libxview/filter/Imakefile +++ xview-3.2p1.4/lib/libxview/filter/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/canvas/Imakefile +++ xview-3.2p1.4/lib/libxview/canvas/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.5 24 Mar 1992 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.5 24 Mar 1992 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/menu/om_public.c +++ xview-3.2p1.4/lib/libxview/menu/om_public.c @@ -18,7 +18,7 @@ static char sccsid[] = "@(#)om_publi #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #include --- xview-3.2p1.4.orig/lib/libxview/menu/omi_impl.h +++ xview-3.2p1.4/lib/libxview/menu/omi_impl.h @@ -15,9 +15,9 @@ #ifndef pixrect_DEFINED #ifndef _TYPES_ #include -#endif _TYPES_ +#endif /* _TYPES_ */ #include -#endif pixrect_DEFINED +#endif /* pixrect_DEFINED */ #include #include #ifdef OW_I18N @@ -87,4 +87,4 @@ struct image { #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 */ --- xview-3.2p1.4.orig/lib/libxview/menu/openmenu.h +++ xview-3.2p1.4/lib/libxview/menu/openmenu.h @@ -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 @@ typedef enum { 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), --- xview-3.2p1.4.orig/lib/libxview/menu/omi.h +++ xview-3.2p1.4/lib/libxview/menu/omi.h @@ -103,4 +103,4 @@ typedef enum { extern void image_destroy(); extern void image_render(); -#endif ~xview_image_DEFINED +#endif /* ~xview_image_DEFINED */ --- xview-3.2p1.4.orig/lib/libxview/menu/Imakefile +++ xview-3.2p1.4/lib/libxview/menu/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/menu/om_impl.h +++ xview-3.2p1.4/lib/libxview/menu/om_impl.h @@ -22,7 +22,7 @@ #ifdef OW_I18N #include #include -#endif OW_I18N +#endif /* OW_I18N */ /***** Definitions *****/ #ifndef TRUE @@ -198,7 +198,7 @@ typedef struct menu { 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 @@ typedef struct menu_item { } Xv_menu_item_info; -#endif _xview_walkmenu_impl_h_already_included +#endif /* _xview_walkmenu_impl_h_already_included */ --- xview-3.2p1.4.orig/lib/libxview/sel/seln.c +++ xview-3.2p1.4/lib/libxview/sel/seln.c @@ -14,6 +14,10 @@ static char sccsid[] = "@(#)seln.c 2 #include #include #include +#ifndef XVIEW_USE_INSECURE_TMPFILES +/* martin.buck@bigfoot.com */ +#include +#endif #include #include #include @@ -133,8 +137,19 @@ selection_filename() { 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); } --- xview-3.2p1.4.orig/lib/libxview/sel/sel_compat.h +++ xview-3.2p1.4/lib/libxview/sel/sel_compat.h @@ -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 */ --- xview-3.2p1.4.orig/lib/libxview/sel/seln_impl.h +++ xview-3.2p1.4/lib/libxview/sel/seln_impl.h @@ -11,11 +11,11 @@ #include #ifndef FILE -#if !defined(SVR4) && !defined(__linux) +#if !defined(SVR4) && !defined(__linux__) #undef NULL -#endif SVR4 +#endif /* SVR4 */ #include -#endif FILE +#endif /* FILE */ #include #include #include @@ -97,7 +97,7 @@ typedef struct { Time timestamp; unsigned char format; } Seln_agent_context; -#endif OW_I18N +#endif /* OW_I18N */ typedef struct { long offset; @@ -203,7 +203,7 @@ typedef struct { 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 --- xview-3.2p1.4.orig/lib/libxview/sel/Imakefile +++ xview-3.2p1.4/lib/libxview/sel/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/sel/sel_agent.c +++ xview-3.2p1.4/lib/libxview/sel/sel_agent.c @@ -12,7 +12,12 @@ static char sccsid[] = "@(#)sel_agen #include +/* mbuck@debian.org */ +#if 1 +#include +#else #include +#endif #include #include #include @@ -31,10 +36,10 @@ static char sccsid[] = "@(#)sel_agen * Ultrix */ #include -#if defined(SVR4) || defined(__linux) +#if defined(SVR4) || defined(__linux__) #include #include -#endif SVR4 +#endif /* SVR4 */ static void selection_agent_process_functions(); @@ -63,6 +68,7 @@ static Seln_result seln_do_request_from_ 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 @@ seln_do_request_from_file(attr, context, 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 @@ sel_get_wcs(server, selection, replier_d 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 @@ extern int dtablesize_cache; #else #define GETDTABLESIZE() \ (dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize())) -#endif SVR4 +#endif /* SVR4 */ /* @@ -1555,9 +1560,9 @@ waitforReadableTimeout(display, timeout) #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 @@ convert_attr_to_target(dpy, agent, attr) 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) --- xview-3.2p1.4.orig/lib/libxview/fullscreen/Imakefile +++ xview-3.2p1.4/lib/libxview/fullscreen/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/file_chooser/file_list.c +++ xview-3.2p1.4/lib/libxview/file_chooser/file_list.c @@ -48,7 +48,7 @@ static void flist_error(File_list_privat static void flist_error(); #endif - +static int flist_match_regex( char *s, File_list_private *private ); /* * xv_create() method @@ -426,7 +426,12 @@ file_list_get( public, status, attr, val 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 @@ file_list_destroy ( public, status ) 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 @@ flist_update_list( private, rows, num_ro /****************************************************************************/ -#ifndef __linux +#ifndef __linux__ /* * Front end to regexp(3). * @@ -1213,7 +1218,7 @@ flist_match_regex( s, private ) 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 @@ flist_compile_regex( private ) 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 @@ flist_match_regex( s, private ) 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__ */ /****************************************************************************/ --- xview-3.2p1.4.orig/lib/libxview/file_chooser/flist_impl.h +++ xview-3.2p1.4/lib/libxview/file_chooser/flist_impl.h @@ -9,7 +9,7 @@ #include #include -#ifdef __linux +#ifdef __linux__ #include #endif #include @@ -25,7 +25,7 @@ typedef struct { 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 */ --- xview-3.2p1.4.orig/lib/libxview/file_chooser/Imakefile +++ xview-3.2p1.4/lib/libxview/file_chooser/Imakefile @@ -6,8 +6,8 @@ #include -/**/########################################################################### -/**/# @(#)Imakefile 1.10 90/01/11 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.10 90/01/11 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/pw/xv_rop.c +++ xview-3.2p1.4/lib/libxview/pw/xv_rop.c @@ -301,7 +301,7 @@ xv_rop_mpr_internal(display, d, gc, x, y else ximage->bitmap_bit_order = MSBFirst; #else -#ifdef ultrix +#if defined(ultrix) || defined(__alpha) ximage->byte_order = LSBFirst; ximage->bitmap_bit_order = MSBFirst; #else --- xview-3.2p1.4.orig/lib/libxview/pw/Imakefile +++ xview-3.2p1.4/lib/libxview/pw/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/rect/rect_util.c +++ xview-3.2p1.4/lib/libxview/rect/rect_util.c @@ -16,6 +16,8 @@ static char sccsid[] = "@(#)rect_uti #include +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 --- xview-3.2p1.4.orig/lib/libxview/rect/Imakefile +++ xview-3.2p1.4/lib/libxview/rect/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/screen/scrn_lyout.c +++ xview-3.2p1.4/lib/libxview/screen/scrn_lyout.c @@ -23,6 +23,10 @@ screen_layout(root, child, op, d1, d2, d 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); --- xview-3.2p1.4.orig/lib/libxview/screen/scrn_get.c +++ xview-3.2p1.4/lib/libxview/screen/scrn_get.c @@ -20,6 +20,10 @@ static char sccsid[] = "@(#)scrn_get #include #include #include +/* mbuck@debian.org */ +#if 1 +#include +#endif /* Bitmap used for the inactive GC */ static unsigned short screen_gray50_bitmap[16] = { /* 50% gray pattern */ --- xview-3.2p1.4.orig/lib/libxview/screen/Imakefile +++ xview-3.2p1.4/lib/libxview/screen/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/textsw/finger_tbl.c +++ xview-3.2p1.4/lib/libxview/textsw/finger_tbl.c @@ -23,7 +23,7 @@ static char sccsid[] = "@(#)finger_t #include #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ static void ft_validate_first_infinity(finger_table) --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_once.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_once.c @@ -436,7 +436,12 @@ textsw_layout(textsw, child, op, d1, d2, 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 @@ contents or store the contents as a new 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. */ --- xview-3.2p1.4.orig/lib/libxview/textsw/es_file.c +++ xview-3.2p1.4/lib/libxview/textsw/es_file.c @@ -97,7 +97,7 @@ static char sccsid[] = "@(#)es_file. #include #include #include -#ifdef __linux +#ifdef __linux__ #include #endif #include @@ -112,9 +112,13 @@ static char sccsid[] = "@(#)es_file. #include +#if defined(__linux__) && defined(__GLIBC__) +/* martin.buck@bigfoot.com */ +#include +#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 @@ es_file_create(name, options, status) char name[MAXNAMLEN]; (void) wcstombs(name, name_wc, MAXNAMLEN); #endif /* OW_I18N */ -#ifdef __linux +#ifdef __linux__ long int maxlinks; #endif @@ -379,11 +383,11 @@ es_file_create(name, options, status) #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 @@ es_file_create(name, options, status) 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 @@ Error_Return: } /* ARGSUSED */ -static caddr_t +caddr_t #ifdef ANSI_FUNC_PROTO es_file_get(Es_handle esh, Es_attribute attribute, ...) #else --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_edit.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_edit.c @@ -28,7 +28,7 @@ static char sccsid[] = "@(#)txt_edit #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 */ --- xview-3.2p1.4.orig/lib/libxview/textsw/ps_impl.c +++ xview-3.2p1.4/lib/libxview/textsw/ps_impl.c @@ -62,6 +62,9 @@ static Es_index ps_read(), ps_scratch_re 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 @@ ps_undo_to_mark(esh, mark, notify_proc, 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 --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_view.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_view.c @@ -66,7 +66,12 @@ textsw_view_init(parent, textsw_view_pub 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. --- xview-3.2p1.4.orig/lib/libxview/textsw/ev_display.c +++ xview-3.2p1.4/lib/libxview/textsw/ev_display.c @@ -921,6 +921,7 @@ ev_swap_line_table(table1, table2) } +static void ev_swap_line_table(); Pkg_private Es_index ev_scroll_lines(view, line_count, scroll_by_display_lines) @@ -940,7 +941,6 @@ ev_scroll_lines(view, line_count, scroll 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; --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_menu.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_menu.c @@ -129,6 +129,8 @@ static Defaults_pairs line_break_pairs[] /* 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 @@ textsw_new_menu(folio) 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(); --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_incl.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_incl.c @@ -30,7 +30,7 @@ static char sccsid[] = "@(#)txt_incl #include #include -#ifdef SVR4 +#if defined(SVR4) || defined(__linux__) #include #include #endif /* SVR4 */ @@ -108,14 +108,14 @@ do_include_proc(folio, ie) /* 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 @@ create_include_items(panel, view) 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 @@ include_cmd_proc(fc,path,file,client_dat /* 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); --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_input.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_input.c @@ -193,6 +193,15 @@ textsw_gprofed_routine(view, ie) #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 @@ textsw_process_event(view_public, ie, ar 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 @@ Return: #ifdef OW_I18N Pkg_private int #else -static int +int #endif textsw_do_newline(view, action) register Textsw_view_handle view; --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_file.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_file.c @@ -18,10 +18,14 @@ static char sccsid[] = "@(#)txt_file #include #include #include -#ifdef SVR4 +#if defined(SVR4) || defined(__linux__) #include #include #include +#ifdef __linux__ +#include +#include +#endif #else #include #include @@ -43,15 +47,19 @@ static char sccsid[] = "@(#)txt_file 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 +#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 @@ textsw_make_temp_name(in_here) * 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 @@ textsw_full_pathname(name) } #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 @@ textsw_full_pathname(name) #else /* OW_I18N */ -#ifdef SVR4 +#if defined(SVR4) || defined(__linux__) if (getcwd(pathname, MAXPATHLEN) == 0) #else if (getwd(pathname) == 0) @@ -925,14 +939,14 @@ textsw_get_from_fd(view, fd, print_error 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); --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_popup.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_popup.c @@ -104,6 +104,9 @@ Panel_item sel_line_panel_items[MAX 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 @@ textsw_create_popup_frame(view, popup_ty 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 @@ add_exten_item( fc ) 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); --- xview-3.2p1.4.orig/lib/libxview/textsw/ev_edit.c +++ xview-3.2p1.4/lib/libxview/textsw/ev_edit.c @@ -502,7 +502,7 @@ ev_make_visible(view, position, lower_co 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 --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_field.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_field.c @@ -98,6 +98,8 @@ Done: } +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 @@ check_selection(buf, buf_len, first, las 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 @@ check_selection(buf, buf_len, first, las 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) { --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_filter.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_filter.c @@ -31,13 +31,16 @@ static char sccsid[] = "@(#)txt_filt #include #include -#ifdef sparc +#if defined(sparc) && !defined(linux) #ifdef SVR4 #include #else #include #endif /* SVR4 */ #endif +#ifdef __linux__ +#include +#endif #include #include #include @@ -73,6 +76,8 @@ Xv_public char *xv_getlogindir(); 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 @@ start_filter(filter_argv, filter_input, #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 @@ start_filter(filter_argv, filter_input, #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) --- xview-3.2p1.4.orig/lib/libxview/textsw/ev_op_bdry.c +++ xview-3.2p1.4/lib/libxview/textsw/ev_op_bdry.c @@ -27,6 +27,8 @@ Pkg_private Es_index ev_position_for_phy 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++) --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_putkey.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_putkey.c @@ -26,6 +26,7 @@ Pkg_private int ev_get_selection(); 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) --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_impl.h +++ xview-3.2p1.4/lib/libxview/textsw/txt_impl.h @@ -181,7 +181,12 @@ typedef struct textsw_view_object { 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; --- xview-3.2p1.4.orig/lib/libxview/textsw/primal.h +++ xview-3.2p1.4/lib/libxview/textsw/primal.h @@ -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 --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_again.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_again.c @@ -19,15 +19,16 @@ static char sccsid[] = "@(#)txt_agai #include #include #include -#ifdef SVR4 +#if defined SVR4 || defined __linux__ #include #include #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 @@ textsw_string_min_free(ptr_to_string, mi * 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 @@ va_dcl 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 @@ va_dcl } #endif /* SVR4 */ -#endif /* __linux */ +#endif /* __linux__ */ static void textsw_record_buf(again, buffer, buffer_length) @@ -644,7 +645,7 @@ textsw_record_trash_insert(textsw) * 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 @@ va_dcl 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 @@ va_dcl #endif /* OW_I18N */ } -#endif /* __linux */ +#endif /* __linux__ */ static int textsw_next_is_delimiter(again) --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_selsvc.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_selsvc.c @@ -24,7 +24,8 @@ static char sccsid[] = "@(#)txt_sels #include #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(); --- xview-3.2p1.4.orig/lib/libxview/textsw/ei_text.c +++ xview-3.2p1.4/lib/libxview/textsw/ei_text.c @@ -105,12 +105,12 @@ typedef ei_plain_text_object *Eipt_handl #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 @@ static void ei_plain_text_set_dummy_char #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 @@ Rescan: } 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 --- xview-3.2p1.4.orig/lib/libxview/textsw/es_mem.c +++ xview-3.2p1.4/lib/libxview/textsw/es_mem.c @@ -15,6 +15,7 @@ static char sccsid[] = "@(#)es_mem.c */ #include +#include #include #include #include @@ -36,8 +37,6 @@ typedef struct es_mem_text { 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 @@ es_mem_destroy(esh) } /* ARGSUSED */ -static caddr_t +caddr_t #ifdef ANSI_FUNC_PROTO es_mem_get(Es_handle esh, Es_attribute attribute, ...) #else --- xview-3.2p1.4.orig/lib/libxview/textsw/Imakefile +++ xview-3.2p1.4/lib/libxview/textsw/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.12 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.12 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_search.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_search.c @@ -79,7 +79,7 @@ textsw_do_search_proc(view, direction, r 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 @@ do_replace_proc(view) 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), --- xview-3.2p1.4.orig/lib/libxview/textsw/txt_e_menu.c +++ xview-3.2p1.4/lib/libxview/textsw/txt_e_menu.c @@ -75,6 +75,7 @@ static int walk_getmenu(); 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 @@ textsw_get_extras_filename(mi) 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", --- xview-3.2p1.4.orig/lib/libxview/notice/notice_get.c +++ xview-3.2p1.4/lib/libxview/notice/notice_get.c @@ -29,7 +29,10 @@ Notice_attribute attr; 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) { --- xview-3.2p1.4.orig/lib/libxview/notice/notice_set.c +++ xview-3.2p1.4/lib/libxview/notice/notice_set.c @@ -22,7 +22,6 @@ static char sccsid[] = "@(#)notice_s #include #include -extern char *strchr(); Pkg_private Xv_opaque notice_generic_set(); #ifdef OW_I18N static CHAR **notice_string_set(); --- xview-3.2p1.4.orig/lib/libxview/notice/notice_pt.c +++ xview-3.2p1.4/lib/libxview/notice/notice_pt.c @@ -29,7 +29,7 @@ Xv_public char xv_iso_select; /* * 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 @@ extern Defaults_pairs bell_types[]; #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 ---------------------------- */ --- xview-3.2p1.4.orig/lib/libxview/notice/noticeimpl.h +++ xview-3.2p1.4/lib/libxview/notice/noticeimpl.h @@ -204,4 +204,4 @@ Pkg_private int notice_jump_cursor; Pkg_private int notice_context_key; Pkg_private Defaults_pairs bell_types[]; -#endif notice_impl_h_already_defined +#endif /* notice_impl_h_already_defined */ --- xview-3.2p1.4.orig/lib/libxview/notice/Imakefile +++ xview-3.2p1.4/lib/libxview/notice/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_get.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_get.c @@ -111,7 +111,7 @@ openwin_get(owin_public, get_status, att #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; --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_seln.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_seln.c @@ -114,4 +114,4 @@ openwin_select_view(owin_public, view) } } -#endif SELECTABLE_VIEWS +#endif /* SELECTABLE_VIEWS */ --- xview-3.2p1.4.orig/lib/libxview/openwin/openwin.c +++ xview-3.2p1.4/lib/libxview/openwin/openwin.c @@ -84,7 +84,7 @@ openwin_init(parent, owin_public, avlist #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 @@ openwin_init(parent, owin_public, avlist 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_layout(owin_public, child, op, d 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; --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_impl.h +++ xview-3.2p1.4/lib/libxview/openwin/ow_impl.h @@ -91,7 +91,7 @@ struct openwin_info_struct { #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 void openwin_seln_function(); 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 void openwin_split_view(); extern int openwin_fill_view_gap(); extern void openwin_copy_scrollbar(); -#endif __openwin_impl_h +#endif /* __openwin_impl_h */ --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_evt.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_evt.c @@ -48,7 +48,7 @@ openwin_event(owin_public, event, arg, t 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 @@ openwin_event(owin_public, event, arg, t #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 @@ openwin_view_event(window_public, event, #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); --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_paint.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_paint.c @@ -41,7 +41,7 @@ Pkg_private void openwin_clear_damage(); 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 @@ openwin_lolite_view(owin_public, view) 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 */ --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_set.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_set.c @@ -55,7 +55,7 @@ openwin_set(owin_public, avlist) 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 @@ openwin_set(owin_public, avlist) 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; --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_view.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_view.c @@ -58,6 +58,7 @@ static openwin_locate_bottom_vi 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 @@ openwin_destroy_views(owin) * 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 @@ openwin_split_view(owin, view, direction /* 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); --- xview-3.2p1.4.orig/lib/libxview/openwin/ow_resize.c +++ xview-3.2p1.4/lib/libxview/openwin/ow_resize.c @@ -215,13 +215,13 @@ openwin_adjust_view_rect(owin, view, vie /* 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 @@ openwin_adjust_view_by_margins(owin, vie } 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 --- xview-3.2p1.4.orig/lib/libxview/openwin/Imakefile +++ xview-3.2p1.4/lib/libxview/openwin/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/frame/fm_xutil.h +++ xview-3.2p1.4/lib/libxview/frame/fm_xutil.h @@ -39,4 +39,4 @@ typedef struct { /* frame_xutil.c */ Xv_private void frame_setwmhints(); -#endif frame_xutil_h_already_included +#endif /* frame_xutil_h_already_included */ --- xview-3.2p1.4.orig/lib/libxview/frame/frame_help.h +++ xview-3.2p1.4/lib/libxview/frame/frame_help.h @@ -18,11 +18,11 @@ static char sccsid[] = "@(#)frame_he /* standard includes */ #ifndef FILE -#if !defined(SVR4) && !defined(__linux) +#if !defined(SVR4) && !defined(__linux__) #undef NULL -#endif SVR4 +#endif /* SVR4 */ #include -#endif FILE +#endif /* FILE */ #include #include #include --- xview-3.2p1.4.orig/lib/libxview/frame/fm_get.c +++ xview-3.2p1.4/lib/libxview/frame/fm_get.c @@ -369,8 +369,14 @@ frame_get_attr(frame_public, status, att 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 @@ frame_get_attr(frame_public, status, att } 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 && --- xview-3.2p1.4.orig/lib/libxview/frame/fm_rescale.c +++ xview-3.2p1.4/lib/libxview/frame/fm_rescale.c @@ -43,7 +43,7 @@ frame_rescale_subwindows(frame_public, s */ 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 --- xview-3.2p1.4.orig/lib/libxview/frame/fmcmd_set.c +++ xview-3.2p1.4/lib/libxview/frame/fmcmd_set.c @@ -18,6 +18,8 @@ static char sccsid[] = "@(#)fmcmd_se #include #include +static int update_default_pin_state(); + Pkg_private Xv_opaque frame_cmd_set_avlist(frame_public, avlist) Frame frame_public; @@ -30,7 +32,6 @@ frame_cmd_set_avlist(frame_public, avlis 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); --- xview-3.2p1.4.orig/lib/libxview/frame/fm_impl.h +++ xview-3.2p1.4/lib/libxview/frame/fm_impl.h @@ -18,11 +18,11 @@ static char sccsid[] = "@(#)fm_impl. /* standard includes */ #ifndef FILE -#if !defined(SVR4) && !defined(__linux) +#if !defined(SVR4) && !defined(__linux__) #undef NULL -#endif SVR4 +#endif /* SVR4 */ #include -#endif FILE +#endif /* FILE */ #include #ifdef OW_I18N #endif /* OW_I18N */ --- xview-3.2p1.4.orig/lib/libxview/frame/frame_base.h +++ xview-3.2p1.4/lib/libxview/frame/frame_base.h @@ -18,11 +18,11 @@ static char sccsid[] = "@(#)frame_ba /* standard includes */ #ifndef FILE -#if !defined(SVR4) && !defined(__linux) +#if !defined(SVR4) && !defined(__linux__) #undef NULL -#endif SVR4 +#endif /* SVR4 */ #include -#endif FILE +#endif /* FILE */ #include #include #include --- xview-3.2p1.4.orig/lib/libxview/frame/fm_cmdline.c +++ xview-3.2p1.4/lib/libxview/frame/fm_cmdline.c @@ -456,7 +456,7 @@ frame_set_icon_cmdline_options(frame_pub /* Free any malloc'ed strings */ if (defaults_string) free(defaults_string); -#endif RECLAIM_STRINGS +#endif /* RECLAIM_STRINGS */ if (new_hints) { Xv_Drawable_info *info; --- xview-3.2p1.4.orig/lib/libxview/frame/fm_input.c +++ xview-3.2p1.4/lib/libxview/frame/fm_input.c @@ -359,6 +359,10 @@ frame_set_focus(sw) */ 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); --- xview-3.2p1.4.orig/lib/libxview/frame/fm_layout.c +++ xview-3.2p1.4/lib/libxview/frame/fm_layout.c @@ -28,7 +28,12 @@ frame_layout(frame_public, child, op, d1 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; --- xview-3.2p1.4.orig/lib/libxview/frame/fm_props.h +++ xview-3.2p1.4/lib/libxview/frame/fm_props.h @@ -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 -#endif FILE +#endif /* FILE */ #include #include #include @@ -45,7 +45,7 @@ #include #include #include -#endif pixrect_hs_DEFINED +#endif /* pixrect_hs_DEFINED */ #include /* for WL_ links */ #include --- xview-3.2p1.4.orig/lib/libxview/frame/Imakefile +++ xview-3.2p1.4/lib/libxview/frame/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/libxview/frame/frame_cmd.h +++ xview-3.2p1.4/lib/libxview/frame/frame_cmd.h @@ -18,11 +18,11 @@ static char sccsid[] = "@(#)frame_cm /* standard includes */ #ifndef FILE -#if !defined(SVR4) && !defined(__linux) +#if !defined(SVR4) && !defined(__linux__) #undef NULL -#endif SVR4 +#endif /* SVR4 */ #include -#endif FILE +#endif /* FILE */ #include #include #include --- xview-3.2p1.4.orig/lib/libxview/frame/fm_win.c +++ xview-3.2p1.4/lib/libxview/frame/fm_win.c @@ -12,7 +12,7 @@ static char sccsid[] = "@(#)fm_win.c #ifdef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #include #include --- xview-3.2p1.4.orig/lib/libxview/server_image/svrim_impl.h +++ xview-3.2p1.4/lib/libxview/server_image/svrim_impl.h @@ -40,4 +40,4 @@ Pkg_private int server_imag 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 */ --- xview-3.2p1.4.orig/lib/libxview/server_image/Imakefile +++ xview-3.2p1.4/lib/libxview/server_image/Imakefile @@ -5,8 +5,8 @@ #endif #include -/**/########################################################################### -/**/# @(#)Imakefile 1.8 28 Jun 1993 SMI +XCOMM ########################################################################### +XCOMM # @(#)Imakefile 1.8 28 Jun 1993 SMI #ifndef SubdirHasTextObjs #define SubdirHasTextObjs YES --- xview-3.2p1.4.orig/lib/pixrect/memreg.h +++ xview-3.2p1.4/lib/pixrect/memreg.h @@ -61,4 +61,4 @@ struct memropc { #define mrc_lmask(x) (0xffff0000 >> (x)) #define mrc_rmask(x) (0x7fff >> (x)) -#endif memreg_DEFINED +#endif /* memreg_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/mem_rop_impl_util.h +++ xview-3.2p1.4/lib/pixrect/mem_rop_impl_util.h @@ -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 */ --- xview-3.2p1.4.orig/lib/pixrect/cg8var.h +++ xview-3.2p1.4/lib/pixrect/cg8var.h @@ -14,7 +14,7 @@ #include #else #include -#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_get(); int cg8_put(); int cg8_rop(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif cg8var_DEFINED +#endif /* cg8var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/pr_dblbuf.h +++ xview-3.2p1.4/lib/pixrect/pr_dblbuf.h @@ -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 */ --- xview-3.2p1.4.orig/lib/pixrect/cg9var.h +++ xview-3.2p1.4/lib/pixrect/cg9var.h @@ -13,13 +13,13 @@ #ifndef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #ifndef SVR4 #include /* colormapseg */ #else #include -#endif SVR4 +#endif /* SVR4 */ /* description of single CG9 frame buffer */ @@ -92,6 +92,6 @@ int cg9_vector(); int cg9_get(); int cg9_put(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif cg9var_DEFINED +#endif /* cg9var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/cg12_var.h +++ xview-3.2p1.4/lib/pixrect/cg12_var.h @@ -13,17 +13,17 @@ #include #else #include -#endif SVR4 +#endif /* SVR4 */ #include #ifndef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #ifndef SVR4 #include /* colormapseg */ #else #include -#endif SVR4 +#endif /* SVR4 */ #define CG12_NFBS 6 /* number of frame buffers in a CG12 */ --- xview-3.2p1.4.orig/lib/pixrect/gp1var.h +++ xview-3.2p1.4/lib/pixrect/gp1var.h @@ -15,7 +15,7 @@ #include #else #include -#endif SVR4 +#endif /* SVR4 */ #include #include @@ -106,10 +106,10 @@ int gp1_batchrop(); 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 */ --- xview-3.2p1.4.orig/lib/pixrect/pr_line.h +++ xview-3.2p1.4/lib/pixrect/pr_line.h @@ -47,7 +47,7 @@ typedef int width; } Pr_brush; -#endif pr_line_h_DEFINED +#endif /* pr_line_h_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/pr_impl_make.h +++ xview-3.2p1.4/lib/pixrect/pr_impl_make.h @@ -25,6 +25,6 @@ struct pr_devdata { #ifndef KERNEL Pixrect *pr_makefromfd(); Pixrect *pr_makefromfd_2(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif pr_impl_make_DEFINED +#endif /* pr_impl_make_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/mem32_var.h +++ xview-3.2p1.4/lib/pixrect/mem32_var.h @@ -13,7 +13,7 @@ #include /* colormapseg */ #else #include -#endif SVR4 +#endif /* SVR4 */ #define MEM32_8BIT_CMAPSIZE 256 --- xview-3.2p1.4.orig/lib/pixrect/cg4var.h +++ xview-3.2p1.4/lib/pixrect/cg4var.h @@ -54,6 +54,6 @@ int cg4_destroy(); Pixrect *cg4_region(); int cg4_getcolormap(); int cg4_getattributes(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif !cg4var_DEFINED +#endif /* !cg4var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/memvar.h +++ xview-3.2p1.4/lib/pixrect/memvar.h @@ -48,7 +48,7 @@ struct mprp_data { #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_get(); 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 */ --- xview-3.2p1.4.orig/lib/pixrect/pixfont.h +++ xview-3.2p1.4/lib/pixrect/pixfont.h @@ -43,7 +43,7 @@ typedef struct pixfont { #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 @@ struct pr_size pf_textwidth(); #define PIXFONT Pixfont -#endif pixfont_DEFINED +#endif /* pixfont_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/bw2var.h +++ xview-3.2p1.4/lib/pixrect/bw2var.h @@ -37,4 +37,4 @@ struct pixrect *bw2_make(); int bw2_destroy(); #endif -#endif bw2var_DEFINED +#endif /* bw2var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/cg2var.h +++ xview-3.2p1.4/lib/pixrect/cg2var.h @@ -83,6 +83,6 @@ int cg2_vector(); Pixrect *cg2_region(); int cg2_getcolormap(); int cg2_getattributes(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif cg2var_DEFINED +#endif /* cg2var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/traprop.h +++ xview-3.2p1.4/lib/pixrect/traprop.h @@ -23,4 +23,4 @@ struct pr_trap { int y0, y1; /* top+bottom boundaries */ }; -#endif traprop_DEFINED +#endif /* traprop_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/pixrect_hs.h +++ xview-3.2p1.4/lib/pixrect/pixrect_hs.h @@ -18,7 +18,7 @@ #include #include #include -#endif NEWPIXMEM +#endif /* NEWPIXMEM */ #include @@ -32,7 +32,7 @@ #include #include #include -#endif NEWPIXMEM +#endif /* NEWPIXMEM */ #include @@ -40,9 +40,9 @@ #include #include -#endif NEWPIXMEM +#endif /* NEWPIXMEM */ #include #include -#endif pixrect_hs_DEFINED +#endif /* pixrect_hs_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/tv1var.h +++ xview-3.2p1.4/lib/pixrect/tv1var.h @@ -10,7 +10,7 @@ #include #ifndef SVR4 #include -#endif SVR4 +#endif /* SVR4 */ #include #include #include @@ -59,6 +59,6 @@ int tv1_getattributes (); #define ROUNDUP(val, gran) (((val) - 1 | (gran) - 1) + 1) #endif -#endif !KERNEL +#endif /* !KERNEL */ -#endif tv1var_DEFINED +#endif /* tv1var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/gp1cmds.h +++ xview-3.2p1.4/lib/pixrect/gp1cmds.h @@ -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 */ --- xview-3.2p1.4.orig/lib/pixrect/pr_io.h +++ xview-3.2p1.4/lib/pixrect/pr_io.h @@ -52,4 +52,4 @@ extern int pr_load_header(); extern Pixrect * pr_load_image(); extern Pixrect * pr_load_std_image(); -#endif pr_io_DEFINED +#endif /* pr_io_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/cg2reg.h +++ xview-3.2p1.4/lib/pixrect/cg2reg.h @@ -310,4 +310,4 @@ struct cg2fb { #define cg2_touch(a) ((a)=0) -#endif cg2reg_DEFINED +#endif /* cg2reg_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/pr_util.h +++ xview-3.2p1.4/lib/pixrect/pr_util.h @@ -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 @@ struct pr_devdata { #ifndef KERNEL Pixrect *pr_makefromfd(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif pr_util_DEFINED +#endif /* pr_util_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/pr_planegroups.h +++ xview-3.2p1.4/lib/pixrect/pr_planegroups.h @@ -47,4 +47,4 @@ extern int pr_get_plane_group(); extern void pr_set_plane_group(); extern void pr_set_planes(); -#endif pr_planegroups_DEFINED +#endif /* pr_planegroups_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/cg3var.h +++ xview-3.2p1.4/lib/pixrect/cg3var.h @@ -45,6 +45,6 @@ int cg3_destroy(); Pixrect *cg3_region(); int cg3_putcolormap(); int cg3_getcolormap(); -#endif !KERNEL +#endif /* !KERNEL */ -#endif !cg3var_DEFINED +#endif /* !cg3var_DEFINED */ --- xview-3.2p1.4.orig/lib/pixrect/Imakefile +++ xview-3.2p1.4/lib/pixrect/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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 \ --- xview-3.2p1.4.orig/lib/pixrect/pr_impl_util.h +++ xview-3.2p1.4/lib/pixrect/pr_impl_util.h @@ -55,14 +55,14 @@ int _ZERO_; /* "constant in conditional #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 @@ typedef short LOOP_T; /* loop variable #define LOOP_DECR(var) (--(var) != -1) -#else mc68000 +#else /* mc68000 */ #define IF68000 IFFALSE @@ -87,7 +87,7 @@ typedef int LOOP_T; #define LOOP_DECR(var) (--(var) >= 0) -#endif mc68000 +#endif /* mc68000 */ #ifdef sparc #define IFSPARC IFTRUE @@ -124,13 +124,13 @@ typedef int LOOP_T; #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 int LOOP_T; 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 */ --- xview-3.2p1.4.orig/lib/pixrect/pixrect.h +++ xview-3.2p1.4/lib/pixrect/pixrect.h @@ -101,7 +101,7 @@ struct pr_subregion { * 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 @@ struct pixrectops { 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 @@ struct pixrectops { (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_getcolormap(); 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 @@ extern pr_getattributes(); #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 prs_replrop(); extern pr_close(); extern pr_line(); -#endif !lint || KERNEL +#endif /* !lint || KERNEL */ @@ -329,7 +329,7 @@ union fbunit { #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 */ --- xview-3.2p1.4.orig/lib/libolgx/Imakefile +++ xview-3.2p1.4/lib/libolgx/Imakefile @@ -6,9 +6,9 @@ #include -/**/######################################################################## -/**/# @(#)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 @@ ALLFILES = $(SRCS) $(HEADERS) \ #include #include + +#ifdef __linux__ +XVIEW_DEPLIBS = $(LDPRELIBS) $(XLIB) -lc +#endif --- xview-3.2p1.4.orig/images/Imakefile +++ xview-3.2p1.4/images/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################## -/**/# @(#)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 @@ SRCS = \ ALLFILES = $(BITMAPS) $(ICONS) $(PIXRECTS) $(CURSORS) $(IMAGES) -all: $(SRCS) +all:: $(SRCS) BuildIncludes($(INCLUDES_SRCS),$(IMAGE_INCDIR),/**/) --- xview-3.2p1.4.orig/misc/Imakefile +++ xview-3.2p1.4/misc/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/misc/support/Imakefile +++ xview-3.2p1.4/misc/support/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################### -/**/# @(#)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 \ --- xview-3.2p1.4.orig/fonts/Imakefile +++ xview-3.2p1.4/fonts/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/fonts/bdf/Imakefile +++ xview-3.2p1.4/fonts/bdf/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/fonts/bdf/75dpi/Imakefile +++ xview-3.2p1.4/fonts/bdf/75dpi/Imakefile @@ -1,8 +1,8 @@ #include -/**/##################################################################### -/**/# @(#)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(lubR19) 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) --- xview-3.2p1.4.orig/fonts/bdf/misc/Imakefile +++ xview-3.2p1.4/fonts/bdf/misc/Imakefile @@ -1,8 +1,8 @@ #include -/**/##################################################################### -/**/# 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(olgl12) 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) --- xview-3.2p1.4.orig/fonts/bdf/100dpi/Imakefile +++ xview-3.2p1.4/fonts/bdf/100dpi/Imakefile @@ -1,8 +1,8 @@ #include -/**/##################################################################### -/**/# @(#)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(lubR19) 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) --- xview-3.2p1.4.orig/doc/Imakefile +++ xview-3.2p1.4/doc/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/doc/bugs/Imakefile +++ xview-3.2p1.4/doc/bugs/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################### -/**/# @(#)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 --- xview-3.2p1.4.orig/doc/config/Imakefile +++ xview-3.2p1.4/doc/config/Imakefile @@ -1,8 +1,8 @@ #include -/**/########################################################################## -/**/# @(#)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)' --- xview-3.2p1.4.orig/doc/config/usenixws/Imakefile +++ xview-3.2p1.4/doc/config/usenixws/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################### -/**/# @(#)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 --- xview-3.2p1.4.orig/bitmaps/Imakefile +++ xview-3.2p1.4/bitmaps/Imakefile @@ -1,8 +1,8 @@ #include -/**/######################################################################## -/**/# @(#)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 @@ SRCS = \ 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) debian/patches/display_setting0000644000000000000000000000224311613022550013736 0ustar Author: Alan BRASLAU Debian-Bug: #617236, #635154 Description: Fix setting of the DISPLAY variable in case the original value of that variable did not contain a screen number. Approved: Ralf Treinen Index: xview-3.2p1.4/clients/olwm/environ.c =================================================================== --- xview-3.2p1.4.orig/clients/olwm/environ.c 2011-07-24 15:48:06.000000000 +0200 +++ xview-3.2p1.4/clients/olwm/environ.c 2011-07-24 15:48:47.000000000 +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); } Index: xview-3.2p1.4/clients/olvwm-4.1/environ.c =================================================================== --- xview-3.2p1.4.orig/clients/olvwm-4.1/environ.c 2011-07-24 15:50:06.000000000 +0200 +++ xview-3.2p1.4/clients/olvwm-4.1/environ.c 2011-07-24 15:50:58.000000000 +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); } debian/control0000644000000000000000000000576411624347662010620 0ustar Source: xview Section: x11 Priority: optional Maintainer: Blars Blarson Standards-Version: 3.8.0.0 Build-Depends: debhelper (>= 5), bison, flex, ed, libncurses5-dev | libncurses-dev, libx11-dev (>= 2:1.0.0), libxt-dev, libxext-dev, libxpm-dev, xutils-dev Package: xviewg Architecture: alpha amd64 arm armeb armel armhf hppa i386 hurd-i386 kfreebsd-i386 m68k mips mipsel powerpc s390 sh3 sh4 sparc Pre-Depends: x11-common (>= 1:7.0.0) Depends: ${shlibs:Depends}, ${misc:Depends}, xbitmaps Suggests: indent Conflicts: xview (<< 3.2p1.4-1) Description: XView shared libraries This package contains the shared libraries for XView. . XView is a user interface toolkit following the look and feel of Sun's pre-X11 SunView. . This package is required by XView-based programs. Package: xviewg-dev Section: devel Architecture: alpha amd64 arm armeb armel armhf hppa i386 hurd-i386 kfreebsd-i386 m68k mips mipsel powerpc s390 sh3 sh4 sparc Pre-Depends: x11-common (>= 1:7.0.0) Depends: xviewg (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, libx11-dev Conflicts: xview-dev (<< 3.2p1.4-1) Description: XView development tools This package contains the files for compiling XView programs, including the header files and the static libraries for XView. Package: xview-clients Architecture: alpha amd64 arm armeb armel armhf hppa i386 hurd-i386 kfreebsd-i386 m68k mips mipsel powerpc s390 sh3 sh4 sparc Depends: ${shlibs:Depends}, ${misc:Depends} Description: XView client programs This package contains the client programs from the free XView distribution, including cmdtool and textedit. Package: xview-examples Architecture: alpha amd64 arm armeb armel armhf hppa i386 hurd-i386 kfreebsd-i386 m68k mips mipsel powerpc s390 sh3 sh4 sparc Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: xviewg-dev, xutils-dev Description: XView contrib programs This package contains the contrib programs from the free XView distribution, including their source code. They are intended mainly as examples for writing your own XView-programs. Package: olwm Architecture: alpha amd64 arm armeb armel armhf hppa i386 hurd-i386 kfreebsd-i386 m68k mips mipsel powerpc s390 sh3 sh4 sparc Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: menu (>= 2.1.9), xview-clients Conflicts: xview (<< 3.2p1.4-1), olvwm (<< 4.1.3.2p1.4-1), menu (<< 2.1.9) Provides: x-window-manager Description: Open Look Window Manager This package contains the traditional Open Look Window Manager. For an extended version that offers virtual desktops, have a look at the package `olvwm'. Package: olvwm Architecture: alpha amd64 arm armeb armel armhf hppa i386 hurd-i386 kfreebsd-i386 m68k mips mipsel powerpc s390 sh3 sh4 sparc Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: menu (>= 2.1.9), xview-clients, olwm Conflicts: menu (<< 2.1.9) Provides: x-window-manager Description: OpenLook virtual window manager This package contains an extended version of olwm, the original OpenLook window manager, enhanced for handling of virtual desktops. debian/shlibs.local0000644000000000000000000000010211532261543011461 0ustar libxview 3 xviewg (>= 3.2p1.4-6) libolgx 3 xviewg (>= 3.2p1.4-6) debian/fixdeps0000644000000000000000000000027511532261543010561 0ustar # Remove dependency $1 from shlibs:Depends-line in file $2 grep "^shlibs:Depends=.*\<$1\>" "$2" > /dev/null 2>&1 || exit 0 echo "/^shlibs:Depends=/s/,\? *\<$1\>[^,]*//g w q" | ed -s "$2"