Ilya Zakharevich on Fri, 21 May 1999 19:08:50 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PATCH] Plotting once more


This should make

     a) Finding libraries on Solaris 7 better;
     b) Somehow a couple of functions in plotport.c were not checking
	for an initialized rectangle, which lead to a possibility of a
	segfault on faulty programs.

I did not check it with 2.0.15 yet.

Enjoy,
Ilya

--- ./Configure~	Fri Mar  5 12:24:26 1999
+++ ./Configure	Fri May 21 14:41:11 1999
@@ -383,6 +383,7 @@ if test "$optimization" != profiling; th
  	/usr/lib\
  	/usr/local/lib\
  	/opt/lib\
+ 	/opt/local/lib\
  	/opt/gnu/lib\
  	/lib/pa1.1\
  	/usr/lib/large\
--- ./src/graph/plotport.c~	Thu May 20 03:06:03 1999
+++ ./src/graph/plotport.c	Fri May 21 18:59:16 1999
@@ -650,7 +650,7 @@ rectlinetype(long ne, long type)
 void
 rectcopy(long source, long dest, long xoff, long yoff)
 {
-  PariRect *s = rectgraph[source], *d = rectgraph[dest];
+  PariRect *s = check_rect_init(source), *d = check_rect_init(dest);
   RectObj *p1 = RHead(s);
   RectObj *tail = RTail(d);
   RectObj *next;
@@ -801,7 +801,7 @@ clipline(long xmin, long xmax, long ymin
 void
 rectclip(long rect)
 {
-  PariRect *s = rectgraph[rect];
+  PariRect *s = check_rect_init(rect);
   RectObj *p1 = RHead(s);
   RectObj **prevp = &RHead(s);
   RectObj *next;