home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / x / volume8 / tgif / patch2.3 < prev    next >
Internet Message Format  |  1990-08-03  |  44KB

  1. Path: uunet!cs.utexas.edu!sun-barr!newstop!sun!CS.UCLA.EDU
  2. From: william@CS.UCLA.EDU (William Cheng)
  3. Newsgroups: comp.sources.x
  4. Subject: v08i060: tgif (tgif-1.9 => tgif-1.12), Patch2, Part03/03
  5. Message-ID: <140170@sun.Eng.Sun.COM>
  6. Date: 4 Aug 90 02:12:57 GMT
  7. Sender: news@sun.Eng.Sun.COM
  8. Lines: 1484
  9. Approved: argv@sun.com
  10.  
  11. Submitted-by: william@CS.UCLA.EDU (William Cheng)
  12. Posting-number: Volume 8, Issue 60
  13. Archive-name: tgif/patch2.03
  14. Patch-To: tgif: Volume 7, Issue 56-76 (original: tgif-1.2)
  15. Patch-To: tgif: Volume 8, Issue 46-48 (Patch1: tgif-1.2 => tgif-1.9)
  16.  
  17. ---------------------------------> cut here <---------------------------------
  18. *** raster.c.orig    Thu Aug  2 09:46:21 1990
  19. --- raster.c    Thu Aug  2 09:46:23 1990
  20. ***************
  21. *** 6,10 ****
  22.   #ifndef lint
  23.   static char RCSid[] =
  24. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/raster.c,v 1.3 90/05/22 14:16:44 william Exp $";
  25.   #endif
  26.   
  27. --- 6,10 ----
  28.   #ifndef lint
  29.   static char RCSid[] =
  30. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/raster.c,v 1.5 90/07/16 10:51:23 william Exp $";
  31.   #endif
  32.   
  33. ***************
  34. *** 13,18 ****
  35.   #include "types.h"
  36.   
  37. - #include "color.e"
  38.   #include "choice.e"
  39.   #include "font.e"
  40.   #include "pattern.e"
  41. --- 13,18 ----
  42.   #include "types.h"
  43.   
  44.   #include "choice.e"
  45. + #include "color.e"
  46.   #include "font.e"
  47.   #include "pattern.e"
  48. ***************
  49. *** 106,111 ****
  50.   GC    revDefaultGC;
  51.   
  52. - Pixmap    colorPxMp[MAXCOLORS];
  53.   Pixmap    choicePixmap[MAXCHOICES];
  54.   Pixmap    lineWidthPixmap[MAXLINEWIDTHS];
  55. --- 106,109 ----
  56. ***************
  57. *** 323,327 ****
  58. --- 321,332 ----
  59.      register int    i;
  60.   
  61. +    for (i = 0; i < MAXCHOICES; i++) XFreePixmap (mainDisplay, choicePixmap[i]);
  62.      for (i = 0; i < MAXPATTERNS+1; i++) XFreePixmap (mainDisplay, patPixmap[i]);
  63. +    for (i = 0; i < MAXLINEWIDTHS; i++)
  64. +       XFreePixmap (mainDisplay, lineWidthPixmap[i]);
  65. +    for (i = 0; i < MAXLINEWIDTHS+MAXLINETYPES+MAXLINESTYLES; i++)
  66. +       XFreePixmap (mainDisplay, lineStylePixmap[i]);
  67. +    for (i = 0; i < MAXLINETYPES; i++)
  68. +       XFreePixmap (mainDisplay, lineTypePixmap[i]);
  69.      for (i = 0; i < MAXJUSTS; i++) XFreePixmap (mainDisplay, justPixmap[i]);
  70.      XFreePixmap (mainDisplay, alignHoriPixmap[0]);
  71. ***************
  72. *** 330,340 ****
  73.      for (i = 1; i < MAXALIGNS; i++)
  74.         XFreePixmap (mainDisplay, alignVertPixmap[i]);
  75. -    for (i = 0; i < MAXLINEWIDTHS+MAXLINETYPES+MAXLINESTYLES; i++)
  76. -       XFreePixmap (mainDisplay, lineStylePixmap[i]);
  77. -    for (i = 0; i < MAXLINETYPES; i++)
  78. -       XFreePixmap (mainDisplay, lineTypePixmap[i]);
  79.      for (i = 0; i < MAXLINEWIDTHS; i++)
  80. -       XFreePixmap (mainDisplay, lineWidthPixmap[i]);
  81. -    for (i = 0; i < MAXLINEWIDTHS; i++)
  82.         XFreePixmap (mainDisplay, shortLineWidthPixmap[i]);
  83.      for (i = 0; i < 2; i++)
  84. --- 335,339 ----
  85. ***************
  86. *** 344,348 ****
  87.      for (i = 0; i < MAXLINESTYLES; i++)
  88.         XFreePixmap (mainDisplay, shortLineStylePixmap[i]);
  89. -    for (i = 0; i < MAXCHOICES; i++) XFreePixmap (mainDisplay, choicePixmap[i]);
  90.   
  91.      XFreeGC (mainDisplay, rasterGC);
  92. --- 343,346 ----
  93. *** select.c.orig    Thu Aug  2 09:46:34 1990
  94. --- select.c    Thu Aug  2 09:46:36 1990
  95. ***************
  96. *** 6,10 ****
  97.   #ifndef lint
  98.   static char RCSid[] =
  99. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/select.c,v 1.4 90/06/26 00:11:25 william Exp $";
  100.   #endif
  101.   
  102. --- 6,10 ----
  103.   #ifndef lint
  104.   static char RCSid[] =
  105. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/select.c,v 1.7 90/07/27 14:37:59 william Exp $";
  106.   #endif
  107.   
  108. ***************
  109. *** 26,31 ****
  110.   #include "rect.e"
  111.   #include "ruler.e"
  112. - #include "stretch.e"
  113.   #include "setup.e"
  114.   
  115.   #define FORWARD 0
  116. --- 26,31 ----
  117.   #include "rect.e"
  118.   #include "ruler.e"
  119.   #include "setup.e"
  120. + #include "stretch.e"
  121.   
  122.   #define FORWARD 0
  123. ***************
  124. *** 573,589 ****
  125.   }
  126.   
  127. ! static
  128. ! void DelCutSel ()
  129.   {
  130.      register struct SelRec    * sel_ptr;
  131.   
  132. !    if ((sel_ptr = topCutSel) == NULL) return;
  133. !    for ( ; sel_ptr != NULL; sel_ptr = sel_ptr->next)
  134.      {
  135. !       DelObj (sel_ptr->obj);
  136. !       cfree (sel_ptr);
  137.      }
  138. -    topCutSel = botCutSel = NULL;
  139.   }
  140.   
  141. --- 573,590 ----
  142.   }
  143.   
  144. ! void DelAllCutSel ()
  145.   {
  146.      register struct SelRec    * sel_ptr;
  147.   
  148. !    while (topCutSel != NULL)
  149.      {
  150. !       for (sel_ptr = topCutSel->next; sel_ptr != NULL; sel_ptr = sel_ptr->next)
  151. !       {
  152. !          FreeObj (sel_ptr->obj);
  153. !          cfree (sel_ptr);
  154. !       }
  155. !       topCutSel = topCutSel->prev; /* prev is used as the stack chaser */
  156. !       botCutSel = botCutSel->prev; /* prev is used as the stack chaser */
  157.      }
  158.   }
  159.   
  160. ***************
  161. *** 590,594 ****
  162.   void UndoDelete ()
  163.   {
  164. !    if (topCutSel == NULL) return;
  165.   
  166.      HighLightReverse ();
  167. --- 591,599 ----
  168.   void UndoDelete ()
  169.   {
  170. !    if (topCutSel == NULL)
  171. !    {
  172. !       Msg ("Un-delete buffer empty!");
  173. !       return;
  174. !    }
  175.   
  176.      HighLightReverse ();
  177. ***************
  178. *** 595,600 ****
  179.      RemoveAllSel ();
  180.   
  181. !    topSel = topCutSel;
  182. !    botSel = botCutSel;
  183.   
  184.      botSel->obj->next = topObj;
  185. --- 600,605 ----
  186.      RemoveAllSel ();
  187.   
  188. !    topSel = topCutSel->next;
  189. !    botSel = botCutSel->next;
  190.   
  191.      botSel->obj->next = topObj;
  192. ***************
  193. *** 605,609 ****
  194.      topObj = topSel->obj;
  195.   
  196. !    topCutSel = botCutSel = NULL;
  197.   
  198.      UpdSelBBox ();
  199. --- 610,617 ----
  200.      topObj = topSel->obj;
  201.   
  202. !    cfree (topCutSel);
  203. !    cfree (botCutSel);
  204. !    topCutSel = topCutSel->prev; /* prev is used as the stack chaser */
  205. !    botCutSel = botCutSel->prev; /* prev is used as the stack chaser */
  206.   
  207.      UpdSelBBox ();
  208. ***************
  209. *** 616,622 ****
  210.   }
  211.   
  212.   void DelAllSelObj ()
  213.   {
  214. !    register struct SelRec    * sel_ptr;
  215.   
  216.      if (topSel == NULL) return;
  217. --- 624,646 ----
  218.   }
  219.   
  220. + void CopySelToCut ()
  221. + {
  222. +    register struct SelRec    * sel_ptr, * top_cut_ptr, * bot_cut_ptr;
  223. +    struct SelRec        * top_sel_ptr, * bot_sel_ptr;
  224. +    if (topSel == NULL) return;
  225. +    JustDupSelObj (&top_sel_ptr, &bot_sel_ptr);
  226. +    top_cut_ptr = (struct SelRec *) calloc (2, sizeof (struct SelRec));
  227. +    bot_cut_ptr = &top_cut_ptr[1];
  228. +    top_cut_ptr->next = top_sel_ptr; bot_cut_ptr->next = bot_sel_ptr;
  229. +    top_cut_ptr->prev = topCutSel; bot_cut_ptr->prev = botCutSel;
  230. +    topCutSel = top_cut_ptr; botCutSel = bot_cut_ptr;
  231. + }
  232.   void DelAllSelObj ()
  233.   {
  234. !    register struct SelRec    * sel_ptr, * top_cut_ptr, * bot_cut_ptr;
  235.   
  236.      if (topSel == NULL) return;
  237. ***************
  238. *** 625,630 ****
  239.      tmpTopObj = tmpBotObj = NULL;
  240.      BreakSel ();
  241. !    topCutSel = topSel;
  242. !    botCutSel = botSel;
  243.   
  244.      topSel = botSel = NULL;
  245. --- 649,658 ----
  246.      tmpTopObj = tmpBotObj = NULL;
  247.      BreakSel ();
  248. !    top_cut_ptr = (struct SelRec *) calloc (2, sizeof (struct SelRec));
  249. !    bot_cut_ptr = &top_cut_ptr[1];
  250. !    top_cut_ptr->next = topSel; bot_cut_ptr->next = botSel;
  251. !    top_cut_ptr->prev = topCutSel; bot_cut_ptr->prev = botCutSel;
  252. !    topCutSel = top_cut_ptr; botCutSel = bot_cut_ptr;
  253.   
  254.      topSel = botSel = NULL;
  255. *** setup.c.orig    Thu Aug  2 09:46:44 1990
  256. --- setup.c    Thu Aug  2 09:46:45 1990
  257. ***************
  258. *** 6,10 ****
  259.   #ifndef lint
  260.   static char RCSid[] =
  261. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/setup.c,v 1.8 90/06/26 00:13:09 william Exp $";
  262.   #endif
  263.   
  264. --- 6,10 ----
  265.   #ifndef lint
  266.   static char RCSid[] =
  267. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/setup.c,v 1.10 90/07/17 16:46:52 william Exp $";
  268.   #endif
  269.   
  270. ***************
  271. *** 14,19 ****
  272.   #include "types.h"
  273.   
  274. - #include "color.e"
  275.   #include "choice.e"
  276.   #include "cursor.e"
  277.   #include "drawing.e"
  278. --- 14,19 ----
  279.   #include "types.h"
  280.   
  281.   #include "choice.e"
  282. + #include "color.e"
  283.   #include "cursor.e"
  284.   #include "drawing.e"
  285. ***************
  286. *** 216,219 ****
  287. --- 216,223 ----
  288.      XSizeHints    sizehints;
  289.      XColor    color;
  290. +    if ((c_ptr = XGetDefault (mainDisplay, TOOL_NAME, "Synchronize")) != NULL)
  291. +       if ((strcmp (c_ptr, "on") == 0) || (strcmp (c_ptr, "On") == 0))
  292. +          XSynchronize (mainDisplay, True);
  293.   
  294.      colorDisplay = (DisplayPlanes (mainDisplay, mainScreen) == 1) ? FALSE : TRUE;
  295. *** special.c.orig    Thu Aug  2 09:46:52 1990
  296. --- special.c    Thu Aug  2 09:46:53 1990
  297. ***************
  298. *** 6,10 ****
  299.   #ifndef lint
  300.   static char RCSid[] =
  301. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/special.c,v 1.4 90/06/26 13:05:00 william Exp $";
  302.   #endif
  303.   
  304. --- 6,10 ----
  305.   #ifndef lint
  306.   static char RCSid[] =
  307. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/special.c,v 1.6 90/07/30 11:00:16 william Exp $";
  308.   #endif
  309.   
  310. ***************
  311. *** 84,90 ****
  312.         if (strcmp (obj_name, "sym") == 0)
  313.         {
  314. !          ReadGroupObj (FP, &obj_ptr);
  315.            obj_ptr->type = OBJ_ICON;
  316. !          while (ReadAttr (FP, &attr_ptr))
  317.            {
  318.               attr_ptr->owner = obj_ptr;
  319. --- 84,90 ----
  320.         if (strcmp (obj_name, "sym") == 0)
  321.         {
  322. !          ReadGroupObj (FP, &obj_ptr, FALSE);
  323.            obj_ptr->type = OBJ_ICON;
  324. !          while (ReadAttr (FP, &attr_ptr, FALSE))
  325.            {
  326.               attr_ptr->owner = obj_ptr;
  327. ***************
  328. *** 106,110 ****
  329.         {
  330.            importingFile = TRUE; /* ignore 'state' info but set fileVersion */
  331. !          ReadState (inbuf);
  332.            importingFile = FALSE;
  333.         }
  334. --- 106,110 ----
  335.         {
  336.            importingFile = TRUE; /* ignore 'state' info but set fileVersion */
  337. !          ReadState (inbuf, FALSE);
  338.            importingFile = FALSE;
  339.         }
  340. *** spline.c.orig    Thu Aug  2 09:47:05 1990
  341. --- spline.c    Thu Aug  2 09:47:07 1990
  342. ***************
  343. *** 6,10 ****
  344.   #ifndef lint
  345.   static char RCSid[] =
  346. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/spline.c,v 1.2 90/05/22 14:38:02 william Exp $";
  347.   #endif
  348.   
  349. --- 6,10 ----
  350.   #ifndef lint
  351.   static char RCSid[] =
  352. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/spline.c,v 1.3 90/07/16 10:58:15 william Exp $";
  353.   #endif
  354.   
  355. *** stk.c.orig    Thu Aug  2 09:47:13 1990
  356. --- stk.c    Thu Aug  2 09:47:14 1990
  357. ***************
  358. *** 6,10 ****
  359.   #ifndef lint
  360.   static char RCSid[] =
  361. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stk.c,v 1.3 90/06/26 00:11:30 william Exp $";
  362.   #endif
  363.   
  364. --- 6,10 ----
  365.   #ifndef lint
  366.   static char RCSid[] =
  367. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stk.c,v 1.5 90/07/30 11:00:40 william Exp $";
  368.   #endif
  369.   
  370. ***************
  371. *** 110,114 ****
  372.      XClearWindow (mainDisplay, drawWindow);
  373.   
  374. !    while (ReadObj (fp, &obj_ptr))
  375.         if (obj_ptr != NULL)
  376.         {
  377. --- 110,114 ----
  378.      XClearWindow (mainDisplay, drawWindow);
  379.   
  380. !    while (ReadObj (fp, &obj_ptr, FALSE))
  381.         if (obj_ptr != NULL)
  382.         {
  383. ***************
  384. *** 210,212 ****
  385. --- 210,223 ----
  386.      XSync (mainDisplay, TRUE);
  387.      justDupped = FALSE;
  388. + }
  389. + void CleanUpStk ()
  390. + {
  391. +    for ( ; topStk != NULL; topStk = topStk->next)
  392. +    {
  393. +       topObj = topStk->first;
  394. +       botObj = topStk->last;
  395. +       DelAllObj ();
  396. +       cfree (topStk);
  397. +    }
  398.   }
  399. *** stretch.c.orig    Thu Aug  2 09:47:52 1990
  400. --- stretch.c    Thu Aug  2 09:47:56 1990
  401. ***************
  402. *** 6,10 ****
  403.   #ifndef lint
  404.   static char RCSid[] =
  405. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stretch.c,v 1.4 90/06/26 00:11:32 william Exp $";
  406.   #endif
  407.   
  408. --- 6,10 ----
  409.   #ifndef lint
  410.   static char RCSid[] =
  411. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stretch.c,v 1.8 90/08/02 08:57:17 william Exp $";
  412.   #endif
  413.   
  414. ***************
  415. *** 105,109 ****
  416.   }
  417.   
  418. - static
  419.   int PtInPolyMark (XOff, YOff, NumPts, V, Index)
  420.      int        XOff, YOff, NumPts, * Index;
  421. --- 105,108 ----
  422. ***************
  423. *** 531,534 ****
  424. --- 530,552 ----
  425.      SelBox (drawWindow, revDefaultGC, stretched_ltx, stretched_lty,
  426.            stretched_rbx, stretched_rby);
  427. +    if (ltx == rbx)
  428. +    {
  429. +       Msg ("Can not stretch!  Object has ZERO width!");
  430. +       SelBox (drawWindow, revDefaultGC, stretched_ltx, stretched_lty,
  431. +             stretched_rbx, stretched_rby);
  432. +       SelBox (drawWindow, revDefaultGC, stretched_sel_ltx-1,
  433. +             stretched_sel_lty-1, stretched_sel_rbx+1, stretched_sel_rby+1);
  434. +       return;
  435. +    }
  436. +    else if (lty == rby)
  437. +    {
  438. +       Msg ("Can not stretch!  Object has ZERO height!");
  439. +       SelBox (drawWindow, revDefaultGC, stretched_ltx, stretched_lty,
  440. +             stretched_rbx, stretched_rby);
  441. +       SelBox (drawWindow, revDefaultGC, stretched_sel_ltx-1,
  442. +             stretched_sel_lty-1, stretched_sel_rbx+1, stretched_sel_rby+1);
  443. +       return;
  444. +    }
  445.   
  446.      obj_w = (double)(moveX - pivotX);
  447. *** text.c.orig    Thu Aug  2 09:48:37 1990
  448. --- text.c    Thu Aug  2 09:48:39 1990
  449. ***************
  450. *** 6,10 ****
  451.   #ifndef lint
  452.   static char RCSid[] =
  453. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/text.c,v 1.6 90/06/26 00:11:37 william Exp $";
  454.   #endif
  455.   
  456. --- 6,10 ----
  457.   #ifndef lint
  458.   static char RCSid[] =
  459. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/text.c,v 1.9 90/07/30 11:02:09 william Exp $";
  460.   #endif
  461.   
  462. ***************
  463. *** 26,29 ****
  464. --- 26,30 ----
  465.   #include "pattern.e"
  466.   #include "poly.e"
  467. + #include "prtgif.e"
  468.   #include "raster.e"
  469.   #include "ruler.e"
  470. ***************
  471. *** 368,372 ****
  472.   }
  473.   
  474. - static
  475.   void SetTextBBox (ObjPtr, Just, W, H, Rotate)
  476.      struct ObjRec    * ObjPtr;
  477. --- 369,372 ----
  478. ***************
  479. *** 1380,1386 ****
  480.   }
  481.   
  482. ! void DumpTextObj (FP, ObjPtr)
  483.      FILE                * FP;
  484.      register struct ObjRec    * ObjPtr;
  485.   {
  486.      int            x, y, font_size, xinc, yinc;
  487. --- 1380,1387 ----
  488.   }
  489.   
  490. ! void DumpTextObj (FP, ObjPtr, PRTGIF)
  491.      FILE                * FP;
  492.      register struct ObjRec    * ObjPtr;
  493. +    int                PRTGIF;
  494.   {
  495.      int            x, y, font_size, xinc, yinc;
  496. ***************
  497. *** 1390,1394 ****
  498.      if (text_ptr->pen == NONEPAT) return;
  499.   
  500. !    SaveCurFont ();
  501.      curFont = text_ptr->font;
  502.      curStyle = text_ptr->style;
  503. --- 1391,1396 ----
  504.      if (text_ptr->pen == NONEPAT) return;
  505.   
  506. !    if (!PRTGIF) SaveCurFont ();
  507.      curFont = text_ptr->font;
  508.      curStyle = text_ptr->style;
  509. ***************
  510. *** 1397,1402 ****
  511.      curRotate = text_ptr->rotate;
  512.      penPat = text_ptr->pen;
  513. -    SetCanvasFont ();
  514.   
  515.      x = ObjPtr->x;
  516.      y = ObjPtr->y;
  517. --- 1399,1412 ----
  518.      curRotate = text_ptr->rotate;
  519.      penPat = text_ptr->pen;
  520.   
  521. +    if (PRTGIF)
  522. +    {
  523. +       textCursorH = pDrawCursorH[FontIndex(curFont,curSize,curStyle)];
  524. +       canvasFontAsc = pDrawFontAsc[FontIndex(curFont,curSize,curStyle)];
  525. +       canvasFontDes = pDrawFontDes[FontIndex(curFont,curSize,curStyle)];
  526. +    }
  527. +    else
  528. +       SetCanvasFont ();
  529.      x = ObjPtr->x;
  530.      y = ObjPtr->y;
  531. ***************
  532. *** 1510,1514 ****
  533.      fprintf (FP, "   grestore\n");
  534.   
  535. !    RestoreCurFont ();
  536.   }
  537.   
  538. --- 1520,1524 ----
  539.      fprintf (FP, "   grestore\n");
  540.   
  541. !    if (!PRTGIF) RestoreCurFont ();
  542.   }
  543.   
  544. ***************
  545. *** 1648,1654 ****
  546.   
  547.      fprintf (FP, "text(%s,", colorMenuItems[ObjPtr->color]);
  548. !    fprintf (FP, "%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,[\n", ObjPtr->x,
  549.            ObjPtr->y, t_ptr->font, t_ptr->style, t_ptr->size,
  550. !          t_ptr->lines, t_ptr->just, t_ptr->rotate, t_ptr->pen);
  551.   
  552.      for (s_ptr = t_ptr->first; s_ptr->next != NULL; s_ptr = s_ptr->next)
  553. --- 1658,1666 ----
  554.   
  555.      fprintf (FP, "text(%s,", colorMenuItems[ObjPtr->color]);
  556. !    fprintf (FP, "%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,%1d,[\n", ObjPtr->x,
  557.            ObjPtr->y, t_ptr->font, t_ptr->style, t_ptr->size,
  558. !          t_ptr->lines, t_ptr->just, t_ptr->rotate, t_ptr->pen,
  559. !          ObjPtr->obbox.rbx-ObjPtr->obbox.ltx,
  560. !          ObjPtr->obbox.rby-ObjPtr->obbox.lty);
  561.   
  562.      for (s_ptr = t_ptr->first; s_ptr->next != NULL; s_ptr = s_ptr->next)
  563. ***************
  564. *** 1677,1684 ****
  565.   }
  566.   
  567. ! void ReadTextObj (FP, Inbuf, ObjPtr)
  568.      FILE            * FP;
  569.      char            * Inbuf;
  570.      struct ObjRec    * * ObjPtr;
  571.   {
  572.      register int        i, max_len = 0, len;
  573. --- 1689,1697 ----
  574.   }
  575.   
  576. ! void ReadTextObj (FP, Inbuf, ObjPtr, PRTGIF)
  577.      FILE            * FP;
  578.      char            * Inbuf;
  579.      struct ObjRec    * * ObjPtr;
  580. +    int            PRTGIF;
  581.   {
  582.      register int        i, max_len = 0, len;
  583. ***************
  584. *** 1689,1692 ****
  585. --- 1702,1706 ----
  586.      int            num_lines, x, y, font, style, size;
  587.      int            text_just, rotate, pen;
  588. +    int            bbox_w, bbox_h;
  589.   
  590.      * ObjPtr = (struct ObjRec *) calloc (1, sizeof(struct ObjRec));
  591. ***************
  592. *** 1700,1706 ****
  593.         pen = 1;
  594.      }
  595. !    else
  596.         sscanf (s, "%d , %d , %d , %d , %d , %d , %d , %d , %d", &x, &y, &font,
  597.               &style, &size, &num_lines, &text_just, &rotate, &pen);
  598.   
  599.      text_ptr = (struct TextRec *) calloc (1, sizeof(struct TextRec));
  600. --- 1714,1725 ----
  601.         pen = 1;
  602.      }
  603. !    else if (fileVersion <= 6)
  604.         sscanf (s, "%d , %d , %d , %d , %d , %d , %d , %d , %d", &x, &y, &font,
  605.               &style, &size, &num_lines, &text_just, &rotate, &pen);
  606. +    else
  607. +       sscanf (s,
  608. +             "%d , %d , %d , %d , %d , %d , %d , %d , %d , %d , %d",
  609. +             &x, &y, &font, &style, &size, &num_lines, &text_just, &rotate, &pen,
  610. +             &bbox_w, &bbox_h);
  611.   
  612.      text_ptr = (struct TextRec *) calloc (1, sizeof(struct TextRec));
  613. ***************
  614. *** 1710,1714 ****
  615.      text_ptr->pen = pen;
  616.   
  617. !    SaveCurFont ();
  618.      curFont = text_ptr->font = font;
  619.      curStyle = text_ptr->style = style;
  620. --- 1729,1734 ----
  621.      text_ptr->pen = pen;
  622.   
  623. !    if (!PRTGIF) SaveCurFont ();
  624.      curFont = text_ptr->font = font;
  625.      curStyle = text_ptr->style = style;
  626. ***************
  627. *** 1716,1721 ****
  628.      textJust = text_just;
  629.      curRotate = rotate;
  630. -    SetCanvasFont ();
  631.   
  632.      for (i = 0; i < num_lines; i++)
  633.      {
  634. --- 1736,1749 ----
  635.      textJust = text_just;
  636.      curRotate = rotate;
  637.   
  638. +    if (PRTGIF)
  639. +    {
  640. +       penPat = pen;
  641. +       textCursorH = pDrawCursorH[FontIndex(curFont,curSize,curStyle)];
  642. +       canvasFontAsc = pDrawFontAsc[FontIndex(curFont,curSize,curStyle)];
  643. +    }
  644. +    else
  645. +       SetCanvasFont ();
  646.      for (i = 0; i < num_lines; i++)
  647.      {
  648. ***************
  649. *** 1727,1731 ****
  650.         strcpy (s_ptr->s, tmp_str);
  651.         AddStr (lastStr, NULL, s_ptr);
  652. !       len = XTextWidth (canvasFontPtr, tmp_str, strlen (tmp_str));
  653.         if (len > max_len) max_len = len;
  654.      }
  655. --- 1755,1762 ----
  656.         strcpy (s_ptr->s, tmp_str);
  657.         AddStr (lastStr, NULL, s_ptr);
  658. !       if (PRTGIF)
  659. !          len = strlen (tmp_str); /* assume string width = 1 pixel per char */
  660. !       else
  661. !          len = XTextWidth (canvasFontPtr, tmp_str, strlen (tmp_str));
  662.         if (len > max_len) max_len = len;
  663.      }
  664. ***************
  665. *** 1739,1743 ****
  666.      (*ObjPtr)->y = y;
  667.   
  668. !    SetTextBBox (*ObjPtr, text_just, max_len, num_lines*textCursorH, rotate);
  669.   
  670.      (*ObjPtr)->type = OBJ_TEXT;
  671. --- 1770,1777 ----
  672.      (*ObjPtr)->y = y;
  673.   
  674. !    if (PRTGIF && fileVersion > 6)
  675. !       SetTextBBox (*ObjPtr, text_just, bbox_w, bbox_h, rotate);
  676. !    else
  677. !       SetTextBBox (*ObjPtr, text_just, max_len, num_lines*textCursorH, rotate);
  678.   
  679.      (*ObjPtr)->type = OBJ_TEXT;
  680. ***************
  681. *** 1745,1749 ****
  682.      (*ObjPtr)->detail.t = text_ptr;
  683.   
  684. !    RestoreCurFont ();
  685.   }
  686.   
  687. --- 1779,1783 ----
  688.      (*ObjPtr)->detail.t = text_ptr;
  689.   
  690. !    if (!PRTGIF) RestoreCurFont ();
  691.   }
  692.   
  693. *** tgif.c.orig    Thu Aug  2 09:48:48 1990
  694. --- tgif.c    Thu Aug  2 09:48:50 1990
  695. ***************
  696. *** 6,10 ****
  697.   #ifndef lint
  698.   static char RCSid[] =
  699. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.c,v 1.4 90/05/17 08:23:08 william Exp $";
  700.   #endif
  701.   
  702. --- 6,10 ----
  703.   #ifndef lint
  704.   static char RCSid[] =
  705. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.c,v 1.6 90/07/30 11:04:46 william Exp $";
  706.   #endif
  707.   
  708. ***************
  709. *** 19,22 ****
  710. --- 19,27 ----
  711.   
  712.   /* extern int    malloc_debug (); */
  713. + int    lastFile;
  714. + short    * pDrawCursorH;
  715. + short    * pDrawFontAsc;
  716. + short    * pDrawFontDes;
  717.   
  718.   static
  719. *** version.c.orig    Thu Aug  2 09:48:56 1990
  720. --- version.c    Thu Aug  2 09:48:57 1990
  721. ***************
  722. *** 6,11 ****
  723.   #ifndef lint
  724.   static char RCSid[] =
  725. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/version.c,v 1.12 90/06/26 08:47:59 william Exp $";
  726.   #endif
  727.   
  728. ! char    * version_string = "1.9";
  729. --- 6,11 ----
  730.   #ifndef lint
  731.   static char RCSid[] =
  732. !       "@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/version.c,v 1.15 90/08/02 09:05:03 william Exp $";
  733.   #endif
  734.   
  735. ! char    * version_string = "1.12";
  736. *** attr.e.orig    Thu Aug  2 09:49:02 1990
  737. --- attr.e    Thu Aug  2 09:49:03 1990
  738. ***************
  739. *** 4,8 ****
  740.    * Copyright (C) 1989, William Cheng.
  741.    *
  742. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/attr.e,v 1.1 90/04/01 22:16:53 william Exp $
  743.    */
  744.   
  745. --- 4,8 ----
  746.    * Copyright (C) 1989, William Cheng.
  747.    *
  748. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/attr.e,v 1.2 90/07/30 11:09:08 william Exp $
  749.    */
  750.   
  751. *** color.e.orig    Thu Aug  2 09:49:08 1990
  752. --- color.e    Thu Aug  2 09:49:08 1990
  753. ***************
  754. *** 4,8 ****
  755.    * Copyright (C) 1989, William Cheng.
  756.    *
  757. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/color.e,v 1.4 90/05/07 15:24:58 william Exp $
  758.    */
  759.   
  760. --- 4,8 ----
  761.    * Copyright (C) 1989, William Cheng.
  762.    *
  763. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/color.e,v 1.6 90/07/15 17:42:49 william Exp $
  764.    */
  765.   
  766. ***************
  767. *** 19,20 ****
  768. --- 19,21 ----
  769.   extern void    ChangeAllSelColor ();
  770.   extern void    ColorMenu ();
  771. + extern void    CleanUpColors ();
  772. *** cursor.e.orig    Thu Aug  2 09:49:13 1990
  773. --- cursor.e    Thu Aug  2 09:49:14 1990
  774. ***************
  775. *** 4,8 ****
  776.    * Copyright (C) 1989, William Cheng.
  777.    *
  778. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/cursor.e,v 1.1 90/04/01 22:16:57 william Exp $
  779.    */
  780.   
  781. --- 4,8 ----
  782.    * Copyright (C) 1989, William Cheng.
  783.    *
  784. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/cursor.e,v 1.3 90/07/08 00:33:40 william Exp $
  785.    */
  786.   
  787. *** dup.e.orig    Thu Aug  2 09:49:19 1990
  788. --- dup.e    Thu Aug  2 09:49:20 1990
  789. ***************
  790. *** 4,8 ****
  791.    * Copyright (C) 1989, William Cheng.
  792.    *
  793. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/dup.e,v 1.1 90/04/01 22:17:00 william Exp $
  794.    */
  795.   
  796. --- 4,8 ----
  797.    * Copyright (C) 1989, William Cheng.
  798.    *
  799. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/dup.e,v 1.2 90/07/06 18:00:44 william Exp $
  800.    */
  801.   
  802. ***************
  803. *** 14,15 ****
  804. --- 14,16 ----
  805.   extern void    DupTextObj ();
  806.   extern void    DupSelObj ();
  807. + extern void    JustDupSelObj ();
  808. *** edit.e.orig    Thu Aug  2 09:49:24 1990
  809. --- edit.e    Thu Aug  2 09:49:25 1990
  810. ***************
  811. *** 4,10 ****
  812.    * Copyright (C) 1989, William Cheng.
  813.    *
  814. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/edit.e,v 1.1 90/04/01 22:17:02 william Exp $
  815.    */
  816.   
  817.   extern void    EditMenu ();
  818.   extern void    FrontProc ();
  819. --- 4,12 ----
  820.    * Copyright (C) 1989, William Cheng.
  821.    *
  822. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/edit.e,v 1.2 90/07/04 21:07:20 william Exp $
  823.    */
  824.   
  825. + extern void    DeletePoint ();
  826. + extern void    AddPoint ();
  827.   extern void    EditMenu ();
  828.   extern void    FrontProc ();
  829. *** file.e.orig    Thu Aug  2 09:49:30 1990
  830. --- file.e    Thu Aug  2 09:49:31 1990
  831. ***************
  832. *** 4,8 ****
  833.    * Copyright (C) 1989, William Cheng.
  834.    *
  835. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/file.e,v 1.6 90/05/24 10:35:30 william Exp $
  836.    */
  837.   
  838. --- 4,8 ----
  839.    * Copyright (C) 1989, William Cheng.
  840.    *
  841. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/file.e,v 1.11 90/07/30 15:53:31 william Exp $
  842.    */
  843.   
  844. ***************
  845. *** 48,49 ****
  846. --- 48,51 ----
  847.   extern int    EscapeProc ();
  848.   extern int    FileMenu ();
  849. + extern void    CleanUpFiles ();
  850. + extern void    EmergencySave ();
  851. *** font.e.orig    Thu Aug  2 09:49:36 1990
  852. --- font.e    Thu Aug  2 09:49:38 1990
  853. ***************
  854. *** 4,8 ****
  855.    * Copyright (C) 1989, William Cheng.
  856.    *
  857. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/font.e,v 1.1 90/04/01 22:17:04 william Exp $
  858.    */
  859.   
  860. --- 4,8 ----
  861.    * Copyright (C) 1989, William Cheng.
  862.    *
  863. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/font.e,v 1.3 90/07/20 16:59:06 william Exp $
  864.    */
  865.   
  866. ***************
  867. *** 27,30 ****
  868. --- 27,31 ----
  869.   
  870.   extern int    pointSize[];
  871. + extern int    curFontDPI;
  872.   extern int    curFont;
  873.   extern int    curSize;
  874. *** grid.e.orig    Thu Aug  2 09:49:42 1990
  875. --- grid.e    Thu Aug  2 09:49:43 1990
  876. ***************
  877. *** 4,8 ****
  878.    * Copyright (C) 1989, William Cheng.
  879.    *
  880. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/grid.e,v 1.1 90/04/01 22:17:05 william Exp $
  881.    */
  882.   
  883. --- 4,8 ----
  884.    * Copyright (C) 1989, William Cheng.
  885.    *
  886. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/grid.e,v 1.3 90/07/16 10:18:50 william Exp $
  887.    */
  888.   
  889. ***************
  890. *** 9,13 ****
  891.   extern int    gridOn;
  892.   extern int    xyGrid;
  893. - extern int    curScale;
  894.   extern int    pageStyle;
  895.   extern int    whereToPrint;
  896. --- 9,12 ----
  897. ***************
  898. *** 26,27 ****
  899. --- 25,27 ----
  900.   extern void    LayoutMenu ();
  901.   extern void    GridXY ();
  902. + extern void    CleanUpGrids ();
  903. *** mainloop.e.orig    Thu Aug  2 09:49:47 1990
  904. --- mainloop.e    Thu Aug  2 09:49:47 1990
  905. ***************
  906. *** 4,11 ****
  907.    * Copyright (C) 1989, William Cheng.
  908.    *
  909. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/mainloop.e,v 1.1 90/04/29 22:38:38 william Exp $
  910.    */
  911.   
  912.   extern int    geometrySpecified;
  913.   extern char    geometrySpec[];
  914.   extern char    initMsg1[];
  915. --- 4,12 ----
  916.    * Copyright (C) 1989, William Cheng.
  917.    *
  918. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/mainloop.e,v 1.2 90/07/17 18:04:57 william Exp $
  919.    */
  920.   
  921.   extern int    geometrySpecified;
  922. + extern int    exitNormally;
  923.   extern char    geometrySpec[];
  924.   extern char    initMsg1[];
  925. *** pattern.e.orig    Thu Aug  2 09:49:52 1990
  926. --- pattern.e    Thu Aug  2 09:49:53 1990
  927. ***************
  928. *** 4,8 ****
  929.    * Copyright (C) 1989, William Cheng.
  930.    *
  931. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/pattern.e,v 1.1 90/04/01 22:17:14 william Exp $
  932.    */
  933.   
  934. --- 4,8 ----
  935.    * Copyright (C) 1989, William Cheng.
  936.    *
  937. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/pattern.e,v 1.3 90/07/11 21:25:59 william Exp $
  938.    */
  939.   
  940. ***************
  941. *** 18,21 ****
  942. --- 18,22 ----
  943.   extern void    ChangeAllSelLineWidth ();
  944.   extern void    ChangeAllSelPen ();
  945. + extern void    ToggleAllSelLineType ();
  946.   extern void    ModeMenu ();
  947.   extern void    FillMenu ();
  948. *** raster.e.orig    Thu Aug  2 09:50:00 1990
  949. --- raster.e    Thu Aug  2 09:50:00 1990
  950. ***************
  951. *** 4,8 ****
  952.    * Copyright (C) 1989, William Cheng.
  953.    *
  954. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/raster.e,v 1.1 90/04/01 22:17:17 william Exp $
  955.    */
  956.   
  957. --- 4,8 ----
  958.    * Copyright (C) 1989, William Cheng.
  959.    *
  960. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/raster.e,v 1.2 90/07/16 09:10:17 william Exp $
  961.    */
  962.   
  963. ***************
  964. *** 15,20 ****
  965.   extern GC    defaultGC;
  966.   extern GC    revDefaultGC;
  967. - extern Pixmap    colorPxMp[];
  968.   
  969.   extern Pixmap    choicePixmap[];
  970. --- 15,18 ----
  971. *** select.e.orig    Thu Aug  2 09:50:05 1990
  972. --- select.e    Thu Aug  2 09:50:06 1990
  973. ***************
  974. *** 4,8 ****
  975.    * Copyright (C) 1989, William Cheng.
  976.    *
  977. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/select.e,v 1.1 90/04/01 22:17:20 william Exp $
  978.    */
  979.   
  980. --- 4,8 ----
  981.    * Copyright (C) 1989, William Cheng.
  982.    *
  983. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/select.e,v 1.2 90/07/06 18:02:44 william Exp $
  984.    */
  985.   
  986. ***************
  987. *** 21,25 ****
  988. --- 21,27 ----
  989.   extern void    MoveSelToTop ();
  990.   extern void    MoveSelToBot ();
  991. + extern void    DelAllCutSel ();
  992.   extern void    UndoDelete ();
  993. + extern void    CopySelToCut ();
  994.   extern void    DelAllSelObj ();
  995.   extern void    GroupSelObj ();
  996. *** stk.e.orig    Thu Aug  2 09:50:11 1990
  997. --- stk.e    Thu Aug  2 09:50:12 1990
  998. ***************
  999. *** 4,8 ****
  1000.    * Copyright (C) 1989, William Cheng.
  1001.    *
  1002. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stk.e,v 1.1 90/04/01 22:17:24 william Exp $
  1003.    */
  1004.   
  1005. --- 4,8 ----
  1006.    * Copyright (C) 1989, William Cheng.
  1007.    *
  1008. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stk.e,v 1.2 90/07/16 09:30:53 william Exp $
  1009.    */
  1010.   
  1011. ***************
  1012. *** 10,11 ****
  1013. --- 10,12 ----
  1014.   extern void    PushIcon ();
  1015.   extern void    PopIcon ();
  1016. + extern void    CleanUpStk ();
  1017. *** stretch.e.orig    Thu Aug  2 09:50:17 1990
  1018. --- stretch.e    Thu Aug  2 09:50:18 1990
  1019. ***************
  1020. *** 4,10 ****
  1021.    * Copyright (C) 1989, William Cheng.
  1022.    *
  1023. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stretch.e,v 1.1 90/04/01 22:17:25 william Exp $
  1024.    */
  1025.   
  1026.   extern struct SelRec    * PtInSelMark ();
  1027.   extern void    StretchSel ();
  1028. --- 4,11 ----
  1029.    * Copyright (C) 1989, William Cheng.
  1030.    *
  1031. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/stretch.e,v 1.2 90/07/07 01:48:10 william Exp $
  1032.    */
  1033.   
  1034. + extern int    * PtInPolyMark ();
  1035.   extern struct SelRec    * PtInSelMark ();
  1036.   extern void    StretchSel ();
  1037. *** text.e.orig    Thu Aug  2 09:50:24 1990
  1038. --- text.e    Thu Aug  2 09:50:25 1990
  1039. ***************
  1040. *** 4,8 ****
  1041.    * Copyright (C) 1989, William Cheng.
  1042.    *
  1043. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/text.e,v 1.1 90/04/01 22:17:26 william Exp $
  1044.    */
  1045.   
  1046. --- 4,8 ----
  1047.    * Copyright (C) 1989, William Cheng.
  1048.    *
  1049. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/text.e,v 1.2 90/07/27 09:33:44 william Exp $
  1050.    */
  1051.   
  1052. ***************
  1053. *** 18,21 ****
  1054. --- 18,22 ----
  1055.   extern void    EraseTextCursor ();
  1056.   extern void    NewCurText ();
  1057. + extern void    SetTextBBox ();
  1058.   extern void    UpdTextBBox ();
  1059.   extern void    FreeTextObj ();
  1060. *** types.h.orig    Thu Aug  2 09:50:32 1990
  1061. --- types.h    Thu Aug  2 09:50:33 1990
  1062. ***************
  1063. *** 4,8 ****
  1064.    * Copyright (C) 1990, William Cheng.
  1065.    *
  1066. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/types.h,v 1.3 90/05/18 20:23:48 william Exp $
  1067.    */
  1068.   
  1069. --- 4,8 ----
  1070.    * Copyright (C) 1990, William Cheng.
  1071.    *
  1072. !  * @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/types.h,v 1.4 90/07/30 15:53:05 william Exp $
  1073.    */
  1074.   
  1075. *** Makefile.noimake.orig    Thu Aug  2 09:50:44 1990
  1076. --- Makefile.noimake    Thu Aug  2 09:50:45 1990
  1077. ***************
  1078. *** 4,8 ****
  1079.   # Copyright (C) 1990, William Cheng.
  1080.   #
  1081. ! # @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Makefile.noimake,v 1.10 90/06/13 14:32:34 william Exp $
  1082.   #
  1083.   
  1084. --- 4,8 ----
  1085.   # Copyright (C) 1990, William Cheng.
  1086.   #
  1087. ! # @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Makefile.noimake,v 1.19 90/07/30 11:05:05 william Exp $
  1088.   #
  1089.   
  1090. ***************
  1091. *** 19,23 ****
  1092.   OBJ1 =    align.o animate.o attr.o \
  1093.       box.o button.o \
  1094. !     color.o choice.o cursor.o \
  1095.       dialog.o drawing.o dup.o \
  1096.       edit.o \
  1097. --- 19,23 ----
  1098.   OBJ1 =    align.o animate.o attr.o \
  1099.       box.o button.o \
  1100. !     choice.o color.o cursor.o \
  1101.       dialog.o drawing.o dup.o \
  1102.       edit.o \
  1103. ***************
  1104. *** 53,56 ****
  1105. --- 53,58 ----
  1106.       bitmaps/poly.bm bitmaps/polygon.bm bitmaps/printer.bm bitmaps/text.bm
  1107.   
  1108. + NAMES_BM = bitmaps/uparrow.bm bitmaps/downarrow.bm
  1109.   SCROLL_BM = bitmaps/uparrow.bm bitmaps/downarrow.bm bitmaps/rightarrow.bm \
  1110.       bitmaps/leftarrow.bm
  1111. ***************
  1112. *** 87,92 ****
  1113.   button.o:    const.h types.h \
  1114.           box.e cursor.e font.e mainloop.e raster.e rect.e setup.e
  1115. - color.o:    const.h types.h \
  1116. -         choice.e mark.e menu.e obj.e raster.e select.e setup.e text.e
  1117.   choice.o:    const.h types.h \
  1118.           align.e box.e color.e cursor.e font.e grid.e mark.e msg.e \
  1119. --- 89,92 ----
  1120. ***************
  1121. *** 93,99 ****
  1122.           oval.e pattern.e poly.e polygon.e raster.e select.e setup.e \
  1123.           text.e
  1124.   cursor.o:    const.h types.h $(CURSOR_BM) choice.e setup.e
  1125. ! tgif.o:        const.h types.h mainloop.e setup.e version.e
  1126. ! dialog.o:    const.h cursor.e box.e font.e mainloop.e raster.e setup.e
  1127.   drawing.o:    const.h types.h \
  1128.           align.e animate.e attr.e box.e choice.e cursor.e dialog.e \
  1129. --- 93,100 ----
  1130.           oval.e pattern.e poly.e polygon.e raster.e select.e setup.e \
  1131.           text.e
  1132. + color.o:    const.h types.h \
  1133. +         choice.e mark.e menu.e obj.e raster.e select.e setup.e text.e
  1134.   cursor.o:    const.h types.h $(CURSOR_BM) choice.e setup.e
  1135. ! dialog.o:    const.h box.e cursor.e font.e mainloop.e raster.e setup.e
  1136.   drawing.o:    const.h types.h \
  1137.           align.e animate.e attr.e box.e choice.e cursor.e dialog.e \
  1138. ***************
  1139. *** 105,118 ****
  1140.           attr.e drawing.e grid.e obj.e select.e setup.e
  1141.   edit.o:        const.h types.h \
  1142. !         align.e color.e drawing.e dup.e group.e mark.e obj.e \
  1143. !         raster.e select.e setup.e stretch.e
  1144.   file.o:        const.h types.h \
  1145.           align.e attr.e box.e button.e choice.e color.e dialog.e \
  1146. !         drawing.e file.e font.e grid.e group.e menu.e msg.e \
  1147. !         poly.e polygon.e obj.e oval.e pattern.e rect.e ruler.e \
  1148. !         scroll.e select.e setup.e stk.e text.e
  1149.   font.o:        const.h types.h \
  1150. !         choice.e color.e drawing.e mark.e menu.e obj.e pattern.e \
  1151. !         raster.e select.e setup.e text.e
  1152.   grid.o:        const.h types.h \
  1153.           choice.e color.e drawing.e dup.e msg.e obj.e \
  1154. --- 106,119 ----
  1155.           attr.e drawing.e grid.e obj.e select.e setup.e
  1156.   edit.o:        const.h types.h \
  1157. !         align.e color.e cursor.e drawing.e dup.e font.e group.e mark.e \
  1158. !         obj.e poly.e raster.e select.e setup.e spline.e stretch.e
  1159.   file.o:        const.h types.h \
  1160.           align.e attr.e box.e button.e choice.e color.e dialog.e \
  1161. !         drawing.e font.e grid.e group.e mainloop.e menu.e msg.e \
  1162. !         names.e pattern.e poly.e polygon.e prtgif.e obj.e oval.e \
  1163. !         rect.e ruler.e scroll.e select.e setup.e stk.e text.e
  1164.   font.o:        const.h types.h \
  1165. !         choice.e color.e drawing.e mark.e menu.e obj.e \
  1166. !         pattern.e raster.e select.e setup.e text.e
  1167.   grid.o:        const.h types.h \
  1168.           choice.e color.e drawing.e dup.e msg.e obj.e \
  1169. ***************
  1170. *** 122,127 ****
  1171.   mainloop.o:    const.h types.h \
  1172.           animate.e choice.e color.e cursor.e dialog.e drawing.e \
  1173. !         file.e font.e menu.e msg.e names.e obj.e raster.e \
  1174. !         ruler.e scroll.e setup.e
  1175.   mark.o:        const.h types.h \
  1176.           raster.e setup.e select.e
  1177. --- 123,128 ----
  1178.   mainloop.o:    const.h types.h \
  1179.           animate.e choice.e color.e cursor.e dialog.e drawing.e \
  1180. !         file.e font.e grid.e menu.e msg.e names.e obj.e raster.e \
  1181. !         ruler.e scroll.e select.e setup.e stk.e text.e
  1182.   mark.o:        const.h types.h \
  1183.           raster.e setup.e select.e
  1184. ***************
  1185. *** 134,138 ****
  1186.           raster.e ruler.e select.e setup.e
  1187.   msg.o:        const.h types.h font.e raster.e setup.e
  1188. ! names.o:    const.h types.h $(SCROLL_BM) \
  1189.           box.e button.e cursor.e font.e mainloop.e raster.e scroll.e \
  1190.           setup.e
  1191. --- 135,139 ----
  1192.           raster.e ruler.e select.e setup.e
  1193.   msg.o:        const.h types.h font.e raster.e setup.e
  1194. ! names.o:    const.h types.h $(NAMES_BM) \
  1195.           box.e button.e cursor.e font.e mainloop.e raster.e scroll.e \
  1196.           setup.e
  1197. ***************
  1198. *** 143,149 ****
  1199.           color.e cursor.e file.e grid.e menu.e obj.e pattern.e \
  1200.           poly.e raster.e ruler.e select.e setup.e
  1201. ! prtgif.o:    const.h types.h \
  1202. !         attr.e box.e file.e font.e grid.e group.e obj.e oval.e \
  1203. !         pattern.e poly.e polygon.e setup.e text.e
  1204.   poly.o:        const.h types.h \
  1205.           attr.e color.e cursor.e drawing.e file.e grid.e obj.e \
  1206. --- 144,150 ----
  1207.           color.e cursor.e file.e grid.e menu.e obj.e pattern.e \
  1208.           poly.e raster.e ruler.e select.e setup.e
  1209. ! pattern.o:    const.h types.h \
  1210. !         choice.e drawing.e mark.e menu.e obj.e poly.e raster.e \
  1211. !         select.e setup.e spline.e
  1212.   poly.o:        const.h types.h \
  1213.           attr.e color.e cursor.e drawing.e file.e grid.e obj.e \
  1214. ***************
  1215. *** 152,158 ****
  1216.           color.e cursor.e dialog.e grid.e file.e obj.e \
  1217.           pattern.e poly.e raster.e ruler.e select.e setup.e spline.e
  1218. ! pattern.o:    const.h types.h \
  1219. !         choice.e drawing.e mark.e menu.e obj.e poly.e raster.e \
  1220. !         select.e setup.e spline.e
  1221.   raster.o:    const.h types.h $(RASTER_BM) \
  1222.           choice.e color.e font.e pattern.e setup.e
  1223. --- 153,158 ----
  1224.           color.e cursor.e dialog.e grid.e file.e obj.e \
  1225.           pattern.e poly.e raster.e ruler.e select.e setup.e spline.e
  1226. ! prtgif.o:    const.h types.h \
  1227. !         file.e grid.e obj.e setup.e
  1228.   raster.o:    const.h types.h $(RASTER_BM) \
  1229.           choice.e color.e font.e pattern.e setup.e
  1230. ***************
  1231. *** 166,173 ****
  1232.           move.e obj.e raster.e rect.e ruler.e setup.e stretch.e
  1233.   setup.o:    const.h types.h \
  1234. !         choice.e color.e cursor.e drawing.e font.e mainloop.e names.e \
  1235. !         raster.e ruler.e scroll.e
  1236.   spline.o:    const.h types.h \
  1237. !         poly.e rect.e raster.e setup.e
  1238.   special.o:    const.h types.h \
  1239.           animate.e attr.e choice.e color.e cursor.e dialog.e drawing.e \
  1240. --- 166,173 ----
  1241.           move.e obj.e raster.e rect.e ruler.e setup.e stretch.e
  1242.   setup.o:    const.h types.h \
  1243. !         choice.e color.e cursor.e drawing.e font.e mainloop.e menu.e \
  1244. !         names.e raster.e ruler.e scroll.e
  1245.   spline.o:    const.h types.h \
  1246. !         poly.e raster.e rect.e setup.e
  1247.   special.o:    const.h types.h \
  1248.           animate.e attr.e choice.e color.e cursor.e dialog.e drawing.e \
  1249. ***************
  1250. *** 183,187 ****
  1251.   text.o:        const.h types.h \
  1252.           attr.e choice.e color.e cursor.e dup.e file.e font.e \
  1253. !         grid.e obj.e pattern.e poly.e raster.e ruler.e setup.e
  1254.   version.o:
  1255.   
  1256. --- 183,188 ----
  1257.   text.o:        const.h types.h \
  1258.           attr.e choice.e color.e cursor.e dup.e file.e font.e \
  1259. !         grid.e obj.e pattern.e poly.e prtgif.e raster.e ruler.e setup.e
  1260. ! tgif.o:        const.h types.h mainloop.e setup.e version.e
  1261.   version.o:
  1262.   
  1263. *** Imakefile.orig    Thu Aug  2 09:50:53 1990
  1264. --- Imakefile    Thu Aug  2 09:50:54 1990
  1265. ***************
  1266. *** 4,14 ****
  1267.   /**/# Copyright (C) 1990, William Cheng.
  1268.   /**/#
  1269. ! /**/# @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Imakefile,v 1.16 90/06/26 08:48:16 william Exp $
  1270.   /**/#
  1271.   
  1272. ! TGIFVERSION    = 1.9
  1273.   PROGRAMS    = tgif prtgif tgif2ps frontend11.o
  1274.   CDEBUGFLAGS    = -g
  1275.   BINDIR        = /u/tangram/bin
  1276.   DEFINES        = -DTGIF_PATH=\"/u/tangram/u/william/X11/TGIF\" \
  1277.             -DPSFILE_MOD=\"664\"
  1278. --- 4,15 ----
  1279.   /**/# Copyright (C) 1990, William Cheng.
  1280.   /**/#
  1281. ! /**/# @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/Imakefile,v 1.21 90/08/02 09:15:42 william Exp $
  1282.   /**/#
  1283.   
  1284. ! TGIFVERSION    = 1.12
  1285.   PROGRAMS    = tgif prtgif tgif2ps frontend11.o
  1286.   CDEBUGFLAGS    = -g
  1287.   BINDIR        = /u/tangram/bin
  1288. + MANPATH        = /u/tangram/man
  1289.   DEFINES        = -DTGIF_PATH=\"/u/tangram/u/william/X11/TGIF\" \
  1290.             -DPSFILE_MOD=\"664\"
  1291. ***************
  1292. *** 56,60 ****
  1293.   MISCTAR = *.man README Copyright tgif.pl spice//**/*.mod example.tex
  1294.   
  1295. ! distr: tar shar version
  1296.   
  1297.   tar:
  1298. --- 57,61 ----
  1299.   MISCTAR = *.man README Copyright tgif.pl spice//**/*.mod example.tex
  1300.   
  1301. ! distr: tar version
  1302.   
  1303.   tar:
  1304. *** prtgif.man.orig    Thu Aug  2 09:51:00 1990
  1305. --- prtgif.man    Thu Aug  2 09:51:01 1990
  1306. ***************
  1307. *** 1,4 ****
  1308. ! .\"@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.man,v 1.1 90/05/10 09:27:25 william Exp $
  1309. ! .TH PRTGIF 1 "Version 1.0" "PrTgif"
  1310.   .SH NAME
  1311.   \fIprtgif\fR \- Prints a \fItgif\fR object file without opening windows
  1312. --- 1,4 ----
  1313. ! .\"@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.man,v 1.2 90/07/17 17:01:52 william Exp $
  1314. ! .TH PRTGIF 1 "Version 1.10 or above" "PrTgif"
  1315.   .SH NAME
  1316.   \fIprtgif\fR \- Prints a \fItgif\fR object file without opening windows
  1317. ***************
  1318. *** 6,17 ****
  1319.   .SH SYNOPSIS
  1320.   .B prtgif
  1321. ! \fIfile\fR
  1322.   .SH DESCRIPTION
  1323. ! \fIprtgif\fR prints \fIfile.obj\fR into a PostScript(TM) page description file,
  1324. ! /tmp/DRAW.PS, and pipes it to \fIlpr\fR.
  1325. ! .SH FILES
  1326. ! /tmp/DRAW.PS
  1327.   .SH SEE ALSO
  1328. ! \fBlpr\fR(1), \fBtgif\fR(1)
  1329.   .SH COPYRIGHT
  1330.   Please see the ``Copyright'' file for details on the copyrights.
  1331. --- 6,18 ----
  1332.   .SH SYNOPSIS
  1333.   .B prtgif
  1334. ! [\fB\-p\fR]
  1335. ! [\fIfile\fR]
  1336.   .SH DESCRIPTION
  1337. ! \fIprtgif\fR prints \fIfile.obj\fR into a PostScript(TM) page description file
  1338. ! and pipes it to \fIlpr\fR if the \fB\-p\fR option is not specified.  Otherwise,
  1339. ! it generates an encapsulated PostScript file in \fIfile.ps\fR.  (Note that
  1340. ! prtgif calls \fItgif2ps\fR, which should be found in the path.)
  1341.   .SH SEE ALSO
  1342. ! \fBlpr\fR(1), \fBtgif\fR(1), \fBtgif2ps\fR(1), \fBlatex\fR(1L)
  1343.   .SH COPYRIGHT
  1344.   Please see the ``Copyright'' file for details on the copyrights.
  1345. *** tgif.man.orig    Thu Aug  2 09:51:10 1990
  1346. --- tgif.man    Thu Aug  2 09:51:11 1990
  1347. ***************
  1348. *** 1,4 ****
  1349. ! .\"@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.man,v 1.6 90/06/05 12:19:24 william Exp $
  1350. ! .TH TGIF 1 "Version 1.6" "Tgif"
  1351.   .SH NAME
  1352.   \fItgif\fR \- Xlib based 2-D drawing facility under X11.  Also supports
  1353. --- 1,4 ----
  1354. ! .\"@(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.man,v 1.10 90/07/30 16:06:37 william Exp $
  1355. ! .TH TGIF 1 "Version 1.10 and Above" "Tgif"
  1356.   .SH NAME
  1357.   \fItgif\fR \- Xlib based 2-D drawing facility under X11.  Also supports
  1358. ***************
  1359. *** 14,18 ****
  1360.   specifies a file of objects to be initially edited by tgif.
  1361.   Tgif is purely based on \fIXlib\fR.
  1362. ! It is tested under X11-R3 and X11-R4, and
  1363.   it requires a 3 button mouse.
  1364.   .PP
  1365. --- 14,18 ----
  1366.   specifies a file of objects to be initially edited by tgif.
  1367.   Tgif is purely based on \fIXlib\fR.
  1368. ! It is tested under X11-R4, and
  1369.   it requires a 3 button mouse.
  1370.   .PP
  1371. ***************
  1372. *** 214,219 ****
  1373. --- 214,221 ----
  1374.     #.    scroll down\br
  1375.   \br
  1376. +  ^#A    add points to the selected poly or spline\br
  1377.    ^#B    change the text style to bold\br
  1378.    ^#C    change the text justification to center justified\br
  1379. +  ^#D    delete points from the selected poly or spline\br
  1380.    ^#G    toggle snapping to the grid points\br
  1381.    ^#I    make the selected complex object iconic\br
  1382. ***************
  1383. *** 229,232 ****
  1384. --- 231,235 ----
  1385.    ^#T    change the text style to italic\br
  1386.    ^#V    change the drawing mode to oval\br
  1387. +  ^#W    toggle between poly and spline\br
  1388.   .DE
  1389.   .br
  1390. ***************
  1391. *** 370,373 ****
  1392. --- 373,385 ----
  1393.   This specified the print command used for printing the PostScript file.
  1394.   Default is lpr (without any quotes).
  1395. + .TP
  1396. + .I Tgif*Synchronize: [on,off]
  1397. + XSynchronize is called if this default is set to \fIon\fR.  Default is
  1398. + \fIoff\fR.
  1399. + .TP
  1400. + .I Tgif*DoubleClickInterval: NUMBER
  1401. + This specifies the maximum interval (in milli-seconds)
  1402. + between two clicked to be recognized as one double-click.
  1403. + Default is 300.
  1404.   .SH ENVIRONMENT
  1405.   .TP
  1406. *** tgif.pl.orig    Thu Aug  2 09:51:18 1990
  1407. --- tgif.pl    Thu Aug  2 09:51:19 1990
  1408. ***************
  1409. *** 3,7 ****
  1410.   %    code.
  1411.   %
  1412. ! % @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.pl,v 1.2 90/05/10 15:22:58 william Exp $
  1413.   %
  1414.   
  1415. --- 3,7 ----
  1416.   %    code.
  1417.   %
  1418. ! % @(#)$Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/tgif.pl,v 1.3 90/07/30 17:30:05 william Exp $
  1419.   %
  1420.   
  1421. ***************
  1422. *** 13,17 ****
  1423.   
  1424.   tgif_text(FileVersion, Obj) :-
  1425. !     FileVersion >= 6,
  1426.       (    var(Obj) ->
  1427.           Obj = text(_Color,_X,_Y,_Font,_TextStyle,_TextSize,_NumLines,
  1428. --- 13,17 ----
  1429.   
  1430.   tgif_text(FileVersion, Obj) :-
  1431. !     FileVersion == 6,
  1432.       (    var(Obj) ->
  1433.           Obj = text(_Color,_X,_Y,_Font,_TextStyle,_TextSize,_NumLines,
  1434. ***************
  1435. *** 20,23 ****
  1436. --- 20,33 ----
  1437.       ;    Obj = text(_Color,_X,_Y,_Font,_TextStyle,_TextSize,_NumLines,
  1438.               _TextJust,_TextRotate,_PenPat,StrList)
  1439. +     ),
  1440. +     tgif_strs(FileVersion, StrList).
  1441. + tgif_text(FileVersion, Obj) :-
  1442. +     FileVersion >= 7,
  1443. +     (    var(Obj) ->
  1444. +         Obj = text(_Color,_X,_Y,_Font,_TextStyle,_TextSize,_NumLines,
  1445. +             _TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH,StrList),
  1446. +         call(Obj)
  1447. +     ;    Obj = text(_Color,_X,_Y,_Font,_TextStyle,_TextSize,_NumLines,
  1448. +             _TextJust,_TextRotate,_PenPat,_BBoxW,_BBoxH,StrList)
  1449.       ),
  1450.       tgif_strs(FileVersion, StrList).
  1451. *** prtgif.e.orig    Mon Jul 30 17:20:49 1990
  1452. --- prtgif.e    Mon Jul 30 17:20:55 1990
  1453. ***************
  1454. *** 0 ****
  1455. --- 1,12 ----
  1456. + /*
  1457. +  * Author:    William Chia-Wei Cheng (william@cs.ucla.edu)
  1458. +  *
  1459. +  * Copyright (C) 1990, William Cheng.
  1460. +  *
  1461. +  * @(#) $Header: /n/kona/u/tangram/u/william/X11/TGIF/RCS/prtgif.e,v 1.1 90/07/30 11:08:07 william Exp $
  1462. +  */
  1463. + extern int    lastFile;
  1464. + extern short    pDrawCursorH[];
  1465. + extern short    pDrawFontAsc[];
  1466. + extern short    pDrawFontDes[];
  1467. ---------------------------------> cut here <---------------------------------
  1468. --
  1469. Bill Cheng // UCLA Computer Science Department // (213) 206-7135
  1470. 3277 Boelter Hall // Los Angeles, California 90024 // USA
  1471. william@CS.UCLA.EDU      ...!{uunet|ucbvax}!cs.ucla.edu!william
  1472.  
  1473. dan
  1474. ----------------------------------------------------
  1475. O'Reilly && Associates   argv@sun.com / argv@ora.com
  1476. Opinions expressed reflect those of the author only.
  1477.