File xv-3.10a.dif of Package xv
---
src/CMakeLists.txt | 7 +++----
src/bggen.c | 2 +-
src/config.h | 16 ++++++++--------
src/xv.h | 26 +++++++++-----------------
src/xvevent.c | 4 +++-
src/xvgrab.c | 27 ++++++++++++++++-----------
6 files changed, 40 insertions(+), 42 deletions(-)
--- src/CMakeLists.txt
+++ src/CMakeLists.txt 2024-02-07 10:53:14.907067976 +0000
@@ -146,17 +146,17 @@ set(man_pages
foreach(file ${man_pages})
string(REGEX REPLACE "\\.[^.]*$" "" base ${file})
install(
- FILES docs/${file} RENAME ${base}.1
+ FILES docs/${file} RENAME ${base}.1x
DESTINATION "${CMAKE_INSTALL_MANDIR}/man1"
)
endforeach()
install(FILES
- pl/man1/xvpictoppm.1
+ pl/man1/xvpictoppm.1 RENAME xvpictoppm.1x
DESTINATION "${CMAKE_INSTALL_MANDIR}/pl/man1")
install(FILES
- fi/man1/xv.1
+ fi/man1/xv.1 RENAME xv.1x
DESTINATION "${CMAKE_INSTALL_MANDIR}/fi/man1")
# Install files into SYSCONFDIR.
@@ -184,7 +184,6 @@ install(FILES
# Install files into DOCDIR/formats.
install(FILES
docs/formats/bmp.doc
- docs/formats/epsf.ps
docs/formats/gif87.doc
docs/formats/gif89.doc
docs/formats/gif.ack
--- src/bggen.c
+++ src/bggen.c 2024-02-07 10:53:27.578834066 +0000
@@ -36,7 +36,7 @@
#define MAXCOLS 128
/* some VMS thing... */
-#if defined(vax11c) || (defined(__sony_news) && (defined(bsd43) || defined(__bsd43) || defined(SYSTYPE_BSD) || defined(__SYSTYPE_BSD)))
+#ifdef vax11c
#include <ctype.h>
#endif
--- src/config.h
+++ src/config.h 2024-02-07 10:53:27.578834066 +0000
@@ -14,13 +14,13 @@
* 'which gunzip' to find if you have gunzip, and where it lives; ditto for
* gzip)
*/
-#define USE_GUNZIP
+#define USE_GUNZIP 1
#ifdef USE_GUNZIP
# ifdef VMS
# define GUNZIP "UNCOMPRESS"
# else
-# define GUNZIP "gzip -dq"
+# define GUNZIP "/bin/gzip -dq"
# endif
#endif
@@ -37,7 +37,7 @@
#define USE_BUNZIP2
#ifdef USE_BUNZIP2
-# define BUNZIP2 "bzip2 -d" /* should this include the full path? */
+# define BUNZIP2 "/usr/bin/bzip2 -dq"
#endif
@@ -52,7 +52,7 @@
* as it tries to be clever on systems where uncompress lives in an unusual
* location.
*/
-#define UNCOMPRESS "/usr/ucb/uncompress"
+#define UNCOMPRESS "/usr/bin/uncompress"
#if defined(hpux) || defined(SVR4) || \
defined(__386BSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
@@ -63,7 +63,7 @@
machine has or not.
*/
# undef UNCOMPRESS
-# define UNCOMPRESS "uncompress"
+# define UNCOMPRESS "/usr/bin/uncompress"
#endif
#if defined(sgi)
@@ -113,7 +113,7 @@
*/
/* #define GS_PATH "/usr/local/bin/gs" */
-#define GS_PATH "gs"
+#define GS_PATH "/usr/bin/gs"
/* #define GS_LIB "." */
/* #define GS_DEV "ppmraw" */
@@ -191,7 +191,7 @@
* in the following line.
*/
-#undef MACBINARY
+#define MACBINARY
/***************************************************************************
@@ -207,7 +207,7 @@
* is read-only), change 'undef' to 'define' the VIRTUAL_TD line.
*/
-#undef AUTO_EXPAND
+#define AUTO_EXPAND
#undef VIRTUAL_TD
#if defined(VIRTUAL_TD) && !defined(AUTO_EXPAND)
--- src/xv.h
+++ src/xv.h 2024-02-07 10:53:27.582833993 +0000
@@ -98,12 +98,6 @@
# define SVR4
#endif
-#if defined(__sony_news) && defined(bsd43) && !defined(__bsd43)
-# define __bsd43
-#elif defined(__sony_news) && (defined(SYSTYPE_BSD) || defined(__SYSTYPE_BSD)) && !defined(bsd43) && !defined(__bsd43)
-# define bsd43
-# define __bsd43
-#endif
#include <signal.h> /* for interrupt handling */
@@ -161,16 +155,6 @@
#endif
-#if defined(__sony_news) && defined(__bsd43)
-# include <unistd.h>
-#endif
-
-
-#if defined(__FreeBSD__)
-# include <sys/param.h>
-#endif
-
-
/* include files */
#include <stdio.h>
#include <math.h>
@@ -333,7 +317,9 @@
# endif
#endif
-
+#ifndef S_IRWUSR
+# define S_IRWUSR (S_IRUSR|__S_IWRITE)
+#endif
/* Use S_ISxxx macros in stat-related stuff
* make them if missing, along with a few fictitious ones
@@ -445,6 +431,12 @@
# define SEEK_END 2
#endif
+#if 1
+# define ThreeButtons (Button1Mask|Button2Mask|Button3Mask)
+#else
+# define ThreeButtons AnyButton
+#endif
+
#if defined(__mips) && defined(__SYSTYPE_BSD43)
# define strstr(A,B) pds_strstr((A),(B))
# undef S_IFIFO
--- src/xvevent.c
+++ src/xvevent.c 2024-02-07 10:53:27.582833993 +0000
@@ -2671,7 +2671,7 @@ int xvErrorHandler(disp, err)
/* in case the error occurred during the Grab command... */
XUngrabServer(theDisp);
- XUngrabButton(theDisp, (u_int) AnyButton, 0, rootW);
+ XUngrabButton(theDisp, (u_int) ThreeButtons, 0, rootW);
xerrcode = err->error_code;
@@ -2689,6 +2689,8 @@ int xvErrorHandler(disp, err)
(err->request_code == 113 /* X_KillClient */ ) ||
(xerrcode == BadLength && err->request_code==18 /* X_ChangeProp */ ) ||
(xerrcode == BadMatch && err->request_code==73 /* X_GetImage */ ) ||
+ (xerrcode == BadDrawable&&err->request_code==14 /* X_GetGeometry*/) ||
+ (xerrcode == BadAccess && err->request_code==28 /* X_GrabButton */) ||
(xerrcode == BadWindow && err->request_code==20 /* X_GetProperty*/))
return 0;
--- src/xvgrab.c
+++ src/xvgrab.c 2024-02-07 10:53:27.582833993 +0000
@@ -12,6 +12,7 @@
#include "copyright.h"
#define NEEDSTIME
+#define RECOLOR_GRAB_CURSOR
#include "xv.h"
/* Allow flexibility in use of buttons JPD */
@@ -103,7 +104,6 @@ int Grab()
else if (ctrlW) CtrlBox(0);
}
-
XSync(theDisp, False);
if (grabDelay>0) { /* instead of sleep(), handle events while waiting */
@@ -133,7 +133,6 @@ int Grab()
grabInProgress = 0;
}
-
rootGC = DefaultGC(theDisp, theScreen);
if (grabPic) { /* throw away previous 'grabbed' pic, if there is one */
@@ -149,7 +148,6 @@ int Grab()
XRecolorCursor(theDisp, tcross, &fc, &bc);
#endif
-
XBell(theDisp, 0); /* beep once at start of grab */
/* Change cursor to top_left_corner JPD */
@@ -157,9 +155,6 @@ int Grab()
PointerMotionMask|ButtonPressMask|ButtonReleaseMask,
GrabModeAsync, GrabModeAsync, None, tlcorner, CurrentTime);
- if (!autograb) XGrabButton(theDisp, (u_int) AnyButton, 0, rootW, False, 0,
- GrabModeAsync, GrabModeSync, None, tcross);
-
if (autograb) {
XGrabServer(theDisp); /* until we've done the grabImage */
if (!XQueryPointer(theDisp,rootW,&rW,&cW,&rx,&ry,&x1,&y1,&mask)) {
@@ -172,14 +167,24 @@ int Grab()
}
else { /* !autograb */
+
+ XGrabButton(theDisp, (u_int) ThreeButtons, AnyModifier, rootW, False, 0,
+ GrabModeAsync, GrabModeSync, None, tcross);
+ XSync(theDisp, False);
+ sched_yield();
+
/* wait for a button press */
while (1) {
- XEvent evt; int done;
+ XEvent evt;
+ int done;
/* recolor cursor to indicate that grabbing is active? */
if (XQueryPointer(theDisp,rootW,&rW,&cW,&rx,&ry,&x1,&y1,&mask)) {
- if (mask & (Button1Mask | Button2Mask | Button3Mask)) break;
+ if (mask & (Button1Mask | Button2Mask | Button3Mask)) {
+ XUngrabButton(theDisp, (u_int) ThreeButtons, AnyModifier, rootW);
+ break;
+ }
}
/* continue to handle events while waiting... */
@@ -191,7 +196,7 @@ int Grab()
i = HandleEvent(&evt, &done);
if (done) { /* only 'new image' cmd accepted=quit */
if (i==QUIT) {
- XUngrabButton(theDisp, (u_int) AnyButton, 0, rootW);
+ XUngrabButton(theDisp, (u_int) ThreeButtons, AnyModifier, rootW);
Quit(0);
}
else XBell(theDisp, 0);
@@ -217,7 +222,7 @@ int Grab()
}
}
- XUngrabButton(theDisp, (u_int) AnyButton, 0, rootW);
+ XUngrabButton(theDisp, (u_int) ThreeButtons, AnyModifier, rootW);
XBell(theDisp, 0);
XBell(theDisp, 0);
rv = 0;
@@ -489,7 +494,7 @@ static void endflash()
static void ungrabX()
{
XUngrabServer(theDisp);
- XUngrabButton(theDisp, (u_int) AnyButton, 0, rootW);
+ XUngrabButton(theDisp, (u_int) ThreeButtons, AnyModifier, rootW);
}