Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Dec 2002 07:43:33 -0800 (PST)
From:      Patrick Powell <papowell@astart.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/46192: port pic2fig patch files update
Message-ID:  <200212111543.gBBFhXuE040149@h110.private>

next in thread | raw e-mail | index | archive | help

>Number:         46192
>Category:       ports
>Synopsis:       port pic2fig patch files update
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 11 07:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Patrick Powell
>Release:        FreeBSD 4.6.2-RELEASE i386
>Organization:
Astart Technologies
>Environment:
System: FreeBSD h110.private 4.6.2-RELEASE FreeBSD 4.6.2-RELEASE #0: Wed Sep 4 12:34:57 PDT 2002 root@localhost:/usr/src/sys/compile/FW i386


>Description:

I am the maintainer for the pic2fig port and discovered
a small problem in the latest CVS/release.

The current port of pic2fig does not appear to have the correct
patch files - the older version and the newer ones seem to have
been combined.

>How-To-Repeat:

If you run pic2fig then the coordinate values are not correct.
This was caused by a patch being applied for the previous version.
I suspect that this file was not removed when the CVS was
updated.

>Fix:

Please remove the existing patch files for the port,
and then update the port with the ones that I have put
into this shar file.

This appears to update the CVS correctly.

Very odd...

Note that it appears that no other files other than the patch files
need to be changed.


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pic2fig
#	pic2fig/Makefile
#	pic2fig/distinfo
#	pic2fig/pkg-comment
#	pic2fig/pkg-descr
#	pic2fig/pkg-plist
#	pic2fig/files
#	pic2fig/files/patch-ae
#	pic2fig/files/patch-ac
#	pic2fig/files/patch-aa
#	pic2fig/files/patch-ab
#	pic2fig/files/patch-ad
#	pic2fig/files/patch-af
#
echo c - pic2fig
mkdir -p pic2fig > /dev/null 2>&1
echo x - pic2fig/Makefile
sed 's/^X//' >pic2fig/Makefile << 'END-of-pic2fig/Makefile'
X# New ports collection makefile for:    pic2fig
X# Date created:         14 Jan 2001
X# Whom:                 Patrick Powell <papowell@astart.com>
X#
X# $FreeBSD: ports/print/pic2fig/Makefile,v 1.2 2001/01/28 22:26:55 sf Exp $
X
XPORTNAME=	pic2fig
XPORTVERSION=	1.4
XCATEGORIES=	print
XMASTER_SITES=	${MASTER_SITE_XCONTRIB}
XMASTER_SITE_SUBDIR=	utilities
XEXTRACT_SUFX=	.tar.Z
X
XMAINTAINER=	papowell@astart.com
X
XWRKSRC=		${WRKDIR}/${PORTNAME}
XMAN1=		pic2fig.1
X
Xdo-install:
X	${INSTALL_PROGRAM} -m 755 ${WRKSRC}/pic2fig ${PREFIX}/bin
X	${INSTALL_MAN} ${WRKSRC}/pic2fig.1 ${PREFIX}/man/man1
X
X.include <bsd.port.mk>
END-of-pic2fig/Makefile
echo x - pic2fig/distinfo
sed 's/^X//' >pic2fig/distinfo << 'END-of-pic2fig/distinfo'
XMD5 (pic2fig-1.4.tar.Z) = 98845b0fc9d9ad7e9484f22ef3057996
END-of-pic2fig/distinfo
echo x - pic2fig/pkg-comment
sed 's/^X//' >pic2fig/pkg-comment << 'END-of-pic2fig/pkg-comment'
XPic format to fig format converter
END-of-pic2fig/pkg-comment
echo x - pic2fig/pkg-descr
sed 's/^X//' >pic2fig/pkg-descr << 'END-of-pic2fig/pkg-descr'
XPic2fig is a pic(l) preprocessor for drawing simple figures in Fig code.
XThe basic objects are box, line, arrow, circle, ellipse, arc and text.
X
XWhen  pic2fig  is  executed, it produces an output file in the
Xcurrent directory.  The name is constructed  from  the input  file's
Xname.  If the input filename ends with .pic, then that extension
Xwill be replaced by .fig.   Otherwise, .fig  is appended to the input
Xfilename.  If file does not exist, then pic2fig tries appending .pic
Xto the name.
X
XUpdated to produce FIG 3.2 format by Patrick Powell <papowell@astart.com>
X
XWeb Site: ftp://ftp.x.org/contrib/utilities/
X
XNote:  this version does not support the groff/pic 'thickness' attribute.
END-of-pic2fig/pkg-descr
echo x - pic2fig/pkg-plist
sed 's/^X//' >pic2fig/pkg-plist << 'END-of-pic2fig/pkg-plist'
Xbin/pic2fig
END-of-pic2fig/pkg-plist
echo c - pic2fig/files
mkdir -p pic2fig/files > /dev/null 2>&1
echo x - pic2fig/files/patch-ae
sed 's/^X//' >pic2fig/files/patch-ae << 'END-of-pic2fig/files/patch-ae'
X*** pic2fig.1.orig	Thu Feb  7 11:04:33 2002
X--- pic2fig.1	Thu Feb  7 11:29:57 2002
X***************
X*** 55,60 ****
X--- 55,105 ----
X  must be given in the first column.  Changing the drawing thickness applies
X  to solid, dashed, and dotted lines, as well as circles, arcs, and ellipses.
X  .PP
X+ Setting the font for text may be done using a
X+ .ti +.5i
X+ \&.ft \fIn\fR
X+ 
X+ command, where \fIn\fR corresponds to the following PostScript fonts:
X+ .nf
X+ -1	Default font
X+  0	Times Roman           
X+  1	Times Italic          
X+  2	Times Bold            
X+  3	Times Bold Italic    
X+  4	AvantGarde Book      
X+  5	AvantGarde Book Oblique 
X+  6	AvantGarde Demi
X+  7	AvantGarde Demi Oblique
X+  8	Bookman Light
X+  9	Bookman Light Italic
X+ 10	Bookman Demi
X+ 11	Bookman Demi Italic
X+ 12	Courier
X+ 13	Courier Oblique
X+ 14	Courier Bold
X+ 15	Courier Bold Oblique
X+ 16	Helvetica
X+ 17	Helvetica Oblique
X+ 18	Helvetica Bold
X+ 19	Helvetica Bold Oblique
X+ 20	Helvetica Narrow
X+ 21	Helvetica Narrow Oblique
X+ 22	Helvetica Narrow Bold
X+ 23	Helvetica Narrow Bold Oblique
X+ 24	New Century Schoolbook Roman
X+ 25	New Century Schoolbook Italic
X+ 26	New Century Schoolbook Bold
X+ 27	New Century Schoolbook Bold Italic
X+ 28	Palatino Roman
X+ 29	Palatino Italic
X+ 30	Palatino Bold
X+ 31	Palatino Bold Italic
X+ 32	Symbol
X+ 33	Zapf Chancery Medium Italic
X+ 34	Zapf Dingbats
X+ .fi
X+ 
X+ .PP
X  Normally, the distance between text is 12 points.  If you're using larger
X  text to label objects, this should be set to an appropriate larger value.
X  This can be done using the
END-of-pic2fig/files/patch-ae
echo x - pic2fig/files/patch-ac
sed 's/^X//' >pic2fig/files/patch-ac << 'END-of-pic2fig/files/patch-ac'
X*** figd.c.orig	Sat Aug  6 19:52:43 1988
X--- figd.c	Thu Feb  7 11:19:49 2002
X***************
X*** 6,18 ****
X   *
X   * Modified by Micah Beck to produce Fig code
X   * Modified by Micah Beck again to produce Fig 1.4 code
X   */
X  
X  #include <stdio.h>
X  #include <ctype.h>
X  #include "object.h"
X  
X! #define DEF_PEN_SIZE	8	/* Default pen diameter */
X  #define	MAXPOINTS	300	/* Max number of points in a path */
X  
X  #define bool int
X--- 6,21 ----
X   *
X   * Modified by Micah Beck to produce Fig code
X   * Modified by Micah Beck again to produce Fig 1.4 code
X+  * Modified by Patrick Powell to produce Fig 3.2 code
X   */
X  
X  #include <stdio.h>
X  #include <ctype.h>
X  #include "object.h"
X  
X! /* #define DEF_PEN_SIZE	8	/ * Default pen diameter */
X! #define DEF_PEN_SIZE	1	/* Default pen diameter */
X! #define DEF_FONT_SIZE	12	/* Default pen diameter */
X  #define	MAXPOINTS	300	/* Max number of points in a path */
X  
X  #define bool int
X***************
X*** 23,28 ****
X--- 26,33 ----
X  #define	P_BLACK		15
X  #define	TEXTURE		3
X  #define ORTEXTURE	7
X+ #define FONT_HT 12
X+ #define FONT_WIDTH 8
X  
X  extern	double	sqrt(), cos(), sin();
X  
X***************
X*** 31,41 ****
X  #define RES			1000.0
X  #define Pix_To_In(x)		(((float) x) / RES)
X  
X! #define FIGRES			80
X  #define FIGCANV_W		(8*FIGRES)
X  #define FIGCANV_H		(10*FIGRES)
X  #define Pix_To_Figpix(x)	((int)(FIGRES * Pix_To_In(x)))
X! #define Pen_to_Figpix(x)	((x*FIGRES + 500) / 1000)
X  
X  
X  extern	int dbg;		/* Non-zero when debugging info wanted */
X--- 36,50 ----
X  #define RES			1000.0
X  #define Pix_To_In(x)		(((float) x) / RES)
X  
X! /* #define FIGRES			80 */
X! #define FIGRES			1200
X  #define FIGCANV_W		(8*FIGRES)
X  #define FIGCANV_H		(10*FIGRES)
X+ #define Points_To_Figpix(x)	((int)(FIGRES * (x)/72.0))
X  #define Pix_To_Figpix(x)	((int)(FIGRES * Pix_To_In(x)))
X! /* #define Pen_to_Figpix(x)	((x*FIGRES + 500) / 1000) */
X! /* pen thickness in 1/80 of inch */
X! #define Pen_to_Figpix(x)	((Pix_To_In(x) + 79) / 80)
X  
X  
X  extern	int dbg;		/* Non-zero when debugging info wanted */
X***************
X*** 44,51 ****
X  static	float xslope,yslope,xbase,ybase;/* Convert Window to Viewport */
X  static	int arraylen;		/* Number of points in current path */
X  static	bool pathsent;		/* True if path has been defined */
X! static	int ipensize;		/* Desired current pen size */
X  extern	FILE *TEXFILE;		/* Output file */
X  
X  
X  /*
X--- 53,62 ----
X  static	float xslope,yslope,xbase,ybase;/* Convert Window to Viewport */
X  static	int arraylen;		/* Number of points in current path */
X  static	bool pathsent;		/* True if path has been defined */
X! static	int ipensize = DEF_PEN_SIZE;		/* Desired current pen size */
X! static	int ifontsize = DEF_FONT_SIZE;		/* Desired current font size */
X  extern	FILE *TEXFILE;		/* Output file */
X+ int     font = -1;  /* font number */
X  
X  
X  /*
X***************
X*** 62,68 ****
X  	yslope = RES * (hiypage-loypage) / (hiy-loy);
X  	ybase  = RES * loypage - loy*yslope;
X  	if (dbg)
X! 	    printf("Coefficients: %10.5f%10.5f%10.5f%10.5f\n",
X  		xslope,xbase,yslope,ybase);
X  }
X  
X--- 73,79 ----
X  	yslope = RES * (hiypage-loypage) / (hiy-loy);
X  	ybase  = RES * loypage - loy*yslope;
X  	if (dbg)
X! 	    printf("Coefficients: %10.5f  %10.5f  %10.5f  %10.5f\n",
X  		xslope,xbase,yslope,ybase);
X  }
X  
X***************
X*** 70,83 ****
X--- 81,98 ----
X  /*
X   * Set the size of the virtual pen used in drawing
X   */
X+ static sendpath();
X  pensize(x)
X  int	x;
X  {
X  	if (x != ipensize) {
X  	    ipensize = Pen_to_Figpix(x);
X+         ifontsize = x;
X+ 		if( ipensize == 0 ) ipensize = 1;
X  	    if (!pathsent) sendpath();
X  	    clearpath();
X  	}
X+ 	if( dbg) printf("pensize %d -> %d\n", x, ipensize );
X  }
X  
X  
X***************
X*** 149,172 ****
X  float	x, y;
X  int	position;	/* Indicates what part of text is at (x,y) */
X  {
X!     int	    ix, iy, offset;
X!     char    *cp;
X      map(x, y, &ix, &iy, 1);
X  
X!     for (cp = text; *cp && isspace(*text); cp++);
X      if (!*cp) return;
X  
X  #ifdef TEXT_LEFT_ONLY
X!     if (position != T_LEFT_JUSTIFIED) offset = strlen(cp)*8;
X      if (position == T_CENTER_JUSTIFIED) offset = offset/2;
X      position = T_LEFT_JUSTIFIED;
X  #else
X      offset = 0;
X  #endif TEXT_LEFT_ONLY
X  
X      fprintf(TEXFILE, "%d %d %d %d %d %d %6.3f %d %d %d %d %d %s%c\n",
X! 	O_TEXT, position, -1, -1, -1, -1, 0.0, -1, 16, strlen(cp)*8,
X  	Pix_To_Figpix(ix) - offset, Pix_To_Figpix(iy), cp, '\01');
X  }
X  
X  
X--- 164,248 ----
X  float	x, y;
X  int	position;	/* Indicates what part of text is at (x,y) */
X  {
X!     int	    ix, iy, offset, c;
X!     unsigned char    *cp;
X      map(x, y, &ix, &iy, 1);
X  
X!     for (cp = (unsigned char *)text; isspace(*cp); cp++);
X      if (!*cp) return;
X  
X  #ifdef TEXT_LEFT_ONLY
X!     if (position != T_LEFT_JUSTIFIED) offset = strlen(cp)*Points_To_Figpix(ifontsize);
X      if (position == T_CENTER_JUSTIFIED) offset = offset/2;
X      position = T_LEFT_JUSTIFIED;
X  #else
X      offset = 0;
X  #endif TEXT_LEFT_ONLY
X  
X+ /* FORMAT 1.4 CODE
X      fprintf(TEXFILE, "%d %d %d %d %d %d %6.3f %d %d %d %d %d %s%c\n",
X!                    4   justification (0,1,2)
X!                             font (unused)
X!                                fontsize (unused)
X!                                   pen (unused)
X!                                      color
X!                                         depth
X!                                           angle (not used)
X!                                               height (pixels)
X!                                                  length (pixels)
X!                                                 
X! 	4, position, -1, -1, -1, -1, 0.0, -1, 16, strlen(cp)*Points_To_Figpix(ifontsize),
X  	Pix_To_Figpix(ix) - offset, Pix_To_Figpix(iy), cp, '\01');
X+ Example:
X+ 4 1 -1 -1 -1 -1  0.000 -1 16 24 229 603 FEP^A
X+ 
X+ FORMAT 3.2 CODE
X+ Example:
X+ 4 1 -1 0 -1 -1 12 0.0000 4 135 330 3450 9060 FEP\001 
X+ 1 2  3 4  5  6  7 8      9  10  11  12  13   14
X+     (3.7) TEXT
X+     type    name            (brief description)
X+     ----    ----            -------------------
X+     int object          (always 4)                  1
X+     int sub_type        (0: Left justified          2
X+                          1: Center justified
X+                          2: Right justified)
X+     int color           (enumeration type)          3
X+     int depth           (enumeration type)          4
X+     int pen_style       (enumeration , not used)    5
X+     int font            (enumeration type)          6
X+     float   font_size       (font size in points)   7
X+     float   angle           (radians, the angle of the text) 8
X+     int font_flags      (bit vector)                9
X+     float   height          (Fig units)             10
X+     float   length          (Fig units)             11
X+     int x, y            (Fig units, coordinate of the origin  12,13
X+                      of the string.  If sub_type = 0, it is
X+                      the lower left corner of the string.
X+                      If sub_type = 1, it is the lower
X+                      center.  Otherwise it is the lower
X+                      right corner of the string.)
X+     char    string[]        (ASCII characters; starts after a blank  14
X+                      character following the last number and
X+                      ends before the sequence '\001'.  This
X+                      sequence is not part of the string.
X+ 
X+ 
X+ */
X+     if(dbg) printf("string (%d,%d) '%s'\n", Pix_To_Figpix(ix-offset), Pix_To_Figpix(iy), cp );
X+ 		
X+     fprintf(TEXFILE, "%d %d %d %d %d %d %d %6.3f %d %d %d %d %d ",
X+ 	O_TEXT, position,       -1, 0,-1,font,ifontsize,0.0,   4,Pix_To_Figpix(FONT_HT),Pix_To_Figpix(strlen(cp)*FONT_WIDTH),
X+ 		Pix_To_Figpix(ix-offset), Pix_To_Figpix(iy));
X+ 	while( (c = ((unsigned char *)(cp))[0]) ){
X+ 		if( c == '\\' ){
X+ 			fprintf(TEXFILE, "\\\\");
X+ 		} else if( isprint(c) || isspace(c) ){
X+ 			fprintf(TEXFILE, "%c", c);
X+ 		}
X+ 		++cp;
X+ 	}
X+ 	fprintf(TEXFILE, "\\001\n");
X  }
X  
X  
X***************
X*** 208,223 ****
X  {
X  	register int i;
X  
X! 	if (dbg) printf("Sending path ...%d\n", arraylen);
X  	if (arraylen > 1) {
X  
X  	    fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X  		O_POLYLINE, T_POLYLINE, SOLID_LINE,
X  		ipensize, -1, -1, -1, -1, -1, 0, 0);
X! 	    for (i=1; i<=arraylen; i++)
X! 		fprintf(TEXFILE, "%d %d ",
X  			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 	    fprintf(TEXFILE, "9999 9999\n");
X  	}
X  
X  	pathsent = TRUE;
X--- 284,337 ----
X  {
X  	register int i;
X  
X! 	if (dbg) printf("Sendpath [%d], ipensize %d\n", arraylen, ipensize);
X  	if (arraylen > 1) {
X  
X+ 	/*
X  	    fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X  		O_POLYLINE, T_POLYLINE, SOLID_LINE,
X  		ipensize, -1, -1, -1, -1, -1, 0, 0);
X! 
X! Example:
X!         2 1 0 1 -1 -1 -1 -1 -1 0 0
X!         19 149  19 9  179 9  179 149  19 149  9999 9999
X! 
X! New format:
X!        2 1 0 1 -1 -1 0 -1 -1 -1.000 0 0 -1 0 0 5
X!        code     pen_color
X!          type      fill_color
X!            line style 
X!                      depth
X!                        pen_style
X!                              style_value
X!                                    join_style
X!                                       cap_style
X!                                           radius
X!                                              forward_arrow
X!                                                 count
X!              thickness (1/80 inch)
X!            -1 = Default
X!             0 = Solid
X!             1 = Dashed
X!             2 = Dotted
X!             3 = Dash-dotted
X!             4 = Dash-double-dotted
X!             5 = Dash-triple-dotted
X! 
X!        300 2250 300 150 2700 150 2700 2250 300 2250
X! 
X! 
X! 	*/
X! 	    fprintf(TEXFILE, "%d %d %d %d -1 -1 0 -1 -1 -1.000 0 0 -1 0 0 %d\n  ",
X! 		2, T_POLYLINE, SOLID_LINE, ipensize, arraylen );
X! 	    for (i=1; i<=arraylen; i++){
X! 			if (dbg) printf(" (%d,%d)", Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 			fprintf(TEXFILE, "%d %d ",
X  			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 		}
X! 		if (dbg) printf("\n", Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 	    /* fprintf(TEXFILE, "9999 9999\n"); */
X! 	    fprintf(TEXFILE, "\n");
X  	}
X  
X  	pathsent = TRUE;
X***************
X*** 234,250 ****
X  {
X  	register int i;
X  
X! 	if (dbg) printf("Sending path ...%d\n", arraylen);
X  	if (arraylen < 2) return;
X  	else {
X  	    fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X  		O_POLYLINE, T_POLYLINE,
X  		(dotted ? DOTTED_LINE : DASH_LINE), ipensize,
X  		-1, -1, -1, -1, -1, 0, 0);
X! 	    for (i=1; i<=arraylen; i++)
X  		fprintf(TEXFILE, "%d %d ",
X  			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 	    fprintf(TEXFILE, "9999 9999\n");
X  	}
X  
X  	pathsent = TRUE;
X--- 348,373 ----
X  {
X  	register int i;
X  
X! 	if (dbg) printf("Send_dashed_path ...%d, inchesperdash %f, dotted %d\n",
X! 		arraylen, inchesperdash, dotted );
X  	if (arraylen < 2) return;
X  	else {
X+ /*
X  	    fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X  		O_POLYLINE, T_POLYLINE,
X  		(dotted ? DOTTED_LINE : DASH_LINE), ipensize,
X  		-1, -1, -1, -1, -1, 0, 0);
X!  */
X! 	    fprintf(TEXFILE, "%d %d %d %d -1 -1 0 -1 -1 %f 0 0 -1 0 0 %d\n  ",
X! 		2, T_POLYLINE, (dotted? DOTTED_LINE: DASH_LINE), ipensize,
X! 			inchesperdash*80,
X! 			arraylen );
X! 	    for (i=1; i<=arraylen; i++){
X  		fprintf(TEXFILE, "%d %d ",
X  			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 		}
X! 	    /* fprintf(TEXFILE, "9999 9999\n"); */
X! 	    fprintf(TEXFILE, "\n");
X  	}
X  
X  	pathsent = TRUE;
X***************
X*** 294,300 ****
X  fig_arc(xcenter, ycenter, xradius, yradius, start, stop)
X  float	xcenter, ycenter, xradius, yradius, start, stop;
X  {
X!     int X0, Y0, xrad, yrad, xend, yend;
X      extern double cos(), sin();
X  
X      map(xcenter, ycenter, &X0, &Y0, FALSE);
X--- 417,423 ----
X  fig_arc(xcenter, ycenter, xradius, yradius, start, stop)
X  float	xcenter, ycenter, xradius, yradius, start, stop;
X  {
X!     int X0, Y0, xrad, yrad, xend, yend, xstart, ystart;
X      extern double cos(), sin();
X  
X      map(xcenter, ycenter, &X0, &Y0, FALSE);
X***************
X*** 304,321 ****
X      if (is_onarc(PI/2, start, stop)) ckbounds(X0, Y0+yrad);
X      if (is_onarc(PI, start, stop)) ckbounds(X0-xrad, Y0);
X      if (is_onarc(1.5*PI, start, stop)) ckbounds(X0, Y0-yrad);
X!     xend = X0 + xrad * cos(start) + 0.5;
X!     yend = Y0 + yrad * sin(start) + 0.5;
X!     ckbounds(xend, yend);
X      xend = X0 + xrad * cos(stop);
X      yend = Y0 + yrad * sin(stop);
X      ckbounds(xend, yend);
X  
X      fprintf(TEXFILE, "%d %d %d %d %d, %d %d %d %d %d %d %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f\n",
X  		O_ELLIPSE, T_ELLIPSE_BY_RAD,
X  	        SOLID_LINE, ipensize, -1, -1, -1, -1, -1, 1, 0.0,
X  		Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X  		Pix_To_Figpix(xrad), Pix_To_Figpix(yrad), 0.0, 0.0, 0.0, 0.0);
X  }
X  
X  
X--- 427,511 ----
X      if (is_onarc(PI/2, start, stop)) ckbounds(X0, Y0+yrad);
X      if (is_onarc(PI, start, stop)) ckbounds(X0-xrad, Y0);
X      if (is_onarc(1.5*PI, start, stop)) ckbounds(X0, Y0-yrad);
X!     xstart = X0 + xrad * cos(start) + 0.5;
X!     ystart = Y0 + yrad * sin(start) + 0.5;
X!     ckbounds(xstart, ystart);
X      xend = X0 + xrad * cos(stop);
X      yend = Y0 + yrad * sin(stop);
X      ckbounds(xend, yend);
X+ 	if(dbg) printf("Ellipse: X0 %d, Y0 %d, xrad %d, yrad %d, xstart %d, ystart %d, xend %d, yend %d\n",
X+ 		Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X+ 		Pix_To_Figpix(xrad), Pix_To_Figpix(yrad),
X+ 		Pix_To_Figpix(xstart), Pix_To_Figpix(ystart),
X+ 		Pix_To_Figpix(xend), Pix_To_Figpix(yend));
X+ 
X+ /*
X+     int object_code     (always 1)
X+     int sub_type        (1 : ellipse defined by radiuses
X+                      2 : ellipse defined by diameters
X+                      3 : circle defined by radius
X+                      4 : circle defined by diameter)
X+     int line_style      (See the end of this section)
X+     int thickness       (pixels, not used)
X+     int color           (not used)
X+     int depth           (not used)
X+     int pen         (not used)
X+     int area_fill       (not used)
X+     float   style_val       (pixels, not used)
X+     int direction       (always 1)
X+     float   angle           (radian, the angle of the x-axis)
X+     int center_x, center_y  (pixels)
X+     int radius_x, radius_y  (pixels)
X+     int start_x, start_y    (pixels; the 1st point entered)
X+     int end_x, end_y        (pixels; the last point entered)
X+ 
X+ Example:
X+   1 1 0 1 -1, -1 -1 -1 -1 1 0  0.000  0.000  0.000  0.000  0.000  0.000
X  
X      fprintf(TEXFILE, "%d %d %d %d %d, %d %d %d %d %d %d %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f\n",
X  		O_ELLIPSE, T_ELLIPSE_BY_RAD,
X  	        SOLID_LINE, ipensize, -1, -1, -1, -1, -1, 1, 0.0,
X  		Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X  		Pix_To_Figpix(xrad), Pix_To_Figpix(yrad), 0.0, 0.0, 0.0, 0.0);
X+ 
X+ 
X+     int object_code     (always 1)
X+     int sub_type        (1: ellipse defined by radii
X+                      2: ellipse defined by diameters
X+                      3: circle defined by radius
X+                      4: circle defined by diameter)
X+     int line_style      (enumeration type)
X+     int thickness       (1/80 inch)
X+    --
X+     int pen_color       (enumeration type, pen color)
X+     int fill_color      (enumeration type, fill color)
X+     int depth           (enumeration type)
X+     int pen_style       (pen style, not used)
X+     int area_fill       (enumeration type, -1 = no fill)
X+     float   style_val       (1/80 inch)
X+     int direction       (always 1)
X+     float   angle           (radians, the angle of the x-axis)
X+     int center_x, center_y  (Fig units)
X+     int radius_x, radius_y  (Fig units)
X+     int start_x, start_y    (Fig units; the 1st point entered)
X+     int end_x, end_y        (Fig units; the last point entered)
X+ 
X+ Example:
X+    1 1 0 1 0 7 50 0 -1 0.000 1 0.0000 1125 975 675 375 1125 975 1800 1350
X+            pen      areafill
X+              fill      styleval
X+                depth
X+                   pen_style
X+ */
X+ 
X+ 
X+     fprintf(TEXFILE, "%d %d %d %d", O_ELLIPSE, T_ELLIPSE_BY_RAD, SOLID_LINE, ipensize );
X+ 	fprintf(TEXFILE, " 0 7 50 0 -1 0.0 1 0.0" );
X+ 	fprintf(TEXFILE, " %d %d %d %d %d %d %d %d\n",
X+ 		Pix_To_Figpix(X0), Pix_To_Figpix(Y0),
X+ 		Pix_To_Figpix(xrad), Pix_To_Figpix(yrad),
X+ 		Pix_To_Figpix(xstart), Pix_To_Figpix(ystart),
X+ 		Pix_To_Figpix(xend), Pix_To_Figpix(yend));
X  }
X  
X  
X***************
X*** 347,360 ****
X   */
X  fig_begin_drawing()
X  {
X!   	fprintf(TEXFILE, "#FIG 1.4\n%d %d\n", FIGRES, 2);
X  
X  	fig_window(0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 3.0, 3.0);
X  	xmin = 30000;	xmax = -30000;
X  	ymin = 30000;	ymax = -30000;
X  	arraylen = 0;
X  	pathsent = FALSE;
X! 	ipensize = Pen_to_Figpix(DEF_PEN_SIZE);
X  }
X  
X  
X--- 537,592 ----
X   */
X  fig_begin_drawing()
X  {
X! 
X! /*
X! (1) The very first line is a comment line containing the name and version:
X!     #FIG 3.2
X! (2) The first non-comment line consists of the following:
X! 
X!     string  orientation     ("Landscape" or "Portrait")
X!     string  justification       ("Center" or "Flush Left")
X!     string  units           ("Metric" or "Inches")
X!     string  papersize       ("Letter", "Legal", "Ledger", "Tabloid",
X!                      "A", "B", "C", "D", "E",
X!                      "A4",   "A3", "A2", "A1", "A0" and "B5")
X!     float   magnification       (export and print magnification, %)
X!     string  multiple-page       ("Single" or "Multiple" pages)
X!     int transparent color   (color number for transparent color for GIF
X!                      export. -3=background, -2=None, -1=Default,
X!                      0-31 for standard colors or 32- for user colors)
X!     # optional comment      (An optional set of comments may be here,
X!                      which are associated with the whole figure)
X!     int resolution coord_system (Fig units/inch and coordinate system:
X!                        1: origin at lower left corner (NOT USED)
X!                        2: upper left)
X! Example:
X!    #FIG 3.2
X!    Landscape
X!    Center
X!    Inches
X!    Letter
X!    100.00
X!    Single
X!    -2
X!    1200 2
X! 
X! */
X!   	fprintf(TEXFILE, "#FIG 3.2\n");
X!   	fprintf(TEXFILE, "Landscape\n");
X!   	fprintf(TEXFILE, "Center\n");
X!   	fprintf(TEXFILE, "Inches\n");
X!   	fprintf(TEXFILE, "Letter\n");
X!   	fprintf(TEXFILE, "100.00\n");
X!   	fprintf(TEXFILE, "Single\n");
X!   	fprintf(TEXFILE, "-2\n");
X!   	fprintf(TEXFILE, "%d %d\n", FIGRES, 2 );
X  
X  	fig_window(0.0, 0.0, 10.0, 10.0, 0.0, 0.0, 3.0, 3.0);
X  	xmin = 30000;	xmax = -30000;
X  	ymin = 30000;	ymax = -30000;
X  	arraylen = 0;
X  	pathsent = FALSE;
X! 	pensize(DEF_PEN_SIZE);
X  }
X  
X  
X***************
X*** 392,406 ****
X  	clearpath();
X      }
X  
X      fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X  	O_SPLINE, T_OPEN_NORMAL,
X  	SOLID_LINE, ipensize, -1, -1, -1, -1, -1, 0, 0);
X      for (i=1; i<N; i++) {
X! 	ckbounds(xx[i], yy[i]);
X! 	fprintf(TEXFILE, "%d %d ",
X! 		Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X!       }
X!     fprintf(TEXFILE, "9999 9999\n");	
X  }
X  
X  
X--- 624,690 ----
X  	clearpath();
X      }
X  
X+ /*
X      fprintf(TEXFILE, "%d %d %d %d %d %d %d %d %d %d %d\n",
X  	O_SPLINE, T_OPEN_NORMAL,
X  	SOLID_LINE, ipensize, -1, -1, -1, -1, -1, 0, 0);
X+     fprintf(TEXFILE, "9999 9999\n");
X+ 
X+ New format:
X+     int object_code     (always 3)
X+     int sub_type        (0: open approximated spline
X+                          1: closed approximated spline
X+                          2: open   interpolated spline
X+                          3: closed interpolated spline
X+                          4: open   x-spline
X+                          5: closed x-spline)
X+     int line_style      (See the end of this section)
X+     int thickness       (1/80 inch)
X+     int pen_color       (enumeration type, pen color)
X+     int fill_color      (enumeration type, fill color)
X+     int depth           (enumeration type)
X+     int pen_style       (pen style, not used)
X+     int area_fill       (enumeration type, -1 = no fill)
X+     float   style_val       (1/80 inch)
X+     int cap_style       (enumeration type, only used for open splines)
X+     int forward_arrow       (0: off, 1: on)
X+     int backward_arrow      (0: off, 1: on)
X+     int npoints         (number of control points in spline)
X+ 
X+     Forward arrow line: same as ARC object
X+ 
X+     Backward arrow line: same as ARC object
X+ 
X+     Points line: same as POLYLINE object
X+ 
X+     Control points line :
X+ 
X+     There is one shape factor for each point. The value of this factor
X+     must be between -1 (which means that the spline is interpolated at
X+     this point) and 1 (which means that the spline is approximated at
X+     this point). The spline is always smooth in the neighbourhood of a
X+     control point, except when the value of the factor is 0 for which
X+     there is a first-order discontinuity (i.e. angular point).
X+ 
X+ Example:
X+     3 2 0 1 0 7 50 0 -1 0.000 0 0 0 3
X+      975 1950 1875 1500 2550 1950
X+      0.000 -1.000 0.000
X+ 
X+ */
X+     fprintf(TEXFILE, "%d %d %d %d", 3, 2, SOLID_LINE, ipensize );
X+ 	fprintf(TEXFILE, " 0 7 50 0 -1 0.000 0 0 0 %d\n  ", N-1 );
X      for (i=1; i<N; i++) {
X! 		ckbounds(xx[i], yy[i]);
X! 		fprintf(TEXFILE, " %d %d",
X! 			Pix_To_Figpix(xx[i]), Pix_To_Figpix(yy[i]));
X! 	}
X!     fprintf(TEXFILE, "\n  ");
X!     fprintf(TEXFILE, " 0.0");
X!     for (i=2; i<N-1; i++) {
X! 		fprintf(TEXFILE, " -1.0");
X! 	}
X!     fprintf(TEXFILE, " 0.0\n");
X  }
X  
X  
END-of-pic2fig/files/patch-ac
echo x - pic2fig/files/patch-aa
sed 's/^X//' >pic2fig/files/patch-aa << 'END-of-pic2fig/files/patch-aa'
X*** FORMAT3.2.orig	Thu Feb  7 11:05:12 2002
X--- FORMAT3.2	Thu Feb  7 11:08:04 2002
X***************
X*** 0 ****
X--- 1,563 ----
X+ /*
X+  * FIG : Facility for Interactive Generation of figures
X+  * Copyright (c) 1985 by Supoj Sutanthavibul
X+  * Parts Copyright (c) 1989-1999 by Brian V. Smith
X+  * Parts Copyright (c) 1991 by Paul King
X+  * Parts Copyright (c) 1995 by C. Blanc and C. Schlick
X+  *
X+  * The X Consortium, and any party obtaining a copy of these files from
X+  * the X Consortium, directly or indirectly, is granted, free of charge, a
X+  * full and unrestricted irrevocable, world-wide, paid up, royalty-free,
X+  * nonexclusive right and license to deal in this software and
X+  * documentation files (the "Software"), including without limitation the
X+  * rights to use, copy, modify, merge, publish, distribute, sublicense,
X+  * and/or sell copies of the Software, and to permit persons who receive
X+  * copies from any such party to do so, with the only requirement being
X+  * that this copyright notice remain intact.  This license includes without
X+  * limitation a license to do the foregoing actions under any patents of
X+  * the party supplying this software to the X Consortium.
X+  */
X+ 
X+ The new components in protocol 3.2 are the paper size, magnification,
X+ single/multiple page indicator and transparent color for GIF export in the
X+ header.
X+ 
X+ The other modification between version 3.1 and version 3.2 of the
X+ protocol is the mathematical model used for splines. The new version
X+ uses X-splines which allows the user to mix interpolation and approximation
X+ points in a same curve. More precisely, it means that an X-spline curve
X+ is neither an interpolated spline nor an approximated one, it is BOTH
X+ (the behaviour of each point is controlled by one single parameter
X+ called "shape factor"). For additional information about X-splines, see:
X+ 
X+   "X-Splines: A Spline Model Designed for the End User"
X+   by C. Blanc and C. Schlick, Proceedings of SIGGRAPH'95
X+ 
X+ Caveat: Because spline models of previous versions (quadratic B-splines
X+ and Bezier with hidden points) are no longer supported, curves that are
X+ present in version 3.1 and older files are automatically converted to
X+ X-splines. This translation is only an approximation process. It means
X+ that the converted curves are not exactly the same as the original ones.
X+ Though the translation usually provides almost identical curves, some
X+ hand-fitting may be needed in some pathological cases.
X+ 
X+ -------------------------------------------------------------------------------
X+ Description of the Fig Format Follows
X+ -------------------------------------------------------------------------------
X+ 
X+ (1) The very first line is a comment line containing the name and version:
X+ 	#FIG 3.2
X+ 
X+     The character # at the first column of a line indicates that the line
X+     is a comment line which will be preserved when the Fig file is read in.
X+     The user may edit them with the popup editor.  
X+ 
X+     The comment line(s) must immediately precede the object to which they
X+     are associated.  In the case of the "whole figure comments" mentioned
X+     below, they immediately precede the (resolution,coord_system) line.
X+ 
X+ (2) The first non-comment line consists of the following:
X+ 
X+ 	string	orientation		("Landscape" or "Portrait")
X+ 	string	justification		("Center" or "Flush Left")
X+ 	string	units			("Metric" or "Inches")
X+ 	string	papersize		("Letter", "Legal", "Ledger", "Tabloid",
X+ 					 "A", "B", "C", "D", "E",
X+ 					 "A4",   "A3", "A2", "A1", "A0" and "B5")
X+ 	float	magnification		(export and print magnification, %)
X+ 	string	multiple-page		("Single" or "Multiple" pages)
X+ 	int	transparent color	(color number for transparent color for GIF
X+ 					 export. -3=background, -2=None, -1=Default,
X+ 					 0-31 for standard colors or 32- for user colors)
X+ 	# optional comment		(An optional set of comments may be here,
X+ 					 which are associated with the whole figure)
X+ 	int	resolution coord_system	(Fig units/inch and coordinate system:
X+ 					   1: origin at lower left corner (NOT USED)
X+ 					   2: upper left)
X+ 
X+     Fig_resolution is the resolution of the figure in the file.
X+     Xfig will always write the file with a resolution of 1200ppi so it
X+     will scale the figure upon reading it in if its resolution is different
X+     from 1200ppi.  Pixels are assumed to be square.
X+ 
X+     Xfig will read the orientation string and change the canvas to match
X+     either the Landscape or Portrait mode of the figure file.
X+ 
X+     The units specification is self-explanatory.
X+ 
X+     The coordinate_system variable is ignored - the origin is ALWAYS the
X+     upper-left corner.
X+ 
X+     ** Coordinates are given in "fig_resolution" units.
X+     ** Line thicknesses are given in 1/80 inch (0.3175mm) or 1 screen pixel.
X+        When exporting to EPS, PostScript or any bitmap format (e.g. GIF),  the
X+        line thickness is reduced to 1/160 inch (0.159mm) to "lighten" the look.
X+     ** dash-lengths/dot-gaps are given in 80-ths of an inch.
X+ 
X+ 
X+ (3) The rest of the file contains various objects.  An object can be one
X+     of six classes (or types).
X+ 
X+ 	0)	Color pseudo-object.
X+ 	1)	Arc.
X+ 	2)	Ellipse which is a generalization of circle.
X+ 	3)	Polyline which includes polygon and box.
X+ 	4)	Spline which includes 
X+ 		closed/open approximated/interpolated/x-spline spline.
X+ 	5)	Text.
X+ 	6)	Compound object which is composed of one or more objects.
X+ 
X+     In the following elaboration on object formats, every value of fig
X+     output are separated by blank characters or new line ('\n').  The
X+     value of the unused parameters will be -1.
X+ 
X+     Some fields are described as "enumeration type" or "bit vector"; the
X+     values which these fields can take are defined in the header file object.h.
X+     The pen_style field is unused.
X+     These values may be defined in some future version of Fig.
X+ 
X+     The two color fields (pen and fill; pen only, for texts) are
X+     defined as follows:
X+ 
X+ 	    -1 = Default
X+ 	     0 = Black
X+ 	     1 = Blue
X+ 	     2 = Green
X+ 	     3 = Cyan
X+ 	     4 = Red
X+ 	     5 = Magenta
X+ 	     6 = Yellow
X+ 	     7 = White
X+ 	  8-11 = four shades of blue (dark to lighter)
X+ 	 12-14 = three shades of green (dark to lighter)
X+ 	 15-17 = three shades of cyan (dark to lighter)
X+ 	 18-20 = three shades of red (dark to lighter)
X+ 	 21-23 = three shades of magenta (dark to lighter)
X+ 	 24-26 = three shades of brown (dark to lighter)
X+ 	 27-30 = four shades of pink (dark to lighter)
X+ 	    31 = Gold
X+ 
X+ 	 values from 32 to 543 (512 total) are user colors and
X+ 	 are defined in color pseudo-objects (type 0)
X+ 
X+ 	 Your X server may limit the number of colors to something less
X+ 	 than this, especially on a 8-bit PseudoColor visual, where
X+ 	 the number of usable colors will be 256 minus the number of colors
X+ 	 xfig preallocates for itself and the 32 standard colors (about 48).
X+ 
X+     For WHITE color, the area fill field is defined as follows:
X+ 	
X+ 	-1 = not filled
X+ 	 0 = black
X+ 	...  values from 1 to 19 are shades of grey, from darker to lighter
X+ 	20 = white
X+ 	21-40 not used
X+ 	41-56 see patterns for colors, below
X+ 
X+     For BLACK or DEFAULT color, the area fill field is defined as follows:
X+ 	
X+ 	-1 = not filled
X+ 	 0 = white
X+ 	...  values from 1 to 19 are shades of grey, from lighter to darker
X+ 	20 = black
X+ 	21-40 not used
X+ 	41-56 see patterns for colors, below
X+ 
X+     For all other colors, the area fill field is defined as follows:
X+ 
X+ 	-1 = not filled
X+ 	 0 = black
X+ 	...  values from 1 to 19 are "shades" of the color, from darker to lighter.
X+ 		A shade is defined as the color mixed with black
X+ 	20 = full saturation of the color
X+ 	...  values from 21 to 39 are "tints" of the color from the color to white.
X+ 		A tint is defined as the color mixed with white
X+ 	40 = white
X+ 	41 = 30 degree left diagonal pattern
X+ 	42 = 30 degree right diagonal pattern
X+ 	43 = 30 degree crosshatch
X+ 	44 = 45 degree left diagonal pattern
X+ 	45 = 45 degree right diagonal pattern
X+ 	46 = 45 degree crosshatch
X+ 	47 = horizontal bricks
X+ 	48 = vertical bricks
X+ 	49 = horizontal lines
X+ 	50 = vertical lines
X+ 	51 = crosshatch
X+ 	52 = horizontal "shingles" skewed to the right
X+ 	53 = horizontal "shingles" skewed to the left
X+ 	54 = vertical "shingles" skewed one way
X+ 	55 = vertical "shingles"skewed the other way
X+ 	56 = fish scales
X+ 	57 = small fish scales
X+ 	58 = circles
X+ 	59 = hexagons
X+ 	60 = octagons
X+ 	61 = horizontal "tire treads"
X+ 	62 = vertical "tire treads"
X+ 
X+     The depth field is defined as follows:
X+ 
X+ 	 0 ... 999 where larger value means object is deeper than (under)
X+ 		   objects with smaller depth
X+ 
X+     The line_style field is defined as follows:
X+ 
X+ 	-1 = Default
X+ 	 0 = Solid
X+ 	 1 = Dashed
X+ 	 2 = Dotted
X+ 	 3 = Dash-dotted
X+ 	 4 = Dash-double-dotted
X+ 	 5 = Dash-triple-dotted
X+ 
X+     The style_val field is defined as the length, in 1/80 inches, of the on/off
X+     dashes for dashed lines, and the distance between the dots, in 1/80 inches,
X+     for dotted lines.
X+ 
X+     The join_style field is defined FOR LINES only as follows:
X+ 
X+ 	 0 = Miter (the default in xfig 2.1 and earlier)
X+ 	 1 = Round
X+ 	 2 = Bevel
X+ 
X+     The cap_style field is defined FOR LINES, OPEN SPLINES and ARCS only as follows:
X+ 
X+ 	 0 = Butt (the default in xfig 2.1 and earlier)
X+ 	 1 = Round
X+ 	 2 = Projecting
X+ 
X+     The arrow_type field is defined for LINES, ARCS and OPEN SPLINES
X+     only as follows:
X+ 
X+ 	 0 = Stick-type (the default in xfig 2.1 and earlier)
X+ 
X+ 		 \
X+ 		    \
X+ 	_______________\
X+ 		       /
X+ 		    /
X+ 		 /
X+ 
X+ 	 1 = Closed triangle:
X+ 
X+ 		|\
X+ 		|   \
X+ 	________|      \
X+ 		|      /
X+ 		|   /
X+ 		|/
X+ 
X+ 	 2 = Closed with "indented" butt:
X+ 
X+ 		|\
X+ 		\   \
X+ 		 \     \
X+ 	__________\       \
X+ 		  /       /
X+ 		 /     /
X+ 		/   /
X+ 		|/
X+ 
X+ 	 3 = Closed with "pointed" butt:
X+ 
X+ 		   /\
X+ 		  /    \
X+ 		 /        \
X+ 	________/            \
X+ 		\            /
X+ 		 \        /
X+ 		  \    /
X+ 		   \/
X+ 
X+     The arrow_style field is defined for LINES, ARCS and OPEN SPLINES
X+     only as follows:
X+ 
X+ 	 0 = Hollow (actually filled with white)
X+ 	 1 = Filled with pen_color
X+ 
X+ (3.0) OBJECT DEFINITION:
X+ 
X+     (3.1) Color Pseudo-objects (user-defined colors)
X+ 	  This is used to define arbitrary colors beyond the 32 standard colors.
X+ 	  The color objects must be defined before any other Fig objects.
X+ 
X+     First line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object_code		(always 0)
X+ 	int	color_number		(color number, from 32-543 (512 total))
X+      hex string	rgb values		(hexadecimal string describing red,
X+ 					 green and blue values (e.g. #330099) )
X+ 
X+     (3.2) ARC
X+ 
X+     First line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object_code		(always 5)
X+ 	int	sub_type		(1: open ended arc
X+ 					 2: pie-wedge (closed) )
X+ 	int	line_style		(enumeration type)
X+ 	int	line_thickness		(1/80 inch)
X+ 	int	pen_color		(enumeration type, pen color)
X+ 	int	fill_color		(enumeration type, fill color)
X+ 	int	depth			(enumeration type)
X+ 	int	pen_style		(pen style, not used)
X+ 	int	area_fill		(enumeration type, -1 = no fill)
X+ 	float	style_val		(1/80 inch)
X+ 	int	cap_style		(enumeration type)
X+ 	int	direction		(0: clockwise, 1: counterclockwise)
X+ 	int	forward_arrow		(0: no forward arrow, 1: on)
X+ 	int	backward_arrow		(0: no forward arrow, 1: on)
X+ 	float	center_x, center_y	(center of the arc)
X+ 	int	x1, y1			(Fig units, the 1st point the user entered)
X+ 	int	x2, y2			(Fig units, the 2nd point)
X+ 	int	x3, y3			(Fig units, the last point)
X+ 
X+     Forward arrow line (Optional; absent if forward_arrow is 0):
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	arrow_type		(enumeration type)
X+ 	int	arrow_style		(enumeration type)
X+ 	float	arrow_thickness		(1/80 inch)
X+ 	float 	arrow_width		(Fig units)
X+ 	float	arrow_height		(Fig units)
X+ 
X+     Backward arrow line (Optional; absent if backward_arrow is 0):
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	arrow_type		(enumeration type)
X+ 	int	arrow_style		(enumeration type)
X+ 	float	arrow_thickness		(1/80 inch)
X+ 	float	arrow_width		(Fig units)
X+ 	float	arrow_height		(Fig units)
X+ 
X+     (3.3) COMPOUND
X+ 
X+     A line with object code 6 signifies the start of a compound.
X+     There are four more numbers on this line which indicate the
X+     upper left corner and the lower right corner of the bounding
X+     box of this compound.  A line with object code -6 signifies
X+     the end of the compound.  Compound may be nested.
X+ 
X+     First line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object_code		(always 6)
X+ 	int	upperleft_corner_x	(Fig units)
X+ 	int	upperleft_corner_y	(Fig units)
X+ 	int	lowerright_corner_x	(Fig units)
X+ 	int	lowerright_corner_y	(Fig units)
X+ 
X+     Subsequent lines:
X+ 	objects
X+ 	.
X+ 	.
X+ 
X+     Last line:
X+ 	-6
X+ 
X+     (3.4) ELLIPSE
X+ 
X+     First line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object_code		(always 1)
X+ 	int	sub_type		(1: ellipse defined by radii
X+ 					 2: ellipse defined by diameters
X+ 					 3: circle defined by radius
X+ 					 4: circle defined by diameter)
X+ 	int	line_style		(enumeration type)
X+ 	int	thickness		(1/80 inch)
X+ 	int	pen_color		(enumeration type, pen color)
X+ 	int	fill_color		(enumeration type, fill color)
X+ 	int	depth			(enumeration type)
X+ 	int	pen_style		(pen style, not used)
X+ 	int	area_fill		(enumeration type, -1 = no fill)
X+ 	float	style_val		(1/80 inch)
X+ 	int	direction		(always 1)
X+ 	float	angle			(radians, the angle of the x-axis)
X+ 	int	center_x, center_y	(Fig units)
X+ 	int	radius_x, radius_y	(Fig units)
X+ 	int	start_x, start_y	(Fig units; the 1st point entered)
X+ 	int	end_x, end_y		(Fig units; the last point entered)
X+ 
X+     (3.5) POLYLINE
X+ 
X+     First line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object_code		(always 2)
X+ 	int	sub_type		(1: polyline
X+ 					 2: box
X+ 					 3: polygon
X+ 					 4: arc-box)
X+ 					 5: imported-picture bounding-box)
X+ 	int	line_style		(enumeration type)
X+ 	int	thickness		(1/80 inch)
X+ 	int	pen_color		(enumeration type, pen color)
X+ 	int	fill_color		(enumeration type, fill color)
X+ 	int	depth			(enumeration type)
X+ 	int	pen_style		(pen style, not used)
X+ 	int	area_fill		(enumeration type, -1 = no fill)
X+ 	float	style_val		(1/80 inch)
X+ 	int	join_style		(enumeration type)
X+ 	int	cap_style		(enumeration type, only used for POLYLINE)
X+ 	int	radius			(1/80 inch, radius of arc-boxes)
X+ 	int	forward_arrow		(0: off, 1: on)
X+ 	int	backward_arrow		(0: off, 1: on)
X+ 	int	npoints			(number of points in line)
X+ 
X+     Forward arrow line: same as ARC object
X+ 
X+     Backward arrow line: same as ARC object
X+ 
X+     Points line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	x1, y1			(Fig units)
X+ 	int	x2, y2			(Fig units)
X+ 	  .
X+ 	  .
X+ 	int	xnpoints ynpoints	(this will be the same as the 1st
X+ 					point for polygon and box)
X+ 
X+     PIC line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	boolean	flipped			orientation = normal (0) or flipped (1)
X+ 	char	file[]			name of picture file to import
X+ 
X+     (3.6) SPLINE
X+ 
X+     First line:
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object_code		(always 3)
X+ 	int	sub_type		(0: open approximated spline
X+ 					     1: closed approximated spline
X+ 					     2: open   interpolated spline
X+ 					     3: closed interpolated spline
X+ 					     4: open   x-spline 
X+ 					     5: closed x-spline)
X+ 	int	line_style		(See the end of this section)
X+ 	int	thickness		(1/80 inch)
X+ 	int	pen_color		(enumeration type, pen color)
X+ 	int	fill_color		(enumeration type, fill color)
X+ 	int	depth			(enumeration type)
X+ 	int	pen_style		(pen style, not used)
X+ 	int	area_fill		(enumeration type, -1 = no fill)
X+ 	float	style_val		(1/80 inch)
X+ 	int	cap_style		(enumeration type, only used for open splines)
X+ 	int	forward_arrow		(0: off, 1: on)
X+ 	int	backward_arrow		(0: off, 1: on)
X+ 	int	npoints			(number of control points in spline)
X+ 
X+     Forward arrow line: same as ARC object
X+ 
X+     Backward arrow line: same as ARC object
X+ 
X+     Points line: same as POLYLINE object
X+ 
X+     Control points line :
X+ 
X+     There is one shape factor for each point. The value of this factor
X+     must be between -1 (which means that the spline is interpolated at
X+     this point) and 1 (which means that the spline is approximated at
X+     this point). The spline is always smooth in the neighbourhood of a
X+     control point, except when the value of	the factor is 0 for which
X+     there is a first-order discontinuity (i.e. angular point).
X+ 
X+     (3.7) TEXT
X+ 	type	name			(brief description)
X+ 	----	----			-------------------
X+ 	int	object 			(always 4)
X+ 	int	sub_type		(0: Left justified
X+ 					     1: Center justified
X+ 					     2: Right justified)
X+ 	int	color			(enumeration type)
X+ 	int	depth			(enumeration type)
X+ 	int	pen_style		(enumeration , not used)
X+ 	int	font 			(enumeration type)
X+ 	float	font_size 		(font size in points)
X+ 	float	angle			(radians, the angle of the text)
X+ 	int	font_flags		(bit vector)
X+ 	float	height			(Fig units)
X+ 	float	length			(Fig units)
X+ 	int	x, y			(Fig units, coordinate of the origin
X+ 					 of the string.  If sub_type = 0, it is
X+ 					 the lower left corner of the string.
X+ 					 If sub_type = 1, it is the lower
X+ 					 center.  Otherwise it is the lower
X+ 					 right corner of the string.)
X+ 	char	string[]		(ASCII characters; starts after a blank
X+ 					 character following the last number and
X+ 					 ends before the sequence '\001'.  This
X+ 					 sequence is not part of the string.
X+ 					 Characters above octal 177 are
X+ 					 represented by \xxx where xxx is the
X+ 					 octal value.  This permits fig files to
X+ 					 be edited with 7-bit editors and sent
X+ 					 by e-mail without data loss.
X+ 					 Note that the string may contain '\n'.)
X+ 
X+     The font_flags field is defined as follows:
X+ 
X+ 	 Bit	Description
X+ 
X+ 	  0	Rigid text (text doesn't scale when scaling compound objects)
X+ 	  1	Special text (for LaTeX)
X+ 	  2	PostScript font (otherwise LaTeX font is used)
X+ 	  3	Hidden text
X+ 
X+     The font field is defined as follows:
X+ 
X+ 	For font_flags bit 2 = 0 (LaTeX fonts):
X+ 
X+ 	 0	Default font
X+ 	 1	Roman
X+ 	 2	Bold
X+ 	 3	Italic
X+ 	 4	Sans Serif
X+ 	 5	Typewriter
X+ 
X+ 	For font_flags bit 2 = 1 (PostScript fonts):
X+ 
X+   (.ft value)
X+ 	-1	Default font
X+ 	 0	Times Roman           
X+ 	 1	Times Italic          
X+ 	 2	Times Bold            
X+ 	 3	Times Bold Italic    
X+ 	 4	AvantGarde Book      
X+ 	 5	AvantGarde Book Oblique 
X+ 	 6	AvantGarde Demi
X+ 	 7	AvantGarde Demi Oblique
X+ 	 8	Bookman Light
X+ 	 9	Bookman Light Italic
X+ 	10	Bookman Demi
X+ 	11	Bookman Demi Italic
X+ 	12	Courier
X+ 	13	Courier Oblique
X+ 	14	Courier Bold
X+ 	15	Courier Bold Oblique
X+ 	16	Helvetica
X+ 	17	Helvetica Oblique
X+ 	18	Helvetica Bold
X+ 	19	Helvetica Bold Oblique
X+ 	20	Helvetica Narrow
X+ 	21	Helvetica Narrow Oblique
X+ 	22	Helvetica Narrow Bold
X+ 	23	Helvetica Narrow Bold Oblique
X+ 	24	New Century Schoolbook Roman
X+ 	25	New Century Schoolbook Italic
X+ 	26	New Century Schoolbook Bold
X+ 	27	New Century Schoolbook Bold Italic
X+ 	28	Palatino Roman
X+ 	29	Palatino Italic
X+ 	30	Palatino Bold
X+ 	31	Palatino Bold Italic
X+ 	32	Symbol
X+ 	33	Zapf Chancery Medium Italic
X+ 	34	Zapf Dingbats
END-of-pic2fig/files/patch-aa
echo x - pic2fig/files/patch-ab
sed 's/^X//' >pic2fig/files/patch-ab << 'END-of-pic2fig/files/patch-ab'
X*** Makefile.orig	Mon Apr 29 10:11:02 1991
X--- Makefile	Wed Feb  6 18:01:53 2002
X***************
X*** 1,7 ****
X  BINDIR	=	/usr/local/bin
X! CFLAGS	=	-O4 -s $(CROSS)
X  #LDFLAGS=	-zs
X! LDFLAGS=	-z $(CROSS)
X  YFLAGS	=	-d
X  
X  MOFILES = main.o boxgen.o print.o misc.o symtab.o blockgen.o circgen.o  \
X--- 1,7 ----
X  BINDIR	=	/usr/local/bin
X! #CFLAGS	=	-O4 -s $(CROSS)
X  #LDFLAGS=	-zs
X! #LDFLAGS=	-z $(CROSS)
X  YFLAGS	=	-d
X  
X  MOFILES = main.o boxgen.o print.o misc.o symtab.o blockgen.o circgen.o  \
X***************
X*** 29,35 ****
X  	-@echo ""
X  
X  pic2fig: picy.o picl.o $(OFILES)
X! 	cc $(LDFLAGS) -o $@ picy.o picl.o $(OFILES) -lm
X  
X  # The following .o files depend of picy.c, since they really need picy.h
X  picl.o:		picl.c pic.h picy.c
X--- 29,35 ----
X  	-@echo ""
X  
X  pic2fig: picy.o picl.o $(OFILES)
X! 	$(CC) $(LDFLAGS) -o $@ picy.o picl.o $(OFILES) -lm
X  
X  # The following .o files depend of picy.c, since they really need picy.h
X  picl.o:		picl.c pic.h picy.c
END-of-pic2fig/files/patch-ab
echo x - pic2fig/files/patch-ad
sed 's/^X//' >pic2fig/files/patch-ad << 'END-of-pic2fig/files/patch-ad'
X*** main.c.orig	Mon Feb  8 06:21:12 1988
X--- main.c	Wed Feb  6 18:01:53 2002
X***************
X*** 1,10 ****
X  #include	<stdio.h>
X  #include	<ctype.h>
X  #include	"pic.h"
X  #include	"picy.h"
X  
X  static reset();
X- extern char *sprintf(), *strcpy();
X  
X  struct	obj	*objlist[MAXOBJ];	/* store the elements here */
X  int	nobj	= 0;
X--- 1,10 ----
X  #include	<stdio.h>
X  #include	<ctype.h>
X+ #include	<strings.h>
X  #include	"pic.h"
X  #include	"picy.h"
X  
X  static reset();
X  
X  struct	obj	*objlist[MAXOBJ];	/* store the elements here */
X  int	nobj	= 0;
END-of-pic2fig/files/patch-ad
echo x - pic2fig/files/patch-af
sed 's/^X//' >pic2fig/files/patch-af << 'END-of-pic2fig/files/patch-af'
X*** plfig.c.orig	Thu Feb  7 11:08:39 2002
X--- plfig.c	Thu Feb  7 11:20:17 2002
X***************
X*** 121,127 ****
X  	htrue = vtrue = 0;
X  }
X  
X! troff(s)	/* handle ".ps n" to set the pen size to "n" pixels */
X  	char *s;
X  {
X      if (strncmp (s, ".ps", 3) == 0) {
X--- 121,168 ----
X  	htrue = vtrue = 0;
X  }
X  
X! /* handle ".ps n" to set the pen size to "n" pixels */
X! /* handle ".ft n" to set the output font to number n
X!   (.ft value)
X! 	-1	Default font
X! 	 0	Times Roman           
X! 	 1	Times Italic          
X! 	 2	Times Bold            
X! 	 3	Times Bold Italic    
X! 	 4	AvantGarde Book      
X! 	 5	AvantGarde Book Oblique 
X! 	 6	AvantGarde Demi
X! 	 7	AvantGarde Demi Oblique
X! 	 8	Bookman Light
X! 	 9	Bookman Light Italic
X! 	10	Bookman Demi
X! 	11	Bookman Demi Italic
X! 	12	Courier
X! 	13	Courier Oblique
X! 	14	Courier Bold
X! 	15	Courier Bold Oblique
X! 	16	Helvetica
X! 	17	Helvetica Oblique
X! 	18	Helvetica Bold
X! 	19	Helvetica Bold Oblique
X! 	20	Helvetica Narrow
X! 	21	Helvetica Narrow Oblique
X! 	22	Helvetica Narrow Bold
X! 	23	Helvetica Narrow Bold Oblique
X! 	24	New Century Schoolbook Roman
X! 	25	New Century Schoolbook Italic
X! 	26	New Century Schoolbook Bold
X! 	27	New Century Schoolbook Bold Italic
X! 	28	Palatino Roman
X! 	29	Palatino Italic
X! 	30	Palatino Bold
X! 	31	Palatino Bold Italic
X! 	32	Symbol
X! 	33	Zapf Chancery Medium Italic
X! 	34	Zapf Dingbats
X! */
X! 
X! troff(s)
X  	char *s;
X  {
X      if (strncmp (s, ".ps", 3) == 0) {
X***************
X*** 131,136 ****
X--- 172,187 ----
X  	    pensize (size);
X  	else
X  	    fprintf (stderr, "Malformed .ps command: %s\n", s);
X+ 	return;
X+     }
X+     if (strncmp (s, ".ft", 3) == 0) {
X+ 	int     size;
X+         extern int font;
X+ 
X+ 	if (sscanf (s + 3, " %d ", &size) == 1)
X+ 	    font = size;
X+ 	else
X+ 	    fprintf (stderr, "Malformed .ft command: %s\n", s);
X  	return;
X      }
X  
END-of-pic2fig/files/patch-af
exit

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212111543.gBBFhXuE040149>