🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sources.bugs
1 messages
1 total messages Started by William Cheng Wed, 04 Nov 1992 07:34
Tgif-2.12-patch11 (11th patch for tgif-2.12), Part 01/01
#2
Author: William Cheng
Date: Wed, 04 Nov 1992 07:34
756 lines
27956 bytes
Below is tgif-2.12-patch11 (11th patch for tgif-2.12).

Tgif is an Xlib based 2-D drawing tool under X11.

Remove everything outside of the 'cut here' lines (inclusive), save
the file as tgif-2.12-patch11, and apply the patch with
'patch -p -N < tgif-2.12-patch11'.  Here's a short list of added
features/bug fixes.

1)  Fix a bug in erasing text from a grouped object.  This bug only appears if
    the Tgif*GroupedTextEditable X default is set to 'true'.
2)  Fix a bug in setting the clipping rectangles.  Sometimes, tgif would not
    redraw properly.  Thanks to Yoichiro Ueno <ueno@cs.titech.ac.jp> for the
    fix.
3)  Fix a bug in copying objects with attributes.  It used to be that every
    time such a object is copied, the ordering of the attributes are reversed.
4)  Fix a typo in box.c.  This bug only appears if -DNO_THIN_LINE is specified
    as a compile option.

Please send bug reports to william@cs.ucla.edu.
---------------------------------> cut here <---------------------------------
*** attr.c.orig	Fri Aug 14 07:33:51 1992
--- attr.c	Fri Aug 14 07:33:53 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/attr.c,v 2.59 1992/06/23 17:00:47 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/attr.c,v 2.60 1992/08/09 02:16:13 william Exp $";
  #endif
  
***************
*** 281,286 ****
  
     topAttr = botAttr = NULL;
!    from_attr_ptr = FromObjPtr->fattr;
!    for ( ; from_attr_ptr != NULL; from_attr_ptr = from_attr_ptr->next)
     {
        to_attr_ptr = (struct AttrRec *) calloc (1, sizeof(struct AttrRec));
--- 281,286 ----
  
     topAttr = botAttr = NULL;
!    from_attr_ptr = FromObjPtr->lattr;
!    for ( ; from_attr_ptr != NULL; from_attr_ptr = from_attr_ptr->prev)
     {
        to_attr_ptr = (struct AttrRec *) calloc (1, sizeof(struct AttrRec));
*** auxtext.c.orig	Fri Aug 14 07:33:58 1992
--- auxtext.c	Fri Aug 14 07:34:00 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/auxtext.c,v 2.28 1992/08/08 08:28:04 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/auxtext.c,v 2.32 1992/08/14 06:37:56 william Exp $";
  #endif
  
***************
*** 511,522 ****
  }
  
! struct ObjRec * FindTextObj (XOff, YOff)
!    int  XOff, YOff;
!    /* XOff and YOff are screen offsets */
  {
!    register struct ObjRec       * obj_ptr;
!    register struct AttrRec      * attr_ptr;
!    struct ObjRec      		* found_text_obj;
!    struct SelRec      		* sel_ptr, * next_sel;
  
     if (outerSel != NULL)
--- 511,518 ----
  }
  
! static
! void CleanOuterInnerSel ()
  {
!    register struct SelRec       * sel_ptr, * next_sel;
  
     if (outerSel != NULL)
***************
*** 529,533 ****
--- 525,541 ----
        outerSel = innerSel = NULL;
     }
+ }
+ 
+ struct ObjRec * FindTextObj (XOff, YOff)
+    int  XOff, YOff;
+    /* XOff and YOff are screen offsets */
+ {
+    register struct ObjRec       * obj_ptr;
+    register struct AttrRec      * attr_ptr;
+    struct ObjRec      		* found_text_obj;
+    struct SelRec      		* sel_ptr;
  
+    CleanOuterInnerSel ();
+ 
     for (obj_ptr = topObj; obj_ptr != NULL; obj_ptr = obj_ptr->next)
        if (obj_ptr->type == OBJ_TEXT &&
***************
*** 576,579 ****
--- 584,630 ----
        }
     return (NULL);
+ }
+ 
+ void UnlinkCurTextFromInnerSel ()
+ {
+    register struct GroupRec	* group_obj=innerSel->obj->detail.r;
+ 
+    if (group_obj->first == group_obj->last)
+    {
+       if (outerSel != innerSel || innerSel->obj->fattr != NULL)
+       {
+          Msg ("Error!   The text object within a composite object which you");
+          Msg ("    have just erased caused all ancestors to be deleted.");
+          Msg ("    You may see ghost images now!");
+          Msg ("    Please undo and try ungroup the ancestor object first");
+          Msg ("    before erasing the text.");
+          fprintf (stderr, "%s\n%s\n%s\n%s\n%s\n",
+                "Error!   The text object within a composite object which you",
+                "    have just erased caused all ancestors to be deleted.",
+                "    You may see ghost images now!",
+                "    Please undo and try ungroup the ancestor object first",
+                "    before erasing the text.");
+       }
+       DelObj (outerSel->obj);
+       CleanOuterInnerSel ();
+       curTextObj = NULL;
+       return;
+    }
+    else if (curTextObj == group_obj->first)
+    {
+       curTextObj->next->prev = NULL;
+       group_obj->first = curTextObj->next;
+    }
+    else if (curTextObj == group_obj->last)
+    {
+       curTextObj->prev->next = NULL;
+       group_obj->last = curTextObj->prev;
+    }
+    else
+    {
+       curTextObj->prev->next = curTextObj->next;
+       curTextObj->next->prev = curTextObj->prev;
+    }
+    curTextObj->prev = curTextObj->next = NULL;
  }
  
*** box.c.orig	Fri Aug 14 07:34:09 1992
--- box.c	Fri Aug 14 07:34:10 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/box.c,v 2.33 1992/06/01 16:16:41 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/box.c,v 2.34 1992/08/14 03:56:31 william Exp $";
  #endif
  
***************
*** 274,278 ****
        values.line_width = ZOOMED_SIZE(width);
  #ifdef NO_THIN_LINE
!       if (vluae.line_width < 1) values.line_width = 1;
  #endif
        values.join_style = JoinMiter;
--- 274,278 ----
        values.line_width = ZOOMED_SIZE(width);
  #ifdef NO_THIN_LINE
!       if (value.line_width < 1) values.line_width = 1;
  #endif
        values.join_style = JoinMiter;
*** cmd.c.orig	Fri Aug 14 07:34:16 1992
--- cmd.c	Fri Aug 14 07:34:19 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/cmd.c,v 2.17 1992/03/31 07:51:35 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/cmd.c,v 2.18 1992/08/14 04:03:01 william Exp $";
  #endif
  
***************
*** 148,152 ****
              next_cmd = cmd_ptr->next;
              DeleteARedoRecord (cmd_ptr);
-             cfree (cmd_ptr);
           }
           break;
--- 148,151 ----
*** drawing.c.orig	Fri Aug 14 07:34:25 1992
--- drawing.c	Fri Aug 14 07:34:27 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/drawing.c,v 2.114 1992/07/24 05:20:38 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/drawing.c,v 2.115 1992/08/11 03:58:46 william Exp $";
  #endif
  
***************
*** 80,84 ****
  #define O_GRID (O_VIS+O_INVIS)
  
! int	numRedrawBBox=INVALID;
  
  static int		checkBBox=TRUE;
--- 80,87 ----
  #define O_GRID (O_VIS+O_INVIS)
  
! int		numRedrawBBox=INVALID;
! int		numClipRecs=0;
! int		clipOrdering=Unsorted;
! XRectangle	clipRecs[4];
  
  static int		checkBBox=TRUE;
***************
*** 87,94 ****
  void SetDefaultDrawWinClipRecs ()
  {
!    XRectangle	recs[1];
! 
!    SetRecVals (recs[0], 0, 0, ZOOMED_SIZE(drawWinW), ZOOMED_SIZE(drawWinH));
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, recs, 1, YXBanded);
  }
  
--- 90,98 ----
  void SetDefaultDrawWinClipRecs ()
  {
!    SetRecVals (clipRecs[0], 0, 0, ZOOMED_SIZE(drawWinW), ZOOMED_SIZE(drawWinH));
!    numClipRecs = 1;
!    clipOrdering = YXBanded;
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs, numClipRecs,
!          clipOrdering);
  }
  
***************
*** 95,102 ****
  void SetDefaultIconWinClipRecs ()
  {
!    XRectangle	recs[1];
! 
!    SetRecVals (recs[0], 0, 0, iconWindowW, iconWindowH);
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, recs, 1, YXBanded);
  }
  
--- 99,107 ----
  void SetDefaultIconWinClipRecs ()
  {
!    SetRecVals (clipRecs[0], 0, 0, iconWindowW, iconWindowH);
!    numClipRecs = 1;
!    clipOrdering = YXBanded;
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs, numClipRecs,
!          clipOrdering);
  }
  
***************
*** 273,281 ****
  {
     register struct ObjRec	* obj_ptr;
-    XRectangle			recs[1];
  
!    SetRecVals (recs[0], OFFSET_X(LtX), OFFSET_Y(LtY), ZOOMED_SIZE(RbX-LtX)+1,
!          ZOOMED_SIZE(RbY-LtY)+1);
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, recs, 1, YXBanded);
  
     XClearArea (mainDisplay, drawWindow, OFFSET_X(LtX), OFFSET_Y(LtY),
--- 278,288 ----
  {
     register struct ObjRec	* obj_ptr;
  
!    SetRecVals (clipRecs[0], OFFSET_X(LtX), OFFSET_Y(LtY),
!          ZOOMED_SIZE(RbX-LtX)+1, ZOOMED_SIZE(RbY-LtY)+1);
!    numClipRecs = 1;
!    clipOrdering = YXBanded;
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs, numClipRecs,
!          clipOrdering);
  
     XClearArea (mainDisplay, drawWindow, OFFSET_X(LtX), OFFSET_Y(LtY),
***************
*** 314,320 ****
  {
     register struct ObjRec	* obj_ptr;
!    int				ltx, lty, rbx, rby, rec1_slot, num;
     struct BBRec			bbox1, bbox2;
-    XRectangle			recs[4];
  
     bbox1.ltx = LtX1; bbox1.lty = LtY1;
--- 321,326 ----
  {
     register struct ObjRec	* obj_ptr;
!    int				ltx, lty, rbx, rby, rec1_slot;
     struct BBRec			bbox1, bbox2;
  
     bbox1.ltx = LtX1; bbox1.lty = LtY1;
***************
*** 348,356 ****
     {
        rec1_slot = (LtX1 <= LtX2) ? 0 : 1;
!       SetRecVals (recs[rec1_slot], OFFSET_X(LtX1), OFFSET_Y(LtY1),
              ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!       SetRecVals (recs[!rec1_slot], OFFSET_X(LtX2), OFFSET_Y(LtY2),
              ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!       num = 2;
     }
     else
--- 354,362 ----
     {
        rec1_slot = (LtX1 <= LtX2) ? 0 : 1;
!       SetRecVals (clipRecs[rec1_slot], OFFSET_X(LtX1), OFFSET_Y(LtY1),
              ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!       SetRecVals (clipRecs[!rec1_slot], OFFSET_X(LtX2), OFFSET_Y(LtY2),
              ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!       numClipRecs = 2;
     }
     else
***************
*** 360,368 ****
           if (RbY1 <= LtY2)
           {  /* y-extents do not intersect */
!             SetRecVals (recs[0], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             SetRecVals (recs[1], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             num = 2;
           }
           else if (RbY1 >= RbY2)
--- 366,374 ----
           if (RbY1 <= LtY2)
           {  /* y-extents do not intersect */
!             SetRecVals (clipRecs[0], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             SetRecVals (clipRecs[1], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             numClipRecs = 2;
           }
           else if (RbY1 >= RbY2)
***************
*** 369,387 ****
           {  /* box 2's y-extents is inside box 1's y-extents */
              rec1_slot = (LtX1 < LtX2) ? 0 : 1;  
!             SetRecVals (recs[rec1_slot], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             SetRecVals (recs[!rec1_slot], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             num = 2;
           }
           else
           {  
!             SetRecVals (recs[0], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(LtY2-LtY1)+1);
              if (LtX1 < LtX2)
              {
!                SetRecVals (recs[1], OFFSET_X(LtX1), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
!                SetRecVals (recs[2], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
              }
--- 375,393 ----
           {  /* box 2's y-extents is inside box 1's y-extents */
              rec1_slot = (LtX1 < LtX2) ? 0 : 1;  
!             SetRecVals (clipRecs[rec1_slot], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             SetRecVals (clipRecs[!rec1_slot], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             numClipRecs = 2;
           }
           else
           {  
!             SetRecVals (clipRecs[0], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(LtY2-LtY1)+1);
              if (LtX1 < LtX2)
              {
!                SetRecVals (clipRecs[1], OFFSET_X(LtX1), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
!                SetRecVals (clipRecs[2], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
              }
***************
*** 388,399 ****
              else
              {
!                SetRecVals (recs[1], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
!                SetRecVals (recs[2], OFFSET_X(LtX1), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
              }
!             SetRecVals (recs[3], OFFSET_X(LtX2), OFFSET_Y(RbY1),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-RbY1)+1);
!             num = 4;
           }
        }
--- 394,405 ----
              else
              {
!                SetRecVals (clipRecs[1], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
!                SetRecVals (clipRecs[2], OFFSET_X(LtX1), OFFSET_Y(LtY2),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY2)+1);
              }
!             SetRecVals (clipRecs[3], OFFSET_X(LtX2), OFFSET_Y(RbY1),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-RbY1)+1);
!             numClipRecs = 4;
           }
        }
***************
*** 402,410 ****
           if (RbY2 <= LtY1)
           {  /* y-extents do not intersect */
!             SetRecVals (recs[0], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             SetRecVals (recs[1], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             num = 2;
           }
           else if (RbY2 >= RbY1)
--- 408,416 ----
           if (RbY2 <= LtY1)
           {  /* y-extents do not intersect */
!             SetRecVals (clipRecs[0], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             SetRecVals (clipRecs[1], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             numClipRecs = 2;
           }
           else if (RbY2 >= RbY1)
***************
*** 411,429 ****
           {  /* box 1's y-extents is inside box 2's y-extents */
              rec1_slot = (LtX1 < LtX2) ? 0 : 1;  
!             SetRecVals (recs[rec1_slot], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             SetRecVals (recs[!rec1_slot], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             num = 2;
           }
           else
           {  
!             SetRecVals (recs[0], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(LtY1-LtY2)+1);
              if (LtX1 < LtX2)
              {
!                SetRecVals (recs[1], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
!                SetRecVals (recs[2], OFFSET_X(LtX2), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
              }
--- 417,435 ----
           {  /* box 1's y-extents is inside box 2's y-extents */
              rec1_slot = (LtX1 < LtX2) ? 0 : 1;  
!             SetRecVals (clipRecs[rec1_slot], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-LtY1)+1);
!             SetRecVals (clipRecs[!rec1_slot], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY2)+1);
!             numClipRecs = 2;
           }
           else
           {  
!             SetRecVals (clipRecs[0], OFFSET_X(LtX2), OFFSET_Y(LtY2),
                    ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(LtY1-LtY2)+1);
              if (LtX1 < LtX2)
              {
!                SetRecVals (clipRecs[1], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
!                SetRecVals (clipRecs[2], OFFSET_X(LtX2), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
              }
***************
*** 430,445 ****
              else
              {
!                SetRecVals (recs[1], OFFSET_X(LtX2), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
!                SetRecVals (recs[2], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
              }
!             SetRecVals (recs[3], OFFSET_X(LtX1), OFFSET_Y(RbY2),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-RbY2)+1);
!             num = 4;
           }
        }
     }
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, recs, num, YXSorted);
  
     if (paperWidth >= LtX1 && paperWidth <= RbX1 ||
--- 436,453 ----
              else
              {
!                SetRecVals (clipRecs[1], OFFSET_X(LtX2), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX2-LtX2)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
!                SetRecVals (clipRecs[2], OFFSET_X(LtX1), OFFSET_Y(LtY1),
                       ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY2-LtY1)+1);
              }
!             SetRecVals (clipRecs[3], OFFSET_X(LtX1), OFFSET_Y(RbY2),
                    ZOOMED_SIZE(RbX1-LtX1)+1, ZOOMED_SIZE(RbY1-RbY2)+1);
!             numClipRecs = 4;
           }
        }
     }
!    clipOrdering = YXSorted;
!    XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs, numClipRecs,
!          clipOrdering);
  
     if (paperWidth >= LtX1 && paperWidth <= RbX1 ||
*** file.c.orig	Fri Aug 14 07:34:41 1992
--- file.c	Fri Aug 14 07:34:46 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/file.c,v 2.191 1992/08/08 19:53:29 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/file.c,v 2.192 1992/08/14 06:14:50 william Exp $";
  #endif
  
***************
*** 621,625 ****
     {
        len = strlen (curFileName);
!       for (c_ptr=&curFileName[len-1]; c_ptr!=curFileName; c_ptr--)
           if (*c_ptr == '/')
              break;
--- 621,625 ----
     {
        len = strlen (curFileName);
!       for (c_ptr = &curFileName[len-1]; c_ptr != curFileName; c_ptr--)
           if (*c_ptr == '/')
              break;
*** text.c.orig	Fri Aug 14 07:34:56 1992
--- text.c	Fri Aug 14 07:34:58 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/text.c,v 2.104 1992/08/08 08:26:55 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/text.c,v 2.108 1992/08/14 05:46:05 william Exp $";
  #endif
  
***************
*** 441,450 ****
        else
        {
!          if (outerSel != NULL) AdjAncestorsBBox ();
           if (!curTextIsNew)
!             ChangeReplaceOneCmdToDeleteCmd ();
           else
              AbortPrepareCmd (CMD_REPLACE);
!          DelObj (curTextObj);
        }
  
--- 441,467 ----
        else
        {
!          if (outerSel != NULL)
!          {
!             UnlinkCurTextFromInnerSel ();
!             AdjAncestorsBBox ();
!          }
           if (!curTextIsNew)
!          {
!             if (outerSel != NULL)
!                RecordReplaceAnObj (outerSel->obj);
!             else
!                ChangeReplaceOneCmdToDeleteCmd ();
!          }
           else
              AbortPrepareCmd (CMD_REPLACE);
!          if (curTextObj != NULL)
!          {
!             if (outerSel != NULL)
!                /* curTextObj already broken off from the main */
!                /*	stream of objects, so just free it. */
!                FreeObj (curTextObj);
!             else
!                DelObj (curTextObj);
!          }
        }
  
***************
*** 2172,2177 ****
                 GCClipMask | GCClipXOrigin | GCClipYOrigin, &values);
           XFillRectangle (mainDisplay, Win, drawGC, ltx, lty, w, h);
-          SetDefaultDrawWinClipRecs ();
           XSetClipOrigin (mainDisplay, drawGC, 0, 0);
        }
     }
--- 2189,2196 ----
                 GCClipMask | GCClipXOrigin | GCClipYOrigin, &values);
           XFillRectangle (mainDisplay, Win, drawGC, ltx, lty, w, h);
           XSetClipOrigin (mainDisplay, drawGC, 0, 0);
+          if (numClipRecs > 0)
+             XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs,
+                numClipRecs, clipOrdering);
        }
     }
*** auxtext.e.orig	Fri Aug 14 07:35:01 1992
--- auxtext.e	Fri Aug 14 07:35:02 1992
***************
*** 23,27 ****
   * PERFORMANCE OF THIS SOFTWARE.
   *
!  * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/auxtext.e,v 2.11 1992/06/26 05:21:19 william Exp $
   */
  
--- 23,27 ----
   * PERFORMANCE OF THIS SOFTWARE.
   *
!  * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/auxtext.e,v 2.12 1992/08/12 05:43:55 william Exp $
   */
  
***************
*** 41,44 ****
--- 41,45 ----
  extern void	MakeCachedTextBitmap ();
  extern struct ObjRec	* FindTextObj ();
+ extern void	UnlinkCurTextFromInnerSel ();
  extern void	AdjAncestorsBBox ();
  extern void	DumpTextObj ();
*** drawing.e.orig	Fri Aug 14 07:35:05 1992
--- drawing.e	Fri Aug 14 07:35:05 1992
***************
*** 23,30 ****
   * PERFORMANCE OF THIS SOFTWARE.
   *
!  * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/drawing.e,v 2.8 1992/05/11 23:41:21 william Exp $
   */
  
  extern int	numRedrawBBox;
  
  extern void	SetDefaultDrawWinClipRecs ();
--- 23,33 ----
   * PERFORMANCE OF THIS SOFTWARE.
   *
!  * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/drawing.e,v 2.9 1992/08/11 03:58:27 william Exp $
   */
  
  extern int	numRedrawBBox;
+ extern int	numClipRecs;
+ extern int	clipOrdering;
+ extern XRectangle	clipRecs[];
  
  extern void	SetDefaultDrawWinClipRecs ();
*** patchlevel.h.orig	Fri Aug 14 07:35:08 1992
--- patchlevel.h	Fri Aug 14 07:35:09 1992
***************
*** 23,28 ****
   * PERFORMANCE OF THIS SOFTWARE.
   *
!  * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/patchlevel.h,v 2.28 1992/08/08 08:26:49 william Exp $
   */
  
! #define TGIF_PATCHLEVEL 10
--- 23,28 ----
   * PERFORMANCE OF THIS SOFTWARE.
   *
!  * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/patchlevel.h,v 2.29 1992/08/11 06:53:25 william Exp $
   */
  
! #define TGIF_PATCHLEVEL 11
*** Imakefile.orig	Fri Aug 14 07:35:12 1992
--- Imakefile	Fri Aug 14 07:35:16 1992
***************
*** 23,30 ****
  /**/# PERFORMANCE OF THIS SOFTWARE.
  /**/#
! /**/# @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Imakefile,v 2.83 1992/08/08 08:25:01 william Exp $
  /**/#
  
! TGIFVERSION	= 2.12-p10
  PROGRAMS	= tgif prtgif /**/#frontend11.o testdrive
  /**/#CDEBUGFLAGS= -g
--- 23,30 ----
  /**/# PERFORMANCE OF THIS SOFTWARE.
  /**/#
! /**/# @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Imakefile,v 2.84 1992/08/14 06:19:54 william Exp $
  /**/#
  
! TGIFVERSION	= 2.12-p11
  PROGRAMS	= tgif prtgif /**/#frontend11.o testdrive
  /**/#CDEBUGFLAGS= -g
*** HISTORY.orig	Fri Aug 14 07:35:22 1992
--- HISTORY	Fri Aug 14 07:35:26 1992
***************
*** 1,5 ****
  /*
!  *  @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/HISTORY,v 2.34 1992/08/08 19:55:45 william Exp $
   */
  -----------------------> tgif-2.12-p9 => tgif-2.12-p10 <-----------------------
  I've just put tgif-2.12-patch10 (10th patch for tgif-2.12) in the
--- 1,27 ----
  /*
!  *  @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/HISTORY,v 2.35 1992/08/14 06:18:25 william Exp $
   */
+ -----------------------> tgif-2.12-p10 => tgif-2.12-p11 <-----------------------
+ I've just put tgif-2.12-patch11 (11th patch for tgif-2.12) in the
+ following places for anonymous ftp:
+ 
+ 	export.lcs.mit.edu	/contrib/tgif-2.12-patch11.Z
+ 	cs.ucla.edu		/pub/tgif/tgif-2.12-patch11.Z
+ 
+ The patch is also posted to comp.sources.bugs.
+ 
+ Please uncompress and then apply the patch with
+ 'patch -p -N < tgif-2.12-patch11'.
+ Here's a short list of added features/bug fixes.
+ 
+ 1)  Fix a bug in erasing text from a grouped object.  This bug only appears if
+     the Tgif*GroupedTextEditable X default is set to 'true'.
+ 2)  Fix a bug in setting the clipping rectangles.  Sometimes, tgif would not
+     redraw properly.  Thanks to Yoichiro Ueno <ueno@cs.titech.ac.jp> for the
+     fix.
+ 3)  Fix a bug in copying objects with attributes.  It used to be that every
+     time such a object is copied, the ordering of the attributes are reversed.
+ 4)  Fix a typo in box.c.  This bug only appears if -DNO_THIN_LINE is specified
+     as a compile option.
  -----------------------> tgif-2.12-p9 => tgif-2.12-p10 <-----------------------
  I've just put tgif-2.12-patch10 (10th patch for tgif-2.12) in the
---------------------------------> cut here <---------------------------------
-- 
Bill Cheng // UCLA Computer Science Department // (310) 645-8328
3564-C Boelter Hall // Los Angeles, California 90024 // USA
william@CS.UCLA.EDU      ...!{uunet|ucbvax}!cs.ucla.edu!william
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads