--- ./fig2dev/dev/genpdf.c Wed Dec 18 17:36:44 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genpdf.c Fri Jun 6 15:12:53 2003 @@ -26,7 +26,6 @@ #include "object.h" #include "texfonts.h" -static FILE *saveofile; static char *ofile; void @@ -46,7 +45,6 @@ { /* divert output from ps driver to the pipe into ghostscript */ /* but first close the output file that main() opened */ - saveofile = tfp; if (tfp != stdout) fclose(tfp); --- ./fig2dev/dev/genpic.c Wed Dec 18 17:36:51 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genpic.c Fri Jun 6 15:00:17 2003 @@ -50,6 +50,8 @@ static int OptEllipseFill = 0; static int OptNoUnps = 0; /* prohibit unpsfont() */ +void bezier_spline(); + void genpic_option(opt, optarg) char opt, *optarg; @@ -128,7 +130,7 @@ } fprintf(tfp, ".PS\n.ps %d\n", /* PIC preamble */ - font_size != 0.0? font_size : DEFAULT_FONT_SIZE); + font_size != 0.0? (int)font_size : DEFAULT_FONT_SIZE); } int @@ -150,7 +152,7 @@ won't take the legitimate line thickness command. */ -static +static void set_linewidth(w) int w; { @@ -477,7 +479,6 @@ genpic_arc(a) F_arc *a; { - double x, y; double cx, cy, sx, sy, ex, ey; /* print any comments */ @@ -539,6 +540,7 @@ /* draw arrow heading from (x1, y1) to (x2, y2) */ +void draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid) double x1, y1, x2, y2, arrowht, arrowwid; { @@ -568,6 +570,7 @@ #define THRESHOLD .05 /* inch */ +void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) double a1, b1, a2, b2, a3, b3, a4, b4; { @@ -672,6 +675,7 @@ } +void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) double a0, b0, a1, b1, a2, b2, a3, b3; { --- ./fig2dev/dev/genptk.c Wed Dec 18 17:37:30 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genptk.c Fri Jun 6 15:14:39 2003 @@ -109,7 +109,6 @@ genptk_start(F_compound *objects) { char stfp[1024]; - int coord_system; float wid, ht, swap; struct paperdef *pd; @@ -448,8 +447,7 @@ void genptk_text(F_text * t) { - char stfp[2048], *tpos; - float y; + char stfp[2048]; int i, j; /* I'm sure I'm just too dense to have seen a better way of doing this... */ @@ -1046,13 +1044,12 @@ ptkArc(void *shape, unsigned int outlineColor, unsigned int fillColor, unsigned int fillPattern, int thickness) { - char dir[8], stfp[1024]; + char stfp[1024]; double cx, cy, /* Center of circle containing arc. */ sx, sy, /* Start point of arc. */ ex, ey, /* Stop point of arc. */ angle1, angle2, extent, radius, startAngle; F_arc *a; - F_arrow *r; a = (F_arc *) shape; cx = X(a->center.x); /* Center. */ --- ./fig2dev/dev/genibmgl.c Wed Dec 18 17:36:14 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genibmgl.c Fri Jun 6 14:41:16 2003 @@ -35,7 +35,7 @@ #include "fig2dev.h" #include "object.h" -static set_style(); +static void set_style(); #define FONTS 35 #define COLORS 8 @@ -322,7 +322,8 @@ fprintf(tfp, "VS%.2f;\n", pen_speed); } -static arc_tangent(x1, y1, x2, y2, direction, x, y) +static void +arc_tangent(x1, y1, x2, y2, direction, x, y) double x1, y1, x2, y2, *x, *y; int direction; { @@ -334,11 +335,12 @@ *x = x2 + (y2 - y1); *y = y2 - (x2 - x1); } - } +} /* draw arrow heading from (x1, y1) to (x2, y2) */ -static draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid) +static void +draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid) double x1, y1, x2, y2, arrowht, arrowwid; { double x, y, xb, yb, dx, dy, l, sina, cosa; @@ -371,12 +373,13 @@ /* restore line style */ set_style(style, length); - } +} /* * set_style - issue line style commands as appropriate */ -static set_style(style, length) +static void +set_style(style, length) int style; double length; { @@ -431,7 +434,7 @@ * set_width - issue line width commands as appropriate * NOTE: for HP plotters we can't do anything */ -static set_width(w) +static void set_width(w) int w; { } @@ -439,7 +442,7 @@ /* * set_color - issue line color commands as appropriate */ -static set_color(color) +static void set_color(color) int color; { static int number = 0; /* 1 <= number <= 8 */ @@ -458,7 +461,7 @@ } } -static fill_polygon(pattern, color) +static void fill_polygon(pattern, color) int pattern; int color; { @@ -730,7 +733,7 @@ #define THRESHOLD .05 /* inch */ -static bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) +static void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) double a0, b0, a1, b1, a2, b2, a3, b3; { double x0, y0, x3, y3; @@ -786,7 +789,7 @@ s->for_arrow->ht/ppi, s->for_arrow->wid/ppi); } -static quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) +static void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) double a1, b1, a2, b2, a3, b3, a4, b4; { double x1, y1, x4, y4; --- ./fig2dev/dev/gensvg.c Wed Dec 18 17:38:18 2002 +++ ../transfig.3.2.4/./fig2dev/dev/gensvg.c Fri Jun 6 15:06:50 2003 @@ -535,9 +535,9 @@ fprintf (tfp, "pen_color), (int) ceil (s->thickness * mag)); - fprintf (tfp, "M %d,%d \n C", (int) s->points->x * mag, (int) s->points->y * mag); + fprintf (tfp, "M %d,%d \n C", (int) (s->points->x * mag), (int) (s->points->y * mag)); for (p = s->points++; p; p = p->next) { - fprintf (tfp, "%d,%d\n", (int) p->x * mag, (int) p->y * mag); + fprintf (tfp, "%d,%d\n", (int) (p->x * mag), (int) (p->y * mag)); } fprintf (tfp, "\"/>\n"); } @@ -692,8 +692,8 @@ if (t->angle != 0) { fprintf (tfp, "\n", (int) (t->base_x * mag), (int) (t->base_y * mag), degrees (t->angle)); - fprintf (tfp, "\n", + fprintf (tfp, "\n", rgbColorVal (t->color), family[(int) ceil ((t->font + 1) / 4)], (t->font % 2 == 0 ? "normal" : "italic"), (t->font % 4 < 2 ? "normal" : "bold"), (int) (ceil (t->size * 12 * mag)), @@ -700,8 +700,8 @@ anchor[t->type]); } else - fprintf (tfp, "\n", + fprintf (tfp, "\n", (int) (t->base_x * mag), (int) (t->base_y * mag), rgbColorVal (t->color), family[(int) ceil ((t->font + 1) / 4)], (t->font % 2 == 0 ? "normal" : "italic"), --- ./fig2dev/dev/readtif.c Wed Dec 18 17:40:57 2002 +++ ../transfig.3.2.4/./fig2dev/dev/readtif.c Fri Jun 6 14:29:43 2003 @@ -31,7 +31,7 @@ { char buf[2*PATH_MAX+40],pcxname[PATH_MAX]; FILE *tiftopcx; - int stat, size; + int stat; *llx = *lly = 0; /* output PostScript comment */ --- ./fig2dev/dev/genemf.c Wed Dec 18 17:35:54 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genemf.c Fri Jun 6 15:19:21 2003 @@ -1458,10 +1458,8 @@ static void polygon(l) F_line *l; { - F_point *p, *q, p0, pn; - int count, erase_head=False, erase_tail=False; - Dir dir; - double d; + F_point *p, *q; + int count; EMRPOLYGON em_pg; /* Polygon in little endian format */ POINTL *aptl; @@ -1794,7 +1792,7 @@ char *text; int type; { - int i, n_chars, n_unicode; + int n_chars, n_unicode; short *utext = NULL; EMREXTTEXTOUTW em_tx; /* Text structure in little endian format */ @@ -1855,11 +1853,13 @@ static void textangle(angle) double angle; { +#if 0 int c, s; static double oldangle = UNDEFVALUE; chkcache(angle, oldangle); c = round(1200*cos(angle)); s = round(1200*sin(angle)); /*fprintf(tfp, "charori (%d,%d) (%d,%d);\n", -s, c, c, s);*/ +#endif } @@ -1878,7 +1878,6 @@ int flags; double size; { - static int oldfont = UNDEFVALUE; static int oldfonthandle = 0; EMREXTCREATEFONTINDIRECTW em_fn; EMRSELECTOBJECT em_so; @@ -2011,7 +2010,7 @@ EMRSETVIEWPORTEXTEX em_vp; char *emh_description; /* Regular text description. */ short *uni_description = NULL; /* Unitext discription. */ - int i, n_chars, n_unicode; + int n_chars, n_unicode; memset(&emh, 0, sizeof(ENHMETAHEADER)); emh.iType = htofl(EMR_HEADER); --- ./fig2dev/dev/genepic.c Wed Dec 18 17:36:00 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genepic.c Fri Jun 6 14:29:43 2003 @@ -117,13 +117,20 @@ #define Economic 1 #define DottedDash 2 +void set_style(); +void chaikin_curve(); +void genepic_itp_spline(); +void drawarc(); +void rtop(); +void fdraw_arrow_head(); + static void genepic_ctl_spline(), genepic_int_spline(); static void genepic_open_spline(), genepic_closed_spline(); -static quadratic_spline(); -static bezier_spline(); -static arc_tangent(); -static arc_arrow(); -static draw_arrow_head(); +static void quadratic_spline(); +static void bezier_spline(); +static void arc_tangent(); +static void arc_arrow(); +static void draw_arrow_head(); /* Structure for Point with "double" values */ struct fp_struct { @@ -317,7 +324,7 @@ } } -static +static void fconvertCS(fpt) FPoint *fpt; { @@ -326,6 +333,7 @@ fpt->y -= LLY; } +void convertCS(pt) F_point *pt; { @@ -419,7 +427,7 @@ return 0; } -static +static void set_linewidth(w) int w; { @@ -439,6 +447,7 @@ } } +void set_pattern(type, color) int type, color; { @@ -868,6 +877,7 @@ } } +void set_style(style, dash_len) int style; double dash_len; @@ -1022,6 +1032,7 @@ fprintf(tfp, "\n"); } +void chaikin_curve(a1, b1, a2, b2, a3, b3) double a1, b1, a2, b2, a3, b3; { @@ -1041,7 +1052,7 @@ } } -static +static void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) double a1, b1, a2, b2, a3, b3, a4, b4; { @@ -1068,6 +1079,7 @@ } } +void genepic_itp_spline(spl) F_spline *spl; { @@ -1122,7 +1134,7 @@ } } -static +static void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) double a0, b0, a1, b1, a2, b2, a3, b3; { @@ -1456,6 +1468,7 @@ } } +void drawarc(ctr, r, th1, angle) FPoint *ctr; double r, th1, angle; @@ -1479,7 +1492,7 @@ fprintf(tfp, "\n"); } -static +static void arc_tangent(pt1, pt2, direction, pt3) FPoint *pt1, *pt2, *pt3; int direction; @@ -1507,7 +1520,7 @@ ****************************************************************/ -static +static void arc_arrow(pt1, pt2, direction, arrow, pt3) FPoint *pt1, *pt2, *pt3; int direction; @@ -1548,6 +1561,7 @@ pt3->y=y1+r*cos(beta+alpha); } +void rtop(x, y, r, th) double x, y, *r, *th; { @@ -1557,7 +1571,7 @@ if (y < 0) *th = 2*M_PI - *th; } -static +static void draw_arrow_head(pt1, pt2, arrowht, arrowwid, type, style, thickness) F_point *pt1, *pt2; int type, style; @@ -1572,6 +1586,7 @@ fdraw_arrow_head(&fpt1, &fpt2, arrowht, arrowwid, type, style, thickness); } +void fdraw_arrow_head(pt1, pt2, arrowht, arrowwid, type, style, thickness) FPoint *pt1, *pt2; int type, style; --- ./fig2dev/dev/gentpic.c Wed Dec 18 17:38:32 2002 +++ ../transfig.3.2.4/./fig2dev/dev/gentpic.c Fri Jun 6 14:29:43 2003 @@ -92,7 +92,7 @@ void gentpic_open_spline(), gentpic_closed_spline(); void gentpic_spline(), gentpic_ellipse(), gentpic_text(); void gentpic_arc(), gentpic_line(); -static bezier_spline(); +static void bezier_spline(); static void newline(); void gentpic_option(opt, optarg) @@ -151,7 +151,7 @@ * tpic's line thickness is given in milli-inches with a default of 8 * milli-inches. We simply multiply this default with the Fig pixel width. */ -static set_linewidth(w) +static void set_linewidth(w) int w; { static int cur_thickness = -1; @@ -163,7 +163,7 @@ } } -static set_style(s, v) +static void set_style(s, v) int s; float v; { @@ -176,7 +176,7 @@ } } -static set_baseline(b) +static void set_baseline(b) int b; { static int cur_baseline = -1; @@ -187,7 +187,7 @@ } } -static set_texture(cur_texture) +static void set_texture(cur_texture) int cur_texture; { /* @@ -207,7 +207,7 @@ * otherwise, it should do a normal gray-scale fill. Note that the gray- * scale fill parameter is wired for fig2.X (the constant 0.05). */ -static set_fill(cur_fill) +static void set_fill(cur_fill) int cur_fill; { if(cur_fill < WHITE_FILL || @@ -627,7 +627,7 @@ } -static arc_tangent(x1, y1, x2, y2, direction, x, y) +static void arc_tangent(x1, y1, x2, y2, direction, x, y) double x1, y1, x2, y2, *x, *y; int direction; { @@ -643,7 +643,7 @@ #define THRESHOLD .05 /* inch */ -static quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) +static void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) double a1, b1, a2, b2, a3, b3, a4, b4; { double x1, y1, x4, y4; @@ -755,7 +755,7 @@ } -static bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) +static void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) double a0, b0, a1, b1, a2, b2, a3, b3; { double x0, y0, x3, y3; --- ./fig2dev/dev/readpcx.c Wed Dec 18 17:40:23 2002 +++ ../transfig.3.2.4/./fig2dev/dev/readpcx.c Fri Jun 6 15:20:23 2003 @@ -82,8 +82,6 @@ long bytemax,bytesdone; byte inbyte,inbyte2; int real_bpp; /* how many bpp file really is */ - int mult, neu_stat, numcols, size, x3; - byte col[3]; fprintf(tfp, "%% Begin Imported PCX File: %s\n\n", pic->file); pic->subtype = P_PCX; --- ./fig2dev/dev/psencode.c Wed Dec 18 17:39:47 2002 +++ ../transfig.3.2.4/./fig2dev/dev/psencode.c Fri Jun 6 14:29:43 2003 @@ -27,6 +27,7 @@ /* output PSencode header */ +void PSencode_header() { static char *PSencodeheader[] = { @@ -103,6 +104,7 @@ /* output transparentimage header */ +void PStransp_header() { static char *Transpheader[] = { --- ./fig2dev/dev/setfigfont.c Wed Dec 18 17:41:17 2002 +++ ../transfig.3.2.4/./fig2dev/dev/setfigfont.c Fri Jun 6 14:29:43 2003 @@ -28,6 +28,7 @@ Boolean FontSizeOnly = False; +void define_setfigfont(tfp) FILE *tfp; { --- ./fig2dev/dev/gentextyl.c Wed Dec 18 17:38:23 2002 +++ ../transfig.3.2.4/./fig2dev/dev/gentextyl.c Fri Jun 6 14:39:54 2003 @@ -29,16 +29,16 @@ #include "object.h" #include "texfonts.h" -static putline(); +static void putline(); #define rint(a) floor((a)+0.5) /* close enough? */ static void gentextyl_ctl_spline(), gentextyl_itp_spline(); -static bezier_spline(); -static draw_arrow_head(); -static set_style(); -static arc_tangent(); -static rtop(); +static void bezier_spline(); +static void draw_arrow_head(); +static void set_style(); +static void arc_tangent(); +static void rtop(); static int line_style = 0; /* Textyl solid line style */ static int linethick = 2; /* Range is 1-12 `pixels' */ @@ -140,7 +140,7 @@ } -static set_linewidth(w) +static void set_linewidth(w) int w; { /* Nop */ @@ -195,7 +195,7 @@ /* * set_style - issue style commands as appropriate */ -static set_style(style, dash_len) +static void set_style(style, dash_len) int style; double dash_len; { @@ -218,7 +218,7 @@ /* * putline */ -static putline (start_x, start_y, end_x, end_y) +static void putline (start_x, start_y, end_x, end_y) int start_x, start_y, end_x, end_y; { @@ -390,7 +390,7 @@ /* * rtop - rectangular to polar conversion */ -static +static void rtop(x, y, r, th) double x, y, *r, *th; { @@ -400,7 +400,7 @@ if (y < 0) *th = 2*M_PI - *th; } -static +static void arc_tangent(x1, y1, x2, y2, direction, x, y) double x1, y1, x2, y2, *x, *y; int direction; @@ -417,7 +417,7 @@ /* draw arrow heading from (x1, y1) to (x2, y2) */ -static +static void draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid) double x1, y1, x2, y2; double arrowht, arrowwid; @@ -455,7 +455,7 @@ #define THRESHOLD (10.0) double last_x, last_y; -static +static void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) double a1, b1, a2, b2, a3, b3, a4, b4; { @@ -490,8 +490,8 @@ } } -static -void gentextyl_ctl_spline(s) +static void +gentextyl_ctl_spline(s) F_spline *s; { F_point *p; @@ -550,8 +550,8 @@ } -static -void gentextyl_itp_spline(s) +static void +gentextyl_itp_spline(s) F_spline *s; { F_point *p1, *p2; @@ -583,7 +583,7 @@ s->for_arrow->ht, s->for_arrow->wid); } -static +static void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) double a0, b0, a1, b1, a2, b2, a3, b3; { --- ./fig2dev/dev/genpictex.c Wed Dec 18 17:36:57 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genpictex.c Fri Jun 6 14:29:43 2003 @@ -34,13 +34,13 @@ extern Boolean FontSizeOnly; /* defined in setfigfont.c */ static void genpictex_ctl_spline(), genpictex_itp_spline(); -static bezier_spline(); -static put_box(); -static set_style(); -static putline(); -static arc_tangent(); -static rtop(); -static draw_arrow_head(); +static void bezier_spline(); +static void put_box(); +static void set_style(); +static void putline(); +static void arc_tangent(); +static void rtop(); +static void draw_arrow_head(); #define rint(a) floor((a)+0.5) /* close enough? */ static int encoding = 1; @@ -176,7 +176,7 @@ return 0; } -static +static void set_linewidth(w) int w; { @@ -348,7 +348,7 @@ /* * draw box */ -static +static void put_box (llx, lly, urx, ury, l) int llx, lly, urx, ury; F_line *l; @@ -442,7 +442,7 @@ /* * set_style - issue style commands as appropriate */ -static +static void set_style(style, dash_len) int style; double dash_len; @@ -473,7 +473,7 @@ /* * putline - use rules if possible */ -static +static void putline (start_x, start_y, end_x, end_y, next_x, next_y, first_start_x, first_start_y, first_end_x, first_end_y) int start_x, start_y, next_x, next_y; @@ -761,7 +761,7 @@ /* * rtop - rectangular to polar conversion */ -static +static void rtop(x, y, r, th) double x, y, *r, *th; { @@ -771,7 +771,7 @@ if (y < 0) *th = 2*M_PI - *th; } -static +static void arc_tangent(x1, y1, x2, y2, direction, x, y) double x1, y1, x2, y2, *x, *y; int direction; @@ -788,7 +788,7 @@ /* draw arrow heading from (x1, y1) to (x2, y2) */ -static +static void draw_arrow_head(x1, y1, x2, y2, arrowht, arrowwid) double x1, y1, x2, y2, arrowht, arrowwid; { @@ -837,7 +837,7 @@ #define THRESHOLD .05 /* inch */ -static +static void quadratic_spline(a1, b1, a2, b2, a3, b3, a4, b4) double a1, b1, a2, b2, a3, b3, a4, b4; { @@ -956,7 +956,7 @@ s->for_arrow->ht/ppi, s->for_arrow->wid/ppi); } -static bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) +static void bezier_spline(a0, b0, a1, b1, a2, b2, a3, b3) double a0, b0, a1, b1, a2, b2, a3, b3; { double x0, y0, x3, y3; --- ./fig2dev/dev/genlatex.c Wed Dec 18 17:36:19 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genlatex.c Fri Jun 6 14:29:43 2003 @@ -41,14 +41,17 @@ extern void unpsfont(); extern Boolean FontSizeOnly; /* defined in setfigfont.c */ -static put_box(); -static put_arc_box(); -static single_line(); -static put_solidline(); -static put_dashline(); -static put_dotline(); -static put_quarter(); +static void put_box(); +static void put_arc_box(); +static void single_line(); +static void put_solidline(); +static void put_dashline(); +static void put_dotline(); +static void put_quarter(); +void set_color(); +void reset_color(); + #define rint(a) floor((a)+0.5) /* close enough? */ /* @@ -116,8 +119,8 @@ int thick_width = 2; double tolerance = 2.0; double arc_tolerance = 1.0; -int (*translate_coordinates)() = NULL; -int (*translate_coordinates_d)() = NULL; +void (*translate_coordinates)() = NULL; +void (*translate_coordinates_d)() = NULL; double unitlength; static int cur_thickness = -1; double ldot_diameter = 1.0/72.0; @@ -131,7 +134,7 @@ extern char *ISO1toTeX[]; extern char *ISO2toTeX[]; -static +static void translate1(xp, yp) int *xp, *yp; { @@ -139,7 +142,7 @@ *yp = *yp + 1; } -static +static void translate2(xp, yp) int *xp, *yp; { @@ -147,7 +150,7 @@ *yp = (double)(TOP - *yp -1); } -static +static void translate1_d(xp, yp) double *xp, *yp; { @@ -155,7 +158,7 @@ *yp = *yp + 1.0; } -static +static void translate2_d(xp, yp) double *xp, *yp; { @@ -274,7 +277,7 @@ return 0; } -static +static void set_linewidth(w) int w; { @@ -373,7 +376,7 @@ reset_color(l->pen_color); } -static +static void single_line (x1, y1, x2, y2, arrow, style, val) int x1, y1, x2, y2, arrow, style; double val; @@ -417,7 +420,7 @@ /* * draw arc box */ -static put_arc_box (llx, lly, urx, ury, radius, style, val) +static void put_arc_box (llx, lly, urx, ury, radius, style, val) int llx, lly, urx, ury, radius, style; double val; { @@ -424,7 +427,7 @@ int radius2= 2*radius; double swidth = (double)(urx-llx-radius2); double sheight= (double)(ury-lly-radius2); - int (*put_line)(); + void (*put_line)(); switch (style) { case SOLID_LINE: @@ -458,7 +461,7 @@ /* * draw box */ -static +static void put_box (llx, lly, urx, ury, style, val) int llx, lly, urx, ury, style; double val; @@ -488,7 +491,7 @@ /* * draw a solid line given latex slope */ -static +static void put_solidline (x, y, sx, sy, l, arrow, val) int x, y, sx, sy, arrow; double l; @@ -548,7 +551,7 @@ /* * draw a dashed line given latex slope */ -static +static void put_dashline (x, y, sx, sy, l, arrow, val) int x, y, sx, sy, arrow; double l; @@ -611,7 +614,7 @@ /* * draw a dotted line given latex slope */ -static +static void put_dotline (x, y, sx, sy, l, arrow, val) int x, y, sx, sy, arrow; double l; @@ -939,7 +942,7 @@ reset_color(a->pen_color); } -static +static void put_quarter(p1, p2, q) F_pos p1, p2; int q; @@ -984,7 +987,7 @@ /* need this for communication between color routines. Sorry */ static int lastcolor=-1; -set_color(col) +void set_color(col) int col; { static char *colors[] = { @@ -1042,7 +1045,7 @@ return; } -reset_color(col) +void reset_color(col) int col; { #ifdef DVIPS --- ./fig2dev/dev/genge.c Wed Dec 18 17:36:07 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genge.c Fri Jun 6 14:39:06 2003 @@ -32,11 +32,16 @@ static float scale; -static set_color(); -static set_linewidth(); -static set_stip(); -static set_fill(); -static set_style(); +static void set_color(); +static void set_linewidth(); +static void set_stip(); +static void set_fill(); +static void set_style(); + +void for_arrow(); +void back_arrow(); +void genge_itp_spline(); +void genge_ctl_spline(); /* color mapping */ /* xfig ge */ @@ -209,6 +214,7 @@ for_arrow(s); } +void genge_itp_spline(s) F_spline *s; { @@ -217,8 +223,6 @@ int xmin, ymin; a = s->controls; - - a = s->controls; p = s->points; /* go through the points to find the last two */ for (q = p->next; q != NULL; p = q, q = q->next) { @@ -241,6 +245,7 @@ } +void genge_ctl_spline(s) F_spline *s; { @@ -413,6 +418,7 @@ fprintf(tfp,"l0 ;\n"); } +void for_arrow(l) F_line *l; { @@ -419,6 +425,7 @@ fprintf(tfp,"w%01d%01d ",(int)(l->for_arrow->wid/15),(int)(l->for_arrow->ht/15)); } +void back_arrow(l) F_line *l; { @@ -427,6 +434,7 @@ /* set the color attribute */ +void set_color(col) int col; { @@ -435,6 +443,7 @@ /* set fill if there is a fill style */ +void set_fill(style, color) int style,color; { @@ -442,6 +451,7 @@ fprintf(tfp,"C%02d ",GE_COLORS[color]); } +void set_stip(stip) int stip; { @@ -450,7 +460,7 @@ /* the dash length, v, is not used in GE */ -static +static void set_style(s, v) int s; double v; @@ -470,7 +480,7 @@ } } -static +static void set_linewidth(w) int w; { --- ./fig2dev/dev/genps.c Wed Dec 18 17:37:19 2002 +++ ../transfig.3.2.4/./fig2dev/dev/genps.c Fri Jun 6 15:13:43 2003 @@ -99,15 +99,22 @@ int lpntx1, lpnty1; /* last point of object */ int lpntx2, lpnty2; /* second-to-last point of object */ -static arc_tangent(); -static fill_area(); -static clip_arrows(); -static draw_arrow(); -static iso_text_exist(); -static encode_all_fonts(); -static ellipse_exist(); -static approx_spline_exist(); -static set_linewidth(); +static void arc_tangent(); +static void fill_area(); +static void clip_arrows(); +static void draw_arrow(); +static int iso_text_exist(); +static void encode_all_fonts(); +static int ellipse_exist(); +static int approx_spline_exist(); +static void set_linewidth(); + +void genps_itp_spline(); +void genps_ctl_spline(); +void genps_std_colors(); +void genps_usr_colors(); +void genps_xpm_colors(); +void convert_xpm_colors(); #define SHADEVAL(F) 1.0*(F)/(NUMSHADES-1) #define TINTVAL(F) 1.0*(F-NUMSHADES+1)/NUMTINTS @@ -1166,7 +1173,7 @@ } -static +static void set_style(s, v) int s; double v; @@ -1196,7 +1203,7 @@ } } -static +static void reset_style(s, v) int s; double v; @@ -1212,7 +1219,7 @@ fprintf(tfp, "\n"); } -static +static void set_linejoin(j) int j; { @@ -1222,7 +1229,7 @@ } } -static +static void set_linecap(j) int j; { @@ -1232,7 +1239,7 @@ } } -static +static void set_linewidth(w) double w; { @@ -1253,7 +1260,7 @@ F_point *p, *q; /* JNT */ int radius; - int i, j; + int i; FILE *picf; char buf[512], realname[PATH_MAX]; int xmin,xmax,ymin,ymax; @@ -1745,6 +1752,7 @@ fprintf(tfp, "} bind def\n"); } +void genps_itp_spline(s) F_spline *s; { @@ -1753,7 +1761,6 @@ int xmin, ymin; fprintf(tfp, "%% Interp Spline\n"); - a = s->controls; a = s->controls; p = s->points; @@ -1810,6 +1817,7 @@ draw_arrow(s, s->for_arrow, fpoints, nfpoints, s->pen_color); } +void genps_ctl_spline(s) F_spline *s; { @@ -2174,7 +2182,7 @@ /* draw arrow from the points array */ -static +static void draw_arrow(obj, arrow, points, npoints, col) F_line *obj; F_arrow *arrow; @@ -2225,7 +2233,7 @@ ****************************************************************/ -static +static void clip_arrows(obj, objtype) F_line *obj; int objtype; @@ -2287,7 +2295,7 @@ fprintf(tfp, "eoclip\n"); } -static +static void arc_tangent(x1, y1, x2, y2, direction, x, y) double x1, y1, x2, y2; int *x, *y; @@ -2305,7 +2313,7 @@ /* uses eofill (even/odd rule fill) */ /* ulx and uly define the upper-left corner of the object for pattern alignment */ -static +static void fill_area(fill, pen_color, fill_color, ulx, uly) int fill, pen_color, fill_color, ulx, uly; { @@ -2364,6 +2372,7 @@ } /* define standard colors as "col##" where ## is the number */ +void genps_std_colors() { int i; @@ -2378,6 +2387,7 @@ } /* define user colors as "col##" where ## is the number */ +void genps_usr_colors() { int i; @@ -2393,7 +2403,7 @@ } } -static +static int iso_text_exist(ob) F_compound *ob; { @@ -2418,7 +2428,7 @@ return 0; } -static +static void encode_all_fonts(ob) F_compound *ob; { @@ -2438,7 +2448,7 @@ } } -static +static int ellipse_exist(ob) F_compound *ob; { @@ -2455,7 +2465,7 @@ return 0; } -static +static int approx_spline_exist(ob) F_compound *ob; { @@ -2484,6 +2494,7 @@ /* lookup color names and return rgb values from X11 RGB database file (e.g. /usr/lib/X11/rgb.XXX) */ +void convert_xpm_colors(cmap, coltabl, ncols) unsigned char cmap[3][MAXCOLORMAPSIZE]; XpmColor *coltabl; --- ./fig2dev/dev/gentk.c Wed Dec 18 17:38:27 2002 +++ ../transfig.3.2.4/./fig2dev/dev/gentk.c Fri Jun 6 14:37:59 2003 @@ -607,7 +607,7 @@ #define THRESHOLD .05 /* inch */ -static +static void bezierSpline(double a0, double b0, double a1, double b1, double a2, double b2, double a3, double b3) { @@ -733,7 +733,7 @@ * q u a d r a t i c S p l i n e ( ) */ -static +static void quadraticSpline(double a1, double b1, double a2, double b2, double a3, double b3, double a4, double b4) { --- ./fig2dev/Imakefile Thu Dec 19 12:33:44 2002 +++ ../transfig.3.2.4/./fig2dev/Imakefile Fri Jun 6 14:29:43 2003 @@ -20,7 +20,7 @@ XCOMM You should point XFIGLIBDIR to the same directory you did when you compiled XCOMM and installed xfig. -XFIGLIBDIR = /usr/local/lib/X11/xfig +XFIGLIBDIR = /usr/freeware/lib/X11/xfig XCOMM ****** XCOMM If your system has the strerror() function (doesn't have sys_errlist) then @@ -48,7 +48,7 @@ XCOMM the full name (rgb.txt) now. XCOMM -RGB = $(LIBDIR)/rgb.txt +RGB = /usr/lib/X11/rgb.txt XCOMM Comment out the following #define USEPNG if you don't want PNG support XCOMM Uncomment the #define for USEPNG if you want to be able to import @@ -60,8 +60,8 @@ XCOMM are in different places #ifdef USEPNG -PNGLIBDIR = $(USRLIBDIR) -PNGINC = -I/usr/include/X11 +PNGLIBDIR = $(ROOT)/usr/freeware/lib32 +PNGINC = -I$(ROOT)/usr/freeware/include #endif XCOMM **************** @@ -73,11 +73,11 @@ XCOMM Change XPMINC if necessary to point to the include file for xpm (xpm.h) XCOMM -XCOMM #define USEXPM +#define USEXPM #ifdef USEXPM -XPMLIBDIR = $(USRLIBDIR) -XPMINC = -I/usr/include/X11 +XPMLIBDIR = $(ROOT)/usr/freeware/lib32 +XPMINC = -I$(ROOT)/usr/freeware/include/X11 #endif XCOMM **************** @@ -126,7 +126,7 @@ #ifdef I18N I18N_DEFS = -DI18N -FIG2DEV_LIBDIR = /usr/local/lib/fig2dev +FIG2DEV_LIBDIR = /usr/freeware/lib/fig2dev I18N_DEV_DEFS = $(I18N_DEFS) -DFIG2DEV_LIBDIR=\\\"$(FIG2DEV_LIBDIR)\\\" install:: --- ./fig2dev/fig2dev.c Wed Dec 18 17:32:13 2002 +++ ../transfig.3.2.4/./fig2dev/fig2dev.c Fri Jun 6 14:29:43 2003 @@ -675,6 +675,7 @@ * d1:d2 include/exclude this range of depths */ +void depth_usage() { fprintf(stderr,"%s: help for -D option:\n",prog); --- ./fig2dev/fig2dev.h Wed Dec 18 17:45:28 2002 +++ ../transfig.3.2.4/./fig2dev/fig2dev.h Fri Jun 6 15:07:38 2003 @@ -41,8 +41,8 @@ #define DEFAULT_FONT_SIZE 11 #ifndef MIN -#define MIN(A, B) ((A) < (B) ? (A) : (B)) -#define MAX(A, B) ((A) > (B) ? (A) : (B)) +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) #endif #ifdef USE_INLINE @@ -122,7 +122,7 @@ extern char *prog, *from, *to; extern char *name; extern double font_size; -Boolean correct_font_size; /* use correct font size */ +extern Boolean correct_font_size; /* use correct font size */ extern double mag, fontmag; extern FILE *tfp; --- ./fig2dev/free.c Wed Dec 18 17:32:28 2002 +++ ../transfig.3.2.4/./fig2dev/free.c Fri Jun 6 14:29:43 2003 @@ -18,6 +18,14 @@ #include "fig2dev.h" #include "object.h" +void free_ellipse(); +void free_line(); +void free_text(); +void free_spline(); +void free_splinestorage(); +void free_linestorage(); + +void free_arc(list) F_arc **list; { @@ -33,6 +41,7 @@ *list = NULL; } +void free_compound(list) F_compound **list; { @@ -52,6 +61,7 @@ *list = NULL; } +void free_ellipse(list) F_ellipse **list; { @@ -65,6 +75,7 @@ *list = NULL; } +void free_line(list) F_line **list; { @@ -78,6 +89,7 @@ *list = NULL; } +void free_text(list) F_text **list; { @@ -92,6 +104,7 @@ *list = NULL; } +void free_spline(list) F_spline **list; { @@ -105,6 +118,7 @@ *list = NULL; } +void free_splinestorage(s) F_spline *s; { @@ -124,6 +138,7 @@ free((char*)s); } +void free_linestorage(l) F_line *l; { --- ./fig2dev/read.c Wed Dec 18 17:33:13 2002 +++ ../transfig.3.2.4/./fig2dev/read.c Fri Jun 6 14:34:32 2003 @@ -49,6 +49,11 @@ static F_comment *attach_comments(); static void count_lines_correctly(); +int save_comment(); +void skip_line(); +void note_pattern(); +void init_pats_used(); + #define FILL_CONVERT(f) \ ((v2_flag || (f) < WHITE_FILL) \ ? (v30_flag? f: (f-1)) : 20 - ((f)-1)*5) @@ -74,6 +79,7 @@ int numcom; /* current comment index */ Boolean com_alloc = False; /* whether or not the comment array has been init. */ +void read_fail_message(file, err) char *file; int err; @@ -113,6 +119,7 @@ The resolution (ppi) is stored in global "ppi" **********************************************************/ +int read_fig(file_name, obj) char *file_name; F_compound *obj; @@ -128,6 +135,7 @@ return readfp_fig(fp, obj); } +int readfp_fig(fp, obj) FILE *fp; F_compound *obj; @@ -450,6 +458,7 @@ user_colors[num_usr_cols].b = b; } +void fix_color(color) int *color; { @@ -1312,6 +1321,7 @@ /* save a comment line to be stored with the *subsequent* object */ +int save_comment(fp) FILE *fp; { @@ -1336,6 +1346,7 @@ /* skip to the end of the current line and any subsequent blank lines */ +void skip_line(fp) FILE *fp; { @@ -1346,6 +1357,7 @@ } /* keep track which patterns are used (if any) */ +void note_pattern(fill_style) int fill_style; { @@ -1357,6 +1369,7 @@ /* reset pattern_used[] array */ +void init_pats_used() { int i; @@ -1475,6 +1488,7 @@ /* print comments to the output file preceded by string1 and succeeded by string2 */ +void print_comments(string1, comment, string2) char *string1; F_comment *comment; --- ./fig2dev/bound.c Wed Dec 18 17:31:54 2002 +++ ../transfig.3.2.4/./fig2dev/bound.c Fri Jun 6 14:29:43 2003 @@ -28,6 +28,17 @@ static double compute_angle(); +void ellipse_bound(); +void line_bound(); +void spline_bound(); +void int_spline_bound(); +void normal_spline_bound(); +void text_bound(); +void points_bound(); +void arrow_bound(); +void calc_arrow(); +void compute_arcarrow_angle(); + /************** ARRAY FOR ARROW SHAPES **************/ struct _fpnt { @@ -88,6 +99,7 @@ { 4, 1, 0.0, {{-1.0,0.5,},{0,0.5},{0,-0.5},{-1.0,-0.5}}}, }; +void arc_bound(arc, xmin, ymin, xmax, ymax) F_arc *arc; int *xmin, *ymin, *xmax, *ymax; @@ -179,6 +191,7 @@ arrow_bound(O_ARC, (F_line *)arc, xmin, ymin, xmax, ymax); } +void compound_bound(compound, xmin, ymin, xmax, ymax, include) F_compound *compound; int *xmin, *ymin, *xmax, *ymax; @@ -288,6 +301,7 @@ *xmax = urx; *ymax = ury; } +void ellipse_bound(e, xmin, ymin, xmax, ymax) F_ellipse *e; int *xmin, *ymin, *xmax, *ymax; @@ -368,6 +382,7 @@ *ymin -= half_wd; } +void line_bound(l, xmin, ymin, xmax, ymax) F_line *l; int *xmin, *ymin, *xmax, *ymax; @@ -379,6 +394,7 @@ arrow_bound(O_POLYLINE, l, xmin, ymin, xmax, ymax); } +void spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; int *xmin, *ymin, *xmax, *ymax; @@ -393,6 +409,7 @@ arrow_bound(O_SPLINE, s, xmin, ymin, xmax, ymax); } +void int_spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; int *xmin, *ymin, *xmax, *ymax; @@ -439,6 +456,7 @@ *ymax = round(by); } +void normal_spline_bound(s, xmin, ymin, xmax, ymax) F_spline *s; int *xmin, *ymin, *xmax, *ymax; @@ -501,6 +519,7 @@ } +void text_bound(t, xmin, ymin, xmax, ymax, inc_text) F_text *t; int *xmin, *ymin, *xmax, *ymax; @@ -560,6 +579,7 @@ min( rot_y(dx3,dy3,t->angle), rot_y(dx4,dy4,t->angle) ) ); } +void points_bound(points, xmin, ymin, xmax, ymax) F_point *points; int *xmin, *ymin, *xmax, *ymax; @@ -576,6 +596,7 @@ *xmax = bx; *ymax = by; } +void control_points_bound(cps, xmin, ymin, xmax, ymax) F_control *cps; int *xmin, *ymin, *xmax, *ymax; @@ -599,6 +620,7 @@ /* extend xmin, ymin xmax, ymax by the arrow boundaries of obj (if any) */ +void arrow_bound(objtype, obj, xmin, ymin, xmax, ymax) int objtype; F_line *obj; @@ -699,6 +721,7 @@ ****************************************************************/ +void calc_arrow(x1, y1, x2, y2, c1x, c1y, c2x, c2y, arrow, points, npoints, nboundpts) int x1, y1, x2, y2; int *c1x, *c1y, *c2x, *c2y; @@ -911,6 +934,7 @@ /* May give strange values if the arrow.ht is larger than about 1/4 of */ /* the circumference of a circle on which the arc lies. */ +void compute_arcarrow_angle(x1, y1, x2, y2, direction, arrow, x, y) double x1, y1; double x2, y2; --- ./fig2dev/trans_spline.c Wed Dec 18 17:33:52 2002 +++ ../transfig.3.2.4/./fig2dev/trans_spline.c Fri Jun 6 14:29:44 2003 @@ -57,17 +57,17 @@ static void spline_segment_computing(); static float step_computing(); -static INLINE point_adding(); -static INLINE point_computing(); -static INLINE negative_s1_influence(); -static INLINE negative_s2_influence(); -static INLINE positive_s1_influence(); -static INLINE positive_s2_influence(); +static INLINE void point_adding(); +static INLINE void point_computing(); +static INLINE void negative_s1_influence(); +static INLINE void negative_s2_influence(); +static INLINE void positive_s1_influence(); +static INLINE void positive_s2_influence(); static INLINE double f_blend(); static INLINE double g_blend(); static INLINE double h_blend(); -static free_point_array(); -static num_points(); +static void free_point_array(); +static int num_points(); static F_arrow *create_arrow(); static F_line *create_line(); static F_point *create_point(); @@ -81,7 +81,7 @@ static int allocstep; -static +static void free_point_array(pts) zXPoint *pts; { @@ -109,6 +109,7 @@ +void too_many_points() { fprintf(stderr, @@ -287,7 +288,7 @@ return (u * (q + u * (2 * q + u2 * (-2*q - u*q)))); } -static INLINE +static INLINE void negative_s1_influence(t, s1, A0, A2) double t, s1, *A0 ,*A2; { @@ -295,7 +296,7 @@ *A2 = g_blend(t, Q(s1)); } -static INLINE +static INLINE void negative_s2_influence(t, s2, A1, A3) double t, s2, *A1 ,*A3; { @@ -303,7 +304,7 @@ *A3 = h_blend(t-1, Q(s2)); } -static INLINE +static INLINE void positive_s1_influence(k, t, s1, A0, A2) int k; double t, s1, *A0 ,*A2; @@ -317,7 +318,7 @@ *A2 = f_blend(t+k+1-Tk, k+2-Tk); } -static INLINE +static INLINE void positive_s2_influence(k, t, s2, A1, A3) int k; double t, s2, *A1 ,*A3; @@ -331,7 +332,7 @@ *A3 = (t+k+1>Tk) ? f_blend(t+k+1-Tk, k+3-Tk) : 0.0; } -static INLINE +static INLINE void point_adding(A_blend, p0, p1, p2, p3) F_point *p0, *p1, *p2, *p3; double *A_blend; @@ -344,7 +345,7 @@ too_many_points(); } -static INLINE +static INLINE void point_computing(A_blend, p0, p1, p2, p3, x, y) F_point *p0, *p1, *p2, *p3; double *A_blend; @@ -693,7 +694,7 @@ -static num_points(points) +static int num_points(points) F_point *points; { int n; --- ./fig2dev/latex_line.c Wed Dec 18 17:32:56 2002 +++ ../transfig.3.2.4/./fig2dev/latex_line.c Fri Jun 6 14:29:44 2003 @@ -126,6 +126,7 @@ {4, 3, 36.869897645844021297}, }; +void get_slope(dx, dy, sxp, syp, arrow) int dx, dy, *sxp, *syp, arrow; /* @@ -167,6 +168,7 @@ if (dy < 0) *syp = -*syp; } +void latex_endpoint(x1, y1, x2, y2, xout, yout, arrow, magnet) int x1, y1, x2, y2; int *xout, *yout; --- ./transfig/transfig.c Wed Dec 18 17:34:12 2002 +++ ../transfig.3.2.4/./transfig/transfig.c Fri Jun 6 14:31:31 2003 @@ -229,6 +229,7 @@ /* other strings */ fprintf(stderr, "Unknown output language \"%s\"\n", s); exit(1); + /*NOTREACHED*/ } argument *parse_arg(tolang, arg_f, arg_s, arg_m, arg_o, arg) --- ./transfig/sys.c Wed Dec 18 17:34:07 2002 +++ ../transfig.3.2.4/./transfig/sys.c Fri Jun 6 14:31:52 2003 @@ -39,6 +39,7 @@ return sysbuf; } +void sysmv(file) char *file; { --- ./transfig/mkfile.c Wed Dec 18 17:33:59 2002 +++ ../transfig.3.2.4/./transfig/mkfile.c Fri Jun 6 14:29:44 2003 @@ -16,9 +16,15 @@ #include #include "transfig.h" +void puttarget(); +void putfig(); +void putoptions(); +void putclean(); + /* * create an appropriate makefile */ +void makefile(mk, altfonts, arg_list) FILE *mk; int altfonts; @@ -215,6 +221,7 @@ } } +void puttarget(mk, i, suf1, suf2) FILE *mk; char *i, *suf1, *suf2; @@ -222,6 +229,7 @@ fprintf(mk, "%s.%s: %s.%s %s\n", i, suf1, i, suf2, mkfile); } +void putfig(mk, to, altfonts, f, s, m, o, i, suf) FILE *mk; enum language to; @@ -239,6 +247,7 @@ putoptions(mk, altfonts, f, s, m, o, i, suf); } +void putoptions(mk, altfonts, f, s, m, o, i, suf) FILE *mk; int altfonts; @@ -253,6 +262,7 @@ fprintf(mk, "%s.fig %s%s%s\n", i, i, (suf ? "." : ""), (suf ? suf : "")); } +void putclean(mk, i, suf) FILE *mk; char *i, *suf; --- ./transfig/txfile.c Wed Dec 18 17:34:20 2002 +++ ../transfig.3.2.4/./transfig/txfile.c Fri Jun 6 14:29:44 2003 @@ -20,6 +20,7 @@ /* * create appropriate .tex file */ +void texfile(tx, in, arg_list) FILE *tx; char *in;