Article View: comp.sources.bugs
Article #4Tgif-2.12-patch12 (12th patch for tgif-2.12), Part 02/02
From: William Cheng
Date: Wed, 04 Nov 1992 07:44
Date: Wed, 04 Nov 1992 07:44
2763 lines
88920 bytes
88920 bytes
---------------------------------> cut here <---------------- Part 02/02 -----
*** prtgif.c.orig Tue Nov 3 22:29:21 1992
--- prtgif.c Tue Nov 3 22:29:22 1992
***************
*** 25,187 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/prtgif.c,v 2.21 1992/07/22 04:35:34 william Exp $";
#endif
#include <stdio.h>
- #include <X11/Xlib.h>
- #include "const.h"
- #include "patchlevel.h"
- #include "types.h"
! #include "file.e"
! #include "grid.e"
! #include "msg.e"
! #include "obj.e"
! #include "pattern.e"
! #include "setup.e"
! #include "version.e"
extern char * getenv ();
- /* extern int malloc_debug (); */
-
- int lastFile = TRUE;
-
- short pDrawFontAsc[] =
- {
- 8, 10, 12, 14, 17, 22,
- 8, 10, 12, 14, 17, 22,
- 8, 10, 12, 14, 17, 23,
- 8, 10, 12, 14, 17, 22,
- 8, 9, 11, 13, 15, 19,
- 7, 9, 11, 12, 15, 20,
- 7, 9, 11, 13, 15, 19,
- 7, 9, 11, 12, 15, 20,
- 9, 11, 12, 14, 18, 24,
- 9, 11, 12, 14, 17, 24,
- 9, 11, 12, 14, 17, 24,
- 9, 11, 12, 14, 17, 24,
- 8, 11, 12, 14, 18, 23,
- 8, 11, 12, 15, 18, 24,
- 8, 11, 12, 14, 16, 23,
- 8, 11, 12, 14, 16, 24,
- 8, 10, 12, 14, 18, 24,
- 9, 14, 15, 18, 23, 30,
- 10, 14, 16, 17, 23, 30,
- 9, 13, 15, 17, 22, 30,
- 9, 13, 15, 18, 22, 30,
- 9, 12, 14, 15, 19, 26,
- 9, 12, 14, 15, 21, 26,
- 9, 12, 14, 15, 19, 26,
- 9, 12, 14, 15, 20, 26,
- 11, 14, 16, 18, 24, 31,
- 11, 14, 16, 18, 24, 31,
- 11, 14, 16, 18, 24, 31,
- 11, 14, 16, 18, 24, 31,
- 11, 14, 16, 19, 24, 32,
- 11, 15, 16, 19, 24, 33,
- 11, 14, 16, 18, 23, 32,
- 11, 15, 16, 19, 24, 32,
- 11, 12, 13, 14, 19, 27
- };
-
- short pDrawFontDes[] =
- {
- 2, 3, 3, 4, 4, 6,
- 2, 3, 3, 4, 4, 6,
- 2, 3, 3, 4, 5, 6,
- 2, 3, 3, 3, 4, 6,
- 2, 2, 3, 3, 4, 5,
- 2, 2, 3, 4, 5, 5,
- 2, 2, 3, 3, 4, 5,
- 2, 2, 3, 4, 5, 5,
- 2, 2, 3, 3, 4, 5,
- 2, 2, 3, 3, 5, 5,
- 2, 2, 3, 3, 5, 5,
- 2, 2, 3, 3, 5, 5,
- 2, 2, 3, 3, 4, 5,
- 2, 2, 3, 3, 4, 5,
- 2, 2, 3, 3, 6, 5,
- 2, 2, 3, 3, 6, 5,
- 3, 4, 4, 6, 7, 8,
- 3, 3, 4, 4, 6, 7,
- 3, 3, 4, 4, 6, 7,
- 3, 4, 4, 5, 6, 7,
- 3, 3, 4, 4, 6, 7,
- 2, 3, 3, 4, 5, 6,
- 2, 4, 3, 5, 5, 7,
- 2, 3, 4, 4, 5, 6,
- 2, 4, 4, 5, 5, 7,
- 2, 3, 4, 4, 5, 7,
- 2, 3, 4, 5, 5, 7,
- 2, 3, 4, 5, 5, 7,
- 2, 3, 4, 5, 5, 7,
- 2, 3, 3, 4, 5, 7,
- 2, 3, 3, 4, 5, 7,
- 2, 3, 3, 4, 5, 7,
- 2, 3, 3, 4, 5, 7,
- 4, 3, 4, 5, 5, 7
- };
-
- static
- int PrTgifLoad (FileName)
- char * FileName;
- {
- struct ObjRec * obj_ptr;
- char full_name[MAXPATHLENGTH+1];
- int len, read_status;
- FILE * fp;
- int tmp_linenum, obj_ext_len, sym_ext_len;
- char tmp_filename[MAXPATHLENGTH+1];
- char obj_ext_str[MAXSTRING+1], sym_ext_str[MAXSTRING+1];
-
- sprintf (obj_ext_str, ".%s", OBJ_FILE_EXT);
- obj_ext_len = strlen (obj_ext_str);
- sprintf (sym_ext_str, ".%s", SYM_FILE_EXT);
- sym_ext_len = strlen (sym_ext_str);
-
- len = strlen (FileName);
-
- if ((len>=obj_ext_len &&
- strcmp (&FileName[len-obj_ext_len], obj_ext_str) == 0) ||
- (len>=sym_ext_len &&
- strcmp (&FileName[len-sym_ext_len],sym_ext_str)==0))
- strcpy (full_name, FileName);
- else
- sprintf (full_name, "%s.%s", FileName, OBJ_FILE_EXT);
-
- if ((fp = fopen (full_name, "r")) == NULL)
- {
- printf ("Can not open '%s'.\n", full_name);
- return (FALSE);
- }
-
- strcpy (tmp_filename, scanFileName);
- tmp_linenum = scanLineNum;
- strcpy (scanFileName, full_name);
- scanLineNum = 0;
- printf ("Reading '%s' ...\n", full_name);
-
- while ((read_status = ReadObj (fp, &obj_ptr)) == TRUE)
- if (obj_ptr != NULL)
- {
- AdjForOldVersion (obj_ptr);
- AddObj (NULL, topObj, obj_ptr);
- }
-
- strcpy (scanFileName, tmp_filename);
- scanLineNum = tmp_linenum;
-
- fclose (fp);
-
- if (read_status == INVALID)
- {
- printf ("File version too large (=%1d). Abort processing!\n",
- fileVersion);
- return (FALSE);
- }
- return (TRUE);
- }
-
main (argc, argv)
int argc;
--- 25,37 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/prtgif.c,v 2.27 1992/11/04 06:10:55 william Exp $";
#endif
#include <stdio.h>
! #include "const.h"
extern char * getenv ();
main (argc, argv)
int argc;
***************
*** 188,225 ****
char * argv[];
{
! char inbuf[MAXSTRING+1];
! char * c_ptr;
! int len, file_name_found;
!
! /* malloc_debug (1); */
- PRTGIF = TRUE;
-
- if (TGIF_PATCHLEVEL == 0)
- printf ("Prtgif Version %s\n", version_string);
- else
- printf ("Prtgif Version %s (patchlevel %1d)\n", version_string,
- TGIF_PATCHLEVEL);
- printf ("Copyright (C) 1990, 1991, William Chia-Wei Cheng\n\n");
-
if ((c_ptr = getenv ("TGIFPATH")) == NULL)
! strcpy (drawPath, TGIF_PATH);
else
if (strlen (c_ptr) >= MAXSTRING)
/* must be an error */
! strcpy (drawPath, TGIF_PATH);
else
! strcpy (drawPath, c_ptr);
#ifdef PRINT_CMD
! strcpy (printCommand, PRINT_CMD);
#else
#ifdef VMS
! strcpy (printCommand, "print");
#else
#ifdef SYSV
! strcpy (printCommand, "lp -dpostscript");
#else
! strcpy (printCommand, "lpr");
#endif /* SYSV */
#endif /* VMS */
--- 38,66 ----
char * argv[];
{
! register int i;
! int total_len;
! char tgif_path[MAXSTRING+1], print_cmd[MAXSTRING+1], * cmd, * c_ptr;
! char tmp_str[MAXSTRING+1], **s_ptr;
! FILE * fp;
if ((c_ptr = getenv ("TGIFPATH")) == NULL)
! strcpy (tgif_path, TGIF_PATH);
else
if (strlen (c_ptr) >= MAXSTRING)
/* must be an error */
! strcpy (tgif_path, TGIF_PATH);
else
! strcpy (tgif_path, c_ptr);
#ifdef PRINT_CMD
! strcpy (print_cmd, PRINT_CMD);
#else
#ifdef VMS
! strcpy (print_cmd, "print");
#else
#ifdef SYSV
! strcpy (print_cmd, "lp -dpostscript");
#else
! strcpy (print_cmd, "lpr");
#endif /* SYSV */
#endif /* VMS */
***************
*** 226,289 ****
#endif /* PRINT_CMD */
! whereToPrint = PRINTER;
!
! c_ptr = printCommand;
! c_ptr += strlen (printCommand);
! file_name_found = FALSE;
for (argc--, argv++; argc > 0; argc--, argv++)
{
! if (**argv == '-')
! {
! if ((strcmp (*argv, "-p") == 0) || (strcmp (*argv, "-eps") == 0))
! whereToPrint = LATEX_FIG;
! else if ((strcmp (*argv, "-f") == 0) || (strcmp (*argv, "-ps") == 0))
! whereToPrint = PS_FILE;
! else if (strcmp (*argv, "-gray") == 0)
! useGray = TRUE;
! else if (strcmp (*argv, "-adobe") == 0)
! usePsAdobeString = TRUE;
! else if (strncmp (*argv, "-o", 2) == 0)
! strcpy (outputDir, (*argv)+2);
! else
! {
! strcat (c_ptr++, " ");
! strcat (c_ptr, *argv);
! c_ptr += strlen (*argv);
! }
! }
! else
! break;
}
! switch (argc)
{
! case 0:
! printf ("\nTgif File Name to Print> ");
! while (fgets (inbuf, MAXSTRING, stdin) != NULL)
! {
! len = strlen (inbuf);
! if (len > 0)
! {
! if (inbuf[--len] == '\n') inbuf[len] = '\0';
! if (PrTgifLoad (inbuf))
! {
! Dump (inbuf);
! DelAllObj ();
! }
! }
! printf ("\nTgif File Name to Print> ");
! }
! break;
! default:
! for ( ; argc > 0; argc--, argv++)
! {
! lastFile = (argc == 1);
! if (PrTgifLoad (*argv))
! {
! Dump (*argv);
! DelAllObj ();
! }
! }
}
exit (0);
}
--- 67,103 ----
#endif /* PRINT_CMD */
! total_len = strlen("tgif ")+strlen("-prtgif ");
! total_len += strlen(tgif_path); total_len += strlen("-tgif_path")+4;
! total_len += strlen(print_cmd); total_len += strlen("-print_cmd")+4;
! for (i=argc-1, s_ptr=(&argv[1]); i > 0; i--, s_ptr++)
! total_len += strlen(*s_ptr)+1;
!
! cmd = (char *) calloc (total_len+2, sizeof(char));
! c_ptr = cmd;
! sprintf(c_ptr, "tgif "); c_ptr += strlen("tgif")+1;
! sprintf(c_ptr, "-prtgif "); c_ptr += strlen("-prtgif")+1;
! sprintf(c_ptr, "-tgif_path \"%s\" ", tgif_path);
! c_ptr += strlen(tgif_path)+strlen("-tgif_path")+4;
! sprintf(c_ptr, "-print_cmd \"%s\" ", print_cmd);
! c_ptr += strlen(print_cmd)+strlen("-print_cmd")+4;
for (argc--, argv++; argc > 0; argc--, argv++)
{
! sprintf(c_ptr, "%s ", *argv);
! c_ptr += strlen(*argv)+1;
! }
! *(--c_ptr) = '\0';
!
! if ((fp = popen (cmd, "r")) == NULL)
! {
! fprintf(stderr, "Can not popen() to tgif. Abort!\n");
! exit (-1);
}
! while (fgets (tmp_str, MAXSTRING, fp) != NULL)
{
! fprintf (stderr, "%s", tmp_str);
! sleep (5);
}
+ pclose (fp);
exit (0);
}
*** ps.c.orig Tue Nov 3 22:29:24 1992
--- ps.c Tue Nov 3 22:29:27 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/ps.c,v 2.3 1992/03/31 07:55:41 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/ps.c,v 2.3.1.2 1992/11/04 04:47:58 william Exp $";
#endif
***************
*** 31,35 ****
static char * psMacro[] =
! { "%%Pages: 1 1",
"%%DocumentFonts: Times-Roman Helvetica Courier NewCenturySchlbk Symbol",
"%%EndComments",
--- 31,35 ----
static char * psMacro[] =
! { "%%Pages: 1",
"%%DocumentFonts: Times-Roman Helvetica Courier NewCenturySchlbk Symbol",
"%%EndComments",
***************
*** 37,43 ****
"%\tDue to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1",
"%",
- "%%BeginSetup",
"",
! "/tgifdict 120 dict def",
"tgifdict begin",
"",
--- 37,42 ----
"%\tDue to bugs in Transcript, the 'PS-Adobe-' stuff is omitted from line 1",
"%",
"",
! "/tgifdict 128 dict def",
"tgifdict begin",
"",
***************
*** 211,214 ****
--- 210,215 ----
"",
"/tgifsetpixels { tgifxpmdict begin /pixels exch def end } def",
+ "",
+ "/tgifsetpix { tgifxpmdict begin pixels 3 1 roll putinterval end } def",
"",
"/tgifbwspot",
*** rcbox.c.orig Tue Nov 3 22:29:32 1992
--- rcbox.c Tue Nov 3 22:29:33 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/rcbox.c,v 2.35 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/rcbox.c,v 2.36 1992/10/21 04:41:00 william Exp $";
#endif
***************
*** 327,331 ****
{
struct RCBoxRec * rcbox_ptr = ObjPtr->detail.rcb;
! int fill, pen, pixel, func, ltx, lty, rbx, rby, width, dash;
int real_x_off, real_y_off, radius;
XGCValues values;
--- 327,331 ----
{
struct RCBoxRec * rcbox_ptr = ObjPtr->detail.rcb;
! int fill, pen, pixel, ltx, lty, rbx, rby, width, dash;
int real_x_off, real_y_off, radius;
XGCValues values;
***************
*** 346,350 ****
rbx = ZOOMED_SIZE(ObjPtr->obbox.rbx - real_x_off);
rby = ZOOMED_SIZE(ObjPtr->obbox.rby - real_y_off);
- func = GXcopy;
SetRCBoxVertex (ltx, lty, rbx, rby, radius);
--- 346,349 ----
***************
*** 452,456 ****
int end_x, end_y, grid_x, grid_y, saved_x, saved_y;
int done = FALSE;
! int pixel, xor_pixel, radius=ZOOMED_SIZE(rcbRadius);
XGCValues values;
XEvent input, ev;
--- 451,455 ----
int end_x, end_y, grid_x, grid_y, saved_x, saved_y;
int done = FALSE;
! int xor_pixel, radius=ZOOMED_SIZE(rcbRadius);
XGCValues values;
XEvent input, ev;
***************
*** 457,461 ****
XMotionEvent * motion_ev;
- pixel = colorPixels[colorIndex];
xor_pixel = xorColorPixels[colorIndex];
--- 456,459 ----
*** rect.c.orig Tue Nov 3 22:29:37 1992
--- rect.c Tue Nov 3 22:29:38 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/rect.c,v 2.30 1992/03/31 07:56:07 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/rect.c,v 2.30.1.2 1992/10/21 04:43:23 william Exp $";
#endif
***************
*** 61,64 ****
--- 61,66 ----
}
+ #define POLYGON_TOL (1.0e-5)
+
int PointInPolygon (X, Y, NumPts, V)
int X, Y, NumPts;
***************
*** 79,83 ****
if (x2 == x1)
{
! if (X == x1 && Y <= min(y1,y2)) count++;
continue;
}
--- 81,85 ----
if (x2 == x1)
{
! if (X == x1 && Y >= min(y1,y2) && Y <= max(y1,y2)) count++;
continue;
}
***************
*** 93,97 ****
m = (y1 - y2) / (x1 - x2);
y_int = m * X + (y1 - m * x1);
! if (Y <= y_int) count++;
}
return (count & 0x1);
--- 95,109 ----
m = (y1 - y2) / (x1 - x2);
y_int = m * X + (y1 - m * x1);
! if (Y <= y_int)
! {
! if (fabs(X-x1) < POLYGON_TOL)
! {
! double x3 = (double)((n == 0) ? V[NumPts-2].x : V[n-1].x);
!
! if (x2 > X && X > x3 || x3 > X && X > x2) count++;
! }
! else
! count++;
! }
}
return (count & 0x1);
***************
*** 1373,1377 ****
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 = arc_x1;
--- 1385,1389 ----
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 = arc_x1;
***************
*** 1405,1409 ****
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 = arc_x2;
--- 1417,1421 ----
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 = arc_x2;
*** scroll.c.orig Tue Nov 3 22:29:42 1992
--- scroll.c Tue Nov 3 22:29:43 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/scroll.c,v 2.35 1992/05/11 23:42:14 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/scroll.c,v 2.36 1992/10/21 04:45:47 william Exp $";
#endif
***************
*** 423,430 ****
else if (ev.type == MotionNotify)
{
! int new_y, y=ev.xmotion.y;
block_start = ev.xmotion.y;
- start_frac = (double)(((double)block_start)/((double)scrollAreaH));
if (block_start <= 0)
--- 423,429 ----
else if (ev.type == MotionNotify)
{
! int new_y;
block_start = ev.xmotion.y;
if (block_start <= 0)
***************
*** 699,703 ****
block_start = ev.xmotion.x;
- start_frac = (double)(((double)block_start)/((double)scrollAreaW));
if (block_start <= 0)
--- 698,701 ----
*** select.c.orig Tue Nov 3 22:29:48 1992
--- select.c Tue Nov 3 22:29:50 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/select.c,v 2.70 1992/03/31 07:56:30 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/select.c,v 2.70.1.2 1992/10/21 04:48:40 william Exp $";
#endif
***************
*** 114,118 ****
{
register struct ObjRec * obj_ptr;
! register struct SelRec * sel_ptr, * prev_sel=NULL;
for (sel_ptr = botSel; sel_ptr != NULL; sel_ptr = prev_sel)
--- 114,118 ----
{
register struct ObjRec * obj_ptr;
! register struct SelRec * sel_ptr, * prev_sel;
for (sel_ptr = botSel; sel_ptr != NULL; sel_ptr = prev_sel)
***************
*** 188,193 ****
{
register struct ObjRec * obj_ptr;
! struct PolyRec * poly_ptr=NULL;
! struct PolygonRec * polygon_ptr=NULL;
struct SelRec * sel_ptr;
--- 188,193 ----
{
register struct ObjRec * obj_ptr;
! struct PolyRec * poly_ptr;
! struct PolygonRec * polygon_ptr;
struct SelRec * sel_ptr;
***************
*** 938,942 ****
&top_vsel_ptr, &bot_vsel_ptr) != NULL)
{
! struct VSelRec * next_vsel=NULL;
for (vsel_ptr=top_vsel_ptr; vsel_ptr!=NULL; vsel_ptr=next_vsel)
--- 938,942 ----
&top_vsel_ptr, &bot_vsel_ptr) != NULL)
{
! struct VSelRec * next_vsel;
for (vsel_ptr=top_vsel_ptr; vsel_ptr!=NULL; vsel_ptr=next_vsel)
***************
*** 1001,1005 ****
&top_sel_ptr, &bot_sel_ptr) != NULL)
{
! struct SelRec * next_sel=NULL;
for (sel_ptr=top_sel_ptr; sel_ptr!=NULL; sel_ptr=next_sel)
--- 1001,1005 ----
&top_sel_ptr, &bot_sel_ptr) != NULL)
{
! struct SelRec * next_sel;
for (sel_ptr=top_sel_ptr; sel_ptr!=NULL; sel_ptr=next_sel)
***************
*** 1240,1244 ****
{
switch (YesNoCancel (
! "File modified, save file before open? [ync](y)"))
{
case CONFIRM_YES: SaveFile (); break;
--- 1240,1245 ----
{
switch (YesNoCancel (
! "File modified, save file before open? [ync](y)",
! CONFIRM_YES))
{
case CONFIRM_YES: SaveFile (); break;
*** setup.c.orig Tue Nov 3 22:29:53 1992
--- setup.c Tue Nov 3 22:29:55 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/setup.c,v 2.100 1992/06/26 05:23:54 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/setup.c,v 2.100.2.1 1992/10/21 04:52:23 william Exp $";
#endif
***************
*** 362,366 ****
{
int bitmask = 0, x_neg_in_def = FALSE, y_neg_in_def = FALSE;
! int x_in_cmdline = FALSE, y_in_cmdline = FALSE, grid_size=0;
char * c_ptr;
int def_x_neg = 0, def_y_neg = 0;
--- 362,366 ----
{
int bitmask = 0, x_neg_in_def = FALSE, y_neg_in_def = FALSE;
! int x_in_cmdline = FALSE, y_in_cmdline = FALSE;
char * c_ptr;
int def_x_neg = 0, def_y_neg = 0;
***************
*** 467,471 ****
if ((c_ptr = XGetDefault (mainDisplay, TOOL_NAME, "InitialGrid")) != NULL)
{
! grid_size = atoi (c_ptr);
switch (gridSystem)
{
--- 467,472 ----
if ((c_ptr = XGetDefault (mainDisplay, TOOL_NAME, "InitialGrid")) != NULL)
{
! int grid_size = atoi (c_ptr);
!
switch (gridSystem)
{
*** spline.c.orig Tue Nov 3 22:29:58 1992
--- spline.c Tue Nov 3 22:30:00 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/spline.c,v 2.19 1992/03/31 07:57:04 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/spline.c,v 2.21 1992/10/21 04:58:25 william Exp $";
#endif
***************
*** 75,79 ****
if (*N == *MaxN)
{
! splineVs = (XPoint *) realloc (splineVs, (*MaxN)*2*sizeof(XPoint));
if (splineVs == NULL)
{
--- 75,79 ----
if (*N == *MaxN)
{
! splineVs = (XPoint *) realloc (splineVs, (*MaxN)*2*sizeof(XPoint)+1);
if (splineVs == NULL)
{
***************
*** 150,154 ****
mx3 = (x1+mx4)/2.0; my3 = (y1+my4)/2.0;
max_n = 100;
! splineVs = (XPoint *) calloc (max_n, sizeof (XPoint));
if (splineVs == NULL)
{
--- 150,154 ----
mx3 = (x1+mx4)/2.0; my3 = (y1+my4)/2.0;
max_n = 100;
! splineVs = (XPoint *) calloc (max_n+1, sizeof (XPoint));
if (splineVs == NULL)
{
***************
*** 170,174 ****
mx4 = (x1+x2)/2.0; my4 = (y1+y2)/2.0;
max_n = 100;
! splineVs = (XPoint *) calloc (max_n, sizeof (XPoint));
if (splineVs == NULL)
{
--- 170,174 ----
mx4 = (x1+x2)/2.0; my4 = (y1+y2)/2.0;
max_n = 100;
! splineVs = (XPoint *) calloc (max_n+1, sizeof (XPoint));
if (splineVs == NULL)
{
***************
*** 238,242 ****
max_n = 100;
! splineVs = (XPoint *) calloc (max_n, sizeof (XPoint));
if (splineVs == NULL)
{
--- 238,242 ----
max_n = 100;
! splineVs = (XPoint *) calloc (max_n+1, sizeof (XPoint));
if (splineVs == NULL)
{
***************
*** 299,303 ****
for (i = 2; i < NumPts-2; i++, V++)
{
! mx1 = mx4; my1 = my4;
mx2 = (x1 + 5.0*x2) / 6.0; my2 = (y1 + 5.0*y2) / 6.0;
x1 = x2; y1 = y2;
--- 299,303 ----
for (i = 2; i < NumPts-2; i++, V++)
{
! /* mx1 = mx4; my1 = my4; */
mx2 = (x1 + 5.0*x2) / 6.0; my2 = (y1 + 5.0*y2) / 6.0;
x1 = x2; y1 = y2;
***************
*** 317,321 ****
#endif
}
! mx1 = mx4; my1 = my4;
mx2 = (x1 + 5.0*x2) / 6.0; my2 = (y1 + 5.0*y2) / 6.0;
x1 = x2; y1 = y2;
--- 317,321 ----
#endif
}
! /* mx1 = mx4; my1 = my4; */
mx2 = (x1 + 5.0*x2) / 6.0; my2 = (y1 + 5.0*y2) / 6.0;
x1 = x2; y1 = y2;
***************
*** 333,337 ****
{
register int j;
! double mx1, my1, mx2, my2, mx3, my3, mx4, my4, x1, y1, x2, y2;
int i;
--- 333,337 ----
{
register int j;
! double mx2, my2, mx3, my3, mx4, my4, x1, y1, x2, y2;
int i;
***************
*** 345,349 ****
for (i = 1; i < NumPts; i++, V++)
{
! mx1 = mx4; my1 = my4;
mx2 = (x1+5.0*x2)/6.0; my2 = (y1+5.0*y2)/6.0;
x1 = x2; y1 = y2;
--- 345,349 ----
for (i = 1; i < NumPts; i++, V++)
{
! /* mx1 = mx4; my1 = my4; */
mx2 = (x1+5.0*x2)/6.0; my2 = (y1+5.0*y2)/6.0;
x1 = x2; y1 = y2;
*** stk.c.orig Tue Nov 3 22:30:05 1992
--- stk.c Tue Nov 3 22:30:06 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/stk.c,v 2.37 1992/08/08 08:26:51 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/stk.c,v 2.37.1.2 1992/10/21 05:00:55 william Exp $";
#endif
***************
*** 256,260 ****
while (fileModified)
{
! switch (YesNoCancel ("File modified, save file before quit? [ync](y)"))
{
case CONFIRM_YES: SaveFile (); break;
--- 256,261 ----
while (fileModified)
{
! switch (YesNoCancel ("File modified, save file before quit? [ync](y)",
! CONFIRM_YES))
{
case CONFIRM_YES: SaveFile (); break;
***************
*** 374,378 ****
void CleanUpStk ()
{
! register struct StkRec * next_stk=NULL;
for ( ; topStk != NULL; topStk = next_stk)
--- 375,379 ----
void CleanUpStk ()
{
! register struct StkRec * next_stk;
for ( ; topStk != NULL; topStk = next_stk)
*** stretch.c.orig Tue Nov 3 22:30:12 1992
--- stretch.c Tue Nov 3 22:30:14 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/stretch.c,v 2.72 1992/04/15 19:24:53 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/stretch.c,v 2.73 1992/10/21 05:04:55 william Exp $";
#endif
***************
*** 515,519 ****
struct AttrRec * attr_ptr;
struct ArcRec * arc_ptr;
! int x, y, dx, dy, new_x, new_y, w, h;
int ltx, lty, rbx, rby, xc, yc, icon_is_rigid=TRUE;
int real_ltx, real_lty, real_rbx, real_rby;
--- 515,519 ----
struct AttrRec * attr_ptr;
struct ArcRec * arc_ptr;
! int x, y, dx, dy, new_x, new_y, h;
int ltx, lty, rbx, rby, xc, yc, icon_is_rigid=TRUE;
int real_ltx, real_lty, real_rbx, real_rby;
***************
*** 524,528 ****
CalcBBox (ltx, lty, rbx, rby, &real_ltx, &real_lty, &real_rbx, &real_rby);
StretchedAbsXY (ObjPtr->x, ObjPtr->y, &x, &y);
- w = ABS_SIZE(ObjPtr->obbox.rbx - ObjPtr->obbox.ltx);
h = ABS_SIZE(ObjPtr->obbox.rby - ObjPtr->obbox.lty);
--- 524,527 ----
***************
*** 799,804 ****
if (move_first || move_last)
{
! int index=INVALID, seg_dx=0, seg_dy=0, dx=0, dy=0;
! int cur_seg_dx=0, cur_seg_dy=0;
PrepareToReplaceAnObj (obj_ptr);
--- 798,803 ----
if (move_first || move_last)
{
! int index=INVALID, seg_dx, seg_dy, dx, dy;
! int cur_seg_dx, cur_seg_dy;
PrepareToReplaceAnObj (obj_ptr);
*** text.c.orig Tue Nov 3 22:30:20 1992
--- text.c Tue Nov 3 22:30:22 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/text.c,v 2.108 1992/08/14 05:46:05 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/text.c,v 2.110 1992/10/21 05:14:30 william Exp $";
#endif
***************
*** 179,185 ****
/* XOff and YOff are UNSCALED screen offset */
{
! register XImage * to_image = NULL;
! int orig_w, orig_h, w, h, len;
! XGCValues values;
if (Pen == NONEPAT) return;
--- 179,184 ----
/* XOff and YOff are UNSCALED screen offset */
{
! int orig_w, orig_h, w, len;
! XGCValues values;
if (Pen == NONEPAT) return;
***************
*** 193,197 ****
orig_h = textCursorH;
w = ZOOMED_SIZE(orig_w);
- h = ZOOMED_SIZE(orig_h);
switch (Just)
--- 192,195 ----
***************
*** 408,413 ****
struct StrRec * s_ptr;
struct AttrRec * attr_ptr;
! int max_len = 0, w = 0, ltx = 0, lty = 0, rbx = 0, rby = 0;
! int scr_ltx = 0, scr_lty = 0;
if (!textCursorShown) return (FALSE);
--- 406,411 ----
struct StrRec * s_ptr;
struct AttrRec * attr_ptr;
! int max_len=0, w, ltx=0, lty, rbx=0, rby;
! int scr_ltx=0, scr_lty;
if (!textCursorShown) return (FALSE);
***************
*** 936,940 ****
struct AttrRec * attr_ptr;
char * c_ptr, s[2];
! int done=FALSE, saved_end_index=0;
XEvent input, ev;
struct StrRec * saved_end_str;
--- 934,938 ----
struct AttrRec * attr_ptr;
char * c_ptr, s[2];
! int done=FALSE, saved_end_index;
XEvent input, ev;
struct StrRec * saved_end_str;
***************
*** 1113,1125 ****
x_off = input.xmotion.x;
y_off = input.xmotion.y;
- abs_x = ABS_X(x_off);
- abs_y = ABS_Y(y_off);
-
- switch (textJust)
- {
- case JUST_L: x = textOrigX-2; break;
- case JUST_C: x = textOrigX-textW/2-2; break;
- case JUST_R: x = textOrigX-textW-2; break;
- }
obj_ptr = curTextObj;
--- 1111,1114 ----
***************
*** 1236,1241 ****
if (!textCursorShown) return;
! x_off = Button_Ev->x; abs_x = ABS_X(x_off);
! y_off = Button_Ev->y; abs_y = ABS_Y(y_off);
switch (textJust)
--- 1225,1230 ----
if (!textCursorShown) return;
! x_off = Button_Ev->x;
! y_off = Button_Ev->y;
switch (textJust)
***************
*** 1532,1536 ****
if (curStr->prev != NULL)
{
! struct StrRec * prev_str=NULL;
y = textCurY - textCursorH - textVSpace;
--- 1521,1525 ----
if (curStr->prev != NULL)
{
! struct StrRec * prev_str;
y = textCurY - textCursorH - textVSpace;
***************
*** 1938,1942 ****
void HandleDown ()
{
! int x_off, left, amount;
char * c_ptr, s[2];
--- 1927,1931 ----
void HandleDown ()
{
! int x_off, amount;
char * c_ptr, s[2];
***************
*** 1963,1967 ****
}
textCurIndex = 0;
- left = textCurX;
s[1] = '\0';
--- 1952,1955 ----
***************
*** 2189,2193 ****
GCClipMask | GCClipXOrigin | GCClipYOrigin, &values);
XFillRectangle (mainDisplay, Win, drawGC, ltx, lty, w, h);
! XSetClipOrigin (mainDisplay, drawGC, 0, 0);
if (numClipRecs > 0)
XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs,
--- 2177,2186 ----
GCClipMask | GCClipXOrigin | GCClipYOrigin, &values);
XFillRectangle (mainDisplay, Win, drawGC, ltx, lty, w, h);
!
! values.clip_mask = None;
! values.clip_x_origin = 0;
! values.clip_y_origin = 0;
! XChangeGC (mainDisplay, drawGC,
! GCClipMask | GCClipXOrigin | GCClipYOrigin, &values);
if (numClipRecs > 0)
XSetClipRectangles (mainDisplay, drawGC, 0, 0, clipRecs,
***************
*** 2668,2672 ****
int AbsXc, AbsYc;
{
! int x=0, y=0;
switch (textJust)
--- 2661,2665 ----
int AbsXc, AbsYc;
{
! int x=0, y;
switch (textJust)
*** tgif.c.orig Tue Nov 3 22:30:25 1992
--- tgif.c Tue Nov 3 22:30:26 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/tgif.c,v 2.14 1992/03/31 07:58:16 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/tgif.c,v 2.19 1992/11/03 05:42:39 william Exp $";
#endif
***************
*** 31,40 ****
--- 31,47 ----
#include <X11/Xlib.h>
#include "const.h"
+ #include "patchlevel.h"
#include "types.h"
+ #include "file.e"
+ #include "grid.e"
#include "mainloop.e"
#include "msg.e"
+ #include "obj.e"
+ #include "pattern.e"
#include "setup.e"
+ #include "version.e"
+ extern char * getenv ();
/*
* extern int malloc_debug ();
***************
*** 41,48 ****
*/
! int lastFile;
! short * pDrawFontAsc;
! short * pDrawFontDes;
/*
* static
--- 48,311 ----
*/
! int lastFile=TRUE;
+ short pDrawFontAsc[] =
+ {
+ 8, 10, 12, 14, 17, 22,
+ 8, 10, 12, 14, 17, 22,
+ 8, 10, 12, 14, 17, 23,
+ 8, 10, 12, 14, 17, 22,
+ 8, 9, 11, 13, 15, 19,
+ 7, 9, 11, 12, 15, 20,
+ 7, 9, 11, 13, 15, 19,
+ 7, 9, 11, 12, 15, 20,
+ 9, 11, 12, 14, 18, 24,
+ 9, 11, 12, 14, 17, 24,
+ 9, 11, 12, 14, 17, 24,
+ 9, 11, 12, 14, 17, 24,
+ 8, 11, 12, 14, 18, 23,
+ 8, 11, 12, 15, 18, 24,
+ 8, 11, 12, 14, 16, 23,
+ 8, 11, 12, 14, 16, 24,
+ 8, 10, 12, 14, 18, 24,
+ 9, 14, 15, 18, 23, 30,
+ 10, 14, 16, 17, 23, 30,
+ 9, 13, 15, 17, 22, 30,
+ 9, 13, 15, 18, 22, 30,
+ 9, 12, 14, 15, 19, 26,
+ 9, 12, 14, 15, 21, 26,
+ 9, 12, 14, 15, 19, 26,
+ 9, 12, 14, 15, 20, 26,
+ 11, 14, 16, 18, 24, 31,
+ 11, 14, 16, 18, 24, 31,
+ 11, 14, 16, 18, 24, 31,
+ 11, 14, 16, 18, 24, 31,
+ 11, 14, 16, 19, 24, 32,
+ 11, 15, 16, 19, 24, 33,
+ 11, 14, 16, 18, 23, 32,
+ 11, 15, 16, 19, 24, 32,
+ 11, 12, 13, 14, 19, 27
+ };
+
+ short pDrawFontDes[] =
+ {
+ 2, 3, 3, 4, 4, 6,
+ 2, 3, 3, 4, 4, 6,
+ 2, 3, 3, 4, 5, 6,
+ 2, 3, 3, 3, 4, 6,
+ 2, 2, 3, 3, 4, 5,
+ 2, 2, 3, 4, 5, 5,
+ 2, 2, 3, 3, 4, 5,
+ 2, 2, 3, 4, 5, 5,
+ 2, 2, 3, 3, 4, 5,
+ 2, 2, 3, 3, 5, 5,
+ 2, 2, 3, 3, 5, 5,
+ 2, 2, 3, 3, 5, 5,
+ 2, 2, 3, 3, 4, 5,
+ 2, 2, 3, 3, 4, 5,
+ 2, 2, 3, 3, 6, 5,
+ 2, 2, 3, 3, 6, 5,
+ 3, 4, 4, 6, 7, 8,
+ 3, 3, 4, 4, 6, 7,
+ 3, 3, 4, 4, 6, 7,
+ 3, 4, 4, 5, 6, 7,
+ 3, 3, 4, 4, 6, 7,
+ 2, 3, 3, 4, 5, 6,
+ 2, 4, 3, 5, 5, 7,
+ 2, 3, 4, 4, 5, 6,
+ 2, 4, 4, 5, 5, 7,
+ 2, 3, 4, 4, 5, 7,
+ 2, 3, 4, 5, 5, 7,
+ 2, 3, 4, 5, 5, 7,
+ 2, 3, 4, 5, 5, 7,
+ 2, 3, 3, 4, 5, 7,
+ 2, 3, 3, 4, 5, 7,
+ 2, 3, 3, 4, 5, 7,
+ 2, 3, 3, 4, 5, 7,
+ 4, 3, 4, 5, 5, 7
+ };
+
+ static
+ int PrTgifLoad (FileName)
+ char * FileName;
+ {
+ struct ObjRec * obj_ptr;
+ char full_name[MAXPATHLENGTH+1];
+ int len, read_status;
+ FILE * fp;
+ int tmp_linenum, obj_ext_len, sym_ext_len;
+ char tmp_filename[MAXPATHLENGTH+1];
+ char obj_ext_str[MAXSTRING+1], sym_ext_str[MAXSTRING+1];
+
+ sprintf (obj_ext_str, ".%s", OBJ_FILE_EXT);
+ obj_ext_len = strlen (obj_ext_str);
+ sprintf (sym_ext_str, ".%s", SYM_FILE_EXT);
+ sym_ext_len = strlen (sym_ext_str);
+
+ len = strlen (FileName);
+
+ if ((len>=obj_ext_len &&
+ strcmp (&FileName[len-obj_ext_len], obj_ext_str) == 0) ||
+ (len>=sym_ext_len &&
+ strcmp (&FileName[len-sym_ext_len],sym_ext_str)==0))
+ strcpy (full_name, FileName);
+ else
+ sprintf (full_name, "%s.%s", FileName, OBJ_FILE_EXT);
+
+ if ((fp = fopen (full_name, "r")) == NULL)
+ {
+ fprintf (stderr, "Can not open '%s'.\n", full_name);
+ return (FALSE);
+ }
+
+ strcpy (tmp_filename, scanFileName);
+ tmp_linenum = scanLineNum;
+ strcpy (scanFileName, full_name);
+ scanLineNum = 0;
+
+ fprintf (stderr, "Reading '%s' ...\n", full_name);
+
+ while ((read_status = ReadObj (fp, &obj_ptr)) == TRUE)
+ if (obj_ptr != NULL)
+ {
+ AdjForOldVersion (obj_ptr);
+ AddObj (NULL, topObj, obj_ptr);
+ }
+
+ strcpy (scanFileName, tmp_filename);
+ scanLineNum = tmp_linenum;
+
+ fclose (fp);
+
+ if (read_status == INVALID)
+ {
+ fprintf (stderr, "File version too large (=%1d). Abort processing!\n",
+ fileVersion);
+ return (FALSE);
+ }
+ return (TRUE);
+ }
+
+ static
+ void DoPrTgif (argc, argv, from_prtgif)
+ int argc, from_prtgif;
+ char * argv[];
+ {
+ char inbuf[MAXSTRING+1];
+ char * c_ptr;
+ int len;
+
+ if (TGIF_PATCHLEVEL == 0)
+ fprintf (stderr, "%s Version %s\n", TOOL_NAME, version_string);
+ else
+ fprintf (stderr, "%s Version %s (patchlevel %1d)\n", TOOL_NAME,
+ version_string, TGIF_PATCHLEVEL);
+ fprintf (stderr, "Copyright (C) 1990, 1991, 1992, %s\n\n",
+ "William Chia-Wei Cheng");
+ fflush(stderr);
+
+ if (!from_prtgif)
+ {
+ if ((c_ptr = getenv ("TGIFPATH")) == NULL)
+ strcpy (drawPath, TGIF_PATH);
+ else
+ if (strlen (c_ptr) >= MAXSTRING)
+ /* must be an error */
+ strcpy (drawPath, TGIF_PATH);
+ else
+ strcpy (drawPath, c_ptr);
+
+ #ifdef PRINT_CMD
+ strcpy (printCommand, PRINT_CMD);
+ #else
+ #ifdef VMS
+ strcpy (printCommand, "print");
+ #else
+ #ifdef SYSV
+ strcpy (printCommand, "lp -dpostscript");
+ #else
+ strcpy (printCommand, "lpr");
+ #endif /* SYSV */
+ #endif /* VMS */
+ #endif /* PRINT_CMD */
+ }
+
+ whereToPrint = PRINTER;
+
+ c_ptr = printCommand;
+ c_ptr += strlen (printCommand);
+ for (argc--, argv++; argc > 0; argc--, argv++)
+ {
+ if (**argv == '-')
+ {
+ if ((strcmp (*argv, "-p") == 0) || (strcmp (*argv, "-eps") == 0))
+ whereToPrint = LATEX_FIG;
+ else if ((strcmp (*argv, "-f") == 0) || (strcmp (*argv, "-ps") == 0))
+ whereToPrint = PS_FILE;
+ else if (strcmp (*argv, "-gray") == 0)
+ useGray = TRUE;
+ else if (strcmp (*argv, "-adobe") == 0)
+ usePsAdobeString = TRUE;
+ else if (strcmp (*argv, "-tgif_path") == 0)
+ {
+ argc--; argv++;
+ strcpy(drawPath, &(*argv)[1]);
+ drawPath[strlen(drawPath)-1] = '\0';
+ if (!from_prtgif)
+ fprintf(stderr, "Warning: -tgif_path should not be used!\n");
+ }
+ else if (strcmp (*argv, "-print_cmd") == 0)
+ {
+ argc--; argv++;
+ strcpy(printCommand, &(*argv)[1]);
+ printCommand[strlen(printCommand)-1] = '\0';
+ if (!from_prtgif)
+ fprintf(stderr, "Warning: -print_cmd should not be used!\n");
+ }
+ else if (strncmp (*argv, "-o", 2) == 0)
+ strcpy (outputDir, &(*argv)[2]);
+ else
+ {
+ strcat (c_ptr++, " ");
+ strcat (c_ptr, *argv);
+ c_ptr += strlen (*argv);
+ }
+ }
+ else
+ break;
+ }
+
+ switch (argc)
+ {
+ case 0:
+ printf ("\nTgif File Name to Print> ");
+ while (fgets (inbuf, MAXSTRING, stdin) != NULL)
+ {
+ len = strlen (inbuf);
+ if (len > 0)
+ {
+ if (inbuf[--len] == '\n') inbuf[len] = '\0';
+ if (PrTgifLoad (inbuf))
+ {
+ Dump (inbuf);
+ DelAllObj ();
+ }
+ }
+ printf ("\nTgif File Name to Print> ");
+ }
+ break;
+ default:
+ for ( ; argc > 0; argc--, argv++)
+ {
+ lastFile = (argc == 1);
+ if (PrTgifLoad (*argv))
+ {
+ Dump (*argv);
+ DelAllObj ();
+ }
+ }
+ }
+ }
+
/*
* static
***************
*** 69,73 ****
*/
! int main (argc, argv)
int argc;
char * argv[];
--- 332,337 ----
*/
! static
! void DoTgif (argc, argv)
int argc;
char * argv[];
***************
*** 75,81 ****
/* Prolog's foreign function interface. */
{
! int i;
! char op_name[80], file_name[80], s[80];
! char * sp[6], * func_strp;
/*
* char color_name[80], val_name[80];
--- 339,345 ----
/* Prolog's foreign function interface. */
{
! register int i;
! char op_name[80], file_name[80], s[80];
! char * sp[6], * func_strp;
/*
* char color_name[80], val_name[80];
***************
*** 82,85 ****
--- 346,350 ----
* char attr_name[80], speed_name[80], id_name[80];
*/
+
file_name[0] = '\0';
for (i = 1; i < argc; i++)
***************
*** 135,141 ****
Usage ("tgif");
}
- /*
- * malloc_debug (1);
- */
if (file_name[0] == '\0')
MainLoop ("init", "", &func_strp,
--- 400,403 ----
***************
*** 200,203 ****
--- 462,497 ----
*/
}
+ }
+
+ int main (argc, argv)
+ int argc;
+ char * argv[];
+ {
+ register int i, from_prtgif;
+
+ PRTGIF = FALSE;
+ from_prtgif = FALSE;
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp(argv[i],"-prtgif")==0)
+ {
+ PRTGIF = TRUE;
+ from_prtgif = TRUE;
+ break;
+ }
+ else if ((strcmp(argv[i],"-print")==0) || (strcmp(argv[i],"-PRINT")==0))
+ {
+ PRTGIF = TRUE;
+ break;
+ }
+ }
+ /*
+ * malloc_debug (1);
+ */
+ if (PRTGIF)
+ DoPrTgif(argc, argv, from_prtgif);
+ else
+ DoTgif(argc, argv);
+
return (0);
}
*** xbitmap.c.orig Tue Nov 3 22:30:38 1992
--- xbitmap.c Tue Nov 3 22:30:41 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/xbitmap.c,v 2.114 1992/06/26 23:25:52 william Exp $";
#endif
--- 25,29 ----
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/xbitmap.c,v 2.115 1992/10/21 05:23:23 william Exp $";
#endif
***************
*** 377,381 ****
{
register int r, c;
! int w, h, fg_pixel, rotate, flip;
int num_cols, num_rows, image_w, image_h, watch_cursor;
int start_col, start_row;
--- 377,381 ----
{
register int r, c;
! int w, h, rotate, flip;
int num_cols, num_rows, image_w, image_h, watch_cursor;
int start_col, start_row;
***************
*** 427,432 ****
image_w, image_h, 1, ZPixmap);
- fg_pixel = colorPixels[ObjPtr->color];
-
mtrx.image_w = (float)image_w; mtrx.image_h = (float)image_h;
mtrx.w = (float)num_cols; mtrx.h = (float)num_rows;
--- 427,430 ----
***************
*** 592,596 ****
{
register struct ObjRec * obj_ptr;
- int changed = FALSE;
for (obj_ptr = LastObjPtr; obj_ptr != NULL; obj_ptr = obj_ptr->prev)
--- 590,593 ----
***************
*** 1284,1288 ****
/*--------------------------------------------------*/
long * thiserr, * nexterr, * tmperr, threshval, sum;
! int fs_forward=TRUE, col, limitcol=w, found_index, * bits;
float gray;
--- 1281,1285 ----
/*--------------------------------------------------*/
long * thiserr, * nexterr, * tmperr, threshval, sum;
! int fs_forward=TRUE, col, limitcol, found_index, * bits;
float gray;
***************
*** 1304,1308 ****
for (col = 0; col < w+2; col++) { nexterr[col] = 0; bits[col] = 0; }
bit_count = 0;
- data = 0;
col = (fs_forward) ? 0 : w-1;
limitcol = (fs_forward) ? w : -1;
--- 1301,1304 ----
***************
*** 1327,1331 ****
sprintf (msg, "Unrecognized pixel value %1d! 1 used.",
pixel);
- data |= (1<<bit_count);
}
Msg (msg);
--- 1323,1326 ----
***************
*** 1999,2003 ****
struct ObjRec * ObjPtr;
{
! int ltx, lty, rbx, rby, w, h, image_w, image_h;
int no_bitmap;
struct XBmRec * xbm_ptr=ObjPtr->detail.xbm;
--- 1994,1998 ----
struct ObjRec * ObjPtr;
{
! int ltx, lty, rbx, rby, image_w, image_h;
int no_bitmap;
struct XBmRec * xbm_ptr=ObjPtr->detail.xbm;
***************
*** 2007,2012 ****
ltx = ObjPtr->obbox.ltx; lty = ObjPtr->obbox.lty;
rbx = ObjPtr->obbox.rbx; rby = ObjPtr->obbox.rby;
- w = rbx - ltx;
- h = rby - lty;
if (no_bitmap)
{
--- 2002,2005 ----
***************
*** 2052,2057 ****
struct XBmRec * xbm_ptr;
char color_str[20], * s, inbuf[MAXSTRING], * c_ptr;
! int ltx, lty, rbx, rby, w, h, i, j, k, data=0, color_index;
! int nibble_count, bit_count, num_nibbles, num_bytes, fill;
int rotation, new_alloc, id=0, image_w, image_h;
int rotate=ROTATE0, flip=0, real_type=XBM_XBM, len;
--- 2045,2050 ----
struct XBmRec * xbm_ptr;
char color_str[20], * s, inbuf[MAXSTRING], * c_ptr;
! int ltx, lty, rbx, rby, i, j, k, data=0, color_index;
! int nibble_count, bit_count, num_nibbles, fill;
int rotation, new_alloc, id=0, image_w, image_h;
int rotate=ROTATE0, flip=0, real_type=XBM_XBM, len;
***************
*** 2058,2064 ****
int no_bitmap=FALSE, llx=0, lly=0, urx=0, ury=0;
int locked=FALSE;
! Pixmap bitmap=None, msg[MAXSTRING];
! char * xbm_data=NULL, write_date[32], * filename;
! XImage * image=NULL;
*ObjPtr = NULL;
--- 2051,2058 ----
int no_bitmap=FALSE, llx=0, lly=0, urx=0, ury=0;
int locked=FALSE;
! Pixmap bitmap;
! char msg[MAXSTRING];
! char * xbm_data, write_date[32], * filename;
! XImage * image;
*ObjPtr = NULL;
***************
*** 2298,2305 ****
xbm_ptr->eps_w = xbm_ptr->eps_h = 0;
- w = rbx - ltx;
- h = rby - lty;
num_nibbles = ((image_w % 4) == 0) ? (int)(image_w>>2) : (int)(image_w>>2)+1;
- num_bytes = ((image_w % 8) == 0) ? (int)(image_w>>3) : (int)(image_w>>3)+1;
fgets (inbuf, MAXSTRING, FP);
--- 2292,2296 ----
*** xpixmap.c.orig Tue Nov 3 22:30:46 1992
--- xpixmap.c Tue Nov 3 22:30:48 1992
***************
*** 25,29 ****
#ifndef lint
static char RCSid[] =
! "@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/xpixmap.c,v 2.116 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/xpixmap.c,v 2.118 1992/10/21 05:32:46 william Exp $";
#endif
***************
*** 374,378 ****
register int j, i;
char msg[MAXSTRING];
! XImage * src_image=NULL;
SetWatchCursor (drawWindow);
--- 374,378 ----
register int j, i;
char msg[MAXSTRING];
! XImage * src_image;
SetWatchCursor (drawWindow);
***************
*** 630,638 ****
{
register int row, i, index, col;
! int ltx, lty, rbx, rby, w, h, color_index, image_w, image_h;
! int fill, ncolors, * pixels, rotate, flip, orig_x, orig_y;
! int cur_pixel, chars_per_pixel, first_pixel_is_bg;
int x, y, found_index=0, pixel_index;
! char * xpm_data, * color_char=NULL;
Pixmap pixmap;
XImage * image=NULL;
--- 630,638 ----
{
register int row, i, index, col;
! int ltx, lty, rbx, rby, w, h, image_w, image_h;
! int ncolors, * pixels, rotate, flip, orig_x, orig_y;
! int cur_pixel, chars_per_pixel;
int x, y, found_index=0, pixel_index;
! char * xpm_data, * color_char;
Pixmap pixmap;
XImage * image=NULL;
***************
*** 650,654 ****
pixels = xpm_ptr->pixels;
ncolors = xpm_ptr->ncolors;
- fill = xpm_ptr->fill;
rotate = xpm_ptr->rotate;
flip = xpm_ptr->flip;
--- 650,653 ----
***************
*** 668,673 ****
}
- color_index = ObjPtr->color;
-
mtrx.image_w = (float)image_w; mtrx.image_h = (float)image_h;
mtrx.w = (float)w; mtrx.h = (float)h;
--- 667,670 ----
***************
*** 689,693 ****
xpm_data = xpm_ptr->data;
chars_per_pixel = xpm_ptr->chars_per_pixel;
- first_pixel_is_bg = xpm_ptr->first_pixel_is_bg;
color_char = xpm_ptr->color_char;
--- 686,689 ----
***************
*** 819,863 ****
fprintf (FP, "gsave\n");
! fprintf (FP, " [");
!
! if (PRTGIF)
{
! int * red, * green, * blue;
! red=xpm_ptr->red;
! green=xpm_ptr->green;
! blue=xpm_ptr->blue;
! BuildXPmBuckets (ncolors, NULL, chars_per_pixel, color_char);
! for (index = 0; index < ncolors; index++)
! {
! fprintf (FP, " %.3f %.3f %.3f", ((float)red[index]/10000.0),
! ((float)green[index]/10000.0), ((float)blue[index]/10000.0));
! if (index%4 == 3) fprintf (FP, "\n ");
! }
! }
! else
! {
! BuildXPmBuckets (ncolors, pixels, INVALID, NULL);
! for (index = 0; index < ncolors; index++)
{
! cur_pixel = pixels[index];
! for (i = 0; i < maxColors; i++)
! if (colorPixels[i] == cur_pixel)
! {
! found_index = i;
! break;
! }
! fprintf (FP, " %.3f %.3f %.3f",
! ((float)tgifColors[found_index].red/maxRGB),
! ((float)tgifColors[found_index].green/maxRGB),
! ((float)tgifColors[found_index].blue/maxRGB));
! if (index%4 == 3) fprintf (FP, "\n ");
}
}
- if (index%4 != 0) fprintf (FP, "\n");
- fprintf (FP, " ] tgifsetpixels\n");
fprintf (FP, " %1d %1d translate %.3f %.3f scale %1d rotate\n", x, y,
--- 815,865 ----
fprintf (FP, "gsave\n");
! if (colorDump)
{
! fprintf (FP, " 3 %1d mul array tgifsetpixels\n", ncolors);
! if (PRTGIF)
! {
! int * red, * green, * blue;
! red=xpm_ptr->red;
! green=xpm_ptr->green;
! blue=xpm_ptr->blue;
! BuildXPmBuckets (ncolors, NULL, chars_per_pixel, color_char);
! for (index = 0; index < ncolors; index++)
! {
! fprintf (FP, "%s%3d [ %.3f %.3f %.3f ] tgifsetpix",
! ((index & 0x1) ? "" : " "), index*3,
! ((float)red[index]/10000.0),
! ((float)green[index]/10000.0),
! ((float)blue[index]/10000.0));
! fprintf (FP, "%s", ((index & 0x1) ? "\n" : " "));
! }
! }
! else
{
! BuildXPmBuckets (ncolors, pixels, INVALID, NULL);
!
! for (index = 0; index < ncolors; index++)
! {
! cur_pixel = pixels[index];
! for (i = 0; i < maxColors; i++)
! if (colorPixels[i] == cur_pixel)
! {
! found_index = i;
! break;
! }
! fprintf (FP, "%s%3d [ %.3f %.3f %.3f ] tgifsetpix",
! ((index & 0x1) ? "" : " "), index*3,
! ((float)tgifColors[found_index].red/maxRGB),
! ((float)tgifColors[found_index].green/maxRGB),
! ((float)tgifColors[found_index].blue/maxRGB));
! fprintf (FP, "%s", ((index & 0x1) ? "\n" : " "));
! }
}
+ if (ncolors & 0x1) fprintf (FP, "\n");
}
fprintf (FP, " %1d %1d translate %.3f %.3f scale %1d rotate\n", x, y,
***************
*** 1146,1150 ****
struct ObjRec * ObjPtr;
{
! int ltx, lty, rbx, rby, w, h, fill, ncolors, * pixels;
int chars_per_pixel, first_pixel_is_bg, image_w, image_h;
struct XPmRec * xpm_ptr = ObjPtr->detail.xpm;
--- 1148,1152 ----
struct ObjRec * ObjPtr;
{
! int ltx, lty, rbx, rby, fill, ncolors, * pixels;
int chars_per_pixel, first_pixel_is_bg, image_w, image_h;
struct XPmRec * xpm_ptr = ObjPtr->detail.xpm;
***************
*** 1153,1158 ****
ltx = ObjPtr->obbox.ltx; lty = ObjPtr->obbox.lty;
rbx = ObjPtr->obbox.rbx; rby = ObjPtr->obbox.rby;
- w = rbx - ltx;
- h = rby - lty;
image_w = xpm_ptr->image_w;
image_h = xpm_ptr->image_h;
--- 1155,1158 ----
***************
*** 1442,1446 ****
c_ptr = FindChar ('"', c_ptr);
c_ptr = FindChar ('"', c_ptr);
! c_ptr = ParseStr (c_ptr, '"', s);
if ((index = QuickFindColorIndex (s,&new_alloc)) == INVALID)
{
--- 1442,1447 ----
c_ptr = FindChar ('"', c_ptr);
c_ptr = FindChar ('"', c_ptr);
! /* c_ptr = ParseStr (c_ptr, '"', s); */
! ParseStr (c_ptr, '"', s);
if ((index = QuickFindColorIndex (s,&new_alloc)) == INVALID)
{
***************
*** 1669,1676 ****
int first_pixel_is_bg, first_pixel_maybe_bg;
int new_alloc, id=0, rotate=ROTATE0, flip=0, locked=FALSE;
! char * xpm_data=NULL, * color_char=NULL, * * color_str=NULL;
! Pixmap pixmap=None;
char msg[MAXSTRING];
! XImage * image=NULL;
*ObjPtr = NULL;
--- 1670,1677 ----
int first_pixel_is_bg, first_pixel_maybe_bg;
int new_alloc, id=0, rotate=ROTATE0, flip=0, locked=FALSE;
! char * xpm_data, * color_char, * * color_str;
! Pixmap pixmap;
char msg[MAXSTRING];
! XImage * image;
*ObjPtr = NULL;
*** dialog.e.orig Tue Nov 3 22:30:51 1992
--- dialog.e Tue Nov 3 22:30:52 1992
***************
*** 23,29 ****
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/dialog.e,v 2.5 1992/03/31 08:00:05 william Exp $
*/
extern unsigned int CornerLoop ();
! extern void Dialog ();
--- 23,29 ----
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/dialog.e,v 2.5.1.1 1992/10/12 02:09:14 william Exp $
*/
extern unsigned int CornerLoop ();
! extern int Dialog ();
*** msg.e.orig Tue Nov 3 22:30:54 1992
--- msg.e Tue Nov 3 22:30:55 1992
***************
*** 23,27 ****
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/msg.e,v 2.14 1992/05/07 01:21:31 william Exp $
*/
--- 23,27 ----
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/msg.e,v 2.16 1992/10/25 07:17:50 william Exp $
*/
*** const.h.orig Tue Nov 3 22:30:58 1992
--- const.h Tue Nov 3 22:30:59 1992
***************
*** 23,27 ****
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/const.h,v 2.73 1992/07/17 14:45:07 william Exp $
*/
--- 23,27 ----
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/const.h,v 2.73.1.1 1992/10/12 02:09:31 william Exp $
*/
***************
*** 327,332 ****
#define MENU_VERTALIGN 7
#define MENU_FONT 8
! #define MENU_STYLE 9
! #define MENU_SIZE 10
#define MENU_LINEDASH 11
#define MENU_LINESTYLE 12
--- 327,332 ----
#define MENU_VERTALIGN 7
#define MENU_FONT 8
! #define MENU_SIZE 9
! #define MENU_STYLE 10
#define MENU_LINEDASH 11
#define MENU_LINESTYLE 12
*** patchlevel.h.orig Tue Nov 3 22:31:01 1992
--- patchlevel.h Tue Nov 3 22:31:02 1992
***************
*** 23,28 ****
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/patchlevel.h,v 2.29 1992/08/11 06:53:25 william Exp $
*/
! #define TGIF_PATCHLEVEL 11
--- 23,28 ----
* PERFORMANCE OF THIS SOFTWARE.
*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/patchlevel.h,v 2.29.1.1 1992/10/12 02:09:52 william Exp $
*/
! #define TGIF_PATCHLEVEL 12
*** Makefile.noimake.orig Tue Nov 3 22:31:07 1992
--- Makefile.noimake Tue Nov 3 22:31:08 1992
***************
*** 23,27 ****
# PERFORMANCE OF THIS SOFTWARE.
#
! # @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Makefile.noimake,v 2.131 1992/08/08 08:25:38 william Exp $
#
--- 23,27 ----
# PERFORMANCE OF THIS SOFTWARE.
#
! # @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Makefile.noimake,v 2.131.1.5 1992/10/26 08:05:52 william Exp $
#
***************
*** 34,37 ****
--- 34,43 ----
TGIFDIR = /u/tangram/lib/tgif
MANPATH = /u/tangram/man
+ #
+ # Change INSTALL to /usr/ucb/install if INSTPGMFLAGS doesn't mean strip on
+ # your machine (such as an RS6000). Stripping gets rid of
+ # symbol talbe and relocation bits in a binary file.
+ #
+ INSTALL = install
MANDIR = $(MANPATH)/mann
***************
*** 44,47 ****
--- 50,57 ----
-DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\"
+ #-DDONTFREECOLORS
+ # Include the above line in the DEFINES if you don't want the black and
+ # the white colors to be freed when tgif initializes itself. You should
+ # not need to do this unless to get around some server bugs.
#-DUSE_XAPPLRESDIR
# Include the above line in the DEFINES if $XAPPLRESDIR/Tgif is used to
***************
*** 77,81 ****
# Include the above line in the DEFINES if you want to print on A4 paper
# (8.25in by 11.7in or about 21cm by 29.7cm).
! CFLAGS = -g $(DEFINES) -I/usr/local/include
LFLAGS = -lc -lX11 -lm
--- 87,91 ----
# Include the above line in the DEFINES if you want to print on A4 paper
# (8.25in by 11.7in or about 21cm by 29.7cm).
! CFLAGS = -O $(DEFINES) -I/usr/local/include
LFLAGS = -lc -lX11 -lm
***************
*** 159,163 ****
prtgif: prtgif.o $(OBJ1)
# $(CC) -o prtgif prtgif.o $(OBJ1) /usr/lib/debug/malloc.o -O $(LFLAGS)
! $(CC) -o prtgif prtgif.o $(OBJ1) -O $(LFLAGS)
testdrive: testdrive.o $(OBJ1)
--- 169,173 ----
prtgif: prtgif.o $(OBJ1)
# $(CC) -o prtgif prtgif.o $(OBJ1) /usr/lib/debug/malloc.o -O $(LFLAGS)
! $(CC) -o prtgif prtgif.o -O $(LFLAGS)
testdrive: testdrive.o $(OBJ1)
***************
*** 284,289 ****
obj.e pattern.e poly.e raster.e ruler.e select.e setup.e \
spline.e xpixmap.e
! prtgif.o: const.h patchlevel.h types.h \
! file.e grid.e msg.e obj.e pattern.e setup.e version.e
ps.o:
raster.o: const.h types.h $(RASTER_BM) \
--- 294,298 ----
obj.e pattern.e poly.e raster.e ruler.e select.e setup.e \
spline.e xpixmap.e
! prtgif.o: const.h
ps.o:
raster.o: const.h types.h $(RASTER_BM) \
***************
*** 331,335 ****
dup.e file.e font.e grid.e msg.e obj.e pattern.e poly.e \
prtgif.e raster.e ruler.e scroll.e setup.e xpixmap.e
! tgif.o: const.h types.h mainloop.e msg.e setup.e
version.o:
vms_compat.o: vms_compat.h
--- 340,345 ----
dup.e file.e font.e grid.e msg.e obj.e pattern.e poly.e \
prtgif.e raster.e ruler.e scroll.e setup.e xpixmap.e
! tgif.o: const.h patchlevel.h types.h \
! file.e grid.e mainloop.e msg.e obj.e pattern.e setup.e version.e
version.o:
vms_compat.o: vms_compat.h
***************
*** 347,351 ****
install: $(INSTALLDIR)/tgif $(INSTALLDIR)/prtgif \
! $(TGIFDIR)/tgifmacro.ps $(TGIFDIR)/tgificon.obj \
$(TGIFDIR)/tgificon.xbm $(TGIFDIR)/tgificon.xpm \
$(TGIFDIR)/tangram.sym $(TGIFDIR)/tgif.Xdefaults \
--- 357,361 ----
install: $(INSTALLDIR)/tgif $(INSTALLDIR)/prtgif \
! $(TGIFDIR)/tgificon.eps $(TGIFDIR)/tgificon.obj \
$(TGIFDIR)/tgificon.xbm $(TGIFDIR)/tgificon.xpm \
$(TGIFDIR)/tangram.sym $(TGIFDIR)/tgif.Xdefaults \
***************
*** 354,382 ****
$(INSTALLDIR)/tgif: tgif
! install -c $(INSTPGMFLAGS) tgif $(INSTALLDIR)/tgif
$(INSTALLDIR)/prtgif: prtgif
! install -c $(INSTPGMFLAGS) prtgif $(INSTALLDIR)/prtgif
$(TGIFDIR)/tgifmacro.ps: tgifmacro.ps
! install -c tgifmacro.ps $(TGIFDIR)/tgifmacro.ps
$(TGIFDIR)/tgificon.obj: tgificon.obj
! install -c tgificon.obj $(TGIFDIR)/tgificon.obj
$(TGIFDIR)/tgificon.xbm: tgificon.xbm
! install -c tgificon.xbm $(TGIFDIR)/tgificon.xbm
$(TGIFDIR)/tgificon.xpm: tgificon.xpm
! install -c tgificon.xpm $(TGIFDIR)/tgificon.xpm
$(TGIFDIR)/tangram.sym: tangram.sym
! install -c tangram.sym $(TGIFDIR)/tangram.sym
$(TGIFDIR)/keys.obj: keys.obj
! install -c keys.obj $(TGIFDIR)/keys.obj
$(TGIFDIR)/tgif.Xdefaults: tgif.Xdefaults
! install -c tgif.Xdefaults $(TGIFDIR)/tgif.Xdefaults
install.man: $(MANDIR)/tgif.n $(MANDIR)/prtgif.n
--- 364,392 ----
$(INSTALLDIR)/tgif: tgif
! $(INSTALL) -c $(INSTPGMFLAGS) tgif $(INSTALLDIR)/tgif
$(INSTALLDIR)/prtgif: prtgif
! $(INSTALL) -c $(INSTPGMFLAGS) prtgif $(INSTALLDIR)/prtgif
$(TGIFDIR)/tgifmacro.ps: tgifmacro.ps
! $(INSTALL) -c tgifmacro.ps $(TGIFDIR)/tgifmacro.ps
$(TGIFDIR)/tgificon.obj: tgificon.obj
! $(INSTALL) -c tgificon.obj $(TGIFDIR)/tgificon.obj
$(TGIFDIR)/tgificon.xbm: tgificon.xbm
! $(INSTALL) -c tgificon.xbm $(TGIFDIR)/tgificon.xbm
$(TGIFDIR)/tgificon.xpm: tgificon.xpm
! $(INSTALL) -c tgificon.xpm $(TGIFDIR)/tgificon.xpm
$(TGIFDIR)/tangram.sym: tangram.sym
! $(INSTALL) -c tangram.sym $(TGIFDIR)/tangram.sym
$(TGIFDIR)/keys.obj: keys.obj
! $(INSTALL) -c keys.obj $(TGIFDIR)/keys.obj
$(TGIFDIR)/tgif.Xdefaults: tgif.Xdefaults
! $(INSTALL) -c tgif.Xdefaults $(TGIFDIR)/tgif.Xdefaults
install.man: $(MANDIR)/tgif.n $(MANDIR)/prtgif.n
***************
*** 384,391 ****
$(MANDIR)/tgif.n: tgif.man
! install -c $(INSTMANFLAGS) tgif.man $(MANDIR)/tgif.n
$(MANDIR)/prtgif.n: prtgif.man
! install -c $(INSTMANFLAGS) prtgif.man $(MANDIR)/prtgif.n
clean:
--- 394,401 ----
$(MANDIR)/tgif.n: tgif.man
! $(INSTALL) -c $(INSTMANFLAGS) tgif.man $(MANDIR)/tgif.n
$(MANDIR)/prtgif.n: prtgif.man
! $(INSTALL) -c $(INSTMANFLAGS) prtgif.man $(MANDIR)/prtgif.n
clean:
*** Imakefile.orig Tue Nov 3 22:31:13 1992
--- Imakefile Tue Nov 3 22:31:14 1992
***************
*** 23,30 ****
/**/# PERFORMANCE OF THIS SOFTWARE.
/**/#
! /**/# @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Imakefile,v 2.84 1992/08/14 06:19:54 william Exp $
/**/#
! TGIFVERSION = 2.12-p11
PROGRAMS = tgif prtgif /**/#frontend11.o testdrive
/**/#CDEBUGFLAGS= -g
--- 23,30 ----
/**/# PERFORMANCE OF THIS SOFTWARE.
/**/#
! /**/# @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/Imakefile,v 2.84.1.3 1992/10/26 06:41:11 william Exp $
/**/#
! TGIFVERSION = 2.12-p12
PROGRAMS = tgif prtgif /**/#frontend11.o testdrive
/**/#CDEBUGFLAGS= -g
***************
*** 40,43 ****
--- 40,47 ----
-DTELEPORT_ATTR=\"warp_to=\" -DTMP_DIR=\"/tmp/\"
+ /**/#-DDONTFREECOLORS
+ /**/# Include the above line in the DEFINES if you don't want the black and
+ /**/# the white colors to be freed when tgif initializes itself. You should
+ /**/# not need to do this unless you need to get around some server bugs.
/**/#-DUSE_XAPPLRESDIR
/**/# Include the above line in the DEFINES if $XAPPLRESDIR/Tgif is used to
***************
*** 96,100 ****
OBJS1 = tgif.o $(OBJ1)
! OBJS2 = prtgif.o $(OBJ1)
OBJS3 = testdrive.o $(OBJ1)
FRONTENDOBJS = frontend.o $(OBJ1)
--- 100,104 ----
OBJS1 = tgif.o $(OBJ1)
! OBJS2 = prtgif.o
OBJS3 = testdrive.o $(OBJ1)
FRONTENDOBJS = frontend.o $(OBJ1)
***************
*** 107,111 ****
ComplexProgramTarget_1(tgif,$(LOCAL_LIBRARIES),)
! ComplexProgramTarget_2(prtgif,$(LOCAL_LIBRARIES),)
/*
* ComplexProgramTarget_3(testdrive,$(LOCAL_LIBRARIES),)
--- 111,115 ----
ComplexProgramTarget_1(tgif,$(LOCAL_LIBRARIES),)
! ComplexProgramTarget_2(prtgif,,)
/*
* ComplexProgramTarget_3(testdrive,$(LOCAL_LIBRARIES),)
***************
*** 151,155 ****
rm -f tgif-$(TGIFVERSION).tar/**/*
tar cvf tgif-$(TGIFVERSION).tar /**/*.c /**/*.e /**/*.h \
! Makefile.noimake Imakefile descrip./**/??? \
tgificon.obj $(XBMDIR)*.xbm \
tgificon.xbm tgificon.xpm tgif.Xdefaults tgificon.eps \
--- 155,159 ----
rm -f tgif-$(TGIFVERSION).tar/**/*
tar cvf tgif-$(TGIFVERSION).tar /**/*.c /**/*.e /**/*.h \
! Makefile.noimake Imakefile descrip./**/??? VMS_MAKE_TGIF.COM \
tgificon.obj $(XBMDIR)*.xbm \
tgificon.xbm tgificon.xpm tgif.Xdefaults tgificon.eps \
***************
*** 160,164 ****
MAN_1 = README /**/*.man Imakefile Copyright
! BASIC_1 = Makefile.noimake descrip./**/* HISTORY tgif.Xdefaults
MISC_1 = an-sr-flip-flop.obj fonts.obj slide-demo.obj keys.obj \
--- 164,169 ----
MAN_1 = README /**/*.man Imakefile Copyright
! BASIC_1 = Makefile.noimake descrip./**/* HISTORY tgif.Xdefaults \
! VMS_MAKE_TGIF.COM
MISC_1 = an-sr-flip-flop.obj fonts.obj slide-demo.obj keys.obj \
***************
*** 220,222 ****
--- 225,228 ----
descrip.mms descrip.opt tgifmacro.ps $(XBMDIR)*.xbm \
tgificon.xbm tgificon.xpm tgif.Xdefaults tgificon.eps \
+ VMS_MAKE_TGIF.COM \
> VersionInfo/Distribution/tgif-$(TGIFVERSION)
*** prtgif.man.orig Tue Nov 3 22:31:17 1992
--- prtgif.man Tue Nov 3 22:31:17 1992
***************
*** 1,7 ****
! .\"@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/prtgif.man,v 2.8 1992/07/24 06:23:05 william Exp $
! .TH PRTGIF n "Version 2.12-p10 or above" "PrTgif"
.SH NAME
! \fIprtgif\fR - Prints a \fItgif\fR object file without opening windows
! or fonts.
.SH SYNOPSIS
.B prtgif
--- 1,7 ----
! .\"@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/prtgif.man,v 2.10 1992/10/26 06:32:25 william Exp $
! .TH PRTGIF n "Version 2.12-p12 or above" "PrTgif"
.SH NAME
! \fI(OBSOLETED) prtgif\fR - Prints a \fItgif\fR object file without
! opening windows or fonts.
.SH SYNOPSIS
.B prtgif
***************
*** 15,59 ****
[\fIfile1\fR \fIfile2\fR ...]
.SH DESCRIPTION
! \fIprtgif\fR prints \fIfile1.obj\fR, \fIfile2.obj\fR,
! etc. (generated by \fItgif\fR)
! into PostScript(TM) page description files
! and pipes them to \fIlpr\fR if none of the
! \fB-eps\fR, \fB-p\fR, \fB-ps\fR, or \fB-f\fR options are not specified;
! in this case, any other command line options are sent to \fIlpr\fR.
! A symbol file can also be printed by specifying the \fI.sym\fR
! extension explicitly.
! .PP
! If the \fB-eps\fR or the \fB-p\fR option is specified,
! it generates an encapsulated PostScript file in \fIfile.eps\fR;
! this file is supposed to be included in a LaTeX file through the
! \\psfig, \\epsf, or \\psfile construct (see the man pages of
! \fItgif\fR for details).
! If the \fB-ps\fR or the \fB-f\fR option is specified,
! it generates a PostScript file in \fIfile.ps\fR;
! this file can be printed to a PostScript printer with lpr.
! (Note that if any of the \fB-eps\fR, \fB-p\fR, \fB-ps\fR, or \fB-f\fR
! options are specified,
! any other command line options are ignored.)
! .PP
! Using the \fI-gray\fR option has the same effect as setting the
! Tgif*UseGrayScale X default for tgif (see the man pages of
! \fItgif\fR for details).
! .PP
! Using the \fI-adobe\fR option has the same effect as setting the
! Tgif*UsePsAdobeString X default for tgif (see the man pages of
! \fItgif\fR for details).
! .PP
! If the \fI-o\fR option is not specified, the output file (eps or ps)
! goes into the same directory as the input file. If \fI-o\fRdir
! is specified, the output file goes into the directory specified
! by \fIdir\fR.
! .PP
! Note that prtgif is no longer calling \fItgif2ps\fR.
! Also note that while tgif can generate X11 bitmap or X11 pixmap files,
! prtgif can not.
! .SH SEE ALSO
! \fBlpr\fR(1), \fBtgif\fR(1), \fBlatex\fR(1L)
! .SH COPYRIGHT
! Please see the ``Copyright'' file for details on the copyrights.
! .SH AUTHOR
! William Chia-Wei Cheng (william@cs.UCLA.edu)
--- 15,20 ----
[\fIfile1\fR \fIfile2\fR ...]
.SH DESCRIPTION
! \fIPrtgif\fR is obsoleted to conserve space. Please use the equivalent form,
! "\fItgif -print\fR", instead. (Prtgif will still work, all it does is to
! run "tgif -print".) Please see the man pages of tgif for a description
! of the options.
*** tgif.man.orig Tue Nov 3 22:31:22 1992
--- tgif.man Tue Nov 3 22:31:24 1992
***************
*** 1,7 ****
! .\"@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/tgif.man,v 2.123 1992/08/08 08:27:10 william Exp $
! .TH TGIF n "Version 2.12-p8 and Above" "Tgif"
.SH NAME
! \fItgif\fR \- Xlib based 2-D drawing facility under X11. Supports
! hierarchical construction of drawings and easy navigation between
sets of drawings.
.SH SYNOPSIS
--- 1,7 ----
! .\"@(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/tgif.man,v 2.124 1992/10/26 06:23:36 william Exp $
! .TH TGIF n "Version 2.12-p12 and Above" "Tgif"
.SH NAME
! \fItgif\fR \- Xlib based interactive 2-D drawing facility under X11.
! Supports hierarchical construction of drawings and easy navigation between
sets of drawings.
.SH SYNOPSIS
***************
*** 14,24 ****
[\fB-nv\fR]
[\fB-bw\fR]
! [\fB-geometry\fR geom]
! [\fB=geom\fR]
! [\fIfile\fR[.\fIobj\fR]]
.SH DESCRIPTION
\fITgif\fR is an interactive drawing tool that allows the user to draw and
! manipulate objects in the X Window System.
! The command line arguments \fI-fg\fR, \fI-bg\fR, and \fI-bd\fR specify
the foreground, background, and border colors, respectively.
The command line argument \fIfile\fR
--- 14,42 ----
[\fB-nv\fR]
[\fB-bw\fR]
! [\fB-geometry\fR <geom>]
! [\fB=<geom>\fR]
! [\fI<file>\fR[.\fIobj\fR]]
! .PP
! or
! .PP
! .B tgif
! \fB-print\fR
! [\fB-eps\fR]
! [\fB-p\fR]
! [\fB-ps\fR]
! [\fB-f\fR]
! [\fB-gray\fR]
! [\fB-adobe\fR]
! [\fB-o\fRdir]
! [\fIfile1\fR \fIfile2\fR ...]
.SH DESCRIPTION
\fITgif\fR is an interactive drawing tool that allows the user to draw and
! manipulate objects in the X Window System. Tgif runs interactively in
! the first form. In the second form, tgif just prints files without
! opening windows or fonts, and it is compatible with
! the obsoleted \fIprtgif\fR.
! .PP
! In the first form, the command line arguments
! \fI-fg\fR, \fI-bg\fR, and \fI-bd\fR specify
the foreground, background, and border colors, respectively.
The command line argument \fIfile\fR
***************
*** 31,34 ****
--- 49,85 ----
it requires a 3 button mouse.
.PP
+ In the second form, tgif prints \fIfile1.obj\fR, \fIfile2.obj\fR,
+ etc. (generated by \fItgif\fR)
+ into PostScript(TM) page description files
+ and pipes them to \fIlpr\fR if none of the
+ \fB-eps\fR, \fB-p\fR, \fB-ps\fR, or \fB-f\fR options are not specified;
+ in this case, any other command line options are sent to \fIlpr\fR.
+ A symbol file (see descriptions below) can also be printed by
+ specifying the \fI.sym\fR extension explicitly.
+ .PP
+ In the second form,
+ if the \fB-eps\fR or the \fB-p\fR option is specified,
+ tgif generates an encapsulated PostScript file in \fIfile.eps\fR;
+ this file is supposed to be included in a LaTeX file through the
+ \\psfig, \\epsf, or \\psfile construct (see the LATEX FIGURE FORMATS section
+ below).
+ If the \fB-ps\fR or the \fB-f\fR option is specified,
+ it generates a PostScript file in \fIfile.ps\fR;
+ this file can be printed to a PostScript printer with lpr.
+ (Note that if any of the \fB-eps\fR, \fB-p\fR, \fB-ps\fR, or \fB-f\fR
+ options are specified,
+ any other command line options are ignored.)
+ Using the \fI-gray\fR option has the same effect as setting the
+ Tgif*UseGrayScale X default for tgif (see the X DEFAULTS section below).
+ Using the \fI-adobe\fR option has the same effect as setting the
+ Tgif*UsePsAdobeString X default for tgif (see the X DEFAULTS section below).
+ If the \fI-o\fR option is not specified, the output file (eps or ps)
+ goes into the same directory as the input file. If \fI-o\fRdir
+ is specified, the output file goes into the directory specified
+ by \fIdir\fR.
+ .PP
+ Please note that only running tgif interactively can generate X11 bitmap
+ or X11 pixmap files.
+ .SH BASIC FUNCTIONALITIES
Primitive objects supported by tgif
are rectangles, ovals, rounded-corner rectangles, arcs,
*** tgif.pl.orig Tue Nov 3 22:31:29 1992
--- tgif.pl Tue Nov 3 22:31:31 1992
***************
*** 23,27 ****
% PERFORMANCE OF THIS SOFTWARE.
%
! % @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/tgif.pl,v 2.29 1992/08/08 08:27:20 william Exp $
%
--- 23,27 ----
% PERFORMANCE OF THIS SOFTWARE.
%
! % @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/tgif.pl,v 2.30 1992/11/04 04:04:39 william Exp $
%
***************
*** 130,134 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize),
tgif_chk_output(OutputObj,Obj),
--- 130,134 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize),
tgif_chk_output(OutputObj,Obj),
***************
*** 154,158 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize,_TextVSpace),
tgif_chk_output(OutputObj,Obj),
--- 154,158 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize,_TextVSpace),
tgif_chk_output(OutputObj,Obj),
***************
*** 179,183 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize,_TextVSpace),
tgif_chk_output(OutputObj,Obj),
--- 179,183 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize,_TextVSpace),
tgif_chk_output(OutputObj,Obj),
***************
*** 205,209 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize,_TextVSpace,_ZoomIn),
tgif_chk_output(OutputObj,Obj),
--- 205,209 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize,_TextVSpace,_ZoomIn),
tgif_chk_output(OutputObj,Obj),
***************
*** 231,235 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode),
tgif_chk_output(OutputObj,Obj),
--- 231,235 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode),
tgif_chk_output(OutputObj,Obj),
***************
*** 258,262 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode,
_TextRotate,_RCBoxRadius),
--- 258,262 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode,
_TextRotate,_RCBoxRadius),
***************
*** 287,291 ****
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GirdSystem,
_MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode,
_TextRotate,_RCBoxRadius,_UseGray),
--- 287,291 ----
_EnglishGridSize,_Grid,_Color,_HoriAlign,_VertAlign,_LineWidth,
_Spline,_LineStyle,_ObjFill,_PenPat,_TextJust,_Font,
! _TextStyle,_TextSize,_TextDPI,_Dash,_GridSystem,
_MetricGridSize,_TextVSpace,_ZoomIn,_GridShown,_MoveMode,
_TextRotate,_RCBoxRadius,_UseGray),
*** HISTORY.orig Tue Nov 3 22:31:44 1992
--- HISTORY Tue Nov 3 22:31:45 1992
***************
*** 1,5 ****
/*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/HISTORY,v 2.35 1992/08/14 06:18:25 william Exp $
*/
-----------------------> tgif-2.12-p10 => tgif-2.12-p11 <-----------------------
I've just put tgif-2.12-patch11 (11th patch for tgif-2.12) in the
--- 1,33 ----
/*
! * @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/HISTORY,v 2.36 1992/11/03 06:45:09 william Exp $
*/
+ -----------------------> tgif-2.12-p11 => tgif-2.12-p12 <-----------------------
+ I've just put tgif-2.12-patch12 (12th patch for tgif-2.12) in the
+ following places for anonymous ftp:
+
+ export.lcs.mit.edu:/contrib/tgif-2.12-patch12.Z
+ cs.ucla.edu:/pub/tgif/tgif-2.12-patch12.Z
+
+ 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.
-----------------------> tgif-2.12-p10 => tgif-2.12-p11 <-----------------------
I've just put tgif-2.12-patch11 (11th patch for tgif-2.12) in the
*** descrip.mms.orig Tue Nov 3 22:33:18 1992
--- descrip.mms Tue Nov 3 22:33:21 1992
***************
*** 6,10 ****
! $ DEFINE SYS SYS$LIBRARY
!
! ! @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/descrip.mms,v 2.124 1992/08/08 08:26:01 william Exp $
!
--- 6,10 ----
! $ DEFINE SYS SYS$LIBRARY
!
! ! @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/descrip.mms,v 2.124.1.3 1992/10/26 07:53:46 william Exp $
!
***************
*** 22,25 ****
--- 22,29 ----
TMP_DIR="""/sys$scratch/""")
+ !DONTFREECOLORS
+ ! Include the above line in the DEFINES if you don't want the black and
+ ! the white colors to be freed when tgif initializes itself. You should
+ ! not need to do this unless to get around some server bugs.
!USE_XAPPLRESDIR
! Include the above line in the DEFINES if $XAPPLRESDIR/Tgif is used to
***************
*** 135,140 ****
setdebug tgif.exe 0
! prtgif.exe depends_on prtgif.obj,$(OBJ1)
! link$(LFLAGS)/exe=prtgif.exe prtgif.obj,$(OBJ1),descrip.opt/opt
setdebug prtgif.exe 0
--- 139,144 ----
setdebug tgif.exe 0
! prtgif.exe depends_on prtgif.obj
! link$(LFLAGS)/exe=prtgif.exe prtgif.obj,descrip.opt/opt
setdebug prtgif.exe 0
***************
*** 264,269 ****
obj.e,pattern.e,poly.e,raster.e,ruler.e,select.e,setup.e,-
spline.e,xpixmap.e
! prtgif.obj depends_on prtgif.c, const.h,patchlevel.h,types.h,-
! file.e,grid.e,msg.e,obj.e,pattern.e,setup.e,version.e
ps.obj depends_on ps.c
raster.obj depends_on raster.c, const.h,types.h,$(RASTER_BM),-
--- 268,272 ----
obj.e,pattern.e,poly.e,raster.e,ruler.e,select.e,setup.e,-
spline.e,xpixmap.e
! prtgif.obj depends_on prtgif.c, const.h
ps.obj depends_on ps.c
raster.obj depends_on raster.c, const.h,types.h,$(RASTER_BM),-
***************
*** 312,316 ****
dup.e,file.e,font.e,grid.e,msg.e,obj.e,pattern.e,poly.e,-
prtgif.e,raster.e,ruler.e,scroll.e,setup.e,xpixmap.e
! tgif.obj depends_on tgif.c, const.h,types.h,mainloop.e,msg.e,setup.e
version.obj depends_on version.c
vms_compat.obj depends_on vms_compat.c, vms_compat.h
--- 315,320 ----
dup.e,file.e,font.e,grid.e,msg.e,obj.e,pattern.e,poly.e,-
prtgif.e,raster.e,ruler.e,scroll.e,setup.e,xpixmap.e
! tgif.obj depends_on tgif.c, const.h,patchlevel.h,types.h,-
! file.e,grid.e,mainloop.e,msg.e,obj.e,pattern.e,setup.e,version.e
version.obj depends_on version.c
vms_compat.obj depends_on vms_compat.c, vms_compat.h
*** VMS_MAKE_TGIF.COM.orig Tue Nov 3 22:39:24 1992
--- VMS_MAKE_TGIF.COM Tue Nov 3 22:39:25 1992
***************
*** 0 ****
--- 1,142 ----
+ $!
+ $! @(#)$Header: /amnt/kona/tangram/u/william/X11/TGIF2/RCS/VMS_MAKE_TGIF.COM,v 2.0 1992/08/24 06:22:06 william Exp $
+ $!
+ $! VAX/VMS command file to compile and link TGIF.
+ $!
+ $! NOTE: This command file is only to be viewed as an EXAMPLE
+ $! on how to build TGIF on a VAX/VMS system.
+ $! THIS COMMAND FILE MAY NOT WORK, NOR DO WHAT
+ $! YOU THINK IT DOES.
+ $!
+ $! Created by Mats Bergstr"om, University of Lund.
+ $!
+ $! The TGIF default extension for the object files is ".obj",
+ $! since this collides with the default VMS ".OBJ" extension
+ $! for compiled files, the name used for TGIF object files is
+ $! changed to ".tgif".
+ $! Feel free to change it at any time.
+ $! Mind the quotes below though ;-)
+ $!
+ $! Have a look at the document to change the defines BEFORE
+ $! You try to run this...
+ $!
+ $! After unpacking TGIF there are problably some files with
+ $! extension ".OBJ". Use the extension ".o" for all compiled
+ $! object files created to avoid confusion!
+ $!
+ $ define sys sys$library
+ $ define x11 decw$include
+ $!
+ $!
+ $ compile := cc/object=*.o
+ $!
+ $ defs := "( ""TGIF_DIR=""""TGIF$DIR"""""" ,"-
+ " ""TGIF_PATH=""""TGIF$DIR"""""" ,"-
+ " ""PSFILE_MOD=0664"","-
+ " ""OBJ_FILE_EXT=""""tgif"""""" ,"-
+ " ""SYM_FILE_EXT=""""sym"""""" ,"-
+ " ""EPSF_FILE_EXT=""""eps"""""" ,"-
+ " ""PS_FILE_EXT=""""ps"""""" ,"-
+ " ""XBM_FILE_EXT=""""xbm"""""" ,"-
+ " ""XPM_FILE_EXT=""""xpm"""""" ,"-
+ " ""TELEPORT_ATTR=""""warp_to="""""" ,"-
+ " ""TMP_DIR=""""SYS$SCRATCH:"""""" ,"-
+ " ""KEEP_WHEN_PRINT"","-
+ " ""PRINT_CMD=""""TGIF$PRINT"""""" ,"-
+ " ""NOTR4MODE"","-
+ " ""A4PAPER"" )"
+ $!
+ $!
+ $! Compile the stuff.
+ $ Write sys$output "Go have a cup of coffee, this will take a while..."
+ $!
+ $ compile/defi='defs' ALIGN
+ $ compile/defi='defs' ANIMATE
+ $ compile/defi='defs' ARC
+ $ compile/defi='defs' ATTR
+ $ compile/defi='defs' AUXTEXT
+ $ compile/defi='defs' BOX
+ $ compile/defi='defs' BUTTON
+ $ compile/defi='defs' CHOICE
+ $ compile/defi='defs' CMD
+ $ compile/defi='defs' COLOR
+ $ compile/defi='defs' COPYPASTE
+ $ compile/defi='defs' CURSOR
+ $ compile/defi='defs' DIALOG
+ $ compile/defi='defs' DRAWING
+ $ compile/defi='defs' DUP
+ $ compile/defi='defs' EDIT
+ $ compile/defi='defs' EPS
+ $ compile/defi='defs' FILE
+ $ compile/defi='defs' FONT
+ $ compile/defi='defs' FRONTEND
+ $ compile/defi='defs' GRID
+ $ compile/defi='defs' GROUP
+ $ compile/defi='defs' MAINLOOP
+ $ compile/defi='defs' MAINMENU
+ $ compile/defi='defs' MARK
+ $ compile/defi='defs' MENU
+ $ compile/defi='defs' MOVE
+ $ compile/defi='defs' MSG
+ $ compile/defi='defs' NAMES
+ $ compile/defi='defs' OBJ
+ $ compile/defi='defs' OVAL
+ $ compile/defi='defs' PATTERN
+ $ compile/defi='defs' POLY
+ $ compile/defi='defs' POLYGON
+ $ compile/defi='defs' PRTGIF
+ $ compile/defi='defs' PS
+ $ compile/defi='defs' RASTER
+ $ compile/defi='defs' RCBOX
+ $ compile/defi='defs' RECT
+ $ compile/defi='defs' RULER
+ $ compile/defi='defs' SCROLL
+ $ compile/defi='defs' SELECT
+ $ compile/defi='defs' SETUP
+ $ compile/defi='defs' SHORTCUT
+ $ compile/defi='defs' SPECIAL
+ $ compile/defi='defs' SPLINE
+ $ compile/defi='defs' STK
+ $ compile/defi='defs' STRETCH
+ $ compile/defi='defs' TESTDRIVE
+ $ compile/defi='defs' TEXT
+ $ compile/defi='defs' TGIF
+ $ compile/defi='defs' VERSION
+ $ compile/defi='defs' VMS_COMPAT
+ $ compile/defi='defs' XBITMAP
+ $ compile/defi='defs' XPIXMAP
+ $!
+ $!
+ $!
+ $!
+ $ delete/noconfirm tgif.olb;
+ $ library/create tgif -
+ ALIGN.o,ANIMATE.o,ARC.o,ATTR.o,AUXTEXT.o,BOX.o,BUTTON.o,CHOICE.o,CMD.o,-
+ COLOR.o,COPYPASTE.o,CURSOR.o,DIALOG.o,DRAWING.o,DUP.o,EDIT.o,EPS.o,FILE.o,-
+ FONT.o,FRONTEND.o,GRID.o,GROUP.o,MAINLOOP.o,MAINMENU.o,MARK.o,MENU.o,MOVE.o,-
+ MSG.o,NAMES.o,OBJ.o,OVAL.o,PATTERN.o,POLY.o,POLYGON.o,PS.o,RASTER.o,RCBOX.o,-
+ RECT.o,RULER.o,SCROLL.o,SELECT.o,SETUP.o,SHORTCUT.o,SPECIAL.o,SPLINE.o,-
+ STK.o,STRETCH.o,TEXT.o,VMS_COMPAT.o,XBITMAP.o,XPIXMAP.o
+ $!
+ $ delete/noconfirm -
+ ALIGN.o;,ANIMATE.o;,ARC.o;,ATTR.o;,AUXTEXT.o;,BOX.o;,BUTTON.o;,CHOICE.o;,-
+ CMD.o;,COLOR.o;,COPYPASTE.o;,CURSOR.o;,DIALOG.o;,DRAWING.o;,DUP.o;,EDIT.o;,-
+ EPS.o;,FILE.o;,FONT.o;,FRONTEND.o;,GRID.o;,GROUP.o;,MAINLOOP.o;,MAINMENU.o;,-
+ MARK.o;,MENU.o;,MOVE.o;,MSG.o;,NAMES.o;,OBJ.o;,OVAL.o;,PATTERN.o;,POLY.o;,-
+ POLYGON.o;,PS.o;,RASTER.o;,RCBOX.o;,RECT.o;,RULER.o;,SCROLL.o;,SELECT.o;,-
+ SETUP.o;,SHORTCUT.o;,SPECIAL.o;,SPLINE.o;,STK.o;,STRETCH.o;,TEXT.o;,-
+ VMS_COMPAT.o;,XBITMAP.o;,XPIXMAP.o;
+ $!
+ $! Link the stuff. NOTE "version.o" MUST be linked explicitly!!!
+ $!
+ $huuj:
+ $ link tgif.o,version.o,tgif/lib,sys$input/opt
+ sys$share:decw$xlibshr/share
+ sys$share:vaxcrtl/share
+ $ link prtgif.o,version.o,tgif/lib,sys$input/opt
+ sys$share:decw$xlibshr/share
+ sys$share:vaxcrtl/share
+ $ link testdrive.o,version.o,tgif/lib,sys$input/opt
+ sys$share:decw$xlibshr/share
+ sys$share:vaxcrtl/share
+ $!
---------------------------------> 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
Technical Details
Message-ID:
<1992Nov4.074441.5159@cs.ucla.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!sdd.hp.com!usc!ucla-cs!lanai.cs.ucla.edu!williamShow Full Headers
Complete Article Headers
Newsgroups: comp.sources.bugs Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!sdd.hp.com!usc!ucla-cs!lanai.cs.ucla.edu!william From: william@lanai.cs.ucla.edu (William Cheng) Subject: Tgif-2.12-patch12 (12th patch for tgif-2.12), Part 02/02 Message-ID: <1992Nov4.074441.5159@cs.ucla.edu> Followup-To: william@cs.ucla.edu Keywords: draw, postscript, latex, hierarchical, x11, xlib, wysiwyg, bitmap Sender: usenet@cs.ucla.edu (Mr Usenet) Nntp-Posting-Host: lanai.cs.ucla.edu Organization: UCLA, Computer Science Department Date: Wed, 4 Nov 92 07:44:41 GMT Lines: 2763