v06i022: xfig, Part14/15
Dan Heller
argv%turnpike at Sun.COM
Thu Mar 8 05:52:26 AEST 1990
Submitted-by: Brian Smith <bvsmith at lbl.gov>
Posting-number: Volume 6, Issue 22
Archive-name: xfig2/part14
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix at uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
# "End of archive 14 (of 15)."
# Contents: xfig/FORMAT1.3 xfig/Imakefile xfig/README xfig/arcbox.c
# xfig/arrow.c xfig/bit_reverse.h xfig/blink.c xfig/break.c
# xfig/changetext.c xfig/changethick.c xfig/curve.c xfig/f2ps.l
# xfig/file.c xfig/free.c xfig/func.h xfig/graphics.c xfig/print.c
# xfig/psfonts.c xfig/querytile.c xfig/redisplay.c xfig/switch.h
# xfig/trans.c
# Wrapped by argv at turnpike on Wed Feb 28 10:53:26 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'xfig/FORMAT1.3' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/FORMAT1.3'\"
else
echo shar: Extracting \"'xfig/FORMAT1.3'\" \(2274 characters\)
sed "s/^X//" >'xfig/FORMAT1.3' <<'END_OF_FILE'
XThe following is the format of fig output (fig 1.3).
X
XThe first line consists of four number:
X screen resolution (pixels/inch),
X screen origin (1 : upper rigth, 2 : upper left, 3 : lower left,
X 4 : lower right),
X canvas width (pixels),
X canvas height (pixels)
X
XThe first integer of the rest of the lines represents the followings;
X
X ELLIPSE 1
X POLYLINE 2
X SPLINE 3 (quadratic spline)
X TEXT 4
X ARC 5
X BEGIN_COMPOUND 6
X END_COMPOUND -BEGIN_COMPOUND
X
XThe detail of each object is:
X
XARC
X type (3 : circle by radius, 4 : circle by diameter, 5 : circular arc),
X line_style,
X thickness (pixels),
X dash_length (pixels),
X direction (0 : clockwise, 1 : counterclokwise),
X forward_arrow (0: off, 1: on),
X backward_arrow (0: off, 1: on),
X arrow_ht (pixels), arrow_wid (pixels),
X center.x, center.y,
X point[0].x, point[0].y, (the 1st point the user entered)
X point[1].x, point[1].y, (the 2nd point or the last for type 3 or 4)
X point[2].x, point[2].y (the last point if type is 5)
X
XBEGIN_COMPOUND
X upperright_corner.x, upperright_corner.y,
X lowerleft_corner.x, lowerleft_corner.y
X
XELLIPSE
X type (1 : defined by radiuses, 2 : defined by diameters),
X line_style,
X thickness (pixels),
X dash_length (pixels),
X direction (is always 1),
X center.x, center.y,
X radius.x, radius.y,
X start.x, start.y, (the 1st point the user entered)
X end.x, end.y
X
XLINE
X type (6 : polyline, 7 : box, 8 : polygon),
X line_style,
X thickness (pixels),
X dash_length (pixels),
X forward_arrow (0: off, 1: on),
X backward_arrow (0: off, 1: on),
X arrow_ht (pixels), arrow_wid (pixels),
X x1, y1,
X x2, y2,
X .
X .
X xn, yn, (this will be the same as the 1st point for type 7 or 8)
X 9999, 9999
X
XSPLINE (quadratic spline)
X type (10: open spline, 11: closed spline),
X line_style,
X thickness (pixels),
X dash_length (pixels),
X forward_arrow (0: off, 1: on),
X backward_arrow (0: off, 1: on),
X arrow_ht (pixels), arrow_wid (pixels),
X x1, y1,
X x2, y2,
X .
X .
X xn, yn, (this will be the same as the 1st point for type 11)
X 9999, 9999
X
XTEXT
X font, (not used)
X size, (not used)
X style, (not used)
X height (pixels), length (pixels),
X lowerleft_corner.x (pixels), lowerleft_corner.y (pixels),
X string (end at newline, \n)
X
XThere are only three line styles defined
X
X SOLID_LINE 0
X DASH_LINE 1
X DOTTED_LINE 2 (not implement)
END_OF_FILE
if test 2274 -ne `wc -c <'xfig/FORMAT1.3'`; then
echo shar: \"'xfig/FORMAT1.3'\" unpacked with wrong size!
fi
# end of 'xfig/FORMAT1.3'
fi
if test -f 'xfig/Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/Imakefile'\"
else
echo shar: Extracting \"'xfig/Imakefile'\" \(1834 characters\)
sed "s/^X//" >'xfig/Imakefile' <<'END_OF_FILE'
XSYS_LIBRARIES = -lm
XSYSAUX_LIBRARIES = -lXaw -lXmu -lXt -lX11
XDEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X
XSRCS= addpt.c arc.c arcbox.c arrow.c autoarrow.c\
X bitmap.c blink.c bound.c box.c break.c\
X canvas.c changestyle.c changetext.c changethick.c \
X char.c color.c copy.c cursor.c curve.c\
X deletept.c dir.c drag.c draw.c ellipse.c\
X file.c flip.c font.c free.c\
X geom.c global.c glue.c graphics.c grid.c\
X intspline.c latex_line.c line.c list.c\
X main.c move.c movept.c msgsw.c\
X panel.c popup.c print.c printfonts.c psbits.c psfonts.c puterr.c\
X read.c read1_3.c redisplay.c remove.c rotate.c ruler.c\
X save.c scale.c search.c spline.c\
X text.c trans.c turn.c undo.c util.c xtra.c
X
XOBJS= addpt.o arc.o arcbox.o arrow.o autoarrow.o\
X bitmap.o blink.o bound.o box.o break.o\
X canvas.o changestyle.o changetext.o changethick.o \
X char.o color.o copy.o cursor.o curve.o\
X deletept.o dir.o drag.o draw.o ellipse.o\
X file.o flip.o font.o free.o\
X geom.o global.o glue.o graphics.o grid.o\
X intspline.o latex_line.o line.o list.o\
X main.o move.o movept.o msgsw.o\
X panel.o popup.o print.o printfonts.o psbits.o psfonts.o puterr.o\
X read.o read1_3.o redisplay.o remove.o rotate.o ruler.o\
X save.o scale.o search.o spline.o\
X text.o trans.o turn.o undo.o util.o xtra.o
X
XF2PSRC = arrow.c f2p.c free.c read.c
XF2POBJ = arrow.o f2p.o free.o read.o
X
XF2PSSRC = arrow.c bound.c f2ps.c free.c read.c psfonts.c
XF2PSOBJ = arrow.o bound.o f2ps.o free.o read.o psfonts.o
X
XComplexProgramTarget(xfig)
X
XSingleProgramTarget(f2p,$(F2POBJ),,)
X
XSingleProgramTarget(f2ps,$(F2PSOBJ),,)
END_OF_FILE
if test 1834 -ne `wc -c <'xfig/Imakefile'`; then
echo shar: \"'xfig/Imakefile'\" unpacked with wrong size!
fi
# end of 'xfig/Imakefile'
fi
if test -f 'xfig/README' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/README'\"
else
echo shar: Extracting \"'xfig/README'\" \(2398 characters\)
sed "s/^X//" >'xfig/README' <<'END_OF_FILE'
XFIG 2.0
X
XNOTE: Version 2.0 of xfig no longer supports SunView! If you wish to
X retain compatibility with SunView, use version 1.4.3.
X
XAdded Features:
X===============
X
Xo Separate version number for program vs file format (protocol now 1.4X)
X
Xo Area fill for circles, boxes, etc. with 20 different gray shades
X for Postscript output
X
Xo 35 different fonts - the 35 fonts normally included with the Laserwriters
X can be used in figures at any point size. If there is a corresponding
X font in X, then the text is shown in that font on the screen.
X
Xo text can be virtually any point size
X
Xo left, center and right justification of text
X
Xo rounded-corner boxes with any radius of the corners
X "pen" component of the object is used for the radius (in pixels)
X
Xo different line thicknesses
X
Xo lower button panel for quick access to "save", "chdir", etc. functions
X
Xo button to change the line thickness of an existing object
X
Xo button to change the line type of an existing object
X
Xo portrait or landscape print mode
X
XNOTE: I will support these features as best I can, but I cannot promise
X anything, as my normal workload is pretty full.
X Brian Smith
X (bvsmith at lbl.gov)
X
X
XDeleted Features:
X=================
X
Xo f2p (fig to pic) support not updated for above features
X
X_________________________________________________________________________
XFIG 1.4 Release 2
X
XAdded features:
X===============
X
X1) Interpolated spline (open and close).
X2) Dotted line style.
X3) Blinking vertical bar cursor for entering character string in
X canvas and message window.
X4) Character strings editing feature both in entering text objects
X and file names in message window (by relocating the blinking cursor
X within the string).
X5) F2ps (fig to postscript filter). Although dashed and dotted line
X style are not rendered as such on the screen for objects other than
X polylines, the objects on hard copy produced with f2ps will be
X rendered with the line style under which the objects are created
X in fig.
X
XChanges:
X========
X
X1) Output format (ref: FORMAT1.4). However fig 1.4 and its associated
X filters (f2p and f2ps) can read fig 1.3 format but fig 1.4 will only
X create output in the new format.
X
XCustomizable characteristics:
X============================
X
X2) The size of fig can be changed by modifying two constants
X in file "const.h", namely CANVAS_WIDTH and CANVAS_HEIGHT.
END_OF_FILE
if test 2398 -ne `wc -c <'xfig/README'`; then
echo shar: \"'xfig/README'\" unpacked with wrong size!
fi
# end of 'xfig/README'
fi
if test -f 'xfig/arcbox.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/arcbox.c'\"
else
echo shar: Extracting \"'xfig/arcbox.c'\" \(2704 characters\)
sed "s/^X//" >'xfig/arcbox.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "alloc.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern int cur_line_style, line_thickness;
Xextern float cur_styleval;
Xextern int cur_color;
Xextern int cur_areafill;
Xextern int cur_radius;
Xextern int fill_mode;
Xextern int fix_x, fix_y, cur_x, cur_y;
Xextern (*canvas_kbd_proc)();
Xextern (*canvas_locmove_proc)();
Xextern (*canvas_leftbut_proc)();
Xextern (*canvas_middlebut_proc)();
Xextern (*canvas_rightbut_proc)();
Xextern null_proc();
Xextern set_popupmenu();
X
Xextern F_compound objects;
X
X/*************************** locally global procedures *********************/
X
X elastic_box();
Xint create_arc_boxobject();
X init_arc_box_drawing();
X
Xarc_box_drawing_selected()
X{
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = init_arc_box_drawing;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = set_popupmenu;
X set_cursor(&arrow_cursor);
X reset_action_on();
X }
X
Xinit_arc_box_drawing(x, y)
Xint x, y;
X{
X cur_x = fix_x = x;
X cur_y = fix_y = y;
X canvas_locmove_proc = elastic_box;
X canvas_leftbut_proc = canvas_rightbut_proc = null_proc;
X canvas_middlebut_proc = create_arc_boxobject;
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT, 1);
X set_temp_cursor(&null_cursor);
X set_action_on();
X }
X
Xcreate_arc_boxobject(x, y)
Xint x, y;
X{
X F_line *box;
X F_point *point;
X int tmp;
X
X draw_rectbox(fix_x, fix_y, cur_x, cur_y, INV_PAINT, 1);
X
X
X if ((Point_malloc(point)) == NULL) {
X blink_msg();
X put_msg(Err_mem);
X return;
X }
X /* sort x and y so that the upper left is first */
X /*
X if (x > fix_x)
X {
X tmp = x; x = fix_x ; fix_x = tmp;
X }
X
X if (y > fix_y)
X {
X tmp = y; y = fix_y ; fix_y = tmp;
X }
X */
X point->x = x;
X point->y = y;
X point->next = NULL;
X
X Line_malloc(box);
X box->type = T_ARC_BOX;
X box->style = cur_line_style;
X box->thickness = line_thickness;
X box->color = cur_color;
X box->depth = NULL;
X box->pen = cur_radius; /* use the pen slot for the radius */
X box->area_fill = fill_mode? cur_areafill : 0;
X box->style_val = cur_styleval;
X box->for_arrow = NULL;
X box->back_arrow = NULL;
X box->points = point;
X box->next = NULL;
X append_point(x, fix_y, &point);
X append_point(fix_x, fix_y, &point);
X append_point(fix_x, y, &point);
X append_point(x, y, &point);
X draw_line(box, PAINT);
X clean_up();
X set_action_object(F_CREATE, O_POLYLINE);
X insert_line(&objects.lines, box);
X set_latestline(box);
X set_modifiedflag();
X arc_box_drawing_selected();
X }
END_OF_FILE
if test 2704 -ne `wc -c <'xfig/arcbox.c'`; then
echo shar: \"'xfig/arcbox.c'\" unpacked with wrong size!
fi
# end of 'xfig/arcbox.c'
fi
if test -f 'xfig/arrow.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/arrow.c'\"
else
echo shar: Extracting \"'xfig/arrow.c'\" \(1779 characters\)
sed "s/^X//" >'xfig/arrow.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985, 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : August 1985.
X * 2nd revision : March 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "alloc.h"
X#include "object.h"
X
Xstatic float forward_arrow_wid = 4;
Xstatic float forward_arrow_ht = 8;
Xstatic int forward_arrow_type = 0;
Xstatic int forward_arrow_style = 0;
Xstatic float forward_arrow_thickness = 1;
X
Xstatic float backward_arrow_wid = 4;
Xstatic float backward_arrow_ht = 8;
Xstatic int backward_arrow_type = 0;
Xstatic int backward_arrow_style = 0;
Xstatic float backward_arrow_thickness = 1;
X
Xextern int line_thickness;
X
XF_arrow *
Xforward_arrow()
X{
X F_arrow *a;
X
X if (NULL == (Arrow_malloc(a))) {
X put_msg(Err_mem);
X return(NULL);
X }
X a->type = forward_arrow_type;
X a->style = forward_arrow_style;
X a->thickness = forward_arrow_thickness = (float) line_thickness;
X a->wid = forward_arrow_thickness * forward_arrow_wid;
X a->ht = forward_arrow_thickness * forward_arrow_ht;
X return(a);
X }
X
XF_arrow *
Xbackward_arrow()
X{
X F_arrow *a;
X
X if (NULL == (Arrow_malloc(a))) {
X put_msg(Err_mem);
X return(NULL);
X }
X a->type = backward_arrow_type;
X a->style = backward_arrow_style;
X a->thickness = backward_arrow_thickness = (float) line_thickness;
X a->wid = backward_arrow_thickness * backward_arrow_wid;
X a->ht = backward_arrow_thickness * backward_arrow_ht;
X return(a);
X }
X
XF_arrow *
Xmake_arrow(type, style, thickness, wid, ht)
Xint type, style;
Xfloat thickness, wid, ht;
X{
X F_arrow *a;
X
X if (NULL == (Arrow_malloc(a))) {
X put_msg(Err_mem);
X return(NULL);
X }
X a->type = type;
X a->style = style;
X a->thickness = thickness;
X a->wid = wid;
X a->ht = ht;
X return(a);
X }
END_OF_FILE
if test 1779 -ne `wc -c <'xfig/arrow.c'`; then
echo shar: \"'xfig/arrow.c'\" unpacked with wrong size!
fi
# end of 'xfig/arrow.c'
fi
if test -f 'xfig/bit_reverse.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/bit_reverse.h'\"
else
echo shar: Extracting \"'xfig/bit_reverse.h'\" \(1994 characters\)
sed "s/^X//" >'xfig/bit_reverse.h' <<'END_OF_FILE'
X/*
X** bit_reverse.h
X**
X** This particular array seems to be useful in a lot of bitmap
X** conversion programs. It's not used in pbm because bits are
X** stored one per byte, for easier manipulation. But if you wanted
X** to write, for example, a program to directly convert Sun raster
X** format into X bitmaps, you could use this.
X*/
X
Xunsigned char bit_reverse[256] = {
X 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0,
X 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
X 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4,
X 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
X 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc,
X 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
X 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca,
X 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
X 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6,
X 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
X 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1,
X 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
X 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9,
X 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
X 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd,
X 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
X 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3,
X 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
X 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7,
X 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
X 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf,
X 0x3f, 0xbf, 0x7f, 0xff};
END_OF_FILE
if test 1994 -ne `wc -c <'xfig/bit_reverse.h'`; then
echo shar: \"'xfig/bit_reverse.h'\" unpacked with wrong size!
fi
# end of 'xfig/bit_reverse.h'
fi
if test -f 'xfig/blink.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/blink.c'\"
else
echo shar: Extracting \"'xfig/blink.c'\" \(1747 characters\)
sed "s/^X//" >'xfig/blink.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * Febuary 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X
Xstatic int cursor_on, cursor_is_moving;
Xstatic int cursor_x, cursor_y;
Xstatic int blink();
Xstatic int (*erase)();
Xstatic int (*draw)();
Xstatic struct itimerval blink_timer;
X
Xturn_on_blinking_cursor(draw_cursor, erase_cursor, x, y, sec, usec)
Xint (*draw_cursor)();
Xint (*erase_cursor)();
Xint x, y;
Xlong sec, usec;
X{
X draw = draw_cursor;
X erase = erase_cursor;
X cursor_is_moving = 0;
X cursor_x = x;
X cursor_y = y;
X blink_timer.it_interval.tv_usec = usec;
X blink_timer.it_interval.tv_sec = sec;
X blink_timer.it_value.tv_usec = usec;
X blink_timer.it_value.tv_sec = sec;
X draw(x, y);
X cursor_on = 1;
X signal(SIGALRM, blink);
X setitimer(ITIMER_REAL, &blink_timer, (struct itimerval *)0);
X /*
X (void) notify_set_itimer_func(&me, blink, ITIMER_REAL, &blink_timer, 0);
X */
X }
X
Xturn_off_blinking_cursor()
X{
X if (cursor_on) erase(cursor_x, cursor_y);
X blink_timer.it_interval.tv_usec = 0;
X blink_timer.it_interval.tv_sec = 0;
X blink_timer.it_value.tv_usec = 0;
X blink_timer.it_value.tv_sec = 0;
X setitimer(ITIMER_REAL, &blink_timer, (struct itimerval *)0);
X /*
X (void) notify_set_itimer_func(&me, blink, ITIMER_REAL, 0, 0);
X */
X draw = erase = NULL;
X }
X
Xstatic
Xblink()
X{
X if (cursor_is_moving) return(0);
X if (cursor_on) {
X erase(cursor_x, cursor_y);
X cursor_on = 0;
X }
X else {
X draw(cursor_x, cursor_y);
X cursor_on = 1;
X }
X return(0);
X }
X
Xmove_blinking_cursor(x, y)
Xint x, y;
X{
X cursor_is_moving = 1;
X if (cursor_on) erase(cursor_x, cursor_y);
X cursor_x = x;
X cursor_y = y;
X draw(cursor_x, cursor_y);
X cursor_on = 1;
X cursor_is_moving = 0;
X }
END_OF_FILE
if test 1747 -ne `wc -c <'xfig/blink.c'`; then
echo shar: \"'xfig/blink.c'\" unpacked with wrong size!
fi
# end of 'xfig/blink.c'
fi
if test -f 'xfig/break.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/break.c'\"
else
echo shar: Extracting \"'xfig/break.c'\" \(1457 characters\)
sed "s/^X//" >'xfig/break.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
X#define TOLERANCE 7
X
X init_break();
X
Xbreak_selected()
X{
X extern (*canvas_kbd_proc)();
X extern (*canvas_locmove_proc)();
X extern (*canvas_leftbut_proc)();
X extern (*canvas_middlebut_proc)();
X extern (*canvas_rightbut_proc)();
X extern null_proc();
X extern set_popupmenu();
X
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = init_break;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = set_popupmenu;
X set_cursor(&pick15_cursor);
X }
X
Xinit_break(x, y)
Xint x, y;
X{
X extern F_compound *compound_search();
X extern F_compound objects, saved_objects;
X extern int compoundbox_shown;
X F_compound *c;
X
X if ((c = compound_search(x, y, TOLERANCE, &x, &y)) == NULL) return;
X clean_up();
X if (compoundbox_shown) draw_compoundbox(c, INV_PAINT);
X delete_compound(&objects.compounds, c);
X break_compound(c);
X set_action(F_BREAK);
X saved_objects.compounds = c;
X break_selected();
X }
X
Xbreak_compound(c)
XF_compound *c;
X{
X extern F_compound objects, object_tails;
X extern int pointmarker_shown;
X
X if (pointmarker_shown) toggle_compoundpointmarker(c);
X tail(&objects, &object_tails);
X append_objects(&objects, c, &object_tails);
X }
END_OF_FILE
if test 1457 -ne `wc -c <'xfig/break.c'`; then
echo shar: \"'xfig/break.c'\" unpacked with wrong size!
fi
# end of 'xfig/break.c'
fi
if test -f 'xfig/changetext.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/changetext.c'\"
else
echo shar: Extracting \"'xfig/changetext.c'\" \(2793 characters\)
sed "s/^X//" >'xfig/changetext.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern (*canvas_kbd_proc)();
Xextern (*canvas_locmove_proc)();
Xextern (*canvas_leftbut_proc)();
Xextern (*canvas_middlebut_proc)();
Xextern (*canvas_rightbut_proc)();
Xextern (*return_proc)();
Xextern null_proc();
Xextern set_popupmenu();
X
Xextern F_text *text_search();
X
Xextern int font_button, size_button;
Xextern int type_button;
Xextern int cur_color; /* not actually used */
Xextern int cur_textstyle; /* not actually used */
Xextern float cur_angle; /* not actually used */
X
Xextern change_text();
X
Xchange_text_selected()
X{
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = change_text;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = set_popupmenu;
X return_proc = change_text_selected;
X set_cursor(&pick9_cursor);
X reset_action_on();
X }
X
Xchange_text(x, y)
Xint x, y;
X{
X F_text *text;
X PR_SIZE size;
X int otype;
X
X if ((text = text_search(x, y)) != NULL) {
X draw_text(text, ERASE);
X size = pf_textwidth(text->font,text->size,
X strlen(text->cstring),text->cstring);
X otype = text->type; /* save current text justification */
X text->type = type_button; /* put in current font type (L,C,R) */
X text->font = font_button; /* font number */
X text->size = size_button;
X text->angle = cur_angle;
X text->style = cur_textstyle;
X text->color = cur_color;
X if (otype == T_LEFT_JUSTIFIED) /* old type was Left justified */
X {
X if (text->type == T_RIGHT_JUSTIFIED)
X text->base_x += size.x; /* adjust to keep in place */
X else if (text->type== T_CENTER_JUSTIFIED)
X text->base_x += size.x/2; /* adjust to keep in place */
X }
X else if (otype == T_RIGHT_JUSTIFIED) /* old type is Right justified */
X {
X if (text->type == T_LEFT_JUSTIFIED)
X text->base_x -= size.x; /* adjust to keep in place */
X else if (text->type == T_CENTER_JUSTIFIED)
X text->base_x -= size.x/2; /* adjust to keep in place */
X }
X else /* T_CENTER_JUSTIFIED */
X {
X if (text->type == T_LEFT_JUSTIFIED)
X text->base_x -= size.x/2; /* adjust to keep in place */
X else if (text->type == T_RIGHT_JUSTIFIED)
X text->base_x += size.x/2; /* adjust to keep in place */
X }
X /* compute new length (width) */
X size = pf_textwidth(text->font,text->size,
X strlen(text->cstring),text->cstring);
X text->length = size.x;
X text->height = size.y;
X draw_text(text, PAINT);
X clean_up();
X set_action_object(F_CHANGE_TEXT, O_TEXT);
X set_latesttext(text);
X set_modifiedflag();
X }
X }
END_OF_FILE
if test 2793 -ne `wc -c <'xfig/changetext.c'`; then
echo shar: \"'xfig/changetext.c'\" unpacked with wrong size!
fi
# end of 'xfig/changetext.c'
fi
if test -f 'xfig/changethick.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/changethick.c'\"
else
echo shar: Extracting \"'xfig/changethick.c'\" \(2877 characters\)
sed "s/^X//" >'xfig/changethick.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "font.h"
X#include "func.h"
X#include "object.h"
X#include "paintop.h"
X
X#define TOLERANCE 3
X
Xextern (*canvas_kbd_proc)();
Xextern (*canvas_locmove_proc)();
Xextern (*canvas_leftbut_proc)();
Xextern (*canvas_middlebut_proc)();
Xextern (*canvas_rightbut_proc)();
Xextern (*return_proc)();
Xextern null_proc();
Xextern set_popupmenu();
X
Xextern F_line *line_search();
Xextern F_arc *arc_search();
Xextern F_ellipse *ellipse_search();
Xextern F_spline *spline_search();
Xextern F_compound *compound_search();
X
Xextern int foreground_color, background_color;
Xextern int compoundbox_shown;
Xextern int line_thickness;
X
Xextern change_thick();
X
Xchange_thick_selected()
X{
X canvas_kbd_proc = null_proc;
X canvas_locmove_proc = null_proc;
X canvas_leftbut_proc = change_thick;
X canvas_middlebut_proc = null_proc;
X canvas_rightbut_proc = set_popupmenu;
X return_proc = change_thick_selected;
X set_cursor(&pick9_cursor);
X reset_action_on();
X }
X
Xchange_thick(x, y)
Xint x, y;
X{
X F_line *l;
X F_arc *a;
X F_ellipse *e;
X F_spline *s;
X F_compound *c;
X int px, py;
X
X if ((l = line_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X win_setmouseposition(canvas_swfd, px, py);
X draw_line(l, ERASE);
X l->thickness = line_thickness;
X draw_line(l, PAINT);
X clean_up();
X set_action_object(F_CHANGE_THICK, O_POLYLINE);
X set_latestline(l);
X set_modifiedflag();
X }
X else if ((e = ellipse_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X win_setmouseposition(canvas_swfd, px, py);
X pw_batch_on(canvas_pixwin);
X draw_ellipse(e, background_color);
X e->thickness = line_thickness;
X draw_ellipse(e, foreground_color);
X pw_batch_off(canvas_pixwin);
X clean_up();
X set_action_object(F_CHANGE_THICK, O_ELLIPSE);
X set_latestellipse(e);
X set_modifiedflag();
X }
X else if ((a = arc_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X win_setmouseposition(canvas_swfd, px, py);
X pw_batch_on(canvas_pixwin);
X draw_arc(a, background_color);
X a->thickness = line_thickness;
X draw_arc(a, foreground_color);
X pw_batch_off(canvas_pixwin);
X clean_up();
X set_action_object(F_CHANGE_THICK, O_ARC);
X set_latestarc(a);
X set_modifiedflag();
X }
X else if ((s = spline_search(x, y, TOLERANCE, &px, &py)) != NULL) {
X win_setmouseposition(canvas_swfd, px, py);
X pw_batch_on(canvas_pixwin);
X draw_spline(s, ERASE);
X s->thickness = line_thickness;
X draw_spline(s, PAINT);
X pw_batch_off(canvas_pixwin);
X clean_up();
X set_action_object(F_CHANGE_THICK, O_SPLINE);
X set_latestspline(s);
X set_modifiedflag();
X }
X else
X return;
X }
END_OF_FILE
if test 2877 -ne `wc -c <'xfig/changethick.c'`; then
echo shar: \"'xfig/changethick.c'\" unpacked with wrong size!
fi
# end of 'xfig/changethick.c'
fi
if test -f 'xfig/curve.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/curve.c'\"
else
echo shar: Extracting \"'xfig/curve.c'\" \(2869 characters\)
sed "s/^X//" >'xfig/curve.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "paintop.h"
X
X#define round(a) ((int)((a) + .5))
X
X/* This routine plot two dimensional curve defined by a second degree
X polynomial of the form :
X 2 2
X f(x, y) = ax + by + g = 0
X
X (x0,y0) is the starting point as well as ending point of the curve.
X The curve will translate with the offset xoff and yoff.
X
X This algorithm is derived from the eight point algorithm in :
X "An Improved Algorithm for the generation of Nonparametric Curves"
X by Bernard W. Jordan, William J. Lennon and Barry D. Holm, IEEE
X Transaction on Computers Vol C-22, No. 12 December 1973.
X
X Will fill the curve if area_fill is != 0
X*/
X
X#define MAXPTS 4000
Xstatic XPoint *points=NULL;
X
Xcurve(window, xstart, ystart, xend, yend, direction,
X a, b, xoff, yoff, val, thick, area_fill)
XWindow window;
Xint xstart, ystart, xend, yend, a, b, xoff, yoff;
Xint direction, val, thick, area_fill;
X{
X int dfx, dfy, dfxx, dfyy;
X int falpha, fx, fy, fxy, absfx, absfy, absfxy;
X int margin, test_succeed, x, y, deltax, deltay, inc, dec;
X int npoints;
X
X if (a == 0 || b == 0)
X return;
X
X if (points==NULL)
X if ((points = (XPoint *) malloc(MAXPTS*sizeof(XPoint))) == 0)
X {
X fprintf(stderr,"curve(): No memory\n");
X return;
X }
X
X x = xstart;
X y = ystart;
X dfx = 2 * a * xstart;
X dfy = 2 * b * ystart;
X dfxx = 2 * a;
X dfyy = 2 * b;
X
X falpha = 0;
X if (direction) {
X inc = 1; dec = -1;
X }
X else {
X inc = -1; dec = 1;
X }
X if (xstart == xend && ystart == yend) {
X test_succeed = margin = 1;
X }
X else {
X test_succeed = margin = 3;
X }
X
X npoints = 0;
X do {
X if (dfy < 0)
X deltax = inc;
X else
X deltax = dec;
X if (dfx < 0)
X deltay = dec;
X else
X deltay = inc;
X fx = falpha + dfx * deltax + a;
X fy = falpha + dfy * deltay + b;
X fxy = fx + fy - falpha;
X absfx = abs(fx); absfy = abs(fy); absfxy = abs(fxy);
X
X if ((absfxy <= absfx) && (absfxy <= absfy))
X falpha = fxy;
X else if (absfy <= absfx) {
X deltax = 0; falpha = fy;
X }
X else {
X deltay = 0; falpha = fx;
X }
X x = x + deltax; y = y + deltay;
X points[npoints].x = (short) xoff+x;
X points[npoints].y = (short) yoff-y;
X if (npoints < MAXPTS)
X npoints++;
X dfx = dfx + dfxx * deltax;
X dfy = dfy + dfyy * deltay;
X if (abs(x - xend) < margin && abs(y - yend) < margin)
X test_succeed--;
X } while (test_succeed);
X
X if (margin == 1) /* end points should touch */
X {
X points[npoints].x = (short) xoff+xstart;
X points[npoints].y = (short) yoff-ystart;
X if (npoints < MAXPTS)
X npoints++;
X }
X pw_lines(window, points, npoints, val? PAINT: ERASE,
X thick, area_fill);
X }
END_OF_FILE
if test 2869 -ne `wc -c <'xfig/curve.c'`; then
echo shar: \"'xfig/curve.c'\" unpacked with wrong size!
fi
# end of 'xfig/curve.c'
fi
if test -f 'xfig/f2ps.l' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/f2ps.l'\"
else
echo shar: Extracting \"'xfig/f2ps.l'\" \(1611 characters\)
sed "s/^X//" >'xfig/f2ps.l' <<'END_OF_FILE'
X.TH F2PS 1 "29 March 1988"
X.SH NAME
Xf2ps \- Fig to Postscript translator
X.SH SYNOPSIS
X.B f2ps
X[
X.B -f
Xfont ] [
X.B -s
Xsize ] [
X.B -e
Xscale ] [
X][
X.B -L
X][
X.B -P
X][
X.B -N
X][
X.B -c
X] [ input_file [ output_file ] ]
X.SH DESCRIPTION
X.I F2ps
Xtranslates xfig output format (in
X.I input_file
Xinto the postscript language (in
X.I output_file
X).
XThe default
X.I input_file
Xand
X.I output_file
Xare standard input and standard output.
X.PP
XThe
X.I font
Xshould be font that your printer knows about.
XThe unit of
X.I size
X(font size) is point. There are 72 points in an inch.
XThe upper limit for
X.I size
Xis 300 points (about 4 inches).
X.I Scale
Xwill also be applied to
X.I size.
XThe default value of
X.I font,
X.I size
Xand
X.I scale
Xare Times-Roman, 12 points and 1 respectively.
X.SH OPTIONS
X.TP
X.B \-c
XCenter the figure on the page.
XThe centering may not be accurate if there are texts in the
X.I input_file
Xthat extends too far to the right of other objects.
X.TP
X.B \-L
XPrint in landscape mode. This is the default.
X.TP
X.B \-P
XPrint in portrait mode.
X.TP
X.B \-N
XNo page printing command (showpage)
Xis to be appended after the figure.
XThis ensures that when the output is used as an included illustration,
Xit won't untimely skip the rest of the page.
XHowever you can not print it by itself on the printer.
X.PP
XObjects (except text) which are created in \fIxfig\fP while the
Xdash-line mode was on will be produced with dashed line even
Xthough they may be drawn with solid line in \fIxfig\fP.
X.SH "SEE ALSO"
Xxfig(1).
X.SH AUTHOR
XSupoj Sutanthavibul (supoj at sally.UTEXAS.EDU),
X.br
XUniversity of Texas at Austin,
X.br
XNovember 13, 1986.
END_OF_FILE
if test 1611 -ne `wc -c <'xfig/f2ps.l'`; then
echo shar: \"'xfig/f2ps.l'\" unpacked with wrong size!
fi
# end of 'xfig/f2ps.l'
fi
if test -f 'xfig/file.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/file.c'\"
else
echo shar: Extracting \"'xfig/file.c'\" \(2744 characters\)
sed "s/^X//" >'xfig/file.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * March 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "func.h"
X#include "object.h"
X
X#define PROMPT 1
X#define NO_PROMPT 0
X
Xextern int figure_modified;
Xextern char current_file[];
Xextern char directory[];
Xextern int num_object;
X
Xedit_file(file)
Xchar *file;
X{
X extern F_compound objects, saved_objects;
X int s;
X F_compound c;
X
X if (*file == 0) {
X put_msg("Empty name");
X return;
X }
X c.arcs = NULL;
X c.compounds = NULL;
X c.ellipses = NULL;
X c.lines = NULL;
X c.splines = NULL;
X c.texts = NULL;
X c.next = NULL;
X set_temp_cursor(&wait_cursor);
X s = read_fig(file, &c);
X if (s == 0) { /* Successful read */
X clean_up();
X (void)strcpy(current_file, file);
X saved_objects = objects;
X objects = c;
X redisplay_canvas();
X put_msg("Edit \"%s\" %d objects", file, num_object);
X set_action(F_EDIT);
X }
X else if (s == ENOENT) {
X clean_up();
X saved_objects = objects;
X objects = c;
X redisplay_canvas();
X put_msg("\"%s\" new file", file);
X (void)strcpy(current_file, file);
X set_action(F_EDIT);
X }
X else if (s > 0)
X read_fail_message(file, s);
X reset_cursor();
X }
X
Xread_file(file)
Xchar *file;
X{
X extern F_compound objects, saved_objects, object_tails;
X int s;
X F_compound c;
X
X if (*file == 0) {
X put_msg("Empty name");
X return;
X }
X
X c.arcs = NULL;
X c.compounds = NULL;
X c.ellipses = NULL;
X c.lines = NULL;
X c.splines = NULL;
X c.texts = NULL;
X c.next = NULL;
X set_temp_cursor(&wait_cursor);
X s = read_fig(file, &c);
X if (s == 0) { /* Successful read */
X clean_up();
X saved_objects = c;
X tail(&objects, &object_tails);
X append_objects(&objects, &saved_objects, &object_tails);
X pw_batch_on(canvas_pixwin);
X redisplay_canvas();
X pw_batch_off(canvas_pixwin);
X put_msg("File \"%s\" %d objects", file, num_object);
X set_action_object(F_CREATE, O_ALL_OBJECT);
X }
X else if (s > 0)
X read_fail_message(file, s);
X reset_cursor();
X }
X
Xsave_and_exit(file)
Xchar *file;
X{
X if (0 == write_file(file, PROMPT)) quit();
X }
X
Xsave_current_file()
X{
X return(write_file(current_file, NO_PROMPT));
X }
X
Xsave_file(file)
Xchar *file;
X{
X return(write_file(file, PROMPT));
X }
X
Xstatus()
X{
X extern char *getwd();
X
X if (*directory == NULL) {
X if (NULL == getwd(directory)) {
X put_msg("%s", directory); /* err msg is in directory */
X *directory = '\0';
X return;
X }
X }
X
X if (*current_file == '\0')
X put_msg("No file; directory \"%s\"", directory);
X else
X put_msg("file \"%s\" %s; directory \"%s\"", current_file,
X (figure_modified ? "[modified]" : ""), directory);
X }
END_OF_FILE
if test 2744 -ne `wc -c <'xfig/file.c'`; then
echo shar: \"'xfig/file.c'\" unpacked with wrong size!
fi
# end of 'xfig/file.c'
fi
if test -f 'xfig/free.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/free.c'\"
else
echo shar: Extracting \"'xfig/free.c'\" \(2336 characters\)
sed "s/^X//" >'xfig/free.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * Febuary 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "object.h"
X
Xfree_arc(list)
XF_arc **list;
X{
X F_arc *a, *arc;
X
X for (a = *list; a != NULL;) {
X arc = a;
X a = a->next;
X if (arc->for_arrow) free((char*)arc->for_arrow);
X if (arc->back_arrow) free((char*)arc->back_arrow);
X free((char*)arc);
X }
X *list = NULL;
X }
X
Xfree_compound(list)
XF_compound **list;
X{
X F_compound *c, *compound;
X
X for (c = *list; c != NULL;) {
X compound = c;
X c = c->next;
X free_arc(&compound->arcs);
X free_compound(&compound->compounds);
X free_ellipse(&compound->ellipses);
X free_line(&compound->lines);
X free_spline(&compound->splines);
X free_text(&compound->texts);
X free((char*)compound);
X }
X *list = NULL;
X }
X
Xfree_ellipse(list)
XF_ellipse **list;
X{
X F_ellipse *e, *ellipse;
X
X for (e = *list; e != NULL;) {
X ellipse = e;
X e = e->next;
X free((char*)ellipse);
X }
X *list = NULL;
X }
X
Xfree_line(list)
XF_line **list;
X{
X F_line *l, *line;
X
X for (l = *list; l != NULL;) {
X line = l;
X l = l->next;
X free_linestorage(line);
X }
X *list = NULL;
X }
X
Xfree_text(list)
XF_text **list;
X{
X F_text *t, *text;
X
X for (t = *list; t != NULL;) {
X text = t;
X t = t->next;
X cfree(text->cstring);
X free((char*)text);
X }
X *list = NULL;
X }
X
Xfree_spline(list)
XF_spline **list;
X{
X F_spline *s, *spline;
X
X for (s = *list; s != NULL;) {
X spline = s;
X s = s->next;
X free_splinestorage(spline);
X }
X *list = NULL;
X }
X
Xfree_splinestorage(s)
XF_spline *s;
X{
X F_point *p, *q;
X F_control *a, *b;
X
X for (p = s->points; p != NULL; p = q) {
X q = p->next;
X free((char*)p);
X }
X for (a = s->controls; a != NULL; a = b) {
X b = a->next;
X free((char*)a);
X }
X if (s->for_arrow) free((char*)s->for_arrow);
X if (s->back_arrow) free((char*)s->back_arrow);
X free((char*)s);
X }
X
Xfree_linestorage(l)
XF_line *l;
X{
X F_point *p, *q;
X
X for (p = l->points; p != NULL; p = q) {
X q = p->next;
X free((char*)p);
X }
X if (l->for_arrow) free((char*)l->for_arrow);
X if (l->back_arrow) free((char*)l->back_arrow);
X free((char*)l);
X }
END_OF_FILE
if test 2336 -ne `wc -c <'xfig/free.c'`; then
echo shar: \"'xfig/free.c'\" unpacked with wrong size!
fi
# end of 'xfig/free.c'
fi
if test -f 'xfig/func.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/func.h'\"
else
echo shar: Extracting \"'xfig/func.h'\" \(2578 characters\)
sed "s/^X//" >'xfig/func.h' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * November 1985.
X *
X * %W% %G%
X*/
X
X/****************** Functions ******************/
X#define F_NULL 0
X#define F_ELLIPSE_BY_RAD 1
X#define F_ELLIPSE_BY_DIA 2
X#define F_CIRCLE_BY_RAD 3
X#define F_CIRCLE_BY_DIA 4
X#define F_CIRCULAR_ARC 5
X#define F_POLYLINE 6
X#define F_BOX 7
X#define F_POLYGON 8
X#define F_TEXT 9
X#define F_SPLINE 10
X#define F_CLOSED_SPLINE 11
X#define F_COMPOUND 13
X#define F_INTSPLINE 14
X#define F_CLOSED_INTSPLINE 15
X#define F_ARC_BOX 16
X
X#define F_CREATE 30
X#define F_COPY 31
X#define F_MOVE 32
X#define F_REPEAT 33
X#define F_REMOVE 34
X#define F_MOVE_POINT 35
X#define F_DELETE_POINT 36
X#define F_ADD_POINT 37
X#define F_DELETE_ARROW_HEAD 38
X#define F_ADD_ARROW_HEAD 39
X#define F_FLIP_XAXIS 40
X#define F_FLIP_YAXIS 41
X#define F_ROTATE90 42
X#define F_ROTATE270 43
X#define F_ROTATE 45
X#define F_FLIP 46
X#define F_AUTOARROW 47
X#define F_TURN 48
X#define F_GLUE 51
X#define F_BREAK 52
X#define F_SCALE 53
X#define F_CHANGE_THICK 54
X#define F_CHANGE_STYLE 55
X#define F_CHANGE_TEXT 56
X
X#define F_SET_PEN_SIZE 70 /* set pen size */
X#define F_SET_LINE_STYLE 71 /* set line style */
X#define F_SET_DASH_LINE 72
X#define F_SET_DOTTED_LINE 73
X#define F_SET_SOLID_LINE 74
X
X#define F_READ 101
X#define F_EDIT 103
X#define F_SAVE_IN 104
X#define F_SAVE 105
X#define F_UNDO 107
X#define F_REDISPLAY 109
X#define F_QUIT 111
X#define F_REMOVE_ALL 113
X#define F_SAVE_N_EXIT 115
X#define F_CHDIR 117
X#define F_PWDIR 118
X#define F_SAVE_BITMAP 121
X#define F_STATUS 123
X#define F_PRINT 124
X#define F_LAND 125
X#define F_FONT 126
X#define F_JUST 127
X#define F_SIZE 128
X#define F_PRINTSEL 129
X
X/**************** Drawing aids *****************/
X#define F_GRID1 250
X#define F_GRID2 251
X#define F_RULER 252
X#define F_MANHATTAN 253
X#define F_MOUNTAIN 254
X#define F_AUTOF_ARROW 255
X#define F_AUTOB_ARROW 256
X#define F_MAGNET 257
X#define F_FILL 258
X#define F_INCDECTHICK 260 /* increase/decreas line thickness */
X#define F_FILLCOLOR 261 /* darken/lighten area fill color */
X#define F_INCDECRADIUS 263 /* inc/dec round-corner box radius */
X
X#define F_UNCONSTRAINT 270 /*fs*/
X#define F_MOUNTHATTAN 271 /*fs*/
X
X#define F_LATEX_LINE 280 /*fs*/
X#define F_LATEX_ARROW 281 /*fs*/
X
X#define F_NOP 999
END_OF_FILE
if test 2578 -ne `wc -c <'xfig/func.h'`; then
echo shar: \"'xfig/func.h'\" unpacked with wrong size!
fi
# end of 'xfig/func.h'
fi
if test -f 'xfig/graphics.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/graphics.c'\"
else
echo shar: Extracting \"'xfig/graphics.c'\" \(2632 characters\)
sed "s/^X//" >'xfig/graphics.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : March 1988
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "paintop.h"
X
X/****************************************************************************
X
X The following spline drawing routine is from
X
X "An Algorithm for High-Speed Curve Generation"
X by George Merrill Chaikin,
X Computer Graphics and Image Processing, 3, Academic Press,
X 1974, 346-349.
X
X and
X
X "On Chaikin's Algorithm" by R. F. Riesenfeld,
X Computer Graphics and Image Processing, 4, Academic Press,
X 1975, 304-310.
X
X*****************************************************************************/
X
X#define round(x) ((int) (x + .5))
X#define half(z1, z2) ((z1+z2)/2.0)
X#define THRESHOLD 5
X
X/* iterative version */
Xquadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4, op, thick)
Xfloat a1, b1, a2, b2, a3, b3, a4, b4;
Xint op, thick;
X{
X float x1, y1, x2, y2, x3, y3, x4, y4;
X float xmid, ymid;
X
X clear_stack();
X push(a1, b1, a2, b2, a3, b3, a4, b4);
X
X while(pop(&x1, &y1, &x2, &y2, &x3, &y3, &x4, &y4)) {
X xmid = half(x2, x3);
X ymid = half(y2, y3);
X if (fabs(x1 - xmid) < THRESHOLD && fabs(y1 - ymid) < THRESHOLD) {
X pw_vector(canvas_pixwin, round(x1), round(y1),
X round(xmid), round(ymid), op, thick);
X }
X else {
X push(x1, y1, half(x1, x2), half(y1, y2),
X half(x2, xmid), half(y2, ymid), xmid, ymid);
X }
X
X if (fabs(xmid - x4) < THRESHOLD && fabs(ymid - y4) < THRESHOLD) {
X pw_vector(canvas_pixwin, round(xmid), round(ymid),
X round(x4), round(y4), op, thick);
X }
X else {
X push(xmid, ymid, half(xmid, x3), half(ymid, y3),
X half(x3, x4), half(y3, y4), x4, y4);
X }
X }
X }
X
Xbezier_spline(a0, b0, a1, b1, a2, b2, a3, b3, op, thick)
Xfloat a0, b0, a1, b1, a2, b2, a3, b3;
Xint op, thick;
X{
X float x0, y0, x1, y1, x2, y2, x3, y3;
X float sx1, sy1, sx2, sy2, tx, ty, tx1, ty1, tx2, ty2, xmid, ymid;
X
X clear_stack();
X push(a0, b0, a1, b1, a2, b2, a3, b3);
X
X while(pop(&x0, &y0, &x1, &y1, &x2, &y2, &x3, &y3)) {
X if (fabs(x0 - x3) < THRESHOLD && fabs(y0 - y3) < THRESHOLD) {
X pw_vector(canvas_pixwin, round(x0), round(y0),
X round(x3), round(y3), op, thick);
X }
X else {
X tx = half(x1, x2); ty = half(y1, y2);
X sx1 = half(x0, x1); sy1 = half(y0, y1);
X sx2 = half(sx1, tx); sy2 = half(sy1, ty);
X tx2 = half(x2, x3); ty2 = half(y2, y3);
X tx1 = half(tx2, tx); ty1 = half(ty2, ty);
X xmid = half(sx2, tx1); ymid = half(sy2, ty1);
X
X push(x0, y0, sx1, sy1, sx2, sy2, xmid, ymid);
X push(xmid, ymid, tx1, ty1, tx2, ty2, x3, y3);
X }
X }
X }
END_OF_FILE
if test 2632 -ne `wc -c <'xfig/graphics.c'`; then
echo shar: \"'xfig/graphics.c'\" unpacked with wrong size!
fi
# end of 'xfig/graphics.c'
fi
if test -f 'xfig/print.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/print.c'\"
else
echo shar: Extracting \"'xfig/print.c'\" \(1176 characters\)
sed "s/^X//" >'xfig/print.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * print.c
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X
X/******************* imported global variables and procedures **************/
X
Xextern char current_file[];
Xextern int print_landscape;
Xextern int figure_modified;
Xextern char *printer;
X
Xextern put_msg();
Xextern wmgr_confirm();
X
Xstatic char prcmd[200];
Xstatic char *conf_prnt =
X "Figure hasn't been saved, PRINT with LEFT button, CANCEL with MIDDLE or RIGHT";
X
Xprint_figure()
X {
X if (current_file[0]==0)
X {
X put_msg("NO FILE TO PRINT");
X XBell(tool_d,50);
X }
X else
X {
X if (figure_modified) /* modified without saving, confirm print */
X if (wmgr_confirm(canvas_swfd, conf_prnt) != -1)
X return;
X put_msg("Print figure %s on printer %s in %s mode",
X current_file,printer,print_landscape? "LANDSCAPE":"PORTRAIT");
X sprintf(prcmd,"f2ps -c %s %s | lpr -J %s -P%s",
X print_landscape? "-L":"-P",
X current_file,
X current_file,
X printer);
X if (system(prcmd)==127)
X put_msg("Error in printing");
X }
X }
END_OF_FILE
if test 1176 -ne `wc -c <'xfig/print.c'`; then
echo shar: \"'xfig/print.c'\" unpacked with wrong size!
fi
# end of 'xfig/print.c'
fi
if test -f 'xfig/psfonts.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/psfonts.c'\"
else
echo shar: Extracting \"'xfig/psfonts.c'\" \(2008 characters\)
sed "s/^X//" >'xfig/psfonts.c' <<'END_OF_FILE'
X#include <X11/Xlib.h>
X#include "psfonts.h"
X#define NULL 0
X
X/* printer font names for indicator window */
X
Xstruct _fstruct fontnames[NUMFONTS] = {
X {"Times-Roman", "-adobe-times-medium-r-*--*", NULL},
X {"Times-Italic", "-adobe-times-medium-i-*--*", NULL},
X {"Times-Bold", "-adobe-times-bold-r-*--*", NULL},
X {"Times-BoldItalic", "-adobe-times-bold-i-*--*", NULL},
X {"AvantGarde", "NONE", NULL},
X {"AvantGarde-BookOblique", "NONE", NULL},
X {"AvantGarde-Demi", "NONE", NULL},
X {"AvantGarde-DemiOblique", "NONE", NULL},
X {"Bookman-Light", "NONE", NULL},
X {"Bookman-LightItalic", "NONE", NULL},
X {"Bookman-Demi", "NONE", NULL},
X {"Bookman-DemiItalic", "NONE", NULL},
X {"Courier", "-adobe-courier-medium-r-*--*", NULL},
X {"Courier-Oblique", "-adobe-courier-medium-o-*--*", NULL},
X {"Courier-Bold", "-adobe-courier-bold-r-*--*", NULL},
X {"Courier-BoldItalic", "-adobe-courier-bold-o-*--*", NULL},
X {"Helvetica", "-adobe-helvetica-medium-r-*--*", NULL},
X {"Helvetica-Oblique", "-adobe-helvetica-medium-o-*--*", NULL},
X {"Helvetica-Bold", "-adobe-helvetica-bold-r-*--*", NULL},
X {"Helvetica-BoldOblique", "-adobe-helvetica-bold-o-*--*", NULL},
X {"Helvetica-Narrow", "NONE", NULL},
X {"Helvetica-Narrow-Oblique", "NONE", NULL},
X {"Helvetica-Narrow-Bold", "NONE", NULL},
X {"Helvetica-Narrow-BoldOblique", "NONE", NULL},
X {"NewCenturySchlbk-Roman", "-adobe-new century schoolbook-medium-r-*--*", NULL},
X {"NewCenturySchlbk-Italic", "-adobe-new century schoolbook-medium-i-*--*", NULL},
X {"NewCenturySchlbk-Bold", "-adobe-new century schoolbook-bold-r-*--*", NULL},
X {"NewCenturySchlbk-BoldItalic", "-adobe-new century schoolbook-bold-i-*--*", NULL},
X {"Palatino-Roman", "NONE", NULL},
X {"Palatino-Italic", "NONE", NULL},
X {"Palatino-Bold", "NONE", NULL},
X {"Palatino-BoldItalic", "NONE", NULL},
X {"Symbol", "*-symbol-medium-r-*--*", NULL},
X {"ZapfChancery-MediumItalic", "zapfchancery-mediumitalic--*", NULL},
X {"ZapfDingbats", "zapfdingbats--*", NULL},
X };
END_OF_FILE
if test 2008 -ne `wc -c <'xfig/psfonts.c'`; then
echo shar: \"'xfig/psfonts.c'\" unpacked with wrong size!
fi
# end of 'xfig/psfonts.c'
fi
if test -f 'xfig/querytile.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/querytile.c'\"
else
echo shar: Extracting \"'xfig/querytile.c'\" \(915 characters\)
sed "s/^X//" >'xfig/querytile.c' <<'END_OF_FILE'
X#include <X11/Xlib.h>
X#include <stdio.h>
X
Xmain(argc,argv)
Xint argc;
Xchar *argv[];
X {
X Display *dpy;
X Window window;
X int width,height;
X int des_width,des_height;
X if (argc < 3)
X {
X fprintf(stderr,"usage: %s desired_tile_width desired_tile_height\n",
X argv[0]);
X exit(1);
X }
X if ((dpy=XOpenDisplay(""))==0)
X {
X fprintf(stderr,"can't open display\n");
X exit(1);
X }
X window = XCreateSimpleWindow(dpy,DefaultRootWindow(dpy),0,0,10,10,0,0,0);
X des_width = atoi(argv[1]);
X des_height = atoi(argv[2]);
X XQueryBestSize(dpy,TileShape,window,des_width,des_height,&width,&height);
X printf("Best tile size is %d x %d \n",width,height);
X XQueryBestSize(dpy,StippleShape,window,des_width,des_height,&width,&height);
X printf("Best stipple size is %d x %d \n",width,height);
X XQueryBestSize(dpy,CursorShape,window,des_width,des_height,&width,&height);
X printf("Best cursor size is %d x %d \n",width,height);
X exit(0);
X }
END_OF_FILE
if test 915 -ne `wc -c <'xfig/querytile.c'`; then
echo shar: \"'xfig/querytile.c'\" unpacked with wrong size!
fi
# end of 'xfig/querytile.c'
fi
if test -f 'xfig/redisplay.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/redisplay.c'\"
else
echo shar: Extracting \"'xfig/redisplay.c'\" \(2600 characters\)
sed "s/^X//" >'xfig/redisplay.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1988 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * Febuary 1988.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "resources.h"
X#include "object.h"
X#include "paintop.h"
X
Xextern int pointmarker_shown;
Xextern int compoundbox_shown;
Xextern int foreground_color, background_color;
X
Xredisplay_objects(objects)
XF_compound *objects;
X{
X int fill;
X
X if (objects == NULL)
X return;
X for (fill=1; fill >= 0; fill--)
X {
X redisplay_lineobject(objects->lines,fill);
X redisplay_ellipseobject(objects->ellipses,fill);
X redisplay_arcobject(objects->arcs,fill);
X redisplay_splineobject(objects->splines,fill);
X }
X if (pointmarker_shown) /* show the point markers if they are on */
X toggle_pointmarker();
X if (compoundbox_shown) {
X F_compound *c;
X for (c = objects->compounds; c != NULL; c = c->next)
X draw_compoundbox(c, INV_PAINT); /* show the compound boxes */
X }
X /* fill compound objects later */
X redisplay_compoundobject(objects->compounds);
X /* text doesn't have fill mode */
X redisplay_textobject(objects->texts);
X }
X
Xredisplay_arcobject(arcs,fill)
XF_arc *arcs;
Xint fill;
X{
X F_arc *arc;
X
X for (arc = arcs; arc != NULL; arc = arc->next)
X {
X if ((fill && arc->area_fill) ||
X (fill==0 && arc->area_fill == 0))
X draw_arc(arc, foreground_color);
X }
X }
X
Xredisplay_ellipseobject(ellipses,fill)
XF_ellipse *ellipses;
Xint fill;
X{
X F_ellipse *e;
X
X for (e = ellipses; e != NULL; e = e->next)
X {
X if ((fill && e->area_fill) ||
X (fill==0 && e->area_fill == 0))
X draw_ellipse(e, foreground_color);
X }
X }
X
Xredisplay_lineobject(lines,fill)
XF_line *lines;
Xint fill;
X{
X F_line *line;
X
X for (line = lines; line != NULL; line = line->next)
X {
X if ((fill && line->area_fill) ||
X (fill==0 && line->area_fill == 0))
X draw_line(line, PAINT);
X }
X }
X
Xredisplay_splineobject(splines,fill)
XF_spline *splines;
Xint fill;
X{
X F_spline *s;
X
X for (s = splines; s != NULL; s = s->next)
X {
X if ((fill && s->area_fill) ||
X (fill==0 && s->area_fill == 0))
X draw_spline(s, PAINT);
X }
X }
X
Xredisplay_textobject(texts,fill)
XF_text *texts;
Xint fill;
X{
X F_text *t;
X
X for (t = texts; t != NULL; t = t->next)
X draw_text(t, PAINT);
X }
X
Xredisplay_compoundobject(compounds)
XF_compound *compounds;
X{
X F_compound *c;
X
X for (c = compounds; c != NULL; c = c->next)
X draw_compound(c);
X }
X
Xredisplay_canvas()
X{
X extern F_compound objects;
X
X clear_canvas();
X set_temp_cursor(&wait_cursor);
X pw_batch_on(canvas_pixwin);
X redisplay_objects(&objects);
X redisplay_grid();
X pw_batch_off(canvas_pixwin);
X reset_cursor();
X }
END_OF_FILE
if test 2600 -ne `wc -c <'xfig/redisplay.c'`; then
echo shar: \"'xfig/redisplay.c'\" unpacked with wrong size!
fi
# end of 'xfig/redisplay.c'
fi
if test -f 'xfig/switch.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/switch.h'\"
else
echo shar: Extracting \"'xfig/switch.h'\" \(1112 characters\)
sed "s/^X//" >'xfig/switch.h' <<'END_OF_FILE'
X/* button definition */
X
Xtypedef struct
X{
X TOOL widget;
X Pixmap normal, reverse;
X} button_info;
X
Xtypedef struct switch_struct {
X int on;
X int group;
X int x; /* Row 0 / 1 */
X int y; /* Column 0 -> ? */
X PIXRECT icon;
X int value;
X int (*on_func)();
X int (*off_func)();
X int type;
X#define S_TOG 1
X#define S_ON 2
X#define S_MOMENT 3
X button_info but;
X }
X F_switch;
X/*
XSwitches in the same "group" > -1 are mutually exclusive;
Xi.e., only one of the switches of the same group can be on at any time.
XIf a switch in a group n>-1 is on and another one in the same group is
Xdepressed, the former will be turned off and the latter on.
X
XA S_ON switch can not be turned off by clicking at it; it can be turned
Xoff only by clicking another switch in the same group.
X
XA S_TOG switch can be turned off both ways.
X
XNo two S_ON or S_ON switches of the same group can be on (hilighted)
Xat anytime.
X
XA S_MOMENT switch turns on when pressed and turns off when finished
Xwith the function (read file, save file, etc).
X
XSwitches with group = -1 are toggle type switches.
X*/
END_OF_FILE
if test 1112 -ne `wc -c <'xfig/switch.h'`; then
echo shar: \"'xfig/switch.h'\" unpacked with wrong size!
fi
# end of 'xfig/switch.h'
fi
if test -f 'xfig/trans.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'xfig/trans.c'\"
else
echo shar: Extracting \"'xfig/trans.c'\" \(2859 characters\)
sed "s/^X//" >'xfig/trans.c' <<'END_OF_FILE'
X/*
X * FIG : Facility for Interactive Generation of figures
X *
X * Copyright (c) 1985 by Supoj Sutanthavibul (supoj at sally.UTEXAS.EDU)
X * January 1985.
X * 1st revision : Aug 1985.
X *
X * %W% %G%
X*/
X#include "fig.h"
X#include "object.h"
X
Xtranslate_ellipse(ellipse, dx, dy)
XF_ellipse *ellipse;
Xint dx, dy;
X{
X ellipse->center.x += dx;
X ellipse->center.y += dy;
X ellipse->start.x += dx;
X ellipse->start.y += dy;
X ellipse->end.x += dx;
X ellipse->end.y += dy;
X }
X
Xtranslate_arc(arc, dx, dy)
XF_arc *arc;
Xint dx, dy;
X{
X arc->center.x += (float)dx;
X arc->center.y += (float)dy;
X arc->point[0].x += dx;
X arc->point[0].y += dy;
X arc->point[1].x += dx;
X arc->point[1].y += dy;
X arc->point[2].x += dx;
X arc->point[2].y += dy;
X }
X
Xtranslate_line(line, dx, dy)
XF_line *line;
Xint dx, dy;
X{
X F_point *point;
X
X for (point = line->points; point != NULL; point = point->next) {
X point->x += dx;
X point->y += dy;
X }
X }
X
Xtranslate_text(text, dx, dy)
XF_text *text;
Xint dx, dy;
X{
X text->base_x += dx;
X text->base_y += dy;
X }
X
Xtranslate_spline(spline, dx, dy)
XF_spline *spline;
Xint dx, dy;
X{
X F_point *point;
X F_control *cp;
X
X for (point = spline->points; point != NULL; point = point->next) {
X point->x += dx;
X point->y += dy;
X }
X for (cp = spline->controls; cp != NULL; cp = cp->next) {
X cp->lx += dx;
X cp->ly += dy;
X cp->rx += dx;
X cp->ry += dy;
X }
X }
X
Xtranslate_compound(compound, dx, dy)
XF_compound *compound;
Xint dx, dy;
X{
X compound->nwcorner.x += dx;
X compound->nwcorner.y += dy;
X compound->secorner.x += dx;
X compound->secorner.y += dy;
X
X translate_lines(compound->lines, dx, dy);
X translate_splines(compound->splines, dx, dy);
X translate_ellipses(compound->ellipses, dx, dy);
X translate_arcs(compound->arcs, dx, dy);
X translate_texts(compound->texts, dx, dy);
X translate_compounds(compound->compounds, dx, dy);
X }
X
Xtranslate_arcs(arcs, dx, dy)
XF_arc *arcs;
Xint dx, dy;
X{
X F_arc *a;
X
X for (a = arcs; a != NULL; a = a-> next)
X translate_arc(a, dx, dy);
X }
X
Xtranslate_compounds(compounds, dx, dy)
XF_compound *compounds;
Xint dx, dy;
X{
X F_compound *c;
X
X for (c = compounds; c != NULL; c = c->next)
X translate_compound(c, dx, dy);
X }
X
Xtranslate_ellipses(ellipses, dx, dy)
XF_ellipse *ellipses;
Xint dx, dy;
X{
X F_ellipse *e;
X
X for (e = ellipses; e != NULL; e = e-> next)
X translate_ellipse(e, dx, dy);
X }
X
Xtranslate_lines(lines, dx, dy)
XF_line *lines;
Xint dx, dy;
X{
X F_line *l;
X
X for (l = lines; l != NULL; l = l->next) translate_line(l, dx, dy);
X }
X
Xtranslate_splines(splines, dx, dy)
XF_spline *splines;
Xint dx, dy;
X{
X F_spline *s;
X
X for (s = splines; s != NULL; s = s->next)
X translate_spline(s, dx, dy);
X }
X
Xtranslate_texts(texts, dx, dy)
XF_text *texts;
Xint dx, dy;
X{
X F_text *t;
X
X for (t = texts; t != NULL; t = t->next)
X translate_text(t, dx, dy);
X }
X
END_OF_FILE
if test 2859 -ne `wc -c <'xfig/trans.c'`; then
echo shar: \"'xfig/trans.c'\" unpacked with wrong size!
fi
# end of 'xfig/trans.c'
fi
echo shar: End of archive 14 \(of 15\).
cp /dev/null ark14isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 15 archives.
rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
dan
-----------------------------------------------------------
O'Reilly && Associates
argv at sun.com / argv at ora.com
632 Petaluma Ave, Sebastopol, CA 95472
800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
Opinions expressed reflect those of the author only.
More information about the Comp.sources.x
mailing list