Path: utzoo!attcan!uunet!lll-winken!sun-barr!newstop!sun!bea.lbl.gov From: envbvs@bea.lbl.gov (Brian V. Smith) Newsgroups: comp.sources.x Subject: v10i030: xfig -- X Drawing Tool, Patch9, Part05/06 Message-ID: <144203@sun.Eng.Sun.COM> Date: 25 Oct 90 18:06:49 GMT References: Sender: news@sun.Eng.Sun.COM Lines: 1260 Approved: argv@sun.com Submitted-by: envbvs@bea.lbl.gov (Brian V. Smith) Posting-number: Volume 10, Issue 30 Archive-name: xfig2/patch9.05 Patch-To: xfig2: Volume XXX, Issue XXX #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh '@figs/watch.fig.uu' <<'END_OF_FILE' Xbegin 664 watch.fig XM(T9)1R R+C *.# @,@HU(#$@," Q(# @," P(# @,"XP,# @," P(# @,3DT XM+C P," T,S8N,# P(#(P-B T,S$@,C W(#0S-B R,#8@-#0Q"C4@,2 P(#$@ XM," P(# @," P+C P," P(# @," Q.3 N-3 P(#0S-BXP,# @,C X(#0S," R XM,#D@-#,V(#(P." T-#(*-2 Q(# @,2 P(# @," P(# N,# P(# @," P(#$X XM-RXP,# @-#,V+C P," R,3(@-#(Y(#(Q,R T,S8@,C$R(#0T,PHU(#$@," Q XM(# @," P(# @,"XP,# @,2 P(# @,C U+C P," T,S8N,# P(#$Y,R T,S$@ XM,3DR(#0S-B Q.3,@-#0Q"C4@,2 P(#$@," P(# @," P+C P," Q(# @," R XM,#'patch9.diff1' <<'END_OF_FILE' X*** CHANGES.p9 Mon Jun 25 13:47:57 1990 X--- CHANGES Fri Sep 21 10:16:36 1990 X*************** X*** 1,5 **** X--- 1,32 ---- X Version 2.0 X X+ Patchlevel 9 X+ Changes from patchlevel 8: X+ X+ o New feature for cutting/pasting objects from figures between xfig processes. X+ Select COPY/PASTE from the popup menu. See the man page. X+ From Tom Tkacik (tkacik@kyzyl.mi.org) X+ o New automatic text line spacing feature moves text input cursor X+ to next line (properly centered, or left/right justified) when X+ is input and automatically re-enters text input mode. X+ From Jon Tombs X+ o print button now calls fig2dev when xfig is compiled with -DTFX option X+ From Doug Flanagan (flanagan@cs.cornell.edu) X+ o Arrows on lines, arcs, etc. are not be corrupted anymore when copying X+ or changing objects X+ o proper centering of figures in postscript printing X+ From Mark Maybe (markm@boulder.colorado.edu) X+ o redundant $(DESTDIR) removed from Imakefile for installing troff fonts X+ o reading figure file no longer loops infinitely if text object is missing ^A X+ From Kenneth H. Carpenter (khc@eece.ksu.edu) X+ o more SYSV compatibility fixes X+ From David Elliot (dce@icky.Sony.COM) X+ o uses 'lp' printer command for print button under SYSV X+ From Bo Thide' (bt@irfu.se) X+ o object image in change object popup menu fixed (caused problems on MIPS X+ and some other machines) X+ From Ivan Herman (ivan@cwi.nl) and David Elliot (dce@icky.Sony.COM) X+ X Patchlevel 8 X Changes from patchlevel 7: X X*** Fig.ad.p9 Thu Jun 21 09:24:45 1990 X--- Fig.ad Mon Sep 17 09:10:02 1990 X*************** X*** 1,6 **** X ! Some interesting colors for the different parts of xfig X ! NOTE: this must actually be read by xrdb in order to work X! ! correctly, because of the #ifdef. This will nor work correctly X ! if put in /usr/lib/X11/app-defaults X X #ifdef COLOR X--- 1,6 ---- X ! Some interesting colors for the different parts of xfig X ! NOTE: this must actually be read by xrdb in order to work X! ! correctly, because of the #ifdef. This will not work correctly X ! if put in /usr/lib/X11/app-defaults X X #ifdef COLOR X*** Imakefile.p9 Fri Jun 15 08:47:50 1990 X--- Imakefile Fri Sep 21 09:54:58 1990 X*************** X*** 53,56 **** X ComplexProgramTarget_3(f2ps,,) X X MakeDirectories(install,$(FONTLIBDIR)) X! InstallNonExec(troff_ft_codes,$(DESTDIR)$(FONTLIBDIR)/$(FONTFILE)) X--- 53,56 ---- X ComplexProgramTarget_3(f2ps,,) X X MakeDirectories(install,$(FONTLIBDIR)) X! InstallNonExec(troff_ft_codes,$(FONTLIBDIR)/$(FONTFILE)) X*** README.p9 Wed Jun 27 13:46:47 1990 X--- README Thu Jul 5 15:00:35 1990 X*************** X*** 22,33 **** X o rounded-corner boxes with any radius of the corners X o line thicknesses supported X o lower button panel for quick access to "save", "undo", etc. functions X! o popup menu to modify existing objects X! o portrait or landscape print mode X X NOTE: I will support these features as best I can, but I cannot promise X anything, as my normal workload is pretty full. X! >>>> Please send any fixes, bug reports, etc. to me at bvsmth@lbl.gov X Brian Smith X (bvsmith@lbl.gov) X X--- 22,38 ---- X o rounded-corner boxes with any radius of the corners X o line thicknesses supported X o lower button panel for quick access to "save", "undo", etc. functions X! o popup menu to modify existing objects, e.g. line width, style, font etc. X! o portrait or landscape print mode to file or lpr -Pprinter X X+ Caveat: Do not install Fig.ad in /usr/lib/.../app-defaults. There is X+ an #ifdef to check for COLOR support, which is ignored in this file. X+ Put the Fig.ad file in your resources file that gets read by xrdb. X+ X NOTE: I will support these features as best I can, but I cannot promise X anything, as my normal workload is pretty full. X! X! >>>> Please send any fixes, bug reports, etc. to me at bvsmith@lbl.gov X Brian Smith X (bvsmith@lbl.gov) X X*** bitmap.c.p9 Wed Apr 18 09:16:07 1990 X--- bitmap.c Thu Jul 5 14:48:24 1990 X*************** X*** 26,32 **** X write_bitmap(file_name) X char *file_name; X { X- FILE *fp; X struct stat file_status; X char string[180]; X X--- 26,31 ---- X*************** X*** 72,86 **** X create_n_write_bitmap(filename) X char *filename; X { X! int box, marker, xmin, ymin, xmax, ymax; X int width, height; X! Window sav_canvas, oneplane_win; X int sav_pointmarker_shown; X Pixmap largepm,bitmap; X extern F_compound objects; X! XVisualInfo *visual,vinfo_template,*vis; X! long vinfo_mask; X! int nitems,i; X GC xgc; X X /* Assume that there is at least one object */ X--- 71,83 ---- X create_n_write_bitmap(filename) X char *filename; X { X! int xmin, ymin, xmax, ymax; X int width, height; X! Window sav_canvas; X int sav_pointmarker_shown; X Pixmap largepm,bitmap; X extern F_compound objects; X! int i; X GC xgc; X X /* Assume that there is at least one object */ X*** change.c.p9 Wed Jun 20 13:27:54 1990 X--- change.c Tue Oct 16 08:33:15 1990 X*************** X*** 32,38 **** X X extern char *panel_get_value(); X extern Widget make_popup_menu(); X- extern void toggle(); X X extern (*canvas_kbd_proc)(); X extern (*canvas_locmove_proc)(); X--- 32,37 ---- X*************** X*** 67,72 **** X--- 66,72 ---- X static get_f_pos(); X static points_panel(); X static get_points(); X+ static XtCallbackProc toggle(), done_button(), apply_button(), cancel_button(); X static void line_style_select(); X static void text_adjust_select(); X static Widget popup, form; X*************** X*** 82,88 **** X extern F_compound objects; X X #define NUM_IMAGES 15 X! extern PIXRECT cirrad_ic, cirdia_ic, ellrad_ic, elldia_ic, X c_spl_ic, spl_ic, c_intspl_ic, intspl_ic, X line_ic, polygon_ic, box_ic, arc_box_ic, X arc_ic, text_ic, blank_ic; X--- 82,88 ---- X extern F_compound objects; X X #define NUM_IMAGES 15 X! extern PIXRECTREC cirrad_ic, cirdia_ic, ellrad_ic, elldia_ic, X c_spl_ic, spl_ic, c_intspl_ic, intspl_ic, X line_ic, polygon_ic, box_ic, arc_box_ic, X arc_ic, text_ic, blank_ic; X*************** X*** 127,133 **** X static Widget font_size_panel; X static Widget filled_panel; X static Widget radius; X! static Widget entry, menu, adjust_menu; X static Widget but1; X X Arg args[12]; X--- 127,133 ---- X static Widget font_size_panel; X static Widget filled_panel; X static Widget radius; X! static Widget menu, adjust_menu; X static Widget but1; X X Arg args[12]; X*************** X*** 155,162 **** X float style_val; X int pen; X int area_fill; X! int for_arrow; X! int back_arrow; X } generic_vals; X X #define put_generic_vals(x) \ X--- 155,162 ---- X float style_val; X int pen; X int area_fill; X! F_arrow *for_arrow; X! F_arrow *back_arrow; X } generic_vals; X X #define put_generic_vals(x) \ X*************** X*** 169,175 **** X generic_vals.area_fill = x->area_fill X X #define get_generic_vals(x) \ X! new_generic_values(NULL, NULL); \ X x->thickness = generic_vals.thickness; \ X x->color = generic_vals.color; \ X x->depth = generic_vals.depth; \ X--- 169,175 ---- X generic_vals.area_fill = x->area_fill X X #define get_generic_vals(x) \ X! new_generic_values(); \ X x->thickness = generic_vals.thickness; \ X x->color = generic_vals.color; \ X x->depth = generic_vals.depth; \ X*************** X*** 179,184 **** X--- 179,196 ---- X x->area_fill = generic_vals.area_fill X X #define put_generic_arrows(x) \ X+ generic_vals.for_arrow = x->for_arrow; \ X+ generic_vals.back_arrow = x->back_arrow X+ X+ #define get_generic_arrows(x) \ X+ x->for_arrow = generic_vals.for_arrow; \ X+ x->back_arrow = generic_vals.back_arrow X+ X+ /* The following is bogus until we have a change arrow feature */ X+ X+ /***** COMMENTED OUT X+ X+ #define put_generic_arrows(x) \ X generic_vals.for_arrow = (x->for_arrow != NULL); \ X generic_vals.back_arrow = (x->back_arrow != NULL) X X*************** X*** 189,194 **** X--- 201,207 ---- X free((char*)x->back_arrow); \ X x->for_arrow = (generic_vals.for_arrow)? forward_arrow(): NULL; \ X x->back_arrow = (generic_vals.back_arrow)? backward_arrow(): NULL X+ *****/ X X X change_item_selected() X*************** X*** 368,374 **** X F_text *t; X { X PIX_FONT temp_font; X- int i,cw; X static char * adjust_item_names[] = { X "Left Justified ", "Centered ", "Right Justified"}; X X--- 381,386 ---- X*************** X*** 497,503 **** X F_ellipse *e; X { X char *s1, *s2; X! PIXRECT *image; X X new_ellipse = copy_ellipse(e); X new_ellipse->next = e; X--- 509,515 ---- X F_ellipse *e; X { X char *s1, *s2; X! PIXRECT image; X X new_ellipse = copy_ellipse(e); X new_ellipse->next = e; X*************** X*** 856,867 **** X generic_vals.area_fill = 0; X } X X static X new_arrow_values() X { X! generic_vals.for_arrow = (int)panel_get_value(for_arrow_panel); X! generic_vals.back_arrow = (int)panel_get_value(back_arrow_panel); X } X X static char * X style_val_string(s, v) X--- 868,881 ---- X generic_vals.area_fill = 0; X } X X+ #ifdef notdef X static X new_arrow_values() X { X! generic_vals.for_arrow = panel_get_value(for_arrow_panel); X! generic_vals.back_arrow = panel_get_value(back_arrow_panel); X } X+ #endif X X static char * X style_val_string(s, v) X*************** X*** 884,890 **** X } X X X! static X done_button(panel_local,item, event) X Widget panel_local; X Widget *item; X--- 898,904 ---- X } X X X! static XtCallbackProc X done_button(panel_local,item, event) X Widget panel_local; X Widget *item; X*************** X*** 892,901 **** X { X button_result = DONE; X done_proc(); X! Quit(); X } X X! static X apply_button(panel_local,item, event) X Widget panel_local; X Widget *item; X--- 906,915 ---- X { X button_result = DONE; X done_proc(); X! Quit(NULL, NULL, NULL); X } X X! static XtCallbackProc X apply_button(panel_local,item, event) X Widget panel_local; X Widget *item; X*************** X*** 905,911 **** X done_proc(); X } X X! static X cancel_button(panel_local,item, event) X Widget panel_local; X Widget *item; X--- 919,925 ---- X done_proc(); X } X X! static XtCallbackProc X cancel_button(panel_local,item, event) X Widget panel_local; X Widget *item; X*************** X*** 913,919 **** X { X button_result = CANCEL; X done_proc(); X! Quit(); X } X X /* X--- 927,933 ---- X { X button_result = CANCEL; X done_proc(); X! Quit(NULL, NULL, NULL); X } X X /* X*************** X*** 1121,1128 **** X char *label; X Widget *pi_x; X { X- char buf[32]; X- X XtSetArg(args[0], XtNfromVert, below); X XtSetArg(args[1], XtNlabel, label); X below = XtCreateManagedWidget(label, labelWidgetClass, form, args, TWO); X--- 1135,1140 ---- X*************** X*** 1154,1160 **** X Widget X make_popup_menu(entries, nent, parent, callback) X char *entries[]; X! int nent; X Widget parent; X XtCallbackProc callback; X { X--- 1166,1172 ---- X Widget X make_popup_menu(entries, nent, parent, callback) X char *entries[]; X! Cardinal nent; X Widget parent; X XtCallbackProc callback; X { X*************** X*** 1208,1214 **** X char *label; X Widget *pi_x; X { X! int width,nlines,i,n; X Dimension pwidth; X PIX_FONT temp_font; X X--- 1220,1227 ---- X char *label; X Widget *pi_x; X { X! int width,nlines,i; X! Cardinal n; X Dimension pwidth; X PIX_FONT temp_font; X X*************** X*** 1363,1370 **** X break; X XtSetArg(args[0], XtNfromVert,below); X sprintf(buf,"X:%d",i); X! XtSetArg(args[1], XtNlabel, buf); X! beside = XtCreateManagedWidget(label, labelWidgetClass, form, args, TWO); X sprintf(bufxy, "%d", p->x); X XtSetArg(args[1], XtNstring, bufxy); X XtSetArg(args[2], XtNinsertPosition, strlen(bufxy)); X--- 1376,1382 ---- X break; X XtSetArg(args[0], XtNfromVert,below); X sprintf(buf,"X:%d",i); X! beside = XtCreateManagedWidget(buf, labelWidgetClass, form, args, ONE); X sprintf(bufxy, "%d", p->x); X XtSetArg(args[1], XtNstring, bufxy); X XtSetArg(args[2], XtNinsertPosition, strlen(bufxy)); X*************** X*** 1375,1384 **** X form, args, SIX); X X sprintf(buf,"Y:%d",i); X! XtSetArg(args[1], XtNlabel, buf); X! XtSetArg(args[2], XtNfromHoriz, px_panel[i]); X! beside = XtCreateManagedWidget(label, labelWidgetClass, X! form, args, THREE); X X sprintf(bufxy, "%d", p->y); X XtSetArg(args[1], XtNstring, bufxy); X--- 1387,1395 ---- X form, args, SIX); X X sprintf(buf,"Y:%d",i); X! XtSetArg(args[1], XtNfromHoriz, px_panel[i]); X! beside = XtCreateManagedWidget(buf, labelWidgetClass, X! form, args, TWO); X X sprintf(bufxy, "%d", p->y); X XtSetArg(args[1], XtNstring, bufxy); X*************** X*** 1430,1436 **** X Widget widget; X XtPointer client_data, call_data; X { X- X XtDestroyWidget(popup); X } X X--- 1441,1446 ---- X*************** X*** 1442,1452 **** X X XtSetArg(args[0], XtNstring, &val); X XtGetValues(widg, args, ONE); X! if(atol(val) < 0) X { X panel_set_value(widg,"0"); X return "0"; X } X return val; X X } X--- 1452,1463 ---- X X XtSetArg(args[0], XtNstring, &val); X XtGetValues(widg, args, ONE); X! /* if(atol(val) < 0) X { X panel_set_value(widg,"0"); X return "0"; X } X+ */ X return val; X X } X*************** X*** 1501,1507 **** X } X X X! void X toggle(w, clos, garbage) X Widget w; X XtPointer clos, garbage; X--- 1512,1518 ---- X } X X X! static XtCallbackProc X toggle(w, clos, garbage) X Widget w; X XtPointer clos, garbage; X*** char.c.p9 Tue May 1 16:33:47 1990 X--- char.c Wed Aug 1 15:41:24 1990 X*************** X*** 15,20 **** X--- 15,21 ---- X extern int cur_x, cur_y; X extern int cur_font, cur_fontsize; X extern int cur_textjust; X+ extern int new_text_line(); X X #define BLINK_INTERVAL 700 /* milliseconds blink rate */ X #define BUF_SIZE 400 X*************** X*** 92,98 **** X X if (c == CR) { X erase_char_string(); X! cr_proc(); X } X else if (c == DEL || c == CTRL_H) { X if (leng_prefix > 0) { X--- 93,102 ---- X X if (c == CR) { X erase_char_string(); X! /* comment out the cr_proc() and un-comment the new_text-line() X! to have new text automatically start after old */ X! /* cr_proc(); */ X! new_text_line(); X } X else if (c == DEL || c == CTRL_H) { X if (leng_prefix > 0) { X*** const.h.p9 Fri May 4 14:53:44 1990 X--- const.h Wed Aug 1 15:19:00 1990 X*************** X*** 30,33 **** X X #define MAXPRINTERS 3 X X! #define DEF_PRINTFONTSIZE 11 /* default printer font size (points) */ X--- 30,33 ---- X X #define MAXPRINTERS 3 X X! #define DEF_PRINTFONTSIZE 12 /* default printer font size (points) */ X*** copy.c.p9 Tue May 1 16:40:15 1990 X--- copy.c Fri Sep 21 09:38:39 1990 X*************** X*** 13,18 **** X--- 13,19 ---- X #include "func.h" X #include "object.h" X #include "paintop.h" X+ #include "const.h" X X #define TOLERANCE 7 X X*************** X*** 33,41 **** X--- 34,56 ---- X X extern F_compound objects; X X+ extern char cut_buf_name[]; X+ extern char *sys_errlist[]; X+ extern int pointmarker_shown; X+ X extern int copy_selected(); X extern int init_copy(); X+ extern int init_file_cut(); X X+ static (*save_kbd_proc)(); X+ static (*save_locmove_proc)(); X+ static (*save_leftbut_proc)(); X+ static (*save_middlebut_proc)(); X+ static (*save_rightbut_proc)(); X+ static (*save_return_proc)(); X+ static CURSOR save_cursor; X+ static Boolean save_pointmarker; X+ X copy_selected() X { X canvas_kbd_proc = null_proc; X*************** X*** 129,139 **** X--- 144,267 ---- X canvas_leftbut_proc = canvas_rightbut_proc = null_proc; X } X X+ file_cut_selected() X+ { X+ save_kbd_proc = canvas_kbd_proc; X+ save_locmove_proc = canvas_locmove_proc; X+ save_leftbut_proc = canvas_leftbut_proc; X+ save_middlebut_proc = canvas_middlebut_proc; X+ save_rightbut_proc = canvas_rightbut_proc; X+ save_return_proc = return_proc; X+ save_pointmarker = pointmarker_shown; X+ X+ canvas_kbd_proc = null_proc; X+ canvas_locmove_proc = null_proc; X+ canvas_leftbut_proc = init_file_cut; X+ canvas_middlebut_proc = null_proc; X+ canvas_rightbut_proc = null_proc; X+ return_proc = file_cut_selected; X+ show_pointmarker(); X+ save_cursor = cur_cursor; X+ set_cursor(&pick9_cursor); X+ reset_action_on(); X+ } X+ X+ init_file_cut(x, y) X+ int x, y; X+ { X+ extern char file_header[]; X+ F_line *l, *line; X+ F_ellipse *e, *ellipse; X+ F_text *t, *text; X+ F_spline *s, *spline; X+ F_arc *a, *arc; X+ F_compound *c, *compound; X+ int px, py; X+ X+ FILE *fp; X+ struct stat file_status; X+ X+ if (stat(cut_buf_name, &file_status) == 0) { /* file exists */ X+ if (file_status.st_mode & S_IFDIR) { X+ put_msg("\"%s\" is a directory", cut_buf_name); X+ return(-1); X+ } X+ if (file_status.st_mode & S_IWRITE) { /* writing is permitted */ X+ if (file_status.st_uid != geteuid()) { X+ put_msg("Error: access denied to cut file"); X+ return(-1); X+ } X+ } X+ else { X+ put_msg("Error: cut file is read only"); X+ return(-1); X+ } X+ } X+ else if (errno != ENOENT) X+ return(-1); /* file does exist but stat fails */ X+ X+ if ((fp = fopen(cut_buf_name, "w")) == NULL) { X+ blink_msg(); X+ put_msg("Couldn't open cut file %s", sys_errlist[errno]); X+ return(-1); X+ } X+ else { X+ fprintf(fp, "%s\n", file_header); X+ fprintf(fp, "%d %d\n", PIX_PER_INCH, 2); X+ } X+ X+ if ((c = compound_search(x, y, TOLERANCE, &px, &py)) != NULL) { X+ win_setmouseposition(canvas_win, px, py); X+ clean_up(); X+ write_compound(fp, c); X+ } X+ else if ((a = arc_search(x, y, TOLERANCE, &px, &py)) != NULL) { X+ win_setmouseposition(canvas_win, px, py); X+ clean_up(); X+ write_arc(fp, a); X+ } X+ else if ((e = ellipse_search(x, y, TOLERANCE, &px, &py)) != NULL) { X+ win_setmouseposition(canvas_win, px, py); X+ clean_up(); X+ write_ellipse(fp, e); X+ } X+ else if ((l = line_search(x, y, TOLERANCE, &px, &py)) != NULL) { X+ win_setmouseposition(canvas_win, px, py); X+ clean_up(); X+ write_line(fp, l); X+ } X+ else if ((t = text_search(x, y)) != NULL) { X+ clean_up(); X+ write_text(fp, t); X+ } X+ else if ((s = spline_search(x, y, TOLERANCE, &px, &py)) != NULL) { X+ win_setmouseposition(canvas_win, px, py); X+ clean_up(); X+ write_spline(fp, s); X+ } X+ else { X+ fclose(fp); X+ return; X+ } X+ if (!save_pointmarker) X+ erase_pointmarker(); X+ put_msg("Object copied to cut file"); X+ set_cursor(save_cursor); X+ canvas_kbd_proc = save_kbd_proc; X+ canvas_locmove_proc = save_locmove_proc; X+ canvas_leftbut_proc = save_leftbut_proc; X+ canvas_middlebut_proc = save_middlebut_proc; X+ canvas_rightbut_proc = save_rightbut_proc; X+ return_proc = save_return_proc; X+ fclose(fp); X+ } X+ X F_arc * X copy_arc(a) X F_arc *a; X { X F_arc *arc; X+ F_arrow *arrow; X X if (NULL == (Arc_malloc(arc))) { X put_msg(Err_mem); X*************** X*** 141,146 **** X--- 269,294 ---- X } X *arc = *a; X arc->next = NULL; X+ if (a->for_arrow) X+ { X+ if (NULL == (Arrow_malloc(arrow))) { X+ put_msg(Err_mem); X+ free((char *)arc); X+ return(NULL); X+ } X+ arc->for_arrow = arrow; X+ *arrow = *a->for_arrow; X+ } X+ if (a->back_arrow) X+ { X+ if (NULL == (Arrow_malloc(arrow))) { X+ put_msg(Err_mem); X+ free((char *)arc); X+ return(NULL); X+ } X+ arc->back_arrow = arrow; X+ *arrow = *a->back_arrow; X+ } X return(arc); X } X X*************** X*** 165,170 **** X--- 313,319 ---- X { X F_line *line; X F_point *p, *point, *last_point; X+ F_arrow *arrow; X X if (NULL == (Line_malloc(line))) { X put_msg(Err_mem); X*************** X*** 176,181 **** X--- 325,351 ---- X free((char *)line); X return(NULL); X } X+ if (l->for_arrow) X+ { X+ if (NULL == (Arrow_malloc(arrow))) { X+ put_msg(Err_mem); X+ free((char *)line); X+ return(NULL); X+ } X+ line->for_arrow = arrow; X+ *arrow = *l->for_arrow; X+ } X+ if (l->back_arrow) X+ { X+ if (NULL == (Arrow_malloc(arrow))) { X+ put_msg(Err_mem); X+ free((char *)line); X+ return(NULL); X+ } X+ line->back_arrow = arrow; X+ *arrow = *l->back_arrow; X+ } X+ X line->points = point; X last_point = point; X p = l->points; X*************** X*** 199,204 **** X--- 369,375 ---- X F_spline *spline; X F_point *p, *point, *last_point; X F_control *cntrl_pnt, *cp, *last_cntrl_pnt; X+ F_arrow *arrow; X X if (NULL == (Spline_malloc(spline))) { X put_msg(Err_mem); X*************** X*** 206,211 **** X--- 377,402 ---- X } X *spline = *s; X spline->next = NULL; X+ if (s->for_arrow) X+ { X+ if (NULL == (Arrow_malloc(arrow))) { X+ put_msg(Err_mem); X+ free((char *)spline); X+ return(NULL); X+ } X+ spline->for_arrow = arrow; X+ *arrow = *s->for_arrow; X+ } X+ if (s->back_arrow) X+ { X+ if (NULL == (Arrow_malloc(arrow))) { X+ put_msg(Err_mem); X+ free((char *)spline); X+ return(NULL); X+ } X+ spline->back_arrow = arrow; X+ *arrow = *s->back_arrow; X+ } X X if (NULL == (Point_malloc(point))) { X put_msg(Err_mem); X*** f2ps.c.p9 Tue Jun 19 09:43:16 1990 X--- f2ps.c Wed Aug 1 13:24:30 1990 X*************** X*** 197,204 **** X char host[256]; X struct passwd *who; X long when; X- extern char *ctime(), *strcpy(); X- extern long time(); X X fprintf(tfp, "%%!\n"); /* PostScript magic strings */ X who = getpwuid(getuid()); X--- 197,202 ---- X*************** X*** 285,291 **** X X /* center image on page */ X if (center) X! fprintf(tfp, "%f %f translate\n", origx, origy); X X /* scale image (=> "flip" if origin changing) */ X fprintf(tfp, "%f %f scale\n", scalex, scaley); X--- 283,291 ---- X X /* center image on page */ X if (center) X! fprintf(tfp, "%f %f translate\n", origx, origy); X! else X! fprintf(tfp, "%d %d translate\n", landscape ? PAGE_WIDTH : 0,PAGE_HEIGHT); X X /* scale image (=> "flip" if origin changing) */ X fprintf(tfp, "%f %f scale\n", scalex, scaley); X*************** X*** 697,706 **** X else X fprintf(tfp,") %d %d moveto ",t->base_x,t->base_y); X X if (coord_system == 2) /* upper left is 0,0 */ X! fprintf(tfp, "1 -1 scale show 1 -1 scale\n"); X else X! fprintf(tfp, "show\n"); X } X X genps_arc(a,fill) X--- 697,711 ---- X else X fprintf(tfp,") %d %d moveto ",t->base_x,t->base_y); X X+ if (t->angle != 0) X+ fprintf(tfp," %d rotate ",(int) (t->angle*180/M_PI)); X if (coord_system == 2) /* upper left is 0,0 */ X! fprintf(tfp, "1 -1 scale show 1 -1 scale "); X else X! fprintf(tfp, "show "); X! if (t->angle != 0) X! fprintf(tfp," %d rotate ",(int) (-t->angle*180/M_PI)); X! putc('\n',tfp); X } X X genps_arc(a,fill) X*** fig.h.p9 Thu Apr 26 11:22:00 1990 X--- fig.h Thu Aug 2 11:20:25 1990 X*************** X*** 10,16 **** X--- 10,18 ---- X #include X X #include X+ #ifndef SYSV X #include X+ #endif X #include X #include X X*** font.c.p9 Fri May 4 14:53:01 1990 X--- font.c Thu Jul 5 09:50:39 1990 X*************** X*** 21,27 **** X extern struct _fstruct fontnames[NUMFONTS]; X extern appresStruct appres; X X- XFontStruct *XLoadQueryFont(); X #define MAXNAMES 30 X X static struct { X--- 21,26 ---- X*** func.h.p9 Fri Apr 6 17:04:30 1990 X--- func.h Thu Sep 20 16:27:46 1990 X*************** X*** 62,69 **** X--- 62,71 ---- X #define F_SAVE_IN 104 X #define F_SAVE 105 X #define F_UNDO 107 X+ #define F_CUT 108 X #define F_REDISPLAY 109 X #define F_QUIT 111 X+ #define F_PASTE 112 X #define F_REMOVE_ALL 113 X #define F_SAVE_N_EXIT 115 X #define F_CHDIR 117 X*************** X*** 76,82 **** 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--- 78,84 ---- X #define F_JUST 127 X #define F_SIZE 128 X #define F_PRINTSEL 129 X! #define F_STEP 130 X /**************** Drawing aids *****************/ X #define F_GRID1 250 X #define F_GRID2 251 X*** global.c.p9 Tue May 1 16:23:11 1990 X--- global.c Tue Jul 31 11:35:13 1990 X*************** X*** 92,97 **** X--- 92,98 ---- X int fill_mode = 0; X int print_landscape = 0; /* def. orientation for printer */ X int size_button; /* font size button value */ X+ int step_button = 12; /* text step */ X int font_button = 0; /* font button value */ X int type_button = T_LEFT_JUSTIFIED; /* text type button value */ X int cur_font; /* font of current text object */ END_OF_FILE if test 24701 -ne `wc -c <'patch9.diff1'`; then echo shar: \"'patch9.diff1'\" unpacked with wrong size! fi # end of 'patch9.diff1' fi echo shar: End of archive 5 \(of 6\). cp /dev/null ark5isdone MISSING="" for I in 1 2 3 4 5 6 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 6 archives. rm -f ark[1-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@sun.com / argv@ora.com Opinions expressed reflect those of the author only.