diff -Nurd gplot.orig/Makefile gplot/Makefile --- gplot.orig/Makefile 1992-10-27 07:07:42.000000000 -0800 +++ gplot/Makefile 2006-01-26 21:19:42.000000000 -0800 @@ -55,26 +55,26 @@ # lvr.o lvr_io.o sony laser video disk recorder controller # dq.o diaquest controller -DRV_FLAGS = -Dincps -Dinctek -Dinccgmc -Dinccgmb +DRV_FLAGS = -Dinctty -Dincxws -Dincps -Dinccgmc -CTR_FLAGS = -O -Dinctty +CTR_FLAGS = -Dinctty -Dincxws -Dincps -Dinccgmc CTR_OBJ = tty.o XWS_OBJ = xws_cla.o xws_color.o xws_delim.o xws_marker.o xws_polygon.o \ xws_polyline.o xws_setup.o xws_text.o drvcla.o -DRV_OBJ = ps.o tek.o cgmc.o cgmb.o +DRV_OBJ = ps.o cgmc.o $(XWS_OBJ) # # These lines should not be modified. DCGM_PATH = drawcgm/ MACHINE_DEFS = $(DCGM_PATH)unix_defs.h -F_LINK = f77 +F_LINK = /usr/bin/g77 AR = ar -ru -RANLIB = echo 'fake-ranlib' +RANLIB = ranlib # To include the XWS, XLib drivers, or GPLOTAW (athena widget) interface, # uncomment the next line. -#XLIBS = -lXaw -lXmu -lXt -lX11 +#XLIBS = -L/usr/X11/lib -lXaw -lXmu -lXt -lX11 # To include the Decwindows interface, uncomment the next line. #DLIBS = -ldwt -lXt -lX11 @@ -83,12 +83,13 @@ # Note: The Xt and X11 libraries might be in a different directory on # your system, so check with your system administrator, and make # the appropriate changes. -#MLIBS = -lXm -lXt -lX11 +#MLIBS = /usr/X11R6/lib/libXm.a /usr/X11R6/lib/libXmu.a /usr/X11R6/lib/libXp.a /usr/X11R6/lib/libXt.a /usr/X11R6/lib/libSM.a /usr/X11R6/lib/libICE.a /usr/X11R6/lib/libXext.a /usr/X11R6/lib/libX11.a +MLIBS = -L/usr/X11R6/lib -lXp -lXpm -lXaw -lXmu -lXext -lXt -lX11 # To build this software on a Sun workstation, uncomment the next lines. -#AR = ar ru -#F_LINK = f77 -#RANLIB = ranlib +AR = ar ru +F_LINK = g77 +RANLIB = ranlib # To include the Sunview driver and gplottool interface, uncomment SVLIBS. # To include the Sun CGI B&W driver, uncomment SLIBS. # NOTE: Uncomment only one of the following two lines. @@ -133,15 +134,17 @@ # To build this software on a Cray, delete the entry $(XLIBS) from the # next line. LIBS = $(XLIBS) $(DLIBS) $(MLIBS) $(SLIBS) $(SVLIBS) $(ILIBS) \ - $(MACHINE_LIBS) -lm + $(MACHINE_LIBS) -lc FONTS = hload.o # To add debugging information, uncomment the next line. -#CFLAGS = -g +#CFLAGS = -g -I/usr/local # To build Gplot on the IRIS, uncomment the next line. -#CFLAGS = -cckr -CFLAGS = +CC = gcc -ansi -bind_at_load -w -I/usr/X11R6/include +#CC = gcc -g -O2 -DLINUX -ansi -fall-virtual -fcond-mismatch -fdollars-in-identifiers -fenum-int-equiv -fexternal-templates -fno-asm -fno-builtin -fno-strict-prototype -fsigned-bitfields -fsigned-char -fthis-is-variable -funsigned-bitfields -funsigned-char -fwritable-strings -trigraphs +CFLAGS = $(DEBUG) +#CFLAGS = # ****************************************************************** # @@ -162,32 +165,32 @@ utils.o carray.o io.o $(FONTS) devices.o emul.o gplot: $(GPT_OBJ) $(CTR_OBJ) $(DRV_OBJ) $(MACHINE_OBJ) - cc -o $@ $(GPT_OBJ) $(CTR_OBJ) $(DRV_OBJ) $(MACHINE_OBJ) $(LIBS) + $(CC) $(DEBUG) -o $@ $(GPT_OBJ) $(CTR_OBJ) $(DRV_OBJ) $(MACHINE_OBJ) $(LIBS) gtex: $(GTEX_OBJ) ps.o tek.o qms.o cgmb.o cgmc.o tty.o - cc -o $@ $(GTEX_OBJ) ps.o tek.o qms.o cgmb.o cgmc.o tty.o -lm + $(CC) -o $@ $(GTEX_OBJ) ps.o tek.o qms.o cgmb.o cgmc.o tty.o /usr/lib/libc.a gplottool: gplot_suntool.o wint.o ccgm.o cgm.o utils.o io.o carray.o \ hload.o emul.o sv.o - cc -o $@ gplot_suntool.o wint.o cgm.o utils.o io.o carray.o ccgm.o \ + $(CC) -o $@ gplot_suntool.o wint.o cgm.o utils.o io.o carray.o ccgm.o \ hload.o emul.o sv.o $(LIBS) # To use the xws driver for gplotdw, include $(XWS_OBJ) instead of xl.o gplotdw: gplotdw.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \ hload.o xl.o - cc -o $@ gplotdw.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \ + $(CC) -o $@ gplotdw.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \ hload.o xl.o $(LIBS) # To use the xws driver for gplotaw, include $(XWS_OBJ) instead of xl.o gplotaw: gplotaw.o wint.o cgm.o ccgm.o utils.o io.o carray.o \ hload.o emul.o xl.o $(MACHINE_OBJ) - cc -o $@ gplotaw.o wint.o cgm.o ccgm.o utils.o io.o carray.o \ + $(CC) -o $@ gplotaw.o wint.o cgm.o ccgm.o utils.o io.o carray.o \ hload.o emul.o xl.o $(MACHINE_OBJ) $(LIBS) # To use the xws driver for gplotm, include $(XWS_OBJ) instead of xl.o gplotm: gplotm.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \ hload.o xl.o $(MACHINE_OBJ) - cc -o $@ gplotm.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \ + $(CC) $(DEBUG) -o $@ gplotm.o wint.o cgm.o utils.o io.o carray.o ccgm.o emul.o \ hload.o xl.o $(MACHINE_OBJ) $(LIBS) drawcgm: $(DCGM_PATH)drawcgm.a @@ -203,8 +206,8 @@ drawcgm/Makefile drawcgm/*.h drawcgm/*.f drawcgm/*.doc \ drawcgm/*.jbl -clean: - rm *.o ; rm drawcgm/*.o +clean: + rm -f ./gplot ./gplotm ./*.o $(DCGM_PATH)drawcgm_test: $(DCGM_PATH)drawcgm_test.o $(DCGM_PATH)drawcgm.a $(F_LINK) -o $@ $(DCGM_PATH)drawcgm_test.o $(DCGM_PATH)drawcgm.a \ @@ -230,25 +233,25 @@ # controlling GPLOT program gplot.o: gplot.c defs.h - cc -c $(CFLAGS) gplot.c + $(CC) -c $(CFLAGS) gplot.c # controlling GPLOT program for the SUNview driver gplot_suntool.o: gplot_suntool.c defs.h - cc -c $(CFLAGS) gplot_suntool.c + $(CC) -c $(CFLAGS) gplot_suntool.c # controlling GPLOTAW program for Athena Widgets gplotaw.o: gplotaw.c # To make gplotaw (xl) compile on the Cray, uncomment the next line -# cc -c -DR3_INTRINSICS gplotaw.c +# $(CC) -c -DR3_INTRINSICS gplotaw.c # To make gplotaw (xws) compile on the Cray, uncomment the next line -# cc -c -DR3_INTRINSICS -Dincxws gplotaw.c +# $(CC) -c -DR3_INTRINSICS -Dincxws gplotaw.c # To use the xws driver for gplotaw, uncomment the next line -# cc -c $(CFLAGS) -Dincxws gplotaw.c +# $(CC) -c $(CFLAGS) -Dincxws gplotaw.c # controlling GPLOTDW program for Decwindows gplotdw.o: gplotdw.c defs.h # To use the xws driver for gplotdw, uncomment the next line -# cc -c $(CFLAGS) -Dincxws gplotdw.c +# $(CC) -c $(CFLAGS) -Dincxws gplotdw.c # controlling GPLOTM program for Motif gplotm.o: gplotm.c defs.h @@ -257,50 +260,50 @@ # window interface module wint.o: wint.c defs.h - cc -c $(CFLAGS) wint.c + $(CC) -c $(CFLAGS) wint.c # controlling GTEX program gtex.o: gtex.c defs.h - cc -c $(CFLAGS) -Dincps -Dincqms gtex.c + $(CC) -c $(CFLAGS) -Dincps -Dincqms gtex.c # all of the cgm specific stuff cgm.o: cgm.c defs.h - cc -c $(CFLAGS) cgm.c + $(CC) -c $(CFLAGS) cgm.c # all of the clear text cgm specific stuff ccgm.o: ccgm.c defs.h ccdefs.h - cc -c $(CFLAGS) ccgm.c + $(CC) -c $(CFLAGS) ccgm.c # utility functions utils.o: utils.c defs.h - cc -c $(CFLAGS) -Dinchershey utils.c + $(CC) -c $(CFLAGS) -Dinchershey utils.c # if we wanted PK fonts also, it would be -# cc -c $(CFLAGS) -Dinchershey -Dincpkras utils.c +# $(CC) -c $(CFLAGS) -Dinchershey -Dincpkras utils.c # I/O routines io.o: io.c defs.h - cc -c $(CFLAGS) $(CTR_FLAGS) io.c + $(CC) -c $(CFLAGS) $(CTR_FLAGS) io.c # To get a gplot usage log file on Unix, uncomment the next line -# cc -c $(CTR_FLAGS) -DUSAGE_NAME=\"gplot_usage.log\" io.c +# $(CC) -c $(CTR_FLAGS) -DUSAGE_NAME=\"gplot_usage.log\" io.c # devices interface devices.o: devices.c defs.h - cc -c $(CFLAGS) $(CTR_FLAGS) $(DRV_FLAGS) devices.c + $(CC) -c $(CFLAGS) $(CTR_FLAGS) $(DRV_FLAGS) devices.c # Cell Array libraries carray.o: carray.c defs.h - cc -c $(CFLAGS) carray.c + $(CC) -c $(CFLAGS) carray.c drvcla.o: drvcla.c defs.h - cc -c $(CFLAGS) drvcla.c + $(CC) -c $(CFLAGS) drvcla.c # Emulation package emul.o: emul.c defs.h - cc -c $(CFLAGS) emul.c + $(CC) -c $(CFLAGS) emul.c # Hershey font support hload.o: hload.c hload.h defs.h - cc -c $(CFLAGS) hload.c + $(CC) -c $(CFLAGS) hload.c # decoding for the PK format files # if fonts are available we must say here where they are @@ -309,100 +312,100 @@ # (1000 implies 10 point fonts at 300 pt/in), e.g., # /usr/staff/andrews/pk/1000/cmr10.pk pkras.o: pkras.c defs.h - cc -c -DUNIXFONTS=\"/usr/staff/andrews/pk\" pkras.c + $(CC) -c -DUNIXFONTS=\"/usr/staff/andrews/pk\" pkras.c #TTY controller tty.o: tty.c defs.h - cc -c $(CFLAGS) tty.c + $(CC) -c $(CFLAGS) tty.c # LVR controller lvr.o: lvr.c lvr_defines.h defs.h - cc -c $(CFLAGS) lvr.c + $(CC) -c $(CFLAGS) lvr.c # to change audit file name, lvr port -# cc -c -DAUDIT_FILE="lvr.dat" -DDEFAULT_PORT="ttyd2" lvr.c +# $(CC) -c -DAUDIT_FILE="lvr.dat" -DDEFAULT_PORT="ttyd2" lvr.c dq.o: dq.c defs.h - cc -c $(CFLAGS) dq.c + $(CC) -c $(CFLAGS) dq.c lvr_io.o: lvr_io.c lvr_defines.h - cc -c $(CFLAGS) lvr_io.c + $(CC) -c $(CFLAGS) lvr_io.c # to turn on debug I/O printout -# cc -c -DDEBUG_IO lvr_io.c +# $(CC) -c -DDEBUG_IO lvr_io.c # Postscript device ps.o: ps.c defs.h - cc -c $(CFLAGS) ps.c + $(CC) -c $(CFLAGS) ps.c # Tektronix devices tek.o: tek.c defs.h - cc -c $(CFLAGS) tek.c + $(CC) -c $(CFLAGS) tek.c # Clear text CGM driver cgmc.o: cgmc.c defs.h - cc -c $(CFLAGS) cgmc.c + $(CC) -c $(CFLAGS) cgmc.c # Binary CGM driver cgmb.o: cgmb.c defs.h - cc -c $(CFLAGS) cgmb.c + $(CC) -c $(CFLAGS) cgmb.c # Sun CGI driver sundriv.o: sundriv.c defs.h - cc -c $(CFLAGS) sundriv.c + $(CC) -c $(CFLAGS) sundriv.c # Silicon Graphics GI driver igl.o: igl.c defs.h - cc -c $(CFLAGS) igl.c + $(CC) -c $(CFLAGS) igl.c # the sunview driver sv.o: sv.c defs.h - cc -c $(CFLAGS) sv.c + $(CC) -c $(CFLAGS) sv.c # the Xlib driver xl.o: xl.c defs.h - cc -c $(CFLAGS) xl.c + $(CC) -c $(CFLAGS) xl.c #-------------- X Window System driver (xws) -------------------------- xws_setup.o: /usr/include/stdio.h \ /usr/include/strings.h \ - /usr/include/X11/Intrinsic.h \ - /usr/include/X11/StringDefs.h \ - /usr/include/X11/Xutil.h \ - /usr/include/X11/cursorfont.h \ + /usr/X11R6/include/X11/Intrinsic.h \ + /usr/X11R6/include/X11/StringDefs.h \ + /usr/X11R6/include/X11/Xutil.h \ + /usr/X11R6/include/X11/cursorfont.h \ defs.h xws_defs.h xws_delim.o: /usr/include/stdio.h \ /usr/include/strings.h \ - /usr/include/X11/Intrinsic.h \ - /usr/include/X11/Xutil.h \ + /usr/X11R6/include/X11/Intrinsic.h \ + /usr/X11R6/include/X11/Xutil.h \ defs.h xws_defs.h xws_color.o: /usr/include/stdio.h \ /usr/include/math.h \ - /usr/include/X11/Intrinsic.h \ - /usr/include/X11/Xutil.h \ - /usr/include/X11/Xatom.h \ + /usr/X11R6/include/X11/Intrinsic.h \ + /usr/X11R6/include/X11/Xutil.h \ + /usr/X11R6/include/X11/Xatom.h \ defs.h xws_defs.h xws_color.h -xws_polyline.o:/usr/include/X11/Intrinsic.h \ +xws_polyline.o:/usr/X11R6/include/X11/Intrinsic.h \ defs.h xws_defs.h xws_polygon.o: /usr/include/stdio.h \ - /usr/include/X11/Intrinsic.h \ + /usr/X11R6/include/X11/Intrinsic.h \ defs.h xws_defs.h xws_fill.h -xws_marker.o: /usr/include/X11/Intrinsic.h \ +xws_marker.o: /usr/X11R6/include/X11/Intrinsic.h \ defs.h xws_defs.h xws_text.o: /usr/include/strings.h \ - /usr/include/X11/Intrinsic.h \ - /usr/include/X11/Xatom.h \ + /usr/X11R6/include/X11/Intrinsic.h \ + /usr/X11R6/include/X11/Xatom.h \ defs.h xws_defs.h xws_cla.o: /usr/include/stdio.h \ /usr/include/math.h \ - /usr/include/X11/Intrinsic.h \ + /usr/X11R6/include/X11/Intrinsic.h \ defs.h xws_defs.h xws_color.h #----------------------------------------------------------------------------- # DrawCGM and CGMGen, and test routines diff -Nurd gplot.orig/carray.c gplot/carray.c --- gplot.orig/carray.c 1991-09-12 10:57:13.000000000 -0700 +++ gplot/carray.c 2006-01-26 22:56:29.000000000 -0800 @@ -415,6 +415,10 @@ /* this is the general cell array modification routine */ /* it takes in a square cell array and writes out a parallelogram */ +static do_line(unsigned char *, int, int, int, int, int, float *, int, + unsigned char *, int, int, int, int, float *, int, + int *, struct c_v_struct *, unsigned int *); /* forward declaration */ + new_carray(host_name, nxin, nyin, cpin, rmin, rbin, inptr, in_bytes, csin, inctab,in_floats, px, py, qx, qy, rx, ry, nxout, nyout, cpout, rmout, rbout, diff -Nurd gplot.orig/ccgm.c gplot/ccgm.c --- gplot.orig/ccgm.c 1992-10-12 07:59:40.000000000 -0700 +++ gplot/ccgm.c 2006-01-26 21:44:46.000000000 -0800 @@ -4,6 +4,7 @@ #include #include "defs.h" /* type definitions */ #include "ccdefs.h" /* clear text definitions */ +#include "ccgm_private.h" /* forward declarations */ /* global pointers that use storage from the main program */ diff -Nurd gplot.orig/ccgm_private.h gplot/ccgm_private.h --- gplot.orig/ccgm_private.h 1969-12-31 16:00:00.000000000 -0800 +++ gplot/ccgm_private.h 2006-01-26 22:30:50.000000000 -0800 @@ -0,0 +1,134 @@ +/* forward declarations of functions used internally by ccgm.c */ + +#ifndef _CCGM_PRIVATE_H_ +#define _CCGM_PRIVATE_H_ + +static class0(enum cgmcls0, int, char *); +static class1(enum cgmcls1, int, char *, int); +static class2(enum cgmcls2, char *); +static class3(enum cgmcls3, char *); +static class4(enum cgmcls4, int, char *); +static class5(enum cgmcls5, int, char *); +static class6(enum cgmcls6, char *); +static class7(enum cgmcls7, char *); + +static f_b_mf(char *, int, int (*)(), int (*)()); +static f_e_mf(int (*)(), int (*)()); +static f_b_p(char *, int, int (*)(), int (*)()); +static f_b_p_body(int (*)(), int (*)()); +static f_e_pic(int (*)(), int (*)()); + +static rd_mf_version(char *, int, int (*)()); +static rd_mf_descriptor(char *, int, int (*)()); + +static s_vdc_type(char *, int (*)()); +static s_int_prec(char *, int (*)()); +static s_real_prec(char *, int (*)()); +static s_index_prec(char *, int (*)()); +static s_col_prec(char *, int (*)()); +static s_cind_prec(char *, int (*)()); +static s_cvextent(char *, int (*)()); +static s_mcind(char *, int (*)()); +static do_mcind(int); + +static rd_mf_list(char *, int (*)()); +static s_mf_defs(char *, int, int (*)(), int); +static do_font_list(char *, int, int (*)()); +static do_char_list(char *, int, int (*)()); +static do_cannounce(char *, int (*)()); +static s_scalmode(char *, int (*)()); + +static s_c_s_mode(char *, int (*)()); +static s_lws_mode(char *, int (*)()); +static s_ms_mode(char *, int (*)()); +static s_ew_mode(char *, int (*)()); +static s_vdc_extent(char *, int (*)()); +static s_back_col(char *, int (*)()); +static s_vdc_i_p(char *, int (*)()); +static s_vdc_r_p(char *, int (*)()); +static s_aux_col(char *, int (*)()); +static s_transp(char *, int (*)()); + +static s_clip_rec(char *, int (*)()); +static s_clip_ind(char *, int (*)()); +static do_polyline(char *, int, int (*)(), int); +static do_dis_polyline(char *, int, int (*)(), int); +static do_polymarker(char *, int, int (*)(), int); +static s_text(char *, int (*)()); +static s_rex_text(char *, int (*)()); +static s_app_text(char *, int (*)()); + +static do_polygon(char *, int, int (*)(), int); +static do_polyset(char *, int, int (*)(), int); +static do_cell_array(char *, int, int (*)()); +static do_g_d_p(char *, int, int (*)()); +static do_rectangle(char *, int (*)()); +static do_circle(char *, int (*)()); +static do_c3(char *, int (*)()); +static do_c3_close(char *, int (*)()); +static do_c_centre(char *, int (*)()); +static do_c_c_close(char *, int (*)()); +static do_ellipse(char *, int (*)()); +static do_ell_arc(char *, int (*)()); +static do_e_a_close(char *, int (*)()); + +static s_lbindex(char *, int (*)()); +static s_l_type(char *, int (*)()); +static s_l_width(char *, int (*)()); +static s_l_colour(char *, int (*)()); +static s_mbindex(char *, int (*)()); +static s_mk_type(char *, int (*)()); +static s_mk_size(char *, int (*)()); +static s_mk_colour(char *, int (*)()); +static s_tbindex(char *, int (*)()); +static s_t_index(char *, int (*)()); +static s_t_prec(char *, int (*)()); +static s_c_exp(char *, int (*)()); +static s_c_space(char *, int (*)()); +static s_t_colour(char *, int (*)()); +static s_c_height(char *, int (*)()); +static s_c_orient(char *, int (*)()); +static s_tpath(char *, int (*)()); +static s_t_align(char *, int (*)()); +static s_csindex(char *, int (*)()); +static s_acsindex(char *, int (*)()); +static s_fbindex(char *, int (*)()); + +static s_interior_style(char *, int (*)()); +static s_fill_colour(char *, int (*)()); +static s_hindex(char *, int (*)()); +static s_pindex(char *, int (*)()); +static s_e_b_index(char *, int (*)()); +static s_edge_t(char *, int (*)()); + +static s_edge_w(char *, int (*)()); +static s_edge_c(char *, int (*)()); +static s_edge_v(char *, int (*)()); + +static s_fill_ref(char *, int (*)()); +static p_tab_entry(char *, int, int (*)()); + +static s_pat_size(char *, int (*)()); +static c_tab_entry(char *, int, int (*)()); +static do_aspsflags(char *, int, int (*)()); +static do_escape(char *, int (*)()); +static do_message(char *, int (*)()); +static do_apdata(char *, int (*)()); +get_clear(char *(*), int *, struct ad_struct *); + +static char *cc_str(char **, char *); +static my_scan_int(char **, int *); +static get_decimal(char **); +static get_based(char **, int, int *); +static my_scan_float(char **, float *); +static int get_token(char **, char *); + +static int cc_same(char *, char *); + +static int get_prec(int, int, int); +get_rprec(float, float, int, int *, int *, int *); +clean_string(char *); +get_clist(char **, char *, int, enum cs_enum, int); +get_pairs(char *); + +#endif /* !_CCGM_PRIVATE_H_ */ diff -Nurd gplot.orig/cgm.c gplot/cgm.c --- gplot.orig/cgm.c 1991-07-17 10:21:55.000000000 -0700 +++ gplot/cgm.c 2006-01-26 22:29:39.000000000 -0800 @@ -3,6 +3,7 @@ /* module to take care of command processing */ #include #include "defs.h" /* type definitions */ +#include "cgm_private.h" /* forward declarations */ /* global pointers that use storage from the main program */ diff -Nurd gplot.orig/cgm_private.h gplot/cgm_private.h --- gplot.orig/cgm_private.h 1969-12-31 16:00:00.000000000 -0800 +++ gplot/cgm_private.h 2006-01-26 22:52:39.000000000 -0800 @@ -0,0 +1,143 @@ +/* forward declarations of functions used internally by cgm.c */ + +#ifndef _CGM_PRIVATE_H_ +#define _CGM_PRIVATE_H_ + +static char *cgm_str(unsigned char *, unsigned char **); + +static int cgm_gint(unsigned char *, int); +static unsigned int cgm_guint(unsigned char *, int); + +static int cgm_sint(unsigned char *); +static int cgm_xint(unsigned char *); +static unsigned int cgm_cxint(unsigned char *); +static unsigned int cgm_dcint(unsigned char *); +static int cgm_vint(unsigned char *); +static int cgm_eint(unsigned char *); + +static double cgm_fixed(unsigned char *, struct r_struct *); +static double cgm_float(unsigned char *, struct r_struct *); + +static double cgm_real(unsigned char *); +static double cgm_vreal(unsigned char *); +static int cgm_vireal(unsigned char *); + +cgm_setup(int, char *, char *, struct info_struct *, struct one_opt *, +struct mf_d_struct *, struct pic_d_struct *, struct pic_d_struct *, struct control_struct *, struct control_struct *, struct attrib_struct *, struct attrib_struct *, +int (**)(), int (**)(), int (**)(), int (**)(), int (**)(), int (**)(), int (**)(), int (**)(), int (**)(), int); + +cgm_command(unsigned char *, int, struct ad_struct *, int *, int *); +static class0(enum cgmcls0, int, unsigned char *); +static class1(enum cgmcls1, int, unsigned char *); + +static class2(enum cgmcls2, unsigned char *); +static class3(enum cgmcls3, unsigned char *); +static class4(enum cgmcls4, int, unsigned char *); +static class5(enum cgmcls5, int, unsigned char *); +static class6(enum cgmcls6, unsigned char *); +static class7(enum cgmcls7, unsigned char *); +static f_b_mf(unsigned char *, int, int (*)(), int (*)()); +static f_e_mf(int (*)(), int (*)()); +static f_b_p(char *, int, int (*)(), int (*)()); +static f_b_p_body(int (*)(), int (*)()); +static f_e_pic(int (*)(), int (*)()); +static rd_mf_version(unsigned char *, int, int (*)()); + +static rd_mf_descriptor(unsigned char *, int, int (*)()); + +static s_vdc_type(unsigned char *, int (*)()); +static s_int_prec(unsigned char *, int (*)()); +static s_real_prec(unsigned char *, int (*)()); +static s_index_prec(unsigned char *, int (*)()); +static s_col_prec(unsigned char *, int (*)()); +static s_cind_prec(unsigned char *, int (*)()); +static s_cvextent(unsigned char *, int (*)()); +static s_mcind(unsigned char *, int (*)()); +static do_mcind(int); + +static rd_mf_list(unsigned char *, int (*)()); +static s_mf_defs(unsigned char *, int, int (*)()); +static do_font_list(unsigned char *, int, int (*)()); +static do_char_list(unsigned char *, int, int (*)()); +static do_cannounce(unsigned char *, int (*)()); +static s_scalmode(unsigned char *, int (*)()); + +static s_c_s_mode(unsigned char *, int (*)()); +static s_lws_mode(unsigned char *, int (*)()); +static s_ms_mode(unsigned char *, int (*)()); +static s_ew_mode(unsigned char *, int (*)()); +static s_vdc_extent(unsigned char *, int (*)()); +static s_back_col(unsigned char *,int (*)()); +static s_vdc_i_p(unsigned char *, int (*)()); +static s_vdc_r_p(unsigned char *, int (*)()); +static s_aux_col(unsigned char *, int (*)()); +static s_transp(unsigned char *, int (*)()); +static s_clip_rec(unsigned char *, int (*)()); +static s_clip_ind(unsigned char *, int (*)()); +static do_polyline(unsigned char *, int, int (*)()); + +static do_dis_polyline(unsigned char *, int, int (*)()); +static do_polymarker(unsigned char *, int, int (*)()); +static s_text(unsigned char *, int (*)()); +static s_rex_text(unsigned char *, int (*)()); +static s_app_text(unsigned char *, int (*)()); + +static do_polygon(unsigned char *, int, int (*)()); +static do_polyset(unsigned char *, int, int (*)()); +static do_cell_array(unsigned char *, int, int (*)()); +static do_g_d_p(unsigned char *, int, int (*)()); +static do_rectangle(unsigned char *, int (*)()); +static do_circle(unsigned char *, int (*)()); +static do_c3(unsigned char *, int (*)()); +static do_c3_close(unsigned char *, int (*)()); +static do_c_centre(unsigned char *, int (*)()); +static do_c_c_close(unsigned char *, int (*)()); +static do_ellipse(unsigned char *, int (*)()); +static do_ell_arc(unsigned char *, int (*)()); +static do_e_a_close(unsigned char *, int (*)()); +static s_lbindex(unsigned char *, int (*)()); +static s_l_type(unsigned char *, int (*)()); +static s_l_width(unsigned char *, int (*)()); +static s_l_colour(unsigned char *, int (*)()); +static s_mbindex(unsigned char *, int (*)()); +static s_mk_type(unsigned char *, int (*)()); +static s_mk_size(unsigned char *, int (*)()); +static s_mk_colour(unsigned char *, int (*)()); +static s_tbindex(unsigned char *, int (*)()); +static s_t_index(unsigned char *, int (*)()); +static s_t_prec(unsigned char *, int (*)()); +static s_c_exp(unsigned char *, int (*)()); +static s_c_space(unsigned char *, int (*)()); +static s_t_colour(unsigned char *, int (*)()); +static s_c_height(unsigned char *, int (*)()); +static s_c_orient(unsigned char *, int (*)()); +static s_tpath(unsigned char *, int (*)()); +static s_t_align(unsigned char *, int (*)()); +static s_csindex(unsigned char *, int (*)()); +static s_acsindex(unsigned char *, int (*)()); +static s_fbindex(unsigned char *, int (*)()); + +static s_interior_style(unsigned char *, int (*)()); +static s_fill_colour(unsigned char *, int (*)()); +static s_hindex(unsigned char *, int (*)()); +static s_pindex(unsigned char *, int (*)()); +static s_e_b_index(unsigned char *, int (*)()); +static s_edge_t(unsigned char *, int (*)()); + +static s_edge_w(unsigned char *, int (*)()); +static s_edge_c(unsigned char *, int (*)()); +static s_edge_v(unsigned char *, int (*)()); + +static s_fill_ref(unsigned char *, int (*)()); +static p_tab_entry(unsigned char *, int, int (*)()); + +static s_pat_size(unsigned char *, int (*)()); +static c_tab_entry(unsigned char *, int, int (*)()); +static do_aspsflags(unsigned char *, int, int (*)()); +static do_escape(unsigned char *, int (*)()); +static read_index(unsigned char *); +want_title(char *, char *, int); +static do_message(unsigned char *, int (*)()); +static do_apdata(unsigned char *, int (*)()); + +#endif /* !_CGM_PRIVATE_H_ */ diff -Nurd gplot.orig/emul.c gplot/emul.c --- gplot.orig/emul.c 1991-07-17 10:22:01.000000000 -0700 +++ gplot/emul.c 2006-01-26 23:03:47.000000000 -0800 @@ -77,6 +77,10 @@ } /* emulate polymarker routine with polylines */ + +static int em_arc(int, int, int, double, double, int *, int, + int **, int **); /* forward declaration */ + /* the present marker types are 1 dot 2 plus 3 asterisk 4 circle 5 cross */ em_pmarker(no_pairs, x1_ptr, y1_ptr) int no_pairs, *x1_ptr, *y1_ptr; @@ -182,7 +186,6 @@ { return(1); } - /* emulate the rectangle function */ em_rectangle(x1, y1, x2, y2) int x1, y1, x2, y2; diff -Nurd gplot.orig/hload.c gplot/hload.c --- gplot.orig/hload.c 1991-07-17 10:22:04.000000000 -0700 +++ gplot/hload.c 2006-01-26 23:01:43.000000000 -0800 @@ -26,6 +26,9 @@ second_shift = hf_array[start_index + 1] - 128; return(1); } /* just a callable routine to tell CGM what to expect */ + +static dim_str(int *, int *, char *, int, enum path_enum, float, float, int, double); /* forward declaration */ + hl_check(font_size) int *font_size; { @@ -33,6 +36,10 @@ return(PL_EMULATION); } /* set a text string as a series of polylines */ + +static do_vecs(int, int, int *, int *, unsigned char *, int (*)(), double, double, double, + double, double); /* forward declaration */ + hl_text(x, y, instr, pline_call, a2, a5, no_chars, capable, font_list, mag) int x, y, (*pline_call)(), no_chars; @@ -119,6 +126,10 @@ return(1); } /* read in the set of vectors, step forward right amount */ + +static send_vecs(int, int *, int *, int, int, int (*)(), double, double, double, + double); /* forward declaration */ + /* NOTE VAXC COMPILER BUG WITH EXPLICIT CASTS !!!! */ static do_vecs(x, y, xdelta, ydelta, hptr, pcall, mag, ctheta1, stheta1, ctheta2, stheta2) diff -Nurd gplot.orig/ps.c gplot/ps.c --- gplot.orig/ps.c 1992-06-16 10:29:19.000000000 -0700 +++ gplot/ps.c 2006-01-26 23:05:37.000000000 -0800 @@ -275,6 +275,9 @@ return(1); } + +static flush_string(); /* forward declaration */ + /* end the page */ ps_epage(no_copies) { @@ -306,6 +309,9 @@ } return(1); } + +static send_string(char *, int); /* forward declaration */ + /* set text on a postscript device */ ps_text(x, y, final, buffer) int x, y, final; @@ -1226,6 +1232,9 @@ } return(1); } + +static l_dofont(); /* forward declaration */ + /* start a postscript font definition */ ps_st_font(font_no, finfo) int font_no; diff -Nurd gplot.orig/utils.c gplot/utils.c --- gplot.orig/utils.c 1991-10-29 07:48:16.000000000 -0800 +++ gplot/utils.c 2006-01-26 21:19:42.000000000 -0800 @@ -10,6 +10,7 @@ #include time static tbuffer_t time_b; #else +/*PCMDI - changed from to */ #include #include #ifdef CRAY1 @@ -57,6 +58,8 @@ { char buffer[80]; + return (1); +/* DNW - return without printing any information times(&time_b); #ifdef VAXC proc_used = time_b.proc_user_time * 0.01 - proc_used; @@ -70,10 +73,11 @@ #ifndef VAXC fprintf(stderr, "\n"); #endif - /* and put it in the log file (if it exists) */ + * and put it in the log file (if it exists) * sprintf(buffer, "%.2f %d %d", proc_used, elaps_time, pages_done); log_line(buffer, 0, NULL, 1, 0, 3); return(1); +*/ } /* take care of necessary memory, note must clear by hand for compatibility */ @@ -242,7 +246,7 @@ #endif init_check(eject, "eject", 'E', onoff, "0"); init_check(copies, "copies", 'c', integer, "1"); - init_check(debug, "debug", 'D', onoff, "0"); + /*init_check(debug, "debug", 'D', onoff, "0"); DNW - turn debugging off */ init_check(list, "list", 'l', onoff, "0"); init_check(pxl_in, "pxl_in", 'P', real, "0.0"); init_check(ypxl_in, "ypxl_in", 'Q', real, "0.0"); @@ -287,7 +291,9 @@ } } /* set the other arguments */ - *to_screen = opt[(int) screen].set; + /* DNW - remove all output to the screen */ + /**to_screen = opt[(int) screen].set;*/ + *to_screen = 1; *do_list = opt[(int) list].set; /* now send off info to the logging line routine */ @@ -302,7 +308,7 @@ #define may_override(name) if (opt[(int) name].set) switch (opt[(int) name].tag) { \ case integer: out_info->name = opt[(int) name].val.i; break; \ case real: out_info->name = opt[(int) name].val.r; break; \ - case lst: case str: strcpy(out_info->name, opt[(int) name].val.str); break;} + case lst: case str: strcpy(&out_info->name, opt[(int) name].val.str); break;} { /* and now overide the device if the command line wants us to */ may_override(pxl_in); @@ -363,7 +369,8 @@ c1->ind_prec = 16; c1->col_prec = 8; c1->col_i_prec = 8; - c1->max_c_index = 63; +/* c1->max_c_index = 63; RLM 12oct94*/ + c1->max_c_index = 255; for (i=0; i<3; ++i) { c1->c_v_extent.min[i] = 0; c1->c_v_extent.max[i] = 255; diff -Nurd gplot.orig/xws_cla.c gplot/xws_cla.c --- gplot.orig/xws_cla.c 1992-05-26 06:59:28.000000000 -0700 +++ gplot/xws_cla.c 2006-01-26 23:07:53.000000000 -0800 @@ -257,6 +257,8 @@ } +static int lcm(int, int); /* forward declaration */ + xws_carray(p, q, r, nx, ny, precision, data, mode, no_bytes) int p[2], q[2], r[2]; /* defining location of the picture matrix */ int nx, ny; /* defining size of the cell array */ diff -Nurd gplot.orig/xws_polygon.c gplot/xws_polygon.c --- gplot.orig/xws_polygon.c 1991-07-17 10:22:15.000000000 -0700 +++ gplot/xws_polygon.c 2006-01-26 23:09:14.000000000 -0800 @@ -76,6 +76,9 @@ /* Polygon processor routine */ +static xws_fill_polygon(int, int[], int[]); /* forward declaration */ +static xws_init_fill(); /* forward declaration */ + xws_pgon(point_count, x, y) int point_count; int x[], y[];