svn commit: r507732 - in head/math/xgraph: . files
Gleb Popov
arrowd at FreeBSD.org
Wed Jul 31 19:58:34 UTC 2019
Author: arrowd
Date: Wed Jul 31 19:58:32 2019
New Revision: 507732
URL: https://svnweb.freebsd.org/changeset/ports/507732
Log:
math/xgraph: Apply patches to fix crashes.
PR: 205796
Added:
head/math/xgraph/files/patch-xtb.h (contents, props changed)
Modified:
head/math/xgraph/Makefile
head/math/xgraph/files/patch-xgraph.c
head/math/xgraph/files/patch-xgraph.h
Modified: head/math/xgraph/Makefile
==============================================================================
--- head/math/xgraph/Makefile Wed Jul 31 19:50:26 2019 (r507731)
+++ head/math/xgraph/Makefile Wed Jul 31 19:58:32 2019 (r507732)
@@ -3,7 +3,7 @@
PORTNAME= xgraph
PORTVERSION= 11.3.2.20000910
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= math print
MASTER_SITES= ftp://ftp.cs.utoronto.ca/pub/radford/
DISTNAME= xgraph-11
Modified: head/math/xgraph/files/patch-xgraph.c
==============================================================================
--- head/math/xgraph/files/patch-xgraph.c Wed Jul 31 19:50:26 2019 (r507731)
+++ head/math/xgraph/files/patch-xgraph.c Wed Jul 31 19:58:32 2019 (r507732)
@@ -21,33 +21,33 @@
fg_color = PM_COLOR("Foreground");
bg_color = PM_COLOR("Background");
XRecolorCursor(disp, zoomCursor, &fg_color, &bg_color);
-+ init_X(win_info->dev_info.user_state);
++ init_X(NULL);
Num_Windows = 1;
while (Num_Windows > 0) {
-@@ -415,6 +415,12 @@ char *argv[];
+@@ -415,6 +415,13 @@ char *argv[];
continue;
}
switch (theEvent.type) {
+ case ConfigureNotify:
+ win_info->dev_info.area_w = theEvent.xconfigure.width;
+ win_info->dev_info.area_h = theEvent.xconfigure.height;
++ init_X(win_info->dev_info.user_state);
+ XClearArea(disp, theEvent.xany.window, 1, 1, win_info->dev_info.area_w, win_info->dev_info.area_h, 0);
+ DrawWindow(win_info);
+ break;
case Expose:
if (theEvent.xexpose.count <= 0) {
XWindowAttributes win_attr;
-@@ -422,7 +428,7 @@ char *argv[];
- XGetWindowAttributes(disp, theEvent.xany.window, &win_attr);
+@@ -423,6 +430,7 @@ char *argv[];
win_info->dev_info.area_w = win_attr.width;
win_info->dev_info.area_h = win_attr.height;
-- init_X(win_info->dev_info.user_state);
+ init_X(win_info->dev_info.user_state);
+ XClearArea(disp, theEvent.xany.window, 1, 1, win_info->dev_info.area_w, win_info->dev_info.area_h, 0);
DrawWindow(win_info);
}
break;
-@@ -715,7 +721,7 @@ int primary; /* Is this the primary wi
+@@ -715,7 +723,7 @@ int primary; /* Is this the primary window? */
if (sizehints.x<0) sizehints.x = 0;
sizehints.y += 25;
}
@@ -56,7 +56,7 @@
/* Aspect ratio computation */
if (asp < 1.0) {
-@@ -723,6 +729,7 @@ int primary; /* Is this the primary wi
+@@ -723,6 +731,7 @@ int primary; /* Is this the primary window? */
} else {
height = ((int) (((double) NORMSIZE) / asp));
}
@@ -64,7 +64,7 @@
height = MAX(MINDIM, height);
width = MAX(MINDIM, width);
-@@ -789,7 +796,7 @@ int primary; /* Is this the primary wi
+@@ -789,7 +798,7 @@ int primary; /* Is this the primary window? */
new_info->flags = 0;
XSelectInput(disp, new_window,
@@ -73,7 +73,7 @@
if (!theCursor) {
theCursor = XCreateFontCursor(disp, XC_top_left_arrow);
fg_color = PM_COLOR("Foreground");
-@@ -1478,6 +1485,8 @@ LineInfo *result; /* Returned result */
+@@ -1478,6 +1487,8 @@ LineInfo *result; /* Returned result */
while (*line && (*line != '\n') && (*line != '"')) line++;
if (*line) *line = '\0';
} else {
Modified: head/math/xgraph/files/patch-xgraph.h
==============================================================================
--- head/math/xgraph/files/patch-xgraph.h Wed Jul 31 19:50:26 2019 (r507731)
+++ head/math/xgraph/files/patch-xgraph.h Wed Jul 31 19:58:32 2019 (r507732)
@@ -13,7 +13,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
-@@ -33,20 +38,9 @@ extern void do_hardcopy(); /* Carries ou
+@@ -33,20 +38,9 @@ extern void do_hardcopy(); /* Carries out hardcopy
extern void ho_dialog(); /* Hardcopy dialog */
extern void set_X(); /* Initializes X device */
@@ -33,7 +33,7 @@
+#define MAX(a,b) ((a) > (b) ? (a) : (b))
+#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
-
--extern void abort();
-
+-extern void abort();
+
#endif /* _XGRAPH_H_ */
Added: head/math/xgraph/files/patch-xtb.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/math/xgraph/files/patch-xtb.h Wed Jul 31 19:58:32 2019 (r507732)
@@ -0,0 +1,11 @@
+--- xtb.h.orig 1997-07-16 18:40:41 UTC
++++ xtb.h
+@@ -164,7 +164,7 @@ typedef union xtb_fmt_defn {
+ xtb_fmt_align align;
+ } xtb_fmt;
+
+-#define NE 0
++#define NE ((xtb_fmt *) 0)
+
+ DECLARE(xtb_w, xtb_fmt *, (xtb_frame *w));
+ /* Returns formatting structure for frame */
More information about the svn-ports-all
mailing list