🚀 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:42
Tgif-2.12-patch12 (12th patch for tgif-2.12), Part 01/02
#3
Author: William Cheng
Date: Wed, 04 Nov 1992 07:42
2866 lines
88112 bytes
Below is Part 01 of tgif-2.12-patch12 (12th patch for tgif-2.12).
(The complete source of tgif-2.12 at patchelevel 12 can be found in the
following places for anonymous ftp:
export.lcs.mit.edu:/contrib/tgif-2.12-p12.tar.Z and
cs.ucla.edu:/pub/tgif/tgif-2.12-p12.tar.Z.)

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

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

1)  Fix a bug that causes PostScript stack overflow.  This could occur when
    printing files (black/white or color) containing xpm objects.
2)  Clears the PostScript stack when printing drawings with EPS objects so that
    certain buggy EPS files (such as the ones generate by xgrabsc) work.
3)  Tgif used to allocate black and white colors for internal use.  These
    colors are freed during initialization to allow the possibility of
    displaying pixmap of 256 colors.  (Please define DONTFREECOLORS in the
    DEFINES compile options to disable calls to free colors on buggy X servers.)
4)  Merge prtgif into tgif to save space.  Tgif will now take all the command
    line options that prtgif used to take; in addition, the -print option turns
    tgif into prtgif.  Thanks to Germano Caronni <caronni@nessie.cs.id.ethz.ch>
    for the suggestion.
5)  Fix a malloc bug in spline.c, poly.c, and polygon.c.  Again, thanks to
    Germano Caronni <caronni@nessie.cs.id.ethz.ch> for the bug fix.
6)  Fix a couple of bugs relating to VMS and that sometimes objects are not
    drawn when tgif comes up.  Thanks to Mats Bergstr"om
    <KOSU_MATSB@routh.kosufy.lu.se> for the code fixes.  Also included in
    this distribution is another example of a VMS makefile, VMS_MAKE_TGIF.COM,
    contributed by Mats Bergstr"om.

Please send bug reports to william@cs.ucla.edu.
---------------------------------> cut here <---------------- Part 01/02 -----
*** align.c.orig	Tue Nov  3 22:26:58 1992
--- align.c	Tue Nov  3 22:26:59 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/align.c,v 2.29 1992/03/31 07:50:25 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/align.c,v 2.31 1992/10/14 04:15:19 william Exp $";
  #endif
  
***************
*** 87,95 ****
  {
     register int		i;
!    struct SelRec	* sel_ptr, * next_sel=NULL;
     struct ObjRec	* obj_ptr;
     struct VSelRec	* vsel_ptr;
     char			msg[MAXSTRING];
!    int			dx=0, dy=0, ltx=0, lty=0, rbx=0, rby=0, count, w, h;
     double		x=0.0, y=0.0, h_dist=0.0, v_dist=0.0;
  
--- 87,95 ----
  {
     register int		i;
!    struct SelRec	* sel_ptr, * next_sel;
     struct ObjRec	* obj_ptr;
     struct VSelRec	* vsel_ptr;
     char			msg[MAXSTRING];
!    int			dx=0, dy=0, ltx, lty, rbx, rby, count, w, h;
     double		x=0.0, y=0.0, h_dist=0.0, v_dist=0.0;
  
***************
*** 106,110 ****
     if (curChoice == VERTEXMODE)
     {
-       int		changed=FALSE;
        int		start, num_pts;
        struct DistrVRec	* dv_ptr, * left_dv, * right_dv, * top_dv, * bottom_dv;
--- 106,109 ----
***************
*** 111,115 ****
        struct DistrVRec	* ptr, * hori_dv, * vert_dv;
        struct SelRec	* tmp_top_sel, * tmp_bot_sel, * tmp_sel_ptr;
-       struct SelRec	* next_sel=NULL;
        XPoint		* v=NULL;
  
--- 110,113 ----
***************
*** 818,823 ****
              horiAlign!=ALIGN_N && horiAlign!=ALIGN_S &&
              vertAlign!=ALIGN_N && vertAlign!=ALIGN_S)
!          if (YesNoCancel ("Okay to move all vertices to one point? [ync](y)") !=
!                CONFIRM_YES)
              return;
  
--- 816,821 ----
              horiAlign!=ALIGN_N && horiAlign!=ALIGN_S &&
              vertAlign!=ALIGN_N && vertAlign!=ALIGN_S)
!          if (YesNoCancel ("Okay to move all vertices to one point? [ync](y)",
!                CONFIRM_YES) != CONFIRM_YES)
              return;
  
***************
*** 1053,1057 ****
  void AlignSelToPage ()
  {
!    register int		x=0, y=0, i;
     struct SelRec	* sel_ptr;
     struct ObjRec	* obj_ptr;
--- 1051,1055 ----
  void AlignSelToPage ()
  {
!    register int		i;
     struct SelRec	* sel_ptr;
     struct ObjRec	* obj_ptr;
***************
*** 1058,1062 ****
     struct VSelRec	* vsel_ptr;
     int			pivot_x = 0, pivot_y = 0;
!    int			dx, dy, ltx=0, lty=0, rbx=0, rby=0;
  
     if (topSel == NULL && topVSel == NULL) return;
--- 1056,1060 ----
     struct VSelRec	* vsel_ptr;
     int			pivot_x = 0, pivot_y = 0;
!    int			dx, dy, ltx, lty, rbx, rby;
  
     if (topSel == NULL && topVSel == NULL) return;
***************
*** 1072,1077 ****
              horiAlign!=ALIGN_N && horiAlign!=ALIGN_S &&
              vertAlign!=ALIGN_N && vertAlign!=ALIGN_S)
!          if (YesNoCancel ("Okay to move all vertices to one point? [ync](y)") !=
!                CONFIRM_YES)
              return;
  
--- 1070,1075 ----
              horiAlign!=ALIGN_N && horiAlign!=ALIGN_S &&
              vertAlign!=ALIGN_N && vertAlign!=ALIGN_S)
!          if (YesNoCancel ("Okay to move all vertices to one point? [ync](y)",
!                CONFIRM_YES) != CONFIRM_YES)
              return;
  
*** arc.c.orig	Tue Nov  3 22:27:03 1992
--- arc.c	Tue Nov  3 22:27:05 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/arc.c,v 2.64 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/arc.c,v 2.66 1992/11/03 06:52:49 william Exp $";
  #endif
  
***************
*** 70,78 ****
     int	xc, yc, x1, y1, x2, y2;
  {
!    register int		dx, dy, radius;
     register double	theta1, theta2;
  
     dx = x1-xc; dy = y1-yc;
-    radius = (int)sqrt((double)(dx*dx+dy*dy));
     theta1 = (dx==0) ? ((dy>=0) ? M_PI/2.0 : -M_PI/2.0) :
           atan2 ((double)(dy), (double)(dx));
--- 70,77 ----
     int	xc, yc, x1, y1, x2, y2;
  {
!    register int		dx, dy;
     register double	theta1, theta2;
  
     dx = x1-xc; dy = y1-yc;
     theta1 = (dx==0) ? ((dy>=0) ? M_PI/2.0 : -M_PI/2.0) :
           atan2 ((double)(dy), (double)(dx));
***************
*** 227,231 ****
     int		aw=arc_ptr->aw, ah=arc_ptr->ah;
     int		x1=arc_ptr->x1, y1=arc_ptr->y1, x2, y2;
!    double	len, sine, cosine;
  
     if (arc_ptr->style & LS_LEFT)
--- 226,230 ----
     int		aw=arc_ptr->aw, ah=arc_ptr->ah;
     int		x1=arc_ptr->x1, y1=arc_ptr->y1, x2, y2;
!    double	sine, cosine;
  
     if (arc_ptr->style & LS_LEFT)
***************
*** 240,244 ****
        if (dx==0 && dy==0)
        {
!          len = sine = cosine = ((double)0.0);
           x = x1; y = y1;
           if (x < ltx) ltx = x; if (y < lty) lty = y;
--- 239,243 ----
        if (dx==0 && dy==0)
        {
!          sine = cosine = ((double)0.0);
           x = x1; y = y1;
           if (x < ltx) ltx = x; if (y < lty) lty = y;
***************
*** 247,251 ****
        else
        {
!          len = (double) sqrt ((double)(dx*dx+dy*dy));
           sine = dy/len;
           cosine = dx/len;
--- 246,251 ----
        else
        {
!          double len = (double) sqrt ((double)(dx*dx+dy*dy));
! 
           sine = dy/len;
           cosine = dx/len;
***************
*** 274,278 ****
        if (dx==0 && dy==0)
        {
!          len = sine = cosine = ((double)0.0);
           ArcRealX2Y2 (arc_ptr, &x2, &y2);
           x = x2; y = y2;
--- 274,278 ----
        if (dx==0 && dy==0)
        {
!          sine = cosine = ((double)0.0);
           ArcRealX2Y2 (arc_ptr, &x2, &y2);
           x = x2; y = y2;
***************
*** 282,286 ****
        else
        {
!          len = (double) sqrt ((double)(dx*dx+dy*dy));
           sine = dy/len;
           cosine = dx/len;
--- 282,287 ----
        else
        {
!          double len = (double) sqrt ((double)(dx*dx+dy*dy));
! 
           sine = dy/len;
           cosine = dx/len;
***************
*** 336,340 ****
     struct BBRec	bbox;
     XPoint	v[2];
!    double	len, sine, cosine;
  
     switch (Dir)
--- 337,341 ----
     struct BBRec	bbox;
     XPoint	v[2];
!    double	sine, cosine;
  
     switch (Dir)
***************
*** 352,359 ****
        if (dx==0 && dy==0)
        {
-          len = ((double)0.0);
-          sine = ((double)0.0);
-          cosine = ((double)0.0);
- 
           v[0].x = v[1].x = X;
           v[0].y = v[1].y = Y;
--- 353,356 ----
***************
*** 361,365 ****
        else
        {
!          len = (double) sqrt ((double)(dx*dx+dy*dy));
           sine = dy/len;
           cosine = dx/len;
--- 358,363 ----
        else
        {
!          double len = (double) sqrt ((double)(dx*dx+dy*dy));
! 
           sine = dy/len;
           cosine = dx/len;
***************
*** 596,602 ****
     struct ArcRec	* arc_ptr = ObjPtr->detail.a;
     int			fill, width, pen, dash, pixel, real_x_off, real_y_off;
!    int			ltx, lty, w, h, angle1, angle2, x1, y1, x2, y2, xc, yc;
     int			real_x2, real_y2, aw, ah, dir;
!    double		dx, dy, len, sine, cosine;
     XPoint		tmp_v[4];
     XGCValues		values;
--- 594,600 ----
     struct ArcRec	* arc_ptr = ObjPtr->detail.a;
     int			fill, width, pen, dash, pixel, real_x_off, real_y_off;
!    int			ltx, lty, w, h, angle1, angle2, x1, y1, x2, y2;
     int			real_x2, real_y2, aw, ah, dir;
!    double		dx, dy, sine, cosine;
     XPoint		tmp_v[4];
     XGCValues		values;
***************
*** 662,667 ****
     dir = arc_ptr->dir;
  
!    xc = ZOOMED_SIZE(arc_ptr->xc-real_x_off);
!    yc = ZOOMED_SIZE(arc_ptr->yc-real_y_off);
  
     x1 = ZOOMED_SIZE(arc_ptr->x1-real_x_off);
--- 660,665 ----
     dir = arc_ptr->dir;
  
! /* xc = ZOOMED_SIZE(arc_ptr->xc-real_x_off); */
! /* yc = ZOOMED_SIZE(arc_ptr->yc-real_y_off); */
  
     x1 = ZOOMED_SIZE(arc_ptr->x1-real_x_off);
***************
*** 682,686 ****
        if (dx==0 && dy==0)
        {
!          len = sine = cosine = ((double)0.0);
  
           tmp_v[0].x = tmp_v[1].x = tmp_v[2].x = tmp_v[3].x = x1;
--- 680,684 ----
        if (dx==0 && dy==0)
        {
!          sine = cosine = ((double)0.0);
  
           tmp_v[0].x = tmp_v[1].x = tmp_v[2].x = tmp_v[3].x = x1;
***************
*** 689,693 ****
        else
        {
!          len = (double) sqrt ((double)(dx*dx+dy*dy));
           sine = dy/len;
           cosine = dx/len;
--- 687,692 ----
        else
        {
!          double len = (double) sqrt ((double)(dx*dx+dy*dy));
! 
           sine = dy/len;
           cosine = dx/len;
***************
*** 722,726 ****
        if (dx==0 && dy==0)
        {
!          len = sine = cosine = ((double)0.0);
  
           tmp_v[0].x = tmp_v[1].x = tmp_v[2].x = tmp_v[3].x = x2;
--- 721,725 ----
        if (dx==0 && dy==0)
        {
!          sine = cosine = ((double)0.0);
  
           tmp_v[0].x = tmp_v[1].x = tmp_v[2].x = tmp_v[3].x = x2;
***************
*** 729,733 ****
        else
        {
!          len = (double) sqrt ((double)(dx*dx+dy*dy));
           sine = dy/len;
           cosine = dx/len;
--- 728,733 ----
        else
        {
!          double len = (double) sqrt ((double)(dx*dx+dy*dy));
! 
           sine = dy/len;
           cosine = dx/len;
*** attr.c.orig	Tue Nov  3 22:27:09 1992
--- attr.c	Tue Nov  3 22:27:10 1992
***************
*** 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
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/attr.c,v 2.62 1992/10/14 04:27:32 william Exp $";
  #endif
  
***************
*** 225,229 ****
     struct AttrRec	* AttrPtr;
  {
!    struct AttrRec	* ptr, * next_attr=NULL;
  
     for (ptr = AttrPtr; ptr != NULL; ptr = next_attr)
--- 225,229 ----
     struct AttrRec	* AttrPtr;
  {
!    struct AttrRec	* ptr, * next_attr;
  
     for (ptr = AttrPtr; ptr != NULL; ptr = next_attr)
***************
*** 441,445 ****
     char	* Str;
  {
!    register char	* s = Str;
  
     for (s = Str; *s != '\0'; s++)
--- 441,445 ----
     char	* Str;
  {
!    register char	* s;
  
     for (s = Str; *s != '\0'; s++)
***************
*** 886,890 ****
     struct SelRec	* * TopSelPtr, * * BotSelPtr;
  {
!    struct AttrRec	* attr_ptr, * next_attr=NULL;
     struct SelRec	* new_sel_ptr;
     int			len1, len2;
--- 886,890 ----
     struct SelRec	* * TopSelPtr, * * BotSelPtr;
  {
!    struct AttrRec	* attr_ptr, * next_attr;
     struct SelRec	* new_sel_ptr;
     int			len1, len2;
***************
*** 944,948 ****
     struct SelRec	* sel_ptr, * new_sel_ptr;
     struct ObjRec	* obj_ptr;
!    struct AttrRec	* attr_ptr, * next_attr=NULL;
     int			picture_changed=FALSE, name_changed=FALSE;
  
--- 944,948 ----
     struct SelRec	* sel_ptr, * new_sel_ptr;
     struct ObjRec	* obj_ptr;
!    struct AttrRec	* attr_ptr, * next_attr;
     int			picture_changed=FALSE, name_changed=FALSE;
  
***************
*** 968,972 ****
           {
              struct SelRec	* tmp_top_sel, * tmp_bot_sel;
!             struct SelRec	* tmp_sel_ptr, * next_sel=NULL;
              int			count;
  
--- 968,972 ----
           {
              struct SelRec	* tmp_top_sel, * tmp_bot_sel;
!             struct SelRec	* tmp_sel_ptr, * next_sel;
              int			count;
  
***************
*** 1076,1080 ****
     struct ObjRec	* text_obj_ptr;
     int          	x, y, grid_x, grid_y, dx, dy, placing = TRUE;
!    int          	ltx, lty, rbx, rby, changed = FALSE, moved = FALSE;
     int			orig_x, orig_y, grid_orig_x, grid_orig_y;
     XEvent		input, ev;
--- 1076,1080 ----
     struct ObjRec	* text_obj_ptr;
     int          	x, y, grid_x, grid_y, dx, dy, placing = TRUE;
!    int          	ltx, lty, rbx, rby;
     int			orig_x, orig_y, grid_orig_x, grid_orig_y;
     XEvent		input, ev;
***************
*** 1116,1120 ****
           GridXY (x, y, &grid_x, &grid_y);
  
!          if (moved = (grid_x != grid_orig_x+dx || grid_y != grid_orig_y+dy))
           {
              SelBox (drawWindow, revDefaultGC, ltx+dx, lty+dy, rbx+dx, rby+dy);
--- 1116,1120 ----
           GridXY (x, y, &grid_x, &grid_y);
  
!          if (grid_x != grid_orig_x+dx || grid_y != grid_orig_y+dy)
           {
              SelBox (drawWindow, revDefaultGC, ltx+dx, lty+dy, rbx+dx, rby+dy);
***************
*** 1199,1205 ****
     struct ObjRec	* text_obj_ptr;
     int          	x, y, grid_x, grid_y, dx, dy, placing = TRUE;
!    int          	ltx, lty, rbx, rby, moved = FALSE;
     int			orig_x, orig_y, grid_orig_x, grid_orig_y;
!    int			old_just = 0, new_just = 0;
     XEvent		input, ev;
  
--- 1199,1205 ----
     struct ObjRec	* text_obj_ptr;
     int          	x, y, grid_x, grid_y, dx, dy, placing = TRUE;
!    int          	ltx, lty, rbx, rby;
     int			orig_x, orig_y, grid_orig_x, grid_orig_y;
!    int			old_just, new_just = 0;
     XEvent		input, ev;
  
***************
*** 1240,1244 ****
           GridXY (x, y, &grid_x, &grid_y);
  
!          if (moved = (grid_x != grid_orig_x+dx || grid_y != grid_orig_y+dy))
           {
              SelBox (drawWindow, revDefaultGC, ltx+dx, lty+dy, rbx+dx, rby+dy);
--- 1240,1244 ----
           GridXY (x, y, &grid_x, &grid_y);
  
!          if (grid_x != grid_orig_x+dx || grid_y != grid_orig_y+dy)
           {
              SelBox (drawWindow, revDefaultGC, ltx+dx, lty+dy, rbx+dx, rby+dy);
***************
*** 1274,1278 ****
              return (TRUE);
           }
-          return (FALSE);
        }
     }
--- 1274,1277 ----
***************
*** 1418,1422 ****
              while (confirm_status == CONFIRM_CANCEL)
              {
!                confirm_status = YesNoCancel (msg);
                 if (confirm_status == CONFIRM_CANCEL)
                    Msg ("CANCEL is not a valid option.");
--- 1417,1421 ----
              while (confirm_status == CONFIRM_CANCEL)
              {
!                confirm_status = YesNoCancel (msg, CONFIRM_YES);
                 if (confirm_status == CONFIRM_CANCEL)
                    Msg ("CANCEL is not a valid option.");
*** auxtext.c.orig	Tue Nov  3 22:27:14 1992
--- auxtext.c	Tue Nov  3 22:27:16 1992
***************
*** 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
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/auxtext.c,v 2.33 1992/10/14 04:29:48 william Exp $";
  #endif
  
***************
*** 252,256 ****
     register int		m, n, r, c;
     int			w=0, h=0, num_cols=0, num_rows=0, scale;
!    int			yinc=0, y, rotate;
     int			flat=FALSE, skinny=FALSE;
     char			* s, msg[MAXSTRING];
--- 252,256 ----
     register int		m, n, r, c;
     int			w=0, h=0, num_cols=0, num_rows=0, scale;
!    int			yinc, y, rotate;
     int			flat=FALSE, skinny=FALSE;
     char			* s, msg[MAXSTRING];
***************
*** 736,741 ****
     register struct ObjRec	* ObjPtr;
  {
!    int			x, y, font_size, color_index, fill;
!    int			ltx, lty, rbx, rby, tmp_pen = 0;
     char			font_str[MAXSTRING], msg[MAXSTRING];
     struct TextRec	* text_ptr = ObjPtr->detail.t;
--- 736,741 ----
     register struct ObjRec	* ObjPtr;
  {
!    int			font_size, color_index, fill;
!    int			ltx, lty, rbx, rby;
     char			font_str[MAXSTRING], msg[MAXSTRING];
     struct TextRec	* text_ptr = ObjPtr->detail.t;
***************
*** 767,773 ****
        SetCanvasFont ();
  
-    x = ObjPtr->x;
-    y = ObjPtr->y;
- 
     color_index = ObjPtr->color;
     if (colorDump)
--- 767,770 ----
***************
*** 885,889 ****
     if (colorDump && penPat > BACKPAT)
     {
!       tmp_pen = penPat;
        penPat = BACKPAT;
        DumpTextPath (FP, ObjPtr, text_ptr);
--- 882,887 ----
     if (colorDump && penPat > BACKPAT)
     {
!       int tmp_pen = penPat;
! 
        penPat = BACKPAT;
        DumpTextPath (FP, ObjPtr, text_ptr);
***************
*** 955,959 ****
     char	*	Str;
  {
!    register char	* s = Str;
     char			msg[MAXSTRING];
  
--- 953,957 ----
     char	*	Str;
  {
!    register char	* s;
     char			msg[MAXSTRING];
  
*** box.c.orig	Tue Nov  3 22:27:22 1992
--- box.c	Tue Nov  3 22:27:23 1992
***************
*** 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
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/box.c,v 2.36 1992/10/23 03:16:01 william Exp $";
  #endif
  
***************
*** 235,239 ****
  {
     struct BoxRec	* box_ptr = ObjPtr->detail.b;
!    int			fill, pen, pixel, func, ltx, lty, rbx, rby, width, dash;
     int			real_x_off, real_y_off;
     XGCValues		values;
--- 235,239 ----
  {
     struct BoxRec	* box_ptr = ObjPtr->detail.b;
!    int			fill, pen, pixel, ltx, lty, rbx, rby, width, dash;
     int			real_x_off, real_y_off;
     XGCValues		values;
***************
*** 253,257 ****
     rbx = ZOOMED_SIZE(ObjPtr->obbox.rbx - real_x_off);
     rby = ZOOMED_SIZE(ObjPtr->obbox.rby - real_y_off);
-    func = GXcopy;
  
     if (fill != 0)
--- 253,256 ----
***************
*** 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;
--- 273,277 ----
        values.line_width = ZOOMED_SIZE(width);
  #ifdef NO_THIN_LINE
!       if (values.line_width < 1) values.line_width = 1;
  #endif
        values.join_style = JoinMiter;
***************
*** 353,357 ****
     int 			end_x, end_y, grid_x, grid_y, saved_x, saved_y;
     int 			done = FALSE;
!    int			pixel, xor_pixel;
     XGCValues		values;
     XEvent		input, ev;
--- 352,356 ----
     int 			end_x, end_y, grid_x, grid_y, saved_x, saved_y;
     int 			done = FALSE;
!    int			xor_pixel;
     XGCValues		values;
     XEvent		input, ev;
***************
*** 358,362 ****
     XMotionEvent		* motion_ev;
  
-    pixel = colorPixels[colorIndex];
     xor_pixel = xorColorPixels[colorIndex];
  
--- 357,360 ----
*** button.c.orig	Tue Nov  3 22:27:26 1992
--- button.c	Tue Nov  3 22:27:26 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/button.c,v 2.38 1992/05/26 00:34:48 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/button.c,v 2.38.1.1 1992/10/12 01:31:31 william Exp $";
  #endif
  
***************
*** 95,100 ****
  static XComposeStatus	c_stat;
  
! int YesNoCancel (Str)
!    char		* Str;
     /* Create a window with Str centered.  This window also has 3 buttons */
     /*    in it, labeled YES, NO, and CANCEL.  The window has an origin at */
--- 95,101 ----
  static XComposeStatus	c_stat;
  
! int YesNoCancel (Str, DefaultReturn)
!    char	* Str;
!    int	DefaultReturn;
     /* Create a window with Str centered.  This window also has 3 buttons */
     /*    in it, labeled YES, NO, and CANCEL.  The window has an origin at */
***************
*** 254,259 ****
                 choice = CONFIRM_CANCEL;
              }
!             else if ((key_sym&0xff)=='y' || (key_sym&0xff)=='Y' ||
!                   (key_sym&0xff)=='\r' || (key_sym&0xff)=='\n')
              {
                 confirming = FALSE;
--- 255,264 ----
                 choice = CONFIRM_CANCEL;
              }
!             else if ((key_sym&0xff)=='\r' || (key_sym&0xff)=='\n')
!             {
!                confirming = FALSE;
!                choice = DefaultReturn;
!             }
!             else if ((key_sym&0xff)=='y' || (key_sym&0xff)=='Y')
              {
                 confirming = FALSE;
*** choice.c.orig	Tue Nov  3 22:27:30 1992
--- choice.c	Tue Nov  3 22:27:31 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/choice.c,v 2.58 1992/08/08 08:25:43 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/choice.c,v 2.58.2.1 1992/10/16 05:17:33 william Exp $";
  #endif
  
***************
*** 251,255 ****
  void ShowTextVSpace ()
  {
!    int		len, x, y, w;
     char		s[80];
     XGCValues	values;
--- 251,255 ----
  void ShowTextVSpace ()
  {
!    int		len, x, y;
     char		s[80];
     XGCValues	values;
***************
*** 260,264 ****
     sprintf (s, "%1d", textVSpace);
     len = strlen (s);
-    w = XTextWidth (rulerFontPtr, s, len);
     x = (int)((VSPACE_COL+0.5)*choiceImageW-2);
     y = VSPACE_ROW*choiceImageH+((choiceImageH-rulerFontAsc)>>1)+rulerFontAsc;
--- 260,263 ----
***************
*** 439,443 ****
  void ShowRCBRadius ()
  {
!    int		len, x, y, w;
     char		s[80];
     XGCValues	values;
--- 438,442 ----
  void ShowRCBRadius ()
  {
!    int		len, x, y;
     char		s[80];
     XGCValues	values;
***************
*** 448,452 ****
     sprintf (s, "%1d", rcbRadius);
     len = strlen (s);
-    w = XTextWidth (rulerFontPtr, s, len);
     x = (int)((RADIUS_COL+0.5)*choiceImageW-2);
     y = (((RADIUS_ROW+1)*choiceImageH-rulerFontAsc)>>1)+rulerFontAsc;
--- 447,450 ----
***************
*** 626,630 ****
     int		saved_text_vspace = textVSpace, res=8, done=FALSE;
     int		orig_x=button_ev->x, orig_y=button_ev->y;
!    int		change=0, saved_change=0;
     XEvent	ev;
  
--- 624,628 ----
     int		saved_text_vspace = textVSpace, res=8, done=FALSE;
     int		orig_x=button_ev->x, orig_y=button_ev->y;
!    int		saved_change=0;
     XEvent	ev;
  
***************
*** 648,653 ****
           int	dx = ev.xmotion.x - orig_x;
           int	dy = ev.xmotion.y - orig_y;
! 
!          change = (abs(dx)>abs(dy)) ? (int)(dx/res) : (int)(dy/res);
  
           if (change != saved_change)
--- 646,650 ----
           int	dx = ev.xmotion.x - orig_x;
           int	dy = ev.xmotion.y - orig_y;
!          int	change = (abs(dx)>abs(dy)) ? (int)(dx/res) : (int)(dy/res);
  
           if (change != saved_change)
***************
*** 699,703 ****
     int		saved_rcb_radius = rcbRadius, res=8, done=FALSE;
     int		orig_x=button_ev->x, orig_y=button_ev->y;
!    int		change=0, saved_change=0;
     XEvent	ev;
  
--- 696,700 ----
     int		saved_rcb_radius = rcbRadius, res=8, done=FALSE;
     int		orig_x=button_ev->x, orig_y=button_ev->y;
!    int		saved_change=0;
     XEvent	ev;
  
***************
*** 721,727 ****
           int	dx = ev.xmotion.x - orig_x;
           int	dy = ev.xmotion.y - orig_y;
  
-          change = (abs(dx)>abs(dy)) ? (int)(dx/res) : (int)(dy/res);
- 
           if (change != saved_change)
           {
--- 718,723 ----
           int	dx = ev.xmotion.x - orig_x;
           int	dy = ev.xmotion.y - orig_y;
+          int	change = (abs(dx)>abs(dy)) ? (int)(dx/res) : (int)(dy/res);
  
           if (change != saved_change)
           {
***************
*** 744,748 ****
     int		initial_zoom, zoom, max_zoom, win_w, win_h;
     int		orig_x=button_ev->x, orig_y=button_ev->y;
!    int		done=FALSE, change=0, saved_change=0;
     XEvent	ev;
  
--- 740,744 ----
     int		initial_zoom, zoom, max_zoom, win_w, win_h;
     int		orig_x=button_ev->x, orig_y=button_ev->y;
!    int		done=FALSE, saved_change=0;
     XEvent	ev;
  
***************
*** 804,809 ****
           int	dx = ev.xmotion.x - orig_x;
           int	dy = ev.xmotion.y - orig_y;
! 
!          change = (abs(dx)>abs(dy)) ? (int)(dx/res) : (int)(dy/res);
  
           if (change != saved_change)
--- 800,804 ----
           int	dx = ev.xmotion.x - orig_x;
           int	dy = ev.xmotion.y - orig_y;
!          int	change = (abs(dx)>abs(dy)) ? (int)(dx/res) : (int)(dy/res);
  
           if (change != saved_change)
***************
*** 835,839 ****
     XButtonEvent	* button_ev;
     int		xindex, yindex, delta=0, root_x, root_y, x=0, y=0;
!    int		choice=INVALID;
     Window	root_win, child_win;
     unsigned int	status;
--- 830,834 ----
     XButtonEvent	* button_ev;
     int		xindex, yindex, delta=0, root_x, root_y, x=0, y=0;
!    int		choice;
     Window	root_win, child_win;
     unsigned int	status;
*** cmd.c.orig	Tue Nov  3 22:27:35 1992
--- cmd.c	Tue Nov  3 22:27:36 1992
***************
*** 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
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/cmd.c,v 2.18.2.1 1992/10/16 05:26:14 william Exp $";
  #endif
  
***************
*** 68,73 ****
     struct CmdRec	* CmdPtr;
  {
!    register struct SelRec	* sel_ptr, * next_sel=NULL;
!    struct CmdRec		* cmd_ptr, * next_cmd=NULL;
  
     if (CmdPtr->pos_before != NULL) cfree (CmdPtr->pos_before);
--- 68,73 ----
     struct CmdRec	* CmdPtr;
  {
!    register struct SelRec	* sel_ptr, * next_sel;
!    struct CmdRec		* cmd_ptr, * next_cmd;
  
     if (CmdPtr->pos_before != NULL) cfree (CmdPtr->pos_before);
***************
*** 243,247 ****
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
     int				pos, count;
  
--- 243,247 ----
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj;
     int				pos, count;
  
***************
*** 314,318 ****
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
     register int			pos;
     struct ObjRec		* saved_top_obj, * saved_bot_obj;
--- 314,318 ----
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj;
     register int			pos;
     struct ObjRec		* saved_top_obj, * saved_bot_obj;
***************
*** 366,370 ****
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
     int				pos, count;
  
--- 366,370 ----
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj;
     int				pos, count;
  
***************
*** 401,405 ****
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
     int				pos, count, dx, dy;
  
--- 401,405 ----
  {
     register struct SelRec	* sel_ptr;
!    register struct ObjRec	* obj_ptr, * next_obj;
     int				pos, count, dx, dy;
  
***************
*** 439,443 ****
     int			HighLightSingleObj;
  {
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
     register struct SelRec	* sel_ptr;
     struct SelRec		* saved_top_sel, * saved_bot_sel;
--- 439,443 ----
     int			HighLightSingleObj;
  {
!    register struct ObjRec	* obj_ptr, * next_obj;
     register struct SelRec	* sel_ptr;
     struct SelRec		* saved_top_sel, * saved_bot_sel;
***************
*** 444,448 ****
     struct ObjRec		* saved_top_obj, * saved_bot_obj;
     int				ltx, lty, rbx, rby, pos, count;
!    int				* pos_table=NULL, max_count;
  
     LinkJustTheObjects (CmdPtr->top_before, CmdPtr->bot_before);
--- 444,448 ----
     struct ObjRec		* saved_top_obj, * saved_bot_obj;
     int				ltx, lty, rbx, rby, pos, count;
!    int				* pos_table, max_count;
  
     LinkJustTheObjects (CmdPtr->top_before, CmdPtr->bot_before);
***************
*** 527,535 ****
     struct CmdRec	* CmdPtr;
  {
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
     register struct SelRec	* sel_ptr;
     struct ObjRec		* saved_top_obj, * saved_bot_obj;
     int				ltx, lty, rbx, rby, pos, count;
!    int				* pos_table=NULL, max_count;
  
     pos_table = (CmdPtr->undone) ? CmdPtr->pos_before : CmdPtr->pos_after;
--- 527,535 ----
     struct CmdRec	* CmdPtr;
  {
!    register struct ObjRec	* obj_ptr, * next_obj;
     register struct SelRec	* sel_ptr;
     struct ObjRec		* saved_top_obj, * saved_bot_obj;
     int				ltx, lty, rbx, rby, pos, count;
!    int				* pos_table, max_count;
  
     pos_table = (CmdPtr->undone) ? CmdPtr->pos_before : CmdPtr->pos_after;
***************
*** 654,658 ****
  {
     struct CmdRec	* cmd_ptr;
-    int			highlight = HighLight;
  
     if (topSel!=NULL) { HighLightReverse (); RemoveAllSel (); }
--- 654,657 ----
***************
*** 861,865 ****
     struct CmdRec	* CmdPtr;
  {
!    register struct SelRec	* sel_ptr, * next_sel=NULL;
  
     for (sel_ptr=CmdPtr->top_after; sel_ptr!=NULL; sel_ptr=next_sel)
--- 860,864 ----
     struct CmdRec	* CmdPtr;
  {
!    register struct SelRec	* sel_ptr, * next_sel;
  
     for (sel_ptr=CmdPtr->top_after; sel_ptr!=NULL; sel_ptr=next_sel)
***************
*** 937,941 ****
     int	CmdType;
  {
!    register struct SelRec	* sel_ptr, * next_sel=NULL;
  
     for (sel_ptr=topSelBefore; sel_ptr!=NULL; sel_ptr=next_sel)
--- 936,940 ----
     int	CmdType;
  {
!    register struct SelRec	* sel_ptr, * next_sel;
  
     for (sel_ptr=topSelBefore; sel_ptr!=NULL; sel_ptr=next_sel)
*** color.c.orig	Tue Nov  3 22:27:39 1992
--- color.c	Tue Nov  3 22:27:40 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/color.c,v 2.48 1992/06/23 22:10:41 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/color.c,v 2.51 1992/10/20 04:43:50 william Exp $";
  #endif
  
***************
*** 368,371 ****
--- 368,374 ----
     }
     tmp_max = max(color.red,max(color.green,color.blue));
+ #ifndef DONTFREECOLORS
+    XFreeColors (mainDisplay, mainColormap, &(color.pixel), 1, 0);
+ #endif
     if (tmp_max > maxRGB) maxRGB = tmp_max;
     if (!ParseAndAllocColorByName ("white", &color))
***************
*** 375,378 ****
--- 378,384 ----
     }
     tmp_max = max(color.red,max(color.green,color.blue));
+ #ifndef DONTFREECOLORS
+    XFreeColors (mainDisplay, mainColormap, &(color.pixel), 1, 0);
+ #endif
     if (tmp_max > maxRGB) maxRGB = tmp_max;
     if (tmp_max == 0)
***************
*** 601,605 ****
  {
     register struct SelRec	* sel_ptr;
!    int				text_obj_created=FALSE, text_cursor_shown;
     int				changed=FALSE;
     XGCValues			values;
--- 607,611 ----
  {
     register struct SelRec	* sel_ptr;
!    int				text_obj_created, text_cursor_shown;
     int				changed=FALSE;
     XGCValues			values;
***************
*** 726,730 ****
                 obj_ptr=obj_ptr->prev)
              if (UpdatePixel (obj_ptr, OldColorStr))
!                changed = TRUE;
           break;
        case OBJ_XPM:
--- 732,736 ----
                 obj_ptr=obj_ptr->prev)
              if (UpdatePixel (obj_ptr, OldColorStr))
!                picture_changed = TRUE;
           break;
        case OBJ_XPM:
*** copypaste.c.orig	Tue Nov  3 22:27:43 1992
--- copypaste.c	Tue Nov  3 22:27:44 1992
***************
*** 26,30 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/copypaste.c,v 2.30 1992/08/08 08:25:48 william Exp $";
  #endif
  
--- 26,30 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/copypaste.c,v 2.30.1.2 1992/10/16 05:07:26 william Exp $";
  #endif
  
***************
*** 67,71 ****
     struct ObjRec		* obj_ptr, * top_obj, * bot_obj;
     char 			tmpfile[MAXSTRING], msg[MAXSTRING];
-    int				copy_failed = FALSE;
     struct stat 			stat;
     unsigned char 		header = TGIF_HEADER;
--- 67,70 ----
***************
*** 124,128 ****
     else
     {
!       copy_failed = FALSE;
        copyingToCutBuffer = TRUE;
        XStoreBytes (mainDisplay, cutBuffer, stat.st_size);
--- 123,128 ----
     else
     {
!       int	copy_failed = FALSE;
! 
        copyingToCutBuffer = TRUE;
        XStoreBytes (mainDisplay, cutBuffer, stat.st_size);
*** dialog.c.orig	Tue Nov  3 22:27:47 1992
--- dialog.c	Tue Nov  3 22:27:47 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/dialog.c,v 2.40 1992/05/26 00:35:07 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/dialog.c,v 2.40.1.2 1992/10/20 04:19:42 william Exp $";
  #endif
  
***************
*** 74,87 ****
  static XComposeStatus	c_stat;
  
! void Dialog (Message, Comment, ReturnStr)
     char	* Message, * Comment, * ReturnStr;
  {
     int		i, w, h, str_w, left, top, fore_draw_pixel, fore_erase_pixel;
!    int		win_x, win_y, usr_str_w=0, comment_left=0, comment_w=0;
     int		dialoging=TRUE, index=0, dsp_w, dsp_h, exposed=FALSE;
     char		buf[80];
     XEvent	input, ev;
     XKeyEvent	* key_ev;
-    KeyCode	key_code;
     KeySym	key_sym;
     XWMHints	wmhints;
--- 74,89 ----
  static XComposeStatus	c_stat;
  
! int Dialog (Message, Comment, ReturnStr)
     char	* Message, * Comment, * ReturnStr;
+    /* returns INVALID if <ESC> is types */
+    /* returns FALSE otherwise */
  {
     int		i, w, h, str_w, left, top, fore_draw_pixel, fore_erase_pixel;
!    int		win_x, win_y, usr_str_w=0, comment_left=0;
     int		dialoging=TRUE, index=0, dsp_w, dsp_h, exposed=FALSE;
+    int		rc=FALSE;
     char		buf[80];
     XEvent	input, ev;
     XKeyEvent	* key_ev;
     KeySym	key_sym;
     XWMHints	wmhints;
***************
*** 97,102 ****
     else
     {
        h = 8 * defaultFontHeight;
-       comment_w = defaultFontWidth * strlen (Comment);
        w = max(max(str_w,comment_w)+6*defaultFontWidth,600);
        comment_left = (w - comment_w) / 2;
--- 99,105 ----
     else
     {
+       int	comment_w = defaultFontWidth * strlen (Comment);
+ 
        h = 8 * defaultFontHeight;
        w = max(max(str_w,comment_w)+6*defaultFontWidth,600);
        comment_left = (w - comment_w) / 2;
***************
*** 223,227 ****
  
           key_ev = &(input.xkey);
-          key_code = key_ev->keycode;
           XLookupString (key_ev, buf, 80-1, &key_sym, &c_stat);
           TranslateKeys (buf, &key_sym);
--- 226,229 ----
***************
*** 240,243 ****
--- 242,246 ----
                    ReturnStr[0] = '\0';
                    dialoging = FALSE;
+                   rc = INVALID;
                    break;
                 case '\r':
***************
*** 293,295 ****
--- 296,299 ----
        XWarpPointer (mainDisplay, None, drawWindow, 0, 0, 0, 0,
              (int)(ZOOMED_SIZE(drawWinW)>>1), (int)(ZOOMED_SIZE(drawWinH)>>1));
+    return (rc);
  }
*** dup.c.orig	Tue Nov  3 22:27:52 1992
--- dup.c	Tue Nov  3 22:27:53 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/dup.c,v 2.48 1992/08/08 08:26:09 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/dup.c,v 2.48.1.1 1992/10/20 04:31:11 william Exp $";
  #endif
  
***************
*** 301,305 ****
     register struct XBmRec	* xbm_ptr;
     register int			i;
!    Pixmap			bitmap, cached_bitmap=None;
     int				w, h, image_w, image_h;
     char				msg[MAXSTRING];
--- 301,305 ----
     register struct XBmRec	* xbm_ptr;
     register int			i;
!    Pixmap			bitmap, cached_bitmap;
     int				w, h, image_w, image_h;
     char				msg[MAXSTRING];
***************
*** 386,390 ****
     register struct XPmRec	* xpm_ptr;
     register int			j, i;
!    Pixmap			pixmap, cached_pixmap=None;
     int				w, h, ncolors, * pixels, len, chars_per_pixel;
     int				image_w, image_h;
--- 386,390 ----
     register struct XPmRec	* xpm_ptr;
     register int			j, i;
!    Pixmap			pixmap, cached_pixmap;
     int				w, h, ncolors, * pixels, len, chars_per_pixel;
     int				image_w, image_h;
***************
*** 508,516 ****
  {
     register struct GroupRec	* group_ptr;
!    struct ObjRec		* top_obj, * bot_obj;
     struct ObjRec		* from_obj_ptr, * to_obj_ptr;
  
     group_ptr = (struct GroupRec *) calloc (1, sizeof(struct GroupRec));
!    top_obj = bot_obj = NULL;
     from_obj_ptr = GroupPtr->last;
     for ( ; from_obj_ptr != NULL; from_obj_ptr = from_obj_ptr->prev)
--- 508,516 ----
  {
     register struct GroupRec	* group_ptr;
!    struct ObjRec		* top_obj;
     struct ObjRec		* from_obj_ptr, * to_obj_ptr;
  
     group_ptr = (struct GroupRec *) calloc (1, sizeof(struct GroupRec));
!    top_obj = NULL;
     from_obj_ptr = GroupPtr->last;
     for ( ; from_obj_ptr != NULL; from_obj_ptr = from_obj_ptr->prev)
***************
*** 665,669 ****
  {
     struct SelRec	* sel_ptr, * new_sel_ptr;
!    struct ObjRec	* obj_ptr, * top_obj, * bot_obj;
  
     *NewTopSel = *NewBotSel = NULL;
--- 665,669 ----
  {
     struct SelRec	* sel_ptr, * new_sel_ptr;
!    struct ObjRec	* obj_ptr, * top_obj;
  
     *NewTopSel = *NewBotSel = NULL;
***************
*** 670,674 ****
     if (TopSel == NULL) return;
  
!    top_obj = bot_obj = NULL;
     for (sel_ptr = BotSel; sel_ptr != NULL; sel_ptr = sel_ptr->prev)
     {
--- 670,674 ----
     if (TopSel == NULL) return;
  
!    top_obj = NULL;
     for (sel_ptr = BotSel; sel_ptr != NULL; sel_ptr = sel_ptr->prev)
     {
***************
*** 679,686 ****
        new_sel_ptr->obj = obj_ptr;
        if (top_obj == NULL)
-       {
-          bot_obj = obj_ptr;
           *NewBotSel = new_sel_ptr;
-       }
        else
        {
--- 679,683 ----
*** edit.c.orig	Tue Nov  3 22:27:58 1992
--- edit.c	Tue Nov  3 22:28:00 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/edit.c,v 2.87 1992/08/08 08:26:16 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/edit.c,v 2.87.1.2 1992/10/20 04:34:53 william Exp $";
  #endif
  
***************
*** 98,102 ****
  {
     struct ObjRec	* prototype, * char_obj;
!    struct StrRec	* s_ptr, * prev_str=NULL;
     struct TextRec	* text_ptr;
     struct SelRec	* new_sel_ptr;
--- 98,102 ----
  {
     struct ObjRec	* prototype, * char_obj;
!    struct StrRec	* s_ptr, * prev_str;
     struct TextRec	* text_ptr;
     struct SelRec	* new_sel_ptr;
***************
*** 247,251 ****
  {
     register struct ObjRec	* obj_ptr;
!    register struct SelRec	* sel_ptr, * next_sel=NULL;
     int				sel_ltx, sel_lty, sel_rbx, sel_rby;
     int				changed=FALSE;
--- 247,251 ----
  {
     register struct ObjRec	* obj_ptr;
!    register struct SelRec	* sel_ptr, * next_sel;
     int				sel_ltx, sel_lty, sel_rbx, sel_rby;
     int				changed=FALSE;
***************
*** 316,320 ****
  {
     register int		i;
!    int			vertex_at_right = TRUE, xc, yc;
     int			sel_ltx, sel_lty, sel_rbx, sel_rby, sides, radius;
     int			ltx, lty, rbx, rby;
--- 316,320 ----
  {
     register int		i;
!    int			vertex_at_right, xc, yc;
     int			sel_ltx, sel_lty, sel_rbx, sel_rby, sides, radius;
     int			ltx, lty, rbx, rby;
***************
*** 352,356 ****
  
     sprintf (msg, "Do you want a vertex at the 3 o'clock position?  [ync](y)");
!    if ((vertex_at_right = YesNoCancel (msg)) == CONFIRM_CANCEL) return;
  
     tmpTopObj = tmpBotObj = NULL;
--- 352,357 ----
  
     sprintf (msg, "Do you want a vertex at the 3 o'clock position?  [ync](y)");
!    if ((vertex_at_right = YesNoCancel (msg, CONFIRM_YES)) == CONFIRM_CANCEL)
!       return;
  
     tmpTopObj = tmpBotObj = NULL;
***************
*** 1380,1384 ****
     register struct SelRec	* sel_ptr;
     struct SelRec		* top_sort, * bot_sort, * sort_ptr;
!    struct SelRec		* new_sort_ptr, * tmp_sel_ptr, * next_sort=NULL;
     struct ObjRec		* sorted_obj, * locked_obj=NULL;
     struct MoveSubCmdRec		* move_cmd;
--- 1381,1385 ----
     register struct SelRec	* sel_ptr;
     struct SelRec		* top_sort, * bot_sort, * sort_ptr;
!    struct SelRec		* new_sort_ptr, * tmp_sel_ptr, * next_sort;
     struct ObjRec		* sorted_obj, * locked_obj=NULL;
     struct MoveSubCmdRec		* move_cmd;
***************
*** 1478,1482 ****
     if (locked_obj != NULL)
     {
-       found = FALSE;
        switch (Dir)
        {
--- 1479,1482 ----
***************
*** 1515,1519 ****
     if (!found && locked_obj != top_sort->obj)
     {
-       next_sort = top_sort->next;
        tmp_sel_ptr->obj = top_sort->obj;
        switch (Dir)
--- 1515,1518 ----
*** eps.c.orig	Tue Nov  3 22:28:03 1992
--- eps.c	Tue Nov  3 22:28:04 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/eps.c,v 2.8 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/eps.c,v 2.8.1.2 1992/10/20 04:56:44 william Exp $";
  #endif
  
***************
*** 73,77 ****
  void CleanUpLines ()
  {
!    register struct LineRec	* line_ptr, * next_line=NULL;
  
     for (line_ptr=topLine; line_ptr != NULL; line_ptr = next_line)
--- 73,77 ----
  void CleanUpLines ()
  {
!    register struct LineRec	* line_ptr, * next_line;
  
     for (line_ptr=topLine; line_ptr != NULL; line_ptr = next_line)
***************
*** 99,103 ****
  {
     register int	k, j;
!    int		i, len, num_nibbles, data=0, bit_count;
     char		* line, * c_ptr;
  
--- 99,103 ----
  {
     register int	k, j;
!    int		i, len, num_nibbles, bit_count;
     char		* line, * c_ptr;
  
***************
*** 132,135 ****
--- 132,137 ----
        for (j=0; j<num_nibbles && *c_ptr!='\0'; j++, c_ptr++)
        {
+          int	data;
+ 
           if (*c_ptr >= '0' && *c_ptr <= '9')
              data = (int)(*c_ptr) - (int)('0');
***************
*** 193,197 ****
     float	* llx, * lly, * urx, * ury;
  {
!    register struct LineRec	* line_ptr, * next_line=NULL;
     register int	i;
     char		inbuf[MAXSTRING+1], * line=NULL, * c_ptr, * loc_time;
--- 195,199 ----
     float	* llx, * lly, * urx, * ury;
  {
!    register struct LineRec	* line_ptr, * next_line;
     register int	i;
     char		inbuf[MAXSTRING+1], * line=NULL, * c_ptr, * loc_time;
***************
*** 372,378 ****
     struct XBmRec	* xbm_ptr;
  {
!    register struct LineRec	* line_ptr, * next_line=NULL;
     register int	i;
!    char		inbuf[MAXSTRING+1], * line=NULL, * c_ptr, * loc_time;
     int		allocated=FALSE, len, cur_size, done, first_line=TRUE;
     int		boundingbox_found=FALSE, preview_found=FALSE, found;
--- 374,380 ----
     struct XBmRec	* xbm_ptr;
  {
!    register struct LineRec	* line_ptr, * next_line;
     register int	i;
!    char		inbuf[MAXSTRING+1], * c_ptr, * loc_time;
     int		allocated=FALSE, len, cur_size, done, first_line=TRUE;
     int		boundingbox_found=FALSE, preview_found=FALSE, found;
***************
*** 402,405 ****
--- 404,409 ----
     while (fgets (inbuf, MAXSTRING, fp) != NULL)
     {
+       char	* line;
+ 
        len = strlen (inbuf);
        if (inbuf[len-1] != '\r' && inbuf[len-1] != '\n')
***************
*** 500,504 ****
        }
        if (allocated) cfree (line);
-       line = NULL;
     }
     fclose (fp);
--- 504,507 ----
***************
*** 633,636 ****
--- 636,640 ----
        fprintf (FP, "%s\n", xbm_ptr->epsflines[i]);
  
+    fprintf (FP, "clear\n");
     fprintf (FP, "tgiflevel%1d restore\n", xbm_ptr->epsf_level);
     fprintf (FP, "tgifdict begin\n");
***************
*** 648,652 ****
     struct XBmRec	* xbm_ptr;
     struct ObjRec	* obj_ptr;
!    int			len=strlen(FileName), w=0, h=0;
     char			* name=(char *) calloc (len+1, sizeof(char));
  
--- 652,656 ----
     struct XBmRec	* xbm_ptr;
     struct ObjRec	* obj_ptr;
!    int			len=strlen(FileName), w, h;
     char			* name=(char *) calloc (len+1, sizeof(char));
  
***************
*** 713,717 ****
     struct ObjRec	* obj_ptr, * new_obj_ptr;
     char			write_date[32], * * lines=NULL, msg[MAXSTRING];
!    int			rc, len, num_lines, epsf_level, image_w, image_h;
     float		llx, lly, urx, ury;
     Pixmap		bitmap;
--- 717,721 ----
     struct ObjRec	* obj_ptr, * new_obj_ptr;
     char			write_date[32], * * lines=NULL, msg[MAXSTRING];
!    int			rc, num_lines, epsf_level, image_w, image_h;
     float		llx, lly, urx, ury;
     Pixmap		bitmap;
***************
*** 726,730 ****
     obj_ptr = topSel->obj;
     xbm_ptr = obj_ptr->detail.xbm;
-    len = strlen (xbm_ptr->filename);
  
     importingFile = TRUE;
--- 730,733 ----
*** file.c.orig	Tue Nov  3 22:28:10 1992
--- file.c	Tue Nov  3 22:28:12 1992
***************
*** 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
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/file.c,v 2.192.1.4 1992/11/04 04:47:29 william Exp $";
  #endif
  
***************
*** 206,210 ****
     if ((fp = fopen (FileName, "r")) == NULL) return (TRUE);
     fclose (fp);
!    switch (YesNoCancel ("File exists, okay to overwrite? [ync](y)"))
     {
        case CONFIRM_YES: break;
--- 206,210 ----
     if ((fp = fopen (FileName, "r")) == NULL) return (TRUE);
     fclose (fp);
!    switch (YesNoCancel ("File exists, okay to overwrite? [ync](y)",CONFIRM_YES))
     {
        case CONFIRM_YES: break;
***************
*** 293,297 ****
     char			* rest;
     FILE			* fp;
!    int			count = 0, status = INVALID, short_name;
     struct ObjRec	* obj_ptr;
  
--- 293,297 ----
     char			* rest;
     FILE			* fp;
!    int			count = 0, status, short_name;
     struct ObjRec	* obj_ptr;
  
***************
*** 365,372 ****
     int			saved_cur_file_defined=FALSE, obj_ext_len, sym_ext_len;
     FILE			* fp;
!    int			count = 0, len, short_name=FALSE;
     struct ObjRec	* obj_ptr, * saved_top_obj=NULL, * saved_bot_obj=NULL;
     struct SelRec	* top_sel_ptr, * bot_sel_ptr;
!    struct SelRec	* sel_ptr, * next_sel=NULL;
  
     if (SaveSelectedOnly && topSel==NULL)
--- 365,372 ----
     int			saved_cur_file_defined=FALSE, obj_ext_len, sym_ext_len;
     FILE			* fp;
!    int			count = 0, len, short_name;
     struct ObjRec	* obj_ptr, * saved_top_obj=NULL, * saved_bot_obj=NULL;
     struct SelRec	* top_sel_ptr, * bot_sel_ptr;
!    struct SelRec	* sel_ptr, * next_sel;
  
     if (SaveSelectedOnly && topSel==NULL)
***************
*** 376,380 ****
     }
  
!    Dialog ("Please Enter New File Name:", "( <CR>: accept, <ESC>: cancel )",
           new_file_name);
     if (*new_file_name == '\0') return;
--- 376,380 ----
     }
  
!    Dialog ("Please enter new file name:", "( <CR>: accept, <ESC>: cancel )",
           new_file_name);
     if (*new_file_name == '\0') return;
***************
*** 496,501 ****
        botObj = bot_sel_ptr->obj;
  
!       sel_ptr = topSel;
!       for (obj_ptr=topObj; obj_ptr!=NULL; obj_ptr=obj_ptr->next)
        {
           CopyObjId (sel_ptr->obj, obj_ptr);
--- 496,501 ----
        botObj = bot_sel_ptr->obj;
  
!       for (sel_ptr=topSel, obj_ptr=topObj; obj_ptr!=NULL;
!             sel_ptr=sel_ptr->next, obj_ptr=obj_ptr->next)
        {
           CopyObjId (sel_ptr->obj, obj_ptr);
***************
*** 569,573 ****
     char			sym_ext_str[MAXSTRING+1], * c_ptr;
     FILE			* fp;
!    int			count=0, len, short_name=FALSE, sym_ext_len;
     int			saved_cur_file_defined;
     struct ObjRec	* obj_ptr;
--- 569,573 ----
     char			sym_ext_str[MAXSTRING+1], * c_ptr;
     FILE			* fp;
!    int			count=0, len, short_name, sym_ext_len;
     int			saved_cur_file_defined;
     struct ObjRec	* obj_ptr;
***************
*** 588,592 ****
     if (*curFileName == '\0')
     {
!       Dialog ("Please Enter New File Name:", "( <CR>: accept, <ESC>: cancel )",
              new_file_name);
        if (*new_file_name == '\0') return;
--- 588,592 ----
     if (*curFileName == '\0')
     {
!       Dialog ("Please enter new file name:", "( <CR>: accept, <ESC>: cancel )",
              new_file_name);
        if (*new_file_name == '\0') return;
***************
*** 1193,1197 ****
  {
     char			inbuf[MAXSTRING+1], obj_name[10];
-    char			* line = NULL, * c_ptr;
     int			len, cur_size, done, allocated, read_state_ok;
  
--- 1193,1196 ----
***************
*** 1199,1202 ****
--- 1198,1203 ----
     while (fgets (inbuf, MAXSTRING, FP) != NULL)
     {
+       char	* line, * c_ptr;
+ 
        scanLineNum++;
        if (inbuf[0] == ']') return (FALSE);
***************
*** 2238,2242 ****
     DumpEightBitFontInfo (fp);
  
!    fprintf (fp, "%%%%EndSetup\n");
     fprintf (fp, "%%%%Page: 1 1\n\n");
     fprintf (fp, "/tgifsavedpage save def\n\n");
--- 2239,2243 ----
     DumpEightBitFontInfo (fp);
  
!    fprintf (fp, "%%%%EndProlog\n");
     fprintf (fp, "%%%%Page: 1 1\n\n");
     fprintf (fp, "/tgifsavedpage save def\n\n");
***************
*** 2528,2532 ****
     while (fileModified)
     {
!       switch (YesNoCancel ("File modified, save file before clear? [ync](y)"))
        {
           case CONFIRM_YES: SaveFile (); break;
--- 2529,2534 ----
     while (fileModified)
     {
!       switch (YesNoCancel ("File modified, save file before clear? [ync](y)",
!             CONFIRM_YES))
        {
           case CONFIRM_YES: SaveFile (); break;
***************
*** 2552,2556 ****
     while (fileModified)
     {
!       switch (YesNoCancel ("File modified, save file before open? [ync](y)"))
        {
           case CONFIRM_YES: SaveFile (); break;
--- 2554,2559 ----
     while (fileModified)
     {
!       switch (YesNoCancel ("File modified, save file before open? [ync](y)",
!             CONFIRM_YES))
        {
           case CONFIRM_YES: SaveFile (); break;
***************
*** 2607,2611 ****
     while (fileModified)
     {
!       switch (YesNoCancel ("File modified, save file before quit? [ync](y)"))
        {
           case CONFIRM_YES: SaveFile (); break;
--- 2610,2615 ----
     while (fileModified)
     {
!       switch (YesNoCancel ("File modified, save file before quit? [ync](y)",
!             CONFIRM_YES))
        {
           case CONFIRM_YES: SaveFile (); break;
***************
*** 2616,2620 ****
     if (AncesterModified ())
     {
!       switch (YesNoCancel ("Ancester file modified, still quitting? [ync](y)"))
        {
           case CONFIRM_YES: return (FILE_QUIT);
--- 2620,2625 ----
     if (AncesterModified ())
     {
!       switch (YesNoCancel ("Ancester file modified, still quitting? [ync](y)",
!             CONFIRM_YES))
        {
           case CONFIRM_YES: return (FILE_QUIT);
*** font.c.orig	Tue Nov  3 22:28:16 1992
--- font.c	Tue Nov  3 22:28:18 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/font.c,v 2.61 1992/08/08 08:26:32 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/font.c,v 2.61.1.1 1992/10/12 01:59:18 william Exp $";
  #endif
  
***************
*** 1499,1503 ****
  
  static int	savedFont, savedSize, savedStyle, savedDPI;
! static int	savedJust, savedRotate, savedPen, savedVSpace;
  
  void SaveCurFont ()
--- 1499,1503 ----
  
  static int	savedFont, savedSize, savedStyle, savedDPI;
! static int	savedJust, savedRotate, savedPen, savedFill, savedVSpace;
  
  void SaveCurFont ()
***************
*** 1510,1513 ****
--- 1510,1514 ----
     savedRotate = curRotate;
     savedPen = penPat;
+    savedFill = objFill;
     savedVSpace = textVSpace;
  }
***************
*** 1522,1525 ****
--- 1523,1527 ----
     curRotate = savedRotate;
     penPat = savedPen;
+    objFill = savedFill;
     textVSpace = savedVSpace;
  
***************
*** 1529,1532 ****
--- 1531,1535 ----
  static int	pushedFont, pushedSize, pushedStyle, pushedDPI, pushedJust;
  static int	pushedColorIndex, pushedRotate, pushedPen, pushedVSpace;
+ static int	pushedFill;
  
  void PushCurFont ()
***************
*** 1539,1542 ****
--- 1542,1546 ----
     pushedRotate = curRotate;
     pushedPen = penPat;
+    pushedFill = objFill;
     pushedVSpace = textVSpace;
     pushedColorIndex = colorIndex;
***************
*** 1552,1555 ****
--- 1556,1560 ----
     curRotate = pushedRotate;
     penPat = pushedPen;
+    objFill = pushedFill;
     textVSpace = pushedVSpace;
     colorIndex = pushedColorIndex;
*** group.c.orig	Tue Nov  3 22:28:21 1992
--- group.c	Tue Nov  3 22:28:22 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/group.c,v 2.18 1992/03/31 07:53:36 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/group.c,v 2.18.1.1 1992/10/20 05:05:04 william Exp $";
  #endif
  
***************
*** 276,280 ****
     struct ObjRec	* ObjPtr;
  {
!    register struct ObjRec	* ptr, * next_obj=NULL;
  
     for (ptr = ObjPtr->detail.r->first; ptr != NULL; ptr = next_obj)
--- 276,280 ----
     struct ObjRec	* ObjPtr;
  {
!    register struct ObjRec	* ptr, * next_obj;
  
     for (ptr = ObjPtr->detail.r->first; ptr != NULL; ptr = next_obj)
***************
*** 327,331 ****
  void UngroupSelObj ()
  {
!    register struct SelRec	* sel_ptr, * next_sel=NULL;
     register struct ObjRec	* obj_ptr;
     int				sel_ltx, sel_lty, sel_rbx, sel_rby;
--- 327,331 ----
  void UngroupSelObj ()
  {
!    register struct SelRec	* sel_ptr, * next_sel;
     register struct ObjRec	* obj_ptr;
     int				sel_ltx, sel_lty, sel_rbx, sel_rby;
*** mainloop.c.orig	Tue Nov  3 22:28:27 1992
--- mainloop.c	Tue Nov  3 22:28:28 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/mainloop.c,v 2.79 1992/07/24 15:20:35 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/mainloop.c,v 2.79.1.5 1992/11/03 06:57:40 william Exp $";
  #endif
  
***************
*** 344,348 ****
     XEvent		input;
     char			* c_ptr, file_name[MAXPATHLENGTH+1], s[MAXPATHLENGTH+1];
!    char			full_name[MAXPATHLENGTH+1], * rest, * c_ptr1=NULL;
     int			rc, len, i, read_status, short_name;
     struct ObjRec	* obj_ptr;
--- 344,348 ----
     XEvent		input;
     char			* c_ptr, file_name[MAXPATHLENGTH+1], s[MAXPATHLENGTH+1];
!    char			full_name[MAXPATHLENGTH+1], * rest;
     int			rc, len, i, read_status, short_name;
     struct ObjRec	* obj_ptr;
***************
*** 363,371 ****
              "Copyright (C) 1990, 1991, 1992, William Chia-Wei Cheng ",
              "(william@cs.UCLA.edu)");
!       printf ("%s\n", initMsg1);
!       printf ("%s\n", initMsg2);
  
  #ifdef USE_XAPPLRESDIR
!       if (((c_ptr1 = getenv ("XENVIRONMENT")) == NULL) &&
              ((c_ptr = getenv ("XAPPLRESDIR")) != NULL) &&
              ((len = strlen (c_ptr)) > 0))
--- 363,372 ----
              "Copyright (C) 1990, 1991, 1992, William Chia-Wei Cheng ",
              "(william@cs.UCLA.edu)");
!       fprintf (stderr, "%s\n", initMsg1);
!       fprintf (stderr, "%s\n", initMsg2);
!       fflush(stderr);
  
  #ifdef USE_XAPPLRESDIR
!       if ((getenv ("XENVIRONMENT") == NULL) &&
              ((c_ptr = getenv ("XAPPLRESDIR")) != NULL) &&
              ((len = strlen (c_ptr)) > 0))
***************
*** 520,523 ****
--- 521,525 ----
           }
        }
+       SetDefaultDrawWinClipRecs ();
        UpdateDirInfo ();
     }
***************
*** 886,890 ****
     struct AttrRec	* attr_ptr;
     char			s[80];
!    int			obj_id, clicked = FALSE;
     XEvent		input;
     XButtonEvent		* button_event;
--- 888,892 ----
     struct AttrRec	* attr_ptr;
     char			s[80];
!    int			obj_id;
     XEvent		input;
     XButtonEvent		* button_event;
***************
*** 904,909 ****
        else
        {
-          if (input.type == ButtonPress)
-             clicked = TRUE;
           strcpy (*ReturnStr, "Interrupt");
           button_event = &(input.xbutton);
--- 906,909 ----
*** mark.c.orig	Tue Nov  3 22:28:31 1992
--- mark.c	Tue Nov  3 22:28:31 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/mark.c,v 2.21 1992/03/31 07:54:01 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/mark.c,v 2.23 1992/10/21 04:24:52 william Exp $";
  #endif
  
***************
*** 151,155 ****
  {
     register struct VSelRec	* vsel_ptr = NULL;
!    register struct ObjRec	* obj_ptr = NULL;
     register int			i;
     struct SelRec		* sel_ptr = NULL;
--- 151,155 ----
  {
     register struct VSelRec	* vsel_ptr = NULL;
!    register struct ObjRec	* obj_ptr;
     register int			i;
     struct SelRec		* sel_ptr = NULL;
*** menu.c.orig	Tue Nov  3 22:28:35 1992
--- menu.c	Tue Nov  3 22:28:36 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/menu.c,v 2.78 1992/03/31 07:54:10 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/menu.c,v 2.78.1.2 1992/10/20 05:35:42 william Exp $";
  #endif
  
***************
*** 92,96 ****
  {
     Window	window, root_win, child_win;
!    register int	i, max_len, menuing = TRUE;
     int		x, y, rc = INVALID, old_selected, new_selected;
     int		* len, dsp_w, dsp_h, menu_w, menu_h, pixel;
--- 92,96 ----
  {
     Window	window, root_win, child_win;
!    register int	i, max_len, menuing;
     int		x, y, rc = INVALID, old_selected, new_selected;
     int		* len, dsp_w, dsp_h, menu_w, menu_h, pixel;
***************
*** 239,243 ****
           else
              rc = INVALID;
-          break;
        }
        else if (menu_pinned)
--- 239,242 ----
***************
*** 322,326 ****
     Pixmap	PxMp[];
  {
!    register int	i, j, menuing = TRUE;
     Window	window, root_win, child_win;
     int		x, y, old_selected, new_selected, menu_w, menu_h;
--- 321,325 ----
     Pixmap	PxMp[];
  {
!    register int	i, j, menuing;
     Window	window, root_win, child_win;
     int		x, y, old_selected, new_selected, menu_w, menu_h;
***************
*** 438,442 ****
           else
              rc = INVALID;
-          break;
        }
        else if (menu_pinned)
--- 437,440 ----
***************
*** 721,725 ****
     int			ltx = 0, lty = 0, rbx = 0, rby = 0, seen_obj = FALSE;
     int			dx, dy, w, h, len, ext_len;
!    int			x, y, bitmask = 0, read_status;
     unsigned int		icon_w, icon_h;
     XSizeHints		sizehints;
--- 719,723 ----
     int			ltx = 0, lty = 0, rbx = 0, rby = 0, seen_obj = FALSE;
     int			dx, dy, w, h, len, ext_len;
!    int			x, y, read_status;
     unsigned int		icon_w, icon_h;
     XSizeHints		sizehints;
***************
*** 748,752 ****
     len = strlen(s);
  
!    if (len<ext_len || strcmp(&s[len-ext_len],ext_str) != 0) strcat (s, ".obj");
  
     if ((fp = fopen (s, "r")) == NULL)
--- 746,751 ----
     len = strlen(s);
  
!    if (len<ext_len || strcmp(&s[len-ext_len],ext_str) != 0)
!       sprintf (&(s[len]), ".%s", OBJ_FILE_EXT);
  
     if ((fp = fopen (s, "r")) == NULL)
***************
*** 825,829 ****
     if ((c_ptr = XGetDefault (mainDisplay,TOOL_NAME,"IconGeometry")) != NULL)
     {
!       bitmask = XParseGeometry (c_ptr, &x, &y, &icon_w, &icon_h);
        if ((bitmask & XValue) && (bitmask & YValue))
        {
--- 824,829 ----
     if ((c_ptr = XGetDefault (mainDisplay,TOOL_NAME,"IconGeometry")) != NULL)
     {
!       int	bitmask = XParseGeometry (c_ptr, &x, &y, &icon_w, &icon_h);
! 
        if ((bitmask & XValue) && (bitmask & YValue))
        {
*** move.c.orig	Tue Nov  3 22:28:40 1992
--- move.c	Tue Nov  3 22:28:42 1992
***************
*** 26,30 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/move.c,v 2.52 1992/03/31 07:54:21 william Exp $";
  #endif
  #include <stdio.h>
--- 26,30 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/move.c,v 2.53 1992/10/20 05:39:26 william Exp $";
  #endif
  #include <stdio.h>
***************
*** 474,478 ****
  {
     register int		i, num_pts = 0;
-    struct OvalRec	* oval_ptr;
     struct PolyRec	* poly_ptr = NULL;
     struct PolygonRec	* polygon_ptr = NULL;
--- 474,477 ----
***************
*** 556,560 ****
           break;
        case OBJ_OVAL:
-          oval_ptr = ObjPtr->detail.o;
           num_pts = 13;
           bbox.ltx = OFFSET_X(ObjPtr->obbox.ltx);
--- 555,558 ----
***************
*** 949,953 ****
  void EndMoveVs ()
  {
!    register struct ObjRec	* obj_ptr, * next_obj=NULL;
  
     for (obj_ptr=tmpTopObj; obj_ptr != NULL; obj_ptr = next_obj)
--- 947,951 ----
  void EndMoveVs ()
  {
!    register struct ObjRec	* obj_ptr, * next_obj;
  
     for (obj_ptr=tmpTopObj; obj_ptr != NULL; obj_ptr = next_obj)
***************
*** 1196,1201 ****
           PointerMotionMask | ButtonReleaseMask,
           GrabModeAsync, GrabModeAsync, None, handCursor, CurrentTime);
- 
-    dx = dy = 0;
  
     while (moving)
--- 1194,1197 ----
*** msg.c.orig	Tue Nov  3 22:28:44 1992
--- msg.c	Tue Nov  3 22:28:45 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/msg.c,v 2.26 1992/05/07 01:21:43 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/msg.c,v 2.28 1992/10/25 07:18:56 william Exp $";
  #endif
  
***************
*** 92,96 ****
  void CleanUpMsg ()
  {
!    register struct MsgRec	* msg_ptr, * prev_msg=NULL;
  
     for (msg_ptr = botMsg; msg_ptr != NULL; msg_ptr = prev_msg)
--- 92,96 ----
  void CleanUpMsg ()
  {
!    register struct MsgRec	* msg_ptr, * prev_msg;
  
     for (msg_ptr = botMsg; msg_ptr != NULL; msg_ptr = prev_msg)
***************
*** 110,114 ****
  {
     register int			i;
!    register struct MsgRec	* ptr = NULL;
  
     if (Number >= msgCount)
--- 110,114 ----
  {
     register int			i;
!    register struct MsgRec	* ptr;
  
     if (Number >= msgCount)
***************
*** 180,184 ****
  {
     char			file_name[MAXPATHLENGTH], * rest, msg[MAXSTRING];
-    int			short_name=FALSE;
     FILE			*fp;
     struct MsgRec	* msg_ptr;
--- 180,183 ----
***************
*** 200,203 ****
--- 199,204 ----
     else
     {
+       int	short_name;
+ 
        if (!OkayToCreateFile (file_name)) return;
  
***************
*** 494,506 ****
     char	* tool_name;
  {
!    fprintf (stderr, "Usage:\t%s\n", tool_name);
!    fprintf (stderr, "\t[-display displayname]\n");
!    fprintf (stderr, "\t[-fg <color>]\n");
!    fprintf (stderr, "\t[-bg <color>]\n");
!    fprintf (stderr, "\t[-bd <color>]\n");
!    fprintf (stderr, "\t[-rv] [-nv]\n");
!    fprintf (stderr, "\t[-bw]\n");
!    fprintf (stderr, "\t[-geometry geom] [=geom]\n");
!    fprintf (stderr, "\t[filename[.obj]]\n");
     exit (-1);
  }
--- 495,507 ----
     char	* tool_name;
  {
!    fprintf (stderr, "Usage:\t%s \\\n", tool_name);
!    fprintf (stderr, "\t[-display displayname] \\\n");
!    fprintf (stderr, "\t[-fg <color>] \\\n");
!    fprintf (stderr, "\t[-bg <color>] \\\n");
!    fprintf (stderr, "\t[-bd <color>] \\\n");
!    fprintf (stderr, "\t[-rv] [-nv] \\\n");
!    fprintf (stderr, "\t[-bw] \\\n");
!    fprintf (stderr, "\t[-geometry <geom>] [=<geom>] \\\n");
!    fprintf (stderr, "\t[<filename>[.obj]]\n");
     exit (-1);
  }
*** names.c.orig	Tue Nov  3 22:28:51 1992
--- names.c	Tue Nov  3 22:28:54 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/names.c,v 2.93 1992/07/22 04:37:14 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/names.c,v 2.93.1.3 1992/11/03 07:13:34 william Exp $";
  #endif
  
***************
*** 190,194 ****
     int			len, path_index, count = 0, reject, sym_ext_len;
     char			path[MAXPATHLENGTH], sym_ext_str[MAXSTRING];
!    DspList		* dsp_ptr = NULL, * head_ptr, * tail_ptr, * p, * p1;
     DIR			* dirp;
  #ifdef ibm-rt
--- 190,194 ----
     int			len, path_index, count = 0, reject, sym_ext_len;
     char			path[MAXPATHLENGTH], sym_ext_str[MAXSTRING];
!    DspList		* dsp_ptr, * head_ptr, * tail_ptr, * p, * p1;
     DIR			* dirp;
  #ifdef ibm-rt
***************
*** 283,287 ****
  {
     register int		i;
!    register DspList	* dsp_ptr, * next_dsp=NULL;
  
     if (symbolList != NULL) cfree (symbolList);
--- 283,287 ----
  {
     register int		i;
!    register DspList	* dsp_ptr, * next_dsp;
  
     if (symbolList != NULL) cfree (symbolList);
***************
*** 305,309 ****
     char	* Path, * ExtStr, * OtherExtStr;
  {
!    DspList		* dsp_ptr = NULL, * head_ptr, * tail_ptr, * p, * p1;
     DIR			* dirp;
  #ifdef ibm-rt
--- 305,309 ----
     char	* Path, * ExtStr, * OtherExtStr;
  {
!    DspList		* dsp_ptr, * head_ptr, * tail_ptr, * p, * p1;
     DIR			* dirp;
  #ifdef ibm-rt
***************
*** 374,381 ****
        }
  #ifdef VMS
!       else if (len > ext_len && (strcmp (".dir", &d->d_name[len-ext_len]) == 0))
        {
!          d->d_name[len-ext_len] = '/';
!          d->d_name[len-ext_len+1] = '\0';
           dsp_ptr = (DspList *) calloc (1, sizeof(DspList));
           dsp_ptr->directory = TRUE;
--- 374,381 ----
        }
  #ifdef VMS
!       else if (len > 4 && (strcmp (".dir", &d->d_name[len-4]) == 0))
        {
!          d->d_name[len-4] = '/';
!          d->d_name[len-4+1] = '\0';
           dsp_ptr = (DspList *) calloc (1, sizeof(DspList));
           dsp_ptr->directory = TRUE;
***************
*** 433,437 ****
  {
     register int		i;
!    register DspList	* dsp_ptr, * next_dsp=NULL;
  
     if (topOfDirLinkList != NULL)
--- 433,437 ----
  {
     register int		i;
!    register DspList	* dsp_ptr, * next_dsp;
  
     if (topOfDirLinkList != NULL)
***************
*** 1036,1040 ****
     XSetWindowAttributes	win_attrs;
     int			win_x, win_y;
!    DspList		* dsp_ptr, * next_dsp=NULL;
  
     dsp_w = DisplayWidth (mainDisplay, mainScreen);
--- 1036,1040 ----
     XSetWindowAttributes	win_attrs;
     int			win_x, win_y;
!    DspList		* dsp_ptr, * next_dsp;
  
     dsp_w = DisplayWidth (mainDisplay, mainScreen);
***************
*** 1055,1059 ****
        w = str_width + 4 * defaultFontWidth;
        str_start = 2 * defaultFontWidth;
!       graph_start = (w - graph_width) / 2;
     }
     else
--- 1055,1059 ----
        w = str_width + 4 * defaultFontWidth;
        str_start = 2 * defaultFontWidth;
!       graph_start = (w - graph_width)>>1;
     }
     else
***************
*** 1060,1070 ****
     {
        w = graph_width + 4 * defaultFontWidth;
!       str_start = (w - str_width) / 2;
        graph_start = 2 * defaultFontWidth;
     }
!    button_start = (w - button_widths) / 2;
     h = (8 + ITEM_DSPED) * ROW_HEIGHT;
  
!    win_x = (w > dsp_w) ? 0 : (dsp_w - w)/2;
     win_y = (h > dsp_h) ? 0 : (dsp_h - h)/3;
  
--- 1060,1070 ----
     {
        w = graph_width + 4 * defaultFontWidth;
!       str_start = (w - str_width)>>1;
        graph_start = 2 * defaultFontWidth;
     }
!    button_start = (w - button_widths)>>1;
     h = (8 + ITEM_DSPED) * ROW_HEIGHT;
  
!    win_x = (w > dsp_w) ? 0 : ((dsp_w - w)>>1);
     win_y = (h > dsp_h) ? 0 : (dsp_h - h)/3;
  
***************
*** 1129,1134 ****
  
     if (warpToWinCenter)
!       XWarpPointer (mainDisplay, None, nameBaseWin, 0, 0, 0, 0,
!             (int)(w/2), (int)(h/2));
  
     XSync (mainDisplay, False);
--- 1129,1133 ----
  
     if (warpToWinCenter)
!       XWarpPointer (mainDisplay, None, nameBaseWin, 0, 0, 0, 0, (w>>1), (h>>1));
  
     XSync (mainDisplay, False);
***************
*** 1401,1405 ****
                    pop_from_root = TRUE;
                    index = INVALID;
-                   break;
                 }
                 else
--- 1400,1403 ----
***************
*** 1429,1433 ****
                 changing = FALSE;
                 index = INVALID;
-                break;
              }
              else if ((tabbed_from_root && nameEntries != 0 ||
--- 1427,1430 ----
***************
*** 1491,1494 ****
--- 1488,1492 ----
                    (!tabbed_from_root)))
              {
+                i = INVALID;
                 if (!tabbed_from_root)
                 {
***************
*** 1526,1543 ****
                             3*ROW_HEIGHT+defaultFontAsc+2);
                 }
- #else
- #ifdef apollo
-                else if (name_index == 0 && buf[0] == '/' && *dir_name == '\0')
-                {
-                   strcpy (dir_name, "/");
-                   name[name_index++] = buf[0];
-                   i = nameEntries;
-                   strcpy (full_name, "//");
-                   if (exposed)
-                      RedrawNamePath (full_name, graph_start,
-                            3*ROW_HEIGHT+defaultFontAsc+2);
-                }
  #endif
- #endif
                 else if (name_index == 0 && buf[0] == '/')
                 {
--- 1524,1528 ----
***************
*** 1550,1554 ****
                    *dir_name = *name = '\0';
                    strcpy (tmp_top_str, "Type <TAB> for file completion..");
-                   break;
                 }
                 else
--- 1535,1538 ----
***************
*** 2168,2173 ****
     char	* MsgStr, * SelStr;
  {
!    int		index = INVALID, saved_num_dir_entries, just_set_dir;
!    DspList	* dsp_ptr, * next_dsp=NULL;
     char		saved_cur_dir[MAXPATHLENGTH];
  
--- 2152,2157 ----
     char	* MsgStr, * SelStr;
  {
!    int		index, saved_num_dir_entries, just_set_dir;
!    DspList	* dsp_ptr, * next_dsp;
     char		saved_cur_dir[MAXPATHLENGTH];
  
***************
*** 2206,2211 ****
     char	* MsgStr, * ExtStr, * SelStr;
  {
!    int		index = INVALID, saved_num_dir_entries, just_set_dir;
!    DspList	* dsp_ptr, * next_dsp=NULL;
     char		msg[MAXPATHLENGTH];
  
--- 2190,2195 ----
     char	* MsgStr, * ExtStr, * SelStr;
  {
!    int		index, saved_num_dir_entries, just_set_dir;
!    DspList	* dsp_ptr, * next_dsp;
     char		msg[MAXPATHLENGTH];
  
***************
*** 2285,2290 ****
     int		seen_examples = FALSE;
     char		s[MAXSTRING], * c_ptr;
!    DspList	* dsp_ptr = NULL, * head_ptr, * tail_ptr, * p, * p1;
!    DspList	* next_dsp=NULL;
  
     if ((c_ptr = XGetDefault (mainDisplay, TOOL_NAME, "MaxDomains")) == NULL)
--- 2269,2274 ----
     int		seen_examples = FALSE;
     char		s[MAXSTRING], * c_ptr;
!    DspList	* dsp_ptr, * head_ptr, * tail_ptr, * p, * p1;
!    DspList	* next_dsp;
  
     if ((c_ptr = XGetDefault (mainDisplay, TOOL_NAME, "MaxDomains")) == NULL)
***************
*** 2355,2359 ****
  {
     int		index;
!    DspList	* dsp_ptr, * next_dsp=NULL;
  
     Msg ("Generating list of domain names, please wait ...");
--- 2339,2343 ----
  {
     int		index;
!    DspList	* dsp_ptr, * next_dsp;
  
     Msg ("Generating list of domain names, please wait ...");
***************
*** 2434,2438 ****
     int		index;
     char		msg[MAXSTRING+1];
!    DspList	* dsp_ptr, * next_dsp=NULL;
  
     *SelStr = '\0';
--- 2418,2422 ----
     int		index;
     char		msg[MAXSTRING+1];
!    DspList	* dsp_ptr, * next_dsp;
  
     *SelStr = '\0';
***************
*** 2480,2484 ****
     char			path[MAXPATHLENGTH];
     char			ext_str[MAXSTRING], other_ext_str[MAXSTRING];
!    DspList		* dsp_ptr = NULL, * head_ptr, * tail_ptr, * p, * p1;
     DIR			* dirp;
  #ifdef ibm-rt
--- 2464,2468 ----
     char			path[MAXPATHLENGTH];
     char			ext_str[MAXSTRING], other_ext_str[MAXSTRING];
!    DspList		* dsp_ptr, * head_ptr, * tail_ptr, * p, * p1;
     DIR			* dirp;
  #ifdef ibm-rt
***************
*** 2584,2588 ****
     int		index;
     char		s[MAXPATHLENGTH], other_ext_str[MAXSTRING];
!    DspList	* dsp_ptr, * next_dsp=NULL;
  
     *other_ext_str = '\0';
--- 2568,2572 ----
     int		index;
     char		s[MAXPATHLENGTH], other_ext_str[MAXSTRING];
!    DspList	* dsp_ptr, * next_dsp;
  
     *other_ext_str = '\0';
*** obj.c.orig	Tue Nov  3 22:29:03 1992
--- obj.c	Tue Nov  3 22:29:04 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/obj.c,v 2.35 1992/06/22 00:16:39 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/obj.c,v 2.35.2.1 1992/10/21 04:32:25 william Exp $";
  #endif
  
***************
*** 122,126 ****
  void DelAllObj ()
  {
!    register struct ObjRec	* ptr, * next_obj=NULL;
  
     if (topObj == NULL) return;
--- 122,126 ----
  void DelAllObj ()
  {
!    register struct ObjRec	* ptr, * next_obj;
  
     if (topObj == NULL) return;
***************
*** 281,285 ****
              XPoint		* v = poly_ptr->vlist, * v_copy;
              int			aw = poly_ptr->aw;
-             int			ah = poly_ptr->ah;
              int			n = poly_ptr->n, dx, dy;
              double		len, sin, cos;
--- 281,284 ----
***************
*** 296,300 ****
  
              if (aw == 0) aw = 1;
-             if (ah == 0) ah = 1;
  
              dx = v_copy[1].x - v_copy[0].x;
--- 295,298 ----
*** oval.c.orig	Tue Nov  3 22:29:07 1992
--- oval.c	Tue Nov  3 22:29:07 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/oval.c,v 2.34 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/oval.c,v 2.35 1992/10/21 04:33:53 william Exp $";
  #endif
  
***************
*** 326,330 ****
     int 			end_x, end_y, grid_x, grid_y;
     int 			done = FALSE;
!    int			pixel, xor_pixel;
     struct BBRec		bbox;
     XGCValues		values;
--- 326,330 ----
     int 			end_x, end_y, grid_x, grid_y;
     int 			done = FALSE;
!    int			xor_pixel;
     struct BBRec		bbox;
     XGCValues		values;
***************
*** 335,339 ****
     bbox.lty = bbox.rby = OrigY;
  
-    pixel = colorPixels[colorIndex];
     xor_pixel = xorColorPixels[colorIndex];
  
--- 335,338 ----
*** poly.c.orig	Tue Nov  3 22:29:11 1992
--- poly.c	Tue Nov  3 22:29:13 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/poly.c,v 2.59 1992/06/19 18:10:30 william Exp $";
  #endif
  
--- 25,29 ----
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/poly.c,v 2.59.1.2 1992/10/21 04:37:27 william Exp $";
  #endif
  
***************
*** 193,197 ****
     int	NumPts;
  {
!    struct PtRec		* pt_ptr, * next_pt=NULL;
     struct PolyRec	* poly_ptr;
     struct ObjRec	* obj_ptr;
--- 193,197 ----
     int	NumPts;
  {
!    struct PtRec		* pt_ptr, * next_pt;
     struct PolyRec	* poly_ptr;
     struct ObjRec	* obj_ptr;
***************
*** 260,264 ****
     XButtonEvent		* button_ev;
     XMotionEvent		* motion_ev;
!    int			pixel, xor_pixel;
     int 			end_x, end_y, grid_x, grid_y, done = FALSE, num_pts = 1;
     int			last_x=OrigX, last_y=OrigY, n=2, sn=0, max_n=40;
--- 260,264 ----
     XButtonEvent		* button_ev;
     XMotionEvent		* motion_ev;
!    int			xor_pixel;
     int 			end_x, end_y, grid_x, grid_y, done = FALSE, num_pts = 1;
     int			last_x=OrigX, last_y=OrigY, n=2, sn=0, max_n=40;
***************
*** 266,270 ****
     XPoint		* v = NULL, * sv = NULL;
  
-    pixel = colorPixels[colorIndex];
     xor_pixel = xorColorPixels[colorIndex];
  
--- 266,269 ----
***************
*** 287,291 ****
     if (curSpline == LT_SPLINE && splineRubberband)
     {
!       v = (XPoint *) calloc (max_n, sizeof (XPoint));
        v[0].x = v[1].x = v[2].x = ABS_X(OrigX);
        v[0].y = v[1].y = v[2].y = ABS_Y(OrigY);
--- 286,290 ----
     if (curSpline == LT_SPLINE && splineRubberband)
     {
!       v = (XPoint *) calloc (max_n+1, sizeof (XPoint));
        v[0].x = v[1].x = v[2].x = ABS_X(OrigX);
        v[0].y = v[1].y = v[2].y = ABS_Y(OrigY);
***************
*** 357,361 ****
                    {
                       max_n += 40;
!                      v = (XPoint *) realloc (v, sizeof(XPoint)*max_n);
                    }
                    XDrawLines (mainDisplay, drawWindow, drawGC, sv, sn,
--- 356,360 ----
                    {
                       max_n += 40;
!                      v = (XPoint *) realloc (v, sizeof(XPoint)*max_n+1);
                    }
                    XDrawLines (mainDisplay, drawWindow, drawGC, sv, sn,
***************
*** 412,416 ****
                 {
                    max_n += 40;
!                   v = (XPoint *) realloc (v, sizeof(XPoint)*max_n);
                 }
                 XDrawLines (mainDisplay, drawWindow, drawGC, sv, sn,
--- 411,415 ----
                 {
                    max_n += 40;
!                   v = (XPoint *) realloc (v, sizeof(XPoint)*max_n+1);
                 }
                 XDrawLines (mainDisplay, drawWindow, drawGC, sv, sn,
***************
*** 437,443 ****
           button_ev = &(input.xbutton);
  
-          end_x = button_ev->x;
-          end_y = button_ev->y;
- 
           if (grid_x != last_x || grid_y != last_y)
           {
--- 436,439 ----
***************
*** 597,605 ****
  {
     register int	i, dx, dy;
!    int		w, aw, ah;
  
     w = Width;
     aw = ArrowWidth;
-    ah = ArrowHeight;
  
     if (Width != 1) fprintf (FP, "   %1d setlinewidth\n", w);
--- 593,600 ----
  {
     register int	i, dx, dy;
!    int		w, aw;
  
     w = Width;
     aw = ArrowWidth;
  
     if (Width != 1) fprintf (FP, "   %1d setlinewidth\n", w);
***************
*** 877,883 ****
     XPoint			* v, tmp_v[4];
     XPoint			v0, v1, vnminus2, vnminus1;
!    int				pen, width, pixel, fill, curved, n, sn, dash;
     int				real_x_off, real_y_off;
!    int				style, rotation, aw, ah, num_pts;
     int				left_dx,left_dy,right_dx,right_dy;
     double			len, sin, cos;
--- 872,878 ----
     XPoint			* v, tmp_v[4];
     XPoint			v0, v1, vnminus2, vnminus1;
!    int				pen, width, pixel, fill, n, dash;
     int				real_x_off, real_y_off;
!    int				style, aw, ah, num_pts;
     int				left_dx,left_dy,right_dx,right_dy;
     double			len, sin, cos;
***************
*** 885,889 ****
  
     n = poly_ptr->n;
-    sn = poly_ptr->sn;
     fill = poly_ptr->fill;
     width = poly_ptr->width;
--- 880,883 ----
***************
*** 892,899 ****
     pen = poly_ptr->pen;
     style = poly_ptr->style;
-    curved = poly_ptr->curved;
     dash = poly_ptr->dash;
     pixel = colorPixels[ObjPtr->color];
-    rotation = ObjPtr->rotation;
  
     if (fill == NONEPAT && pen == NONEPAT) return;
--- 886,891 ----
*** polygon.c.orig	Tue Nov  3 22:29:17 1992
--- polygon.c	Tue Nov  3 22:29:18 1992
***************
*** 25,29 ****
  #ifndef lint
  static char RCSid[] =
!       "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/polygon.c,v 2.58 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/polygon.c,v 2.58.1.2 1992/10/21 04:40:03 william Exp $";
  #endif
  
***************
*** 319,335 ****
  {
     struct PolygonRec	* polygon_ptr = ObjPtr->detail.g;
!    XPoint		* pv = polygon_ptr->vlist, * v;
!    int			fill, width, pen, curved, n, dash, pixel;
!    int			rotation, num_pts;
     XGCValues		values;
  
-    n = polygon_ptr->n;
     fill = polygon_ptr->fill;
     width = polygon_ptr->width;
     pen = polygon_ptr->pen;
-    curved = polygon_ptr->curved;
     dash = polygon_ptr->dash;
     pixel = colorPixels[ObjPtr->color];
-    rotation = ObjPtr->rotation;
  
     if (fill == NONEPAT && pen == NONEPAT) return;
--- 319,332 ----
  {
     struct PolygonRec	* polygon_ptr = ObjPtr->detail.g;
!    XPoint		* v;
!    int			fill, width, pen, dash, pixel;
!    int			num_pts;
     XGCValues		values;
  
     fill = polygon_ptr->fill;
     width = polygon_ptr->width;
     pen = polygon_ptr->pen;
     dash = polygon_ptr->dash;
     pixel = colorPixels[ObjPtr->color];
  
     if (fill == NONEPAT && pen == NONEPAT) return;
***************
*** 381,385 ****
  {
     register int		i;
!    struct PtRec		* pt_ptr, * next_pt=NULL;
     struct PolygonRec	* polygon_ptr;
     struct ObjRec	* obj_ptr;
--- 378,382 ----
  {
     register int		i;
!    struct PtRec		* pt_ptr, * next_pt;
     struct PolygonRec	* polygon_ptr;
     struct ObjRec	* obj_ptr;
***************
*** 449,457 ****
     int 			end_x, end_y, grid_x, grid_y, done = FALSE;
     int 			saved_x, saved_y, closed=FALSE;
!    int			pixel, xor_pixel, num_pts=1, n=2, sn=0, max_n=40;
     struct PtRec		* pt_ptr;
     XPoint		* v = NULL, * sv = NULL;
  
-    pixel = colorPixels[colorIndex];
     xor_pixel = xorColorPixels[colorIndex];
  
--- 446,453 ----
     int 			end_x, end_y, grid_x, grid_y, done = FALSE;
     int 			saved_x, saved_y, closed=FALSE;
!    int			xor_pixel, num_pts=1, n=2, sn=0, max_n=40;
     struct PtRec		* pt_ptr;
     XPoint		* v = NULL, * sv = NULL;
  
     xor_pixel = xorColorPixels[colorIndex];
  
***************
*** 474,478 ****
     if (curSpline == LT_SPLINE && splineRubberband)
     {
!       v = (XPoint *) calloc (max_n, sizeof (XPoint));
        v[0].x = v[1].x = v[2].x = ABS_X(OrigX);
        v[0].y = v[1].y = v[2].y = ABS_Y(OrigY);
--- 470,474 ----
     if (curSpline == LT_SPLINE && splineRubberband)
     {
!       v = (XPoint *) calloc (max_n+1, sizeof (XPoint));
        v[0].x = v[1].x = v[2].x = ABS_X(OrigX);
        v[0].y = v[1].y = v[2].y = ABS_Y(OrigY);
***************
*** 570,574 ****
                 {
                    max_n += 40;
!                   v = (XPoint *) realloc (v, sizeof(XPoint)*max_n);
                 }
                 XDrawLines (mainDisplay, drawWindow, drawGC, sv, sn,
--- 566,570 ----
                 {
                    max_n += 40;
!                   v = (XPoint *) realloc (v, sizeof(XPoint)*max_n+1);
                 }
                 XDrawLines (mainDisplay, drawWindow, drawGC, sv, sn,
---------------------------------> 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