home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-01-05 | 49.4 KB | 1,716 lines |
- diff -cr ./README ../gnuplot2.02/README
- *** ./README Tue Sep 18 14:56:36 1990
- --- ../gnuplot2.02/README Tue Dec 11 16:40:48 1990
- ***************
- *** 208,213
- AED AED 512 and AED 767
- ATT6300 PC with AT&T 6300 graphics
- BITGRAPH BBN BitGraph
- CORONA PC with Corona graphics 325
- DXY800A Roland DXY800A plotter
- EEPIC EEPIC-extended LaTeX driver, for EEPIC users
-
- --- 208,214 -----
- AED AED 512 and AED 767
- ATT6300 PC with AT&T 6300 graphics
- BITGRAPH BBN BitGraph
- + CGI SCO CGI
- CORONA PC with Corona graphics 325
- DXY800A Roland DXY800A plotter
- EEPIC EEPIC-extended LaTeX driver, for EEPIC users
- ***************
- *** 220,226
- HP26 HP2623A and maybe others
- HP75 HP7580, and probably other HPs
- HPGL HP7475 and (hopefully) lots of others
- ! HPLJET HP Laserjet
- IMAGEN Imagen laser printers (300dpi) (requires -Iterm also)
- IRIS4D IRIS4D series computer
- KERMIT MS-Kermit Tektronix 4010 emulator
-
- --- 221,227 -----
- HP26 HP2623A and maybe others
- HP75 HP7580, and probably other HPs
- HPGL HP7475 and (hopefully) lots of others
- ! HPLJII HP Laserjet II
- IMAGEN Imagen laser printers (300dpi) (requires -Iterm also)
- IRIS4D IRIS4D series computer
- KERMIT MS-Kermit Tektronix 4010 emulator
- ***************
- *** 227,233
- LATEX LATEX picture environment
- NEC NEC CP6 pinwriter printer
- POSTSCRIPT Postscript
- ! PROPRINTER IBM Proprinter
- QMS QMS/QUIC laserprinter (Talaris 1200 and others)
- REGIS ReGis graphics (vt125, vt220, vt240, Gigis...)
- SELANAR Selanar
-
- --- 228,234 -----
- LATEX LATEX picture environment
- NEC NEC CP6 pinwriter printer
- POSTSCRIPT Postscript
- ! PRESCRIBE Kyocera Laser printer
- QMS QMS/QUIC laserprinter (Talaris 1200 and others)
- REGIS ReGis graphics (vt125, vt220, vt240, Gigis...)
- SELANAR Selanar
- ***************
- *** 239,244
- UNIXPC unixpc (ATT 3b1 or ATT 7300)
- UNIXPLOT unixplot
- V384 Vectrix 384 and tandy color printer
- X11 X11R4 window system
-
-
-
- --- 240,246 -----
- UNIXPC unixpc (ATT 3b1 or ATT 7300)
- UNIXPLOT unixplot
- V384 Vectrix 384 and tandy color printer
- + VTTEK VT like Tektronix 4010 emulator
- X11 X11R4 window system
-
-
- ***************
- *** 279,285
-
- under MSDOS:
- Using Microsoft C 5.10.
- ! make makefile.msc
-
- Using Turbo C 2.0.
- make -fmakefile.tc
-
- --- 281,288 -----
-
- under MSDOS:
- Using Microsoft C 5.10.
- ! copy makefile.msc
- ! make makefile
-
- Using Turbo C 2.0.
- copy makefile.tc
- ***************
- *** 282,288
- make makefile.msc
-
- Using Turbo C 2.0.
- ! make -fmakefile.tc
-
- The file gnuplot.gih is needed for help on the PC.
- If the file gnuplot.gih is not in the default directory, then use:
-
- --- 285,293 -----
- make makefile
-
- Using Turbo C 2.0.
- ! copy makefile.tc
- ! Edit makefile to change TC, BIN, BGI.
- ! make
-
- The file gnuplot.gih is needed for help on the PC.
- If the file gnuplot.gih is not in the default directory, then use:
- diff -cr ./README.x11 ../gnuplot2.02/README.x11
- *** ./README.x11 Tue Sep 18 14:56:39 1990
- --- ../gnuplot2.02/README.x11 Mon Nov 26 02:31:27 1990
- ***************
- *** 1,4
- ! Gnuplot Support for X11
- -----------------------
- 31 August 1990
-
-
- --- 1,4 -----
- ! Gnuplot (patch 2) Support for X11
- -----------------------
- 24 November 1990
-
- ***************
- *** 1,6
- Gnuplot Support for X11
- -----------------------
- ! 31 August 1990
-
- Installing gnuplot X11 support requires:
-
-
- --- 1,6 -----
- Gnuplot (patch 2) Support for X11
- -----------------------
- ! 24 November 1990
-
- Installing gnuplot X11 support requires:
-
- ***************
- *** 10,19
-
- o compilation of the outboard X11 terminal driver gnuplot_x11
-
- - o additions to the gnuplot(1) man page to describe command line
- - options and tailorable resources available when gnuplot terminal
- - types x11 or X11 are used.
- -
- makefile.x11 (a modified version of makefile.unx) provides these additional
- functions. The X11LIBS and X11INCLUDES parameters should be set to point to
- the X11 libraries and include files on your system. Comments give settings
-
- --- 10,15 -----
-
- o compilation of the outboard X11 terminal driver gnuplot_x11
-
- makefile.x11 (a modified version of makefile.unx) provides these additional
- functions. The X11LIBS and X11INCLUDES parameters should be set to point to
- the X11 libraries and include files on your system. Comments give settings
- ***************
- *** 17,23
- makefile.x11 (a modified version of makefile.unx) provides these additional
- functions. The X11LIBS and X11INCLUDES parameters should be set to point to
- the X11 libraries and include files on your system. Comments give settings
- ! for several systems.
-
- Sorry, as of this writing no support is available for systems without the
- Athena widget library (libXaw.a), or platforms other than unix.
-
- --- 13,20 -----
- makefile.x11 (a modified version of makefile.unx) provides these additional
- functions. The X11LIBS and X11INCLUDES parameters should be set to point to
- the X11 libraries and include files on your system. Comments give settings
- ! for several systems. The X11FLAGS parameter should be set to "-DMOTIF" to
- ! compile for the Motif (libXm.a) rather than Athena (libXaw.a) widget library.
-
- The gnuplot man page describes command line options and tailorable resources
- available when gnuplot terminal types x11 or X11 are used.
- ***************
- *** 19,26
- the X11 libraries and include files on your system. Comments give settings
- for several systems.
-
- ! Sorry, as of this writing no support is available for systems without the
- ! Athena widget library (libXaw.a), or platforms other than unix.
-
- Differences from "xgnuplot"
- ---------------------------
-
- --- 16,23 -----
- for several systems. The X11FLAGS parameter should be set to "-DMOTIF" to
- compile for the Motif (libXm.a) rather than Athena (libXaw.a) widget library.
-
- ! The gnuplot man page describes command line options and tailorable resources
- ! available when gnuplot terminal types x11 or X11 are used.
-
- Sorry, as of this writing no support is available for platforms other than unix.
-
- ***************
- *** 22,27
- Sorry, as of this writing no support is available for systems without the
- Athena widget library (libXaw.a), or platforms other than unix.
-
- Differences from "xgnuplot"
- ---------------------------
-
-
- --- 19,26 -----
- The gnuplot man page describes command line options and tailorable resources
- available when gnuplot terminal types x11 or X11 are used.
-
- + Sorry, as of this writing no support is available for platforms other than unix.
- +
- Differences from "xgnuplot"
- ---------------------------
- This X11 support is based on the xgnuplot wrapper/terminal driver distributed
- ***************
- *** 24,29
-
- Differences from "xgnuplot"
- ---------------------------
-
- This X11 support is based on (and replaces) the xgnuplot wrapper/terminal
- driver which was distributed separately from gnuplot. Differences:
-
- --- 23,30 -----
-
- Differences from "xgnuplot"
- ---------------------------
- + This X11 support is based on the xgnuplot wrapper/terminal driver distributed
- + separately from gnuplot. Differences:
-
- o Gnuplot silently invokes the outboard driver, rather than vice versa.
- Thus resource names in .Xdefaults begin with "gnuplot" rather than
- ***************
- *** 25,33
- Differences from "xgnuplot"
- ---------------------------
-
- - This X11 support is based on (and replaces) the xgnuplot wrapper/terminal
- - driver which was distributed separately from gnuplot. Differences:
- -
- o Gnuplot silently invokes the outboard driver, rather than vice versa.
- Thus resource names in .Xdefaults begin with "gnuplot" rather than
- "xgnuplot". En passant, this change fixed the bug where xgnuplot would
-
- --- 26,31 -----
- This X11 support is based on the xgnuplot wrapper/terminal driver distributed
- separately from gnuplot. Differences:
-
- o Gnuplot silently invokes the outboard driver, rather than vice versa.
- Thus resource names in .Xdefaults begin with "gnuplot" rather than
- "xgnuplot".
- ***************
- *** 30,38
-
- o Gnuplot silently invokes the outboard driver, rather than vice versa.
- Thus resource names in .Xdefaults begin with "gnuplot" rather than
- ! "xgnuplot". En passant, this change fixed the bug where xgnuplot would
- ! hang until Ctrl-C when gnuplot was exited without plotting at least
- ! one x11/X11 plot.
-
- o When the window is resized, the currently displayed plot is automatically
- rescaled and replotted.
-
- --- 28,34 -----
-
- o Gnuplot silently invokes the outboard driver, rather than vice versa.
- Thus resource names in .Xdefaults begin with "gnuplot" rather than
- ! "xgnuplot".
-
- o When the window is resized, the currently displayed plot is automatically
- rescaled and replotted.
- ***************
- *** 37,48
- o When the window is resized, the currently displayed plot is automatically
- rescaled and replotted.
-
- ! o Compiles under X11 R3 as well as R4. This required using XtInitialize
- ! instead of XtAppInitialize, (char *) instead of XtPointer for callback
- ! client data declarations, removing a reference to XGetGCValues, and
- ! parameterizing (X11INCLUDES in makefile.x11) the location of the needed
- ! Athena include files.
- !
-
- ---------------------------------
- Ed Kubaitis, ejk@uxh.cso.uiuc.edu
-
- --- 33,40 -----
- o When the window is resized, the currently displayed plot is automatically
- rescaled and replotted.
-
- ! o Compiles under X11 R3 as well as R4 and with either the Athena or Motif
- ! widget libraries.
-
- ---------------------------------
- Ed Kubaitis, ejk@uxh.cso.uiuc.edu
- Common subdirectories: ./bugtest and ../gnuplot2.02/bugtest
- diff -cr ./buildvms.com ../gnuplot2.02/buildvms.com
- *** ./buildvms.com Tue Sep 18 14:56:40 1990
- --- ../gnuplot2.02/buildvms.com Tue Dec 4 11:43:40 1990
- ***************
- *** 3,8
- $ !TERMFLAGS = "/define=()"
- $ TERMFLAGS = ""
- $ set verify
- $ cc 'CFLAGS' command.c
- $ cc 'CFLAGS' eval.c
- $ cc 'CFLAGS' graphics.c
-
- --- 3,9 -----
- $ !TERMFLAGS = "/define=()"
- $ TERMFLAGS = ""
- $ set verify
- + $ cc 'CFLAGS' bitmap.c
- $ cc 'CFLAGS' command.c
- $ cc 'CFLAGS' eval.c
- $ cc 'CFLAGS' graphics.c
- ***************
- *** 17,23
- $ cc 'CFLAGS' util.c
- $ cc 'CFLAGS' version.c
- $ link /exe=gnuplot -
- ! command.obj,eval.obj,graphics.obj,internal.obj, -
- misc.obj,parse.obj,plot.obj,scanner.obj,setshow.obj, -
- standard.obj,term.obj,util.obj,version.obj ,linkopt.vms/opt
- $ cc [.docs]doc2hlp.c
-
- --- 18,24 -----
- $ cc 'CFLAGS' util.c
- $ cc 'CFLAGS' version.c
- $ link /exe=gnuplot -
- ! bitmap.obj,command.obj,eval.obj,graphics.obj,internal.obj, -
- misc.obj,parse.obj,plot.obj,scanner.obj,setshow.obj, -
- standard.obj,term.obj,util.obj,version.obj ,linkopt.vms/opt
- $ cc [.docs]doc2hlp.c
- diff -cr ./command.c ../gnuplot2.02/command.c
- *** ./command.c Tue Sep 18 14:56:42 1990
- --- ../gnuplot2.02/command.c Thu Nov 29 10:13:34 1990
- ***************
- *** 75,81
- extern int strlen(), strcmp();
-
- #ifdef unix
- ! extern char *getwd();
- #else
- extern char *getcwd();
- #endif
-
- --- 75,82 -----
- extern int strlen(), strcmp();
-
- #ifdef unix
- ! #ifdef GETCWD
- ! extern char *getcwd(); /* some Unix's use getcwd */
- #else
- extern char *getwd(); /* most Unix's use getwd */
- #endif
- ***************
- *** 77,83
- #ifdef unix
- extern char *getwd();
- #else
- ! extern char *getcwd();
- #endif
- extern int chdir();
-
-
- --- 78,84 -----
- #ifdef GETCWD
- extern char *getcwd(); /* some Unix's use getcwd */
- #else
- ! extern char *getwd(); /* most Unix's use getwd */
- #endif
- #else
- extern char *getcwd(); /* Turbo C, MSC and VMS use getcwd */
- ***************
- *** 79,84
- #else
- extern char *getcwd();
- #endif
- extern int chdir();
-
- extern double magnitude(),angle(),real(),imag();
-
- --- 80,88 -----
- #else
- extern char *getwd(); /* most Unix's use getwd */
- #endif
- + #else
- + extern char *getcwd(); /* Turbo C, MSC and VMS use getcwd */
- + #endif
- extern int chdir();
-
- extern double magnitude(),angle(),real(),imag();
- ***************
- *** 287,294
- }
- else if (almost_equals(c_token,"pwd")) {
- #ifdef unix
- ! /* unix has getwd() */
- ! (void) getwd(sv_file);
- #else
- /* Turbo C and VMS have getcwd() */
- (void) getcwd(sv_file,MAX_ID_LEN);
-
- --- 291,298 -----
- }
- else if (almost_equals(c_token,"pwd")) {
- #ifdef unix
- ! #ifdef GETCWD
- ! (void) getcwd(sv_file,MAX_ID_LEN); /* some Unix's use getcwd */
- #else
- (void) getwd(sv_file); /* most Unix's use getwd */
- #endif
- ***************
- *** 290,295
- /* unix has getwd() */
- (void) getwd(sv_file);
- #else
- /* Turbo C and VMS have getcwd() */
- (void) getcwd(sv_file,MAX_ID_LEN);
- #endif
-
- --- 294,302 -----
- #ifdef GETCWD
- (void) getcwd(sv_file,MAX_ID_LEN); /* some Unix's use getcwd */
- #else
- + (void) getwd(sv_file); /* most Unix's use getwd */
- + #endif
- + #else
- /* Turbo C and VMS have getcwd() */
- (void) getcwd(sv_file,MAX_ID_LEN);
- #endif
- ***************
- *** 328,333
-
-
- plotrequest()
- {
- BOOLEAN changed;
- int dummy_token = -1;
-
- --- 335,346 -----
-
-
- plotrequest()
- + /*
- + In the parametric case we can say
- + plot [a= -4:4] [-2:2] [-1:1] sin(a),a**2
- + while in the non-parametric case we would say only
- + plot [b= -2:2] [-1:1] sin(b)
- + */
- {
- BOOLEAN changed;
- int dummy_token = -1;
- ***************
- *** 332,337
- BOOLEAN changed;
- int dummy_token = -1;
-
- autoscale_lx = autoscale_x;
- autoscale_ly = autoscale_y;
-
-
- --- 345,351 -----
- BOOLEAN changed;
- int dummy_token = -1;
-
- + autoscale_lt = autoscale_t;
- autoscale_lx = autoscale_x;
- autoscale_ly = autoscale_y;
-
- ***************
- *** 350,355
- /* used to be: int_error("'=' expected",c_token); */
- }
- }
- changed = load_range(&xmin,&xmax);
- if (!equals(c_token,"]"))
- int_error("']' expected",c_token);
-
- --- 364,383 -----
- /* used to be: int_error("'=' expected",c_token); */
- }
- }
- + changed = parametric ? load_range(&tmin,&tmax):load_range(&xmin,&xmax);
- + if (!equals(c_token,"]"))
- + int_error("']' expected",c_token);
- + c_token++;
- + if (changed) {
- + if (parametric)
- + autoscale_lt = FALSE;
- + else
- + autoscale_lx = FALSE;
- + }
- + }
- +
- + if (parametric && equals(c_token,"[")) { /* set optional x ranges */
- + c_token++;
- changed = load_range(&xmin,&xmax);
- if (!equals(c_token,"]"))
- int_error("']' expected",c_token);
- ***************
- *** 417,422
- register FILE *fp;
- float x, y;
- int npoints; /* number of points and breaks read */
-
- quote_str(data_file, c_token);
- this_plot->plot_type = DATA;
-
- --- 445,453 -----
- register FILE *fp;
- float x, y;
- int npoints; /* number of points and breaks read */
- + float temp;
- + BOOLEAN yfirst;
- + char format[MAX_LINE_LEN+1];
-
- quote_str(data_file, c_token);
- this_plot->plot_type = DATA;
- ***************
- *** 423,428
- if ((fp = fopen(data_file, "r")) == (FILE *)NULL)
- os_error("can't open data file", c_token);
-
- l_num = 0;
- datum = 0;
- i = 0;
-
- --- 454,483 -----
- if ((fp = fopen(data_file, "r")) == (FILE *)NULL)
- os_error("can't open data file", c_token);
-
- + format[0] = '\0';
- + yfirst = FALSE;
- + c_token++; /* skip data file name */
- + if (almost_equals(c_token,"u$sing")) {
- + c_token++; /* skip "using" */
- + if (!isstring(c_token)) {
- + if ( equals(c_token,"xy") || equals(c_token,"y") )
- + yfirst = FALSE;
- + else if (equals(c_token,"yx"))
- + yfirst = TRUE;
- + else
- + int_error("expecting xy, yx, y or format (scanf) string",c_token);
- + c_token++; /* skip "xy", "yx" or "y" */
- + }
- + if (isstring(c_token)) {
- + quotel_str(format, c_token);
- + c_token++; /* skip format */
- + }
- + else
- + int_error("expecting format (scanf) string",c_token);
- + }
- + if (strlen(format) == 0)
- + strcpy(format,"%f %f");
- +
- l_num = 0;
- datum = 0;
- i = 0;
- ***************
- *** 441,447
- continue;
- }
-
- ! switch (sscanf(line, "%f %f", &x, &y)) {
- case 1: { /* only one number on the line */
- y = x; /* assign that number to y */
- x = datum; /* and make the index into x */
-
- --- 496,502 -----
- continue;
- }
-
- ! switch (sscanf(line, format, &x, &y)) {
- case 1: { /* only one number on the line */
- y = x; /* assign that number to y */
- x = datum; /* and make the index into x */
- ***************
- *** 448,453
- /* no break; !!! */
- }
- case 2: {
- datum++;
- this_plot->points[i].type = INRANGE;
-
-
- --- 503,513 -----
- /* no break; !!! */
- }
- case 2: {
- + if (yfirst) { /* exchange x and y */
- + temp = y;
- + y = x;
- + x = temp;
- + }
- datum++;
- this_plot->points[i].type = INRANGE;
-
- ***************
- *** 517,523
- {
- register int i;
- register struct curve_points *this_plot, **tp_ptr;
- ! register int start_token, mysamples;
- register int begin_token;
- register double x_min, x_max, y_min, y_max, x;
- register double xdiff, temp;
-
- --- 577,583 -----
- {
- register int i;
- register struct curve_points *this_plot, **tp_ptr;
- ! register int start_token, end_token, mysamples;
- register int begin_token;
- double x_min, x_max, y_min, y_max;
- register double x, xdiff, temp;
- ***************
- *** 519,526
- register struct curve_points *this_plot, **tp_ptr;
- register int start_token, mysamples;
- register int begin_token;
- ! register double x_min, x_max, y_min, y_max, x;
- ! register double xdiff, temp;
- static struct value a;
- BOOLEAN some_data_files = FALSE;
- int plot_num, line_num, point_num;
-
- --- 579,586 -----
- register struct curve_points *this_plot, **tp_ptr;
- register int start_token, end_token, mysamples;
- register int begin_token;
- ! double x_min, x_max, y_min, y_max;
- ! register double x, xdiff, temp;
- static struct value a;
- BOOLEAN ltmp, some_data_files = FALSE;
- int plot_num, line_num, point_num, xparam=0;
- ***************
- *** 522,529
- register double x_min, x_max, y_min, y_max, x;
- register double xdiff, temp;
- static struct value a;
- ! BOOLEAN some_data_files = FALSE;
- ! int plot_num, line_num, point_num;
-
- mysamples = samples;
-
-
- --- 582,591 -----
- double x_min, x_max, y_min, y_max;
- register double x, xdiff, temp;
- static struct value a;
- ! BOOLEAN ltmp, some_data_files = FALSE;
- ! int plot_num, line_num, point_num, xparam=0;
- ! char *xtitle;
- ! void parametric_fixup();
-
- mysamples = samples;
-
- ***************
- *** 569,574
- }
-
- if (isstring(c_token)) { /* data file to plot */
- if (!some_data_files && autoscale_lx) {
- xmin = VERYLARGE;
- xmax = -VERYLARGE;
-
- --- 631,640 -----
- }
-
- if (isstring(c_token)) { /* data file to plot */
- + if (parametric && xparam)
- + int_error("previous parametric function not fully specified",
- + c_token);
- +
- if (!some_data_files && autoscale_lx) {
- xmin = VERYLARGE;
- xmax = -VERYLARGE;
- ***************
- *** 577,584
-
- this_plot->plot_type = DATA;
- this_plot->plot_style = data_style;
- ! get_data(this_plot);
- ! c_token++;
- }
- else { /* function to plot */
- this_plot->plot_type = FUNC;
-
- --- 643,650 -----
-
- this_plot->plot_type = DATA;
- this_plot->plot_style = data_style;
- ! end_token = c_token;
- ! get_data(this_plot); /* this also parses the using option */
- }
- else { /* function to plot */
- if (parametric) /* working on x parametric function */
- ***************
- *** 581,586
- c_token++;
- }
- else { /* function to plot */
- this_plot->plot_type = FUNC;
- this_plot->plot_style = func_style;
- dummy_func = &plot_func;
-
- --- 647,654 -----
- get_data(this_plot); /* this also parses the using option */
- }
- else { /* function to plot */
- + if (parametric) /* working on x parametric function */
- + xparam = 1 - xparam;
- this_plot->plot_type = FUNC;
- this_plot->plot_style = func_style;
- dummy_func = &plot_func;
- ***************
- *** 586,591
- dummy_func = &plot_func;
- plot_func.at = temp_at();
- /* ignore it for now */
- }
-
- if (almost_equals(c_token,"t$itle")) {
-
- --- 654,660 -----
- dummy_func = &plot_func;
- plot_func.at = temp_at();
- /* ignore it for now */
- + end_token = c_token-1;
- }
-
- if (almost_equals(c_token,"t$itle")) {
- ***************
- *** 589,594
- }
-
- if (almost_equals(c_token,"t$itle")) {
- c_token++;
- if ( (input_line[token[c_token].start_index]=='\'')
- ||(input_line[token[c_token].start_index]=='"') ) {
-
- --- 658,671 -----
- }
-
- if (almost_equals(c_token,"t$itle")) {
- + if (parametric) {
- + if (xparam)
- + int_error(
- + "\"title\" allowed only after parametric function fully specified",
- + c_token);
- + else if (xtitle != NULL)
- + xtitle[0] = '\0'; /* Remove default title .*/
- + }
- c_token++;
- if ( (input_line[token[c_token].start_index]=='\'')
- ||(input_line[token[c_token].start_index]=='"') ) {
- ***************
- *** 599,609
- }
- c_token++;
- }
- ! else {
- ! m_capture(&(this_plot->title),start_token,c_token-1);
- ! }
- !
- ! this_plot->line_type = line_num;
- this_plot->point_type = point_num;
-
- if (almost_equals(c_token,"w$ith")) {
-
- --- 676,687 -----
- }
- c_token++;
- }
- ! else {
- ! m_capture(&(this_plot->title),start_token,end_token);
- ! if (xparam) xtitle = this_plot->title;
- ! }
- !
- ! this_plot->line_type = line_num;
- this_plot->point_type = point_num;
-
- if (almost_equals(c_token,"w$ith")) {
- ***************
- *** 607,612
- this_plot->point_type = point_num;
-
- if (almost_equals(c_token,"w$ith")) {
- this_plot->plot_style = get_style();
- }
-
-
- --- 685,693 -----
- this_plot->point_type = point_num;
-
- if (almost_equals(c_token,"w$ith")) {
- + if (parametric && xparam)
- + int_error("\"with\" allowed only after parametric function fully specified",
- + c_token);
- this_plot->plot_style = get_style();
- }
-
- ***************
- *** 620,627
- }
- if ( (this_plot->plot_style == POINTS) ||
- (this_plot->plot_style == LINESPOINTS) )
- ! point_num++;
- ! line_num++;
-
- tp_ptr = &(this_plot->next_cp);
- }
-
- --- 701,708 -----
- }
- if ( (this_plot->plot_style == POINTS) ||
- (this_plot->plot_style == LINESPOINTS) )
- ! if (!xparam) point_num++;
- ! if (!xparam) line_num++;
-
- tp_ptr = &(this_plot->next_cp);
- }
- ***************
- *** 632,637
- break;
- }
-
- /*** Second Pass: Evaluate the functions ***/
- /* Everything is defined now, except the function data. We expect
- * no syntax errors, etc, since the above parsed it all. This makes
-
- --- 713,728 -----
- break;
- }
-
- + if (parametric && xparam)
- + int_error("parametric function not fully specified", NO_CARET);
- +
- + if (parametric) {
- + /* Swap t and x ranges for duration of these eval_plot computations. */
- + ltmp = autoscale_lx; autoscale_lx = autoscale_lt; autoscale_lt = ltmp;
- + temp = xmin; xmin = tmin; tmin = temp;
- + temp = xmax; xmax = tmax; tmax = temp;
- + }
- +
- /*** Second Pass: Evaluate the functions ***/
- /* Everything is defined now, except the function data. We expect
- * no syntax errors, etc, since the above parsed it all. This makes
- ***************
- *** 639,645
- */
- if (xmin == xmax)
- if (autoscale_lx) {
- ! fprintf(stderr, "Warning: empty x range [%g:%g], ", xmin,xmax);
- if (xmin == 0.0) {
- /* completely arbitary */
- xmin = -1.;
-
- --- 730,737 -----
- */
- if (xmin == xmax)
- if (autoscale_lx) {
- ! fprintf(stderr, "Warning: empty %c range [%g:%g], ",
- ! parametric ? 't' : 'x', xmin,xmax);
- if (xmin == 0.0) {
- /* completely arbitary */
- xmin = -1.;
- ***************
- *** 654,659
- int_error("x range is empty", c_token);
- }
-
- if (log_x) {
- if (xmin <= 0.0 || xmax <= 0.0)
- int_error("x range must be greater than 0 for log scale!",NO_CARET);
-
- --- 746,756 -----
- int_error("x range is empty", c_token);
- }
-
- + /* give error if xrange badly set from missing datafile error */
- + if (xmin == VERYLARGE || xmax == -VERYLARGE) {
- + int_error("x range is invalid", c_token);
- + }
- +
- if (log_x) {
- if (xmin <= 0.0 || xmax <= 0.0)
- int_error("x range must be greater than 0 for log scale!",NO_CARET);
- ***************
- *** 679,684
- if (isstring(c_token)) { /* data file to plot */
- /* ignore this now */
- c_token++;
- }
- else { /* function to plot */
- dummy_func = &plot_func;
-
- --- 776,787 -----
- if (isstring(c_token)) { /* data file to plot */
- /* ignore this now */
- c_token++;
- + if (almost_equals(c_token,"u$sing")) {
- + c_token++; /* skip "using" */
- + if (!isstring(c_token))
- + c_token++; /* skip "xy", "yx" or "y" */
- + c_token++; /* skip format string */
- + }
- }
- else { /* function to plot */
- if (parametric) /* working on x parametric function */
- ***************
- *** 681,686
- c_token++;
- }
- else { /* function to plot */
- dummy_func = &plot_func;
- plot_func.at = temp_at(); /* reparse function */
-
-
- --- 784,791 -----
- }
- }
- else { /* function to plot */
- + if (parametric) /* working on x parametric function */
- + xparam = 1 - xparam;
- dummy_func = &plot_func;
- plot_func.at = temp_at(); /* reparse function */
-
- ***************
- *** 724,731
- if (autoscale_ly || polar
- || inrange(temp, ymin, ymax)) {
- this_plot->points[i].type = INRANGE;
- ! if (autoscale_ly && temp < ymin) ymin = temp;
- ! if (autoscale_ly && temp > ymax) ymax = temp;
- } else
- this_plot->points[i].type = OUTRANGE;
- }
-
- --- 829,839 -----
- if (autoscale_ly || polar
- || inrange(temp, ymin, ymax)) {
- this_plot->points[i].type = INRANGE;
- ! /* When xparam is 1 we are not really computing y's! */
- ! if (!xparam && autoscale_ly) {
- ! if (temp < ymin) ymin = temp;
- ! if (temp > ymax) ymax = temp;
- ! }
- } else
- this_plot->points[i].type = OUTRANGE;
- }
- ***************
- *** 789,794
- y_max = ymax;
- }
- capture(replot_line,plot_token,c_token);
- do_plot(first_plot,plot_num,x_min,x_max,y_min,y_max);
- }
-
-
- --- 897,918 -----
- y_max = ymax;
- }
- capture(replot_line,plot_token,c_token);
- +
- + if (parametric) {
- + /* Now put t and x ranges back before we actually plot anything. */
- + ltmp = autoscale_lx; autoscale_lx = autoscale_lt; autoscale_lt = ltmp;
- + temp = xmin; xmin = tmin; tmin = temp;
- + temp = xmax; xmax = tmax; tmax = temp;
- + if (some_data_files && autoscale_lx) {
- + /*
- + Stop any further autoscaling in this case (may be a mistake, have
- + to consider what is really wanted some day in the future--jdc).
- + */
- + autoscale_lx = 0;
- + }
- + /* Now actually fix the plot pairs to be single plots. */
- + parametric_fixup (first_plot, &plot_num, &x_min, &x_max);
- + }
- do_plot(first_plot,plot_num,x_min,x_max,y_min,y_max);
- }
-
- ***************
- *** 804,809
- #endif
- exit(status);
- }
-
- #ifdef MSDOS
- #ifndef __TURBOC__ /* Turbo C already has sleep() */
-
- --- 928,1074 -----
- #endif
- exit(status);
- }
- +
- + void parametric_fixup (start_plot, plot_num, x_min, x_max)
- + struct curve_points *start_plot;
- + int *plot_num;
- + double *x_min, *x_max;
- + /*
- + The hardest part of this routine is collapsing the FUNC plot types
- + in the list (which are gauranteed to occur in (x,y) pairs while
- + preserving the non-FUNC type plots intact. This means we have to
- + work our way through various lists. Examples (hand checked):
- + start_plot:F1->F2->NULL ==> F2->NULL
- + start_plot:F1->F2->F3->F4->F5->F6->NULL ==> F2->F4->F6->NULL
- + start_plot:F1->F2->D1->D2->F3->F4->D3->NULL ==> F2->D1->D2->F4->D3->NULL
- +
- + Of course, the more interesting work is to move the y values of
- + the x function to become the x values of the y function (checking
- + the mins and maxs as we go along).
- + */
- + {
- + struct curve_points *xp, *new_list, *yp = start_plot, *tmp,
- + *free_list, *free_head=NULL;
- + int i, tlen, curve;
- + char *new_title;
- + double lxmin, lxmax, temp;
- +
- + if (autoscale_lx) {
- + lxmin = VERYLARGE;
- + lxmax = -VERYLARGE;
- + } else {
- + lxmin = xmin;
- + lxmax = xmax;
- + }
- +
- + /*
- + Ok, go through all the plots and move FUNC types together. Note: this
- + originally was written to look for a NULL next pointer, but gnuplot
- + wants to be sticky in grabbing memory and the right number of items
- + in the plot list is controlled by the plot_num variable.
- +
- + Since gnuplot wants to do this sticky business, a free_list of
- + curve_points is kept and then tagged onto the end of the plot list as
- + this seems more in the spirit of the original memory behavior than
- + simply freeing the memory. I'm personally not convinced this sort
- + of concern is worth it since the time spent computing points seems
- + to dominate any garbage collecting that might be saved here...
- + */
- + new_list = xp = start_plot;
- + yp = xp->next_cp;
- + curve = 0;
- + for (; curve < *plot_num; xp = xp->next_cp,yp = yp->next_cp,curve++) {
- + if (xp->plot_type != FUNC) {
- + continue;
- + }
- + /* Here's a FUNC parametric function defined as two parts. */
- + --(*plot_num);
- + /*
- + Go through all the points assigning the y's from xp to be the
- + x's for yp. Check max's and min's as you go.
- + */
- + for (i = 0; i < yp->p_count; ++i) {
- + /*
- + Throw away excess xp points, mark excess yp points as OUTRANGE.
- + */
- + if (i > xp->p_count) {
- + yp->points[i].type == OUTRANGE;
- + continue;
- + }
- + /*
- + Just as we had to do when we computed y values--now check that
- + x's (computed parametrically) are in the permitted ranges as well.
- + */
- + temp = xp->points[i].y; /* New x value for yp function. */
- + yp->points[i].x = temp;
- + /* For legitimate y values, let the x values decide if they plot. */
- + if (yp->points[i].type == INRANGE)
- + yp->points[i].type = xp->points[i].type;
- + if (autoscale_lx || polar
- + || inrange(temp, lxmin, lxmax)) {
- + if (autoscale_lx && temp < lxmin) lxmin = temp;
- + if (autoscale_lx && temp > lxmax) lxmax = temp;
- + } else
- + yp->points[i].type = OUTRANGE; /* Due to x value. */
- + }
- + /* Ok, fix up the title to include both the xp and yp plots. */
- + if (xp->title && xp->title[0] != '\0') {
- + tlen = strlen (yp->title) + strlen (xp->title) + 3;
- + new_title = alloc ((unsigned int) tlen, "string");
- + strcpy (new_title, xp->title);
- + strcat (new_title, ", "); /* + 2 */
- + strcat (new_title, yp->title); /* + 1 = + 3 */
- + free (yp->title);
- + yp->title = new_title;
- + }
- + /* Eliminate the first curve (xparam) and just use the second. */
- + if (xp == start_plot) {
- + /* Simply nip off the first element of the list. */
- + new_list = first_plot = yp;
- + xp = xp->next_cp;
- + if (yp->next_cp != NULL)
- + yp = yp->next_cp;
- + /* Add start_plot to the free_list. */
- + if (free_head == NULL) {
- + free_list = free_head = start_plot;
- + free_head->next_cp = NULL;
- + } else {
- + free_list->next_cp = start_plot;
- + start_plot->next_cp = NULL;
- + free_list = start_plot;
- + }
- + }
- + else {
- + /* Here, remove the xp node and replace it with the yp node. */
- + tmp = xp;
- + /* Pass over any data files that might have been in place. */
- + while (new_list->next_cp && new_list->next_cp != xp)
- + new_list = new_list->next_cp;
- + new_list->next_cp = yp;
- + new_list = new_list->next_cp;
- + xp = xp->next_cp;
- + if (yp->next_cp != NULL)
- + yp = yp->next_cp;
- + /* Add tmp to the free_list. */
- + if (free_head == NULL) {
- + free_list = free_head = tmp;
- + } else {
- + free_list->next_cp = tmp;
- + tmp->next_cp = NULL;
- + free_list = tmp;
- + }
- + }
- + }
- + /* Ok, stick the free list at the end of the curve_points plot list. */
- + while (new_list->next_cp != NULL)
- + new_list = new_list->next_cp;
- + new_list->next_cp = free_head;
- +
- + /* Report the overall graph mins and maxs. */
- + *x_min = lxmin;
- + *x_max = lxmax;
- + }
- +
-
- #ifdef MSDOS
- #ifndef __TURBOC__ /* Turbo C already has sleep() */
- Common subdirectories: ./demo and ../gnuplot2.02/demo
- Common subdirectories: ./docs and ../gnuplot2.02/docs
- Only in .: gnuplot
- diff -cr ./gnuplot_x11.c ../gnuplot2.02/gnuplot_x11.c
- *** ./gnuplot_x11.c Tue Sep 18 14:59:27 1990
- --- ../gnuplot2.02/gnuplot_x11.c Wed Nov 28 09:34:33 1990
- ***************
- *** 1,5
- /*-----------------------------------------------------------------------------
- - *
- * gnuplot_x11 - X11 outboard terminal driver for gnuplot 2
- *
- * Requires installation of companion inboard x11 driver in gnuplot/term.c
-
- --- 1,4 -----
- /*-----------------------------------------------------------------------------
- * gnuplot_x11 - X11 outboard terminal driver for gnuplot 2
- *
- * Requires installation of companion inboard x11 driver in gnuplot/term.c
- ***************
- *** 8,13
- * Chris Peterson (MIT) - original Xlib gnuplot support (and Xaw examples)
- * Dana Chee (Bellcore) - mods to original support for gnuplot 2.0
- * Arthur Smith (Cornell) - graphical-label-widget idea (xplot)
- *
- * This code is provided as is and with no warranties of any kind.
- *
-
- --- 7,13 -----
- * Chris Peterson (MIT) - original Xlib gnuplot support (and Xaw examples)
- * Dana Chee (Bellcore) - mods to original support for gnuplot 2.0
- * Arthur Smith (Cornell) - graphical-label-widget idea (xplot)
- + * Hendri Hondorp (University of Twente, The Netherlands) - Motif xgnuplot
- *
- * This code is provided as is and with no warranties of any kind.
- *
- ***************
- *** 11,18
- *
- * This code is provided as is and with no warranties of any kind.
- *
- ! * Ed Kubaitis
- ! * Computing Services Office - University of Illinois, Urbana
- *---------------------------------------------------------------------------*/
-
- #include <stdio.h>
-
- --- 11,17 -----
- *
- * This code is provided as is and with no warranties of any kind.
- *
- ! * Ed Kubaitis - Computing Services Office - University of Illinois, Urbana
- *---------------------------------------------------------------------------*/
-
- #include <stdio.h>
- ***************
- *** 16,21
- *---------------------------------------------------------------------------*/
-
- #include <stdio.h>
- #include <X11/Intrinsic.h>
- #include <X11/StringDefs.h>
- #include <Cardinals.h> /* use -Idir for location on your system */
-
- --- 15,21 -----
- *---------------------------------------------------------------------------*/
-
- #include <stdio.h>
- + #include <signal.h>
- #include <X11/Intrinsic.h>
- #include <X11/StringDefs.h>
- #include <Label.h> /* use -Idir for location on your system */
- ***************
- *** 18,24
- #include <stdio.h>
- #include <X11/Intrinsic.h>
- #include <X11/StringDefs.h>
- - #include <Cardinals.h> /* use -Idir for location on your system */
- #include <Label.h> /* use -Idir for location on your system */
-
-
-
- --- 18,23 -----
- #include <signal.h>
- #include <X11/Intrinsic.h>
- #include <X11/StringDefs.h>
- #include <Label.h> /* use -Idir for location on your system */
- #ifdef MOTIF
- #include <Xm.h> /* use -Idir for location on your system */
- ***************
- *** 20,25
- #include <X11/StringDefs.h>
- #include <Cardinals.h> /* use -Idir for location on your system */
- #include <Label.h> /* use -Idir for location on your system */
-
-
- #define Color (D>1)
-
- --- 19,32 -----
- #include <X11/Intrinsic.h>
- #include <X11/StringDefs.h>
- #include <Label.h> /* use -Idir for location on your system */
- + #ifdef MOTIF
- + #include <Xm.h> /* use -Idir for location on your system */
- + #define LabelWC xmLabelWidgetClass
- + #define LabelBPM XmNbackgroundPixmap
- + #else
- + #define LabelWC labelWidgetClass
- + #define LabelBPM XtNbitmap
- + #endif
-
- #define Color (D>1)
- #define Ncolors 11
- ***************
- *** 21,27
- #include <Cardinals.h> /* use -Idir for location on your system */
- #include <Label.h> /* use -Idir for location on your system */
-
- -
- #define Color (D>1)
- #define Ncolors 11
- unsigned long colors[Ncolors];
-
- --- 28,33 -----
- #define LabelBPM XtNbitmap
- #endif
-
- #define Color (D>1)
- #define Ncolors 11
- unsigned long colors[Ncolors];
- ***************
- *** 27,33
- unsigned long colors[Ncolors];
- char color_keys[Ncolors][30] = { "text", "border", "axis",
- "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8" };
- -
- char color_values[Ncolors][30] = { "black", "black", "black",
- "red", "green", "blue", "magenta", "cyan", "sienna", "orange", "coral" };
-
-
- --- 33,38 -----
- unsigned long colors[Ncolors];
- char color_keys[Ncolors][30] = { "text", "border", "axis",
- "line1", "line2", "line3", "line4", "line5", "line6", "line7", "line8" };
- char color_values[Ncolors][30] = { "black", "black", "black",
- "red", "green", "blue", "magenta", "cyan", "sienna", "orange", "coral" };
-
- ***************
- *** 35,42
- {0}, {4,2,0}, {1,3,0}, {4,4,0}, {1,5,0}, {4,4,4,1,0}, {4,2,0}, {1,3,0}
- };
-
- ! Widget w_top, w_label;
- ! Window win; Display *dpy;
- Pixmap pixmap; GC gc = (GC)NULL;
- XFontStruct *font;
- unsigned long fg, bg;
-
- --- 40,46 -----
- {0}, {4,2,0}, {1,3,0}, {4,4,0}, {1,5,0}, {4,4,4,1,0}, {4,2,0}, {1,3,0}
- };
-
- ! Widget w_top, w_label; Window win; Display *dpy;
- Pixmap pixmap; GC gc = (GC)NULL;
- Dimension W = 640 , H = 450; int D;
- Arg args[5];
- ***************
- *** 38,45
- Widget w_top, w_label;
- Window win; Display *dpy;
- Pixmap pixmap; GC gc = (GC)NULL;
- - XFontStruct *font;
- - unsigned long fg, bg;
- Dimension W = 640 , H = 450; int D;
- Arg args[5];
- static void gnuplot(), resize();
-
- --- 42,47 -----
-
- Widget w_top, w_label; Window win; Display *dpy;
- Pixmap pixmap; GC gc = (GC)NULL;
- Dimension W = 640 , H = 450; int D;
- Arg args[5];
- static void gnuplot(), resize();
- ***************
- *** 53,58
- char buf[Nbuf];
- String *commands = NULL;
-
- /*-----------------------------------------------------------------------------
- * main program - fire up application and callbacks
- *---------------------------------------------------------------------------*/
-
- --- 55,76 -----
- char buf[Nbuf];
- String *commands = NULL;
-
- + typedef struct { /* See "X Toolkit Intrinsics Programming Manual" */
- + XFontStruct *font; /* Nye and O'Reilly, O'Reilly & Associates, pp. 80-85 */
- + unsigned long fg;
- + unsigned long bg;
- + } RValues, *RVptr;
- + RValues rv;
- +
- + XtResource resources[] = {
- + { XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
- + XtOffset(RVptr, font), XtRString, "fixed" },
- + { XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
- + XtOffset(RVptr, fg), XtRString, XtDefaultForeground },
- + { XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel),
- + XtOffset(RVptr, bg), XtRString, XtDefaultBackground },
- + };
- +
- /*-----------------------------------------------------------------------------
- * main program - fire up application and callbacks
- *---------------------------------------------------------------------------*/
- ***************
- *** 59,64
-
- main(argc, argv) int argc; char *argv[]; {
-
- /* initialize application */
- w_top = XtInitialize("gnuplot", "Gnuplot", NULL, 0, &argc, argv);
- XtSetArg(args[0], XtNwidth, W);
-
- --- 77,85 -----
-
- main(argc, argv) int argc; char *argv[]; {
-
- + signal(SIGINT, SIG_IGN);
- + signal(SIGTSTP, SIG_IGN);
- +
- /* initialize application */
- w_top = XtInitialize("gnuplot", "Gnuplot", NULL, 0, &argc, argv);
- XtSetArg(args[0], XtNwidth, W);
- ***************
- *** 63,69
- w_top = XtInitialize("gnuplot", "Gnuplot", NULL, 0, &argc, argv);
- XtSetArg(args[0], XtNwidth, W);
- XtSetArg(args[1], XtNheight, H);
- ! w_label = XtCreateManagedWidget("", labelWidgetClass, w_top, args, TWO);
- XtRealizeWidget(w_top);
-
- /* extract needed information */
-
- --- 84,90 -----
- w_top = XtInitialize("gnuplot", "Gnuplot", NULL, 0, &argc, argv);
- XtSetArg(args[0], XtNwidth, W);
- XtSetArg(args[1], XtNheight, H);
- ! w_label = XtCreateManagedWidget ("", LabelWC, w_top, args, (Cardinal)2);
- XtRealizeWidget(w_top);
-
- /* extract needed information */
- ***************
- *** 67,73
- XtRealizeWidget(w_top);
-
- /* extract needed information */
- ! dpy = XtDisplay(w_top); win = XtWindow(w_top); D = DisplayPlanes(dpy,0);
- if (Color) {
- char option[20], *value;
- XColor used, exact;
-
- --- 88,95 -----
- XtRealizeWidget(w_top);
-
- /* extract needed information */
- ! dpy = XtDisplay(w_top); win = XtWindow(w_label);
- ! D = DisplayPlanes(dpy,DefaultScreen(dpy));
- if (Color) {
- char option[20], *value;
- XColor used, exact; int n;
- ***************
- *** 70,77
- dpy = XtDisplay(w_top); win = XtWindow(w_top); D = DisplayPlanes(dpy,0);
- if (Color) {
- char option[20], *value;
- ! XColor used, exact;
- ! int n;
-
- for(n=0; n<Ncolors; n++) {
- strcpy(option, color_keys[n]);
-
- --- 92,98 -----
- D = DisplayPlanes(dpy,DefaultScreen(dpy));
- if (Color) {
- char option[20], *value;
- ! XColor used, exact; int n;
-
- for(n=0; n<Ncolors; n++) {
- strcpy(option, color_keys[n]);
- ***************
- *** 87,99
- }
- }
- }
- ! XtSetArg(args[0], XtNfont, &font);
- ! XtSetArg(args[1], XtNforeground, &fg);
- ! XtSetArg(args[2], XtNbackground, &bg);
- ! XtSetArg(args[3], XtNwidth, &W);
- ! XtSetArg(args[4], XtNheight,&H);
- ! XtGetValues(w_label, args, FIVE);
- ! vchar = (font->ascent + font->descent);
-
- /* add callbacks on input-from-gnuplot-on-stdin & window-resized */
- XtAddInput(0, XtInputReadMask, gnuplot, NULL);
-
- --- 108,118 -----
- }
- }
- }
- ! XtSetArg(args[0], XtNwidth, &W);
- ! XtSetArg(args[1], XtNheight,&H);
- ! XtGetValues(w_label, args, (Cardinal)2);
- ! XtGetApplicationResources(w_top, &rv, resources, XtNumber(resources),NULL,0);
- ! vchar = (rv.font->ascent + rv.font->descent);
-
- /* add callbacks on input-from-gnuplot-on-stdin & window-resized */
- XtAddInput(0, XtInputReadMask, gnuplot, NULL);
- ***************
- *** 113,121
- /* set scaling factor between internal driver & window geometry */
- xscale = (double)W / 4096.; yscale = (double)H / 4096.;
-
- - /* return old pixmap & GC, if any */
- - if (gc) { XFreeGC(dpy, gc); XFreePixmap(dpy, pixmap); }
- -
- /* create new pixmap & GC */
- pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy), W, H, D);
- gc = XCreateGC(dpy, pixmap, 0, NULL);
-
- --- 132,137 -----
- /* set scaling factor between internal driver & window geometry */
- xscale = (double)W / 4096.; yscale = (double)H / 4096.;
-
- /* create new pixmap & GC */
- if (gc) { XFreeGC(dpy, gc); XFreePixmap(dpy, pixmap); }
- pixmap = XCreatePixmap(dpy, RootWindow(dpy,DefaultScreen(dpy)), W, H, D);
- ***************
- *** 117,123
- if (gc) { XFreeGC(dpy, gc); XFreePixmap(dpy, pixmap); }
-
- /* create new pixmap & GC */
- ! pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy), W, H, D);
- gc = XCreateGC(dpy, pixmap, 0, NULL);
- XSetFont(dpy, gc, font->fid);
-
-
- --- 133,140 -----
- xscale = (double)W / 4096.; yscale = (double)H / 4096.;
-
- /* create new pixmap & GC */
- ! if (gc) { XFreeGC(dpy, gc); XFreePixmap(dpy, pixmap); }
- ! pixmap = XCreatePixmap(dpy, RootWindow(dpy,DefaultScreen(dpy)), W, H, D);
- gc = XCreateGC(dpy, pixmap, 0, NULL);
- XSetFont(dpy, gc, rv.font->fid);
-
- ***************
- *** 119,125
- /* create new pixmap & GC */
- pixmap = XCreatePixmap(dpy, DefaultRootWindow(dpy), W, H, D);
- gc = XCreateGC(dpy, pixmap, 0, NULL);
- ! XSetFont(dpy, gc, font->fid);
-
- /* connect new pixmap to label widget */
- XtSetArg(args[0], XtNbitmap, pixmap);
-
- --- 136,142 -----
- if (gc) { XFreeGC(dpy, gc); XFreePixmap(dpy, pixmap); }
- pixmap = XCreatePixmap(dpy, RootWindow(dpy,DefaultScreen(dpy)), W, H, D);
- gc = XCreateGC(dpy, pixmap, 0, NULL);
- ! XSetFont(dpy, gc, rv.font->fid);
-
- /* erase pixmap */
- #ifndef MOTIF
- ***************
- *** 121,130
- gc = XCreateGC(dpy, pixmap, 0, NULL);
- XSetFont(dpy, gc, font->fid);
-
- - /* connect new pixmap to label widget */
- - XtSetArg(args[0], XtNbitmap, pixmap);
- - XtSetValues(w_label, args, ONE);
- -
- /* erase pixmap */
- if (Color) {
- XSetForeground(dpy, gc, bg);
-
- --- 138,143 -----
- gc = XCreateGC(dpy, pixmap, 0, NULL);
- XSetFont(dpy, gc, rv.font->fid);
-
- /* erase pixmap */
- #ifndef MOTIF
- if (Color) { /* Athena needs different erase for color and mono */
- ***************
- *** 126,133
- XtSetValues(w_label, args, ONE);
-
- /* erase pixmap */
- ! if (Color) {
- ! XSetForeground(dpy, gc, bg);
- XFillRectangle(dpy, pixmap, gc, 0, 0, W, H);
- XSetForeground(dpy, gc, fg);
- XSetBackground(dpy, gc, bg);
-
- --- 139,148 -----
- XSetFont(dpy, gc, rv.font->fid);
-
- /* erase pixmap */
- ! #ifndef MOTIF
- ! if (Color) { /* Athena needs different erase for color and mono */
- ! #endif
- ! XSetForeground(dpy, gc, rv.bg);
- XFillRectangle(dpy, pixmap, gc, 0, 0, W, H);
- XSetForeground(dpy, gc, rv.fg);
- XSetBackground(dpy, gc, rv.bg);
- ***************
- *** 129,136
- if (Color) {
- XSetForeground(dpy, gc, bg);
- XFillRectangle(dpy, pixmap, gc, 0, 0, W, H);
- ! XSetForeground(dpy, gc, fg);
- ! XSetBackground(dpy, gc, bg);
- }
- else {
- XSetFunction(dpy, gc, GXxor);
-
- --- 144,152 -----
- #endif
- XSetForeground(dpy, gc, rv.bg);
- XFillRectangle(dpy, pixmap, gc, 0, 0, W, H);
- ! XSetForeground(dpy, gc, rv.fg);
- ! XSetBackground(dpy, gc, rv.bg);
- ! #ifndef MOTIF
- }
- else {
- XSetFunction(dpy, gc, GXxor);
- ***************
- *** 132,138
- XSetForeground(dpy, gc, fg);
- XSetBackground(dpy, gc, bg);
- }
- ! else {
- XSetFunction(dpy, gc, GXxor);
- XCopyArea(dpy, pixmap, pixmap, gc, 0, 0, W, H, 0, 0);
- XSetFunction(dpy, gc, GXcopyInverted);
-
- --- 148,154 -----
- XSetBackground(dpy, gc, rv.bg);
- #ifndef MOTIF
- }
- ! else {
- XSetFunction(dpy, gc, GXxor);
- XCopyArea(dpy, pixmap, pixmap, gc, 0, 0, W, H, 0, 0);
- XSetFunction(dpy, gc, GXcopyInverted);
- ***************
- *** 137,142
- XCopyArea(dpy, pixmap, pixmap, gc, 0, 0, W, H, 0, 0);
- XSetFunction(dpy, gc, GXcopyInverted);
- }
-
- /* loop over accumulated commands from inboard driver */
- for (n=0; n<nc; n++) {
-
- --- 153,159 -----
- XCopyArea(dpy, pixmap, pixmap, gc, 0, 0, W, H, 0, 0);
- XSetFunction(dpy, gc, GXcopyInverted);
- }
- + #endif
-
- /* connect new pixmap to label widget */
- XtSetArg(args[0], LabelBPM, pixmap);
- ***************
- *** 138,143
- XSetFunction(dpy, gc, GXcopyInverted);
- }
-
- /* loop over accumulated commands from inboard driver */
- for (n=0; n<nc; n++) {
- buf = commands[n];
-
- --- 155,164 -----
- }
- #endif
-
- + /* connect new pixmap to label widget */
- + XtSetArg(args[0], LabelBPM, pixmap);
- + XtSetValues(w_label, args, (Cardinal)1);
- +
- /* loop over accumulated commands from inboard driver */
- for (n=0; n<nc; n++) {
- buf = commands[n];
- ***************
- *** 157,163
- else if (*buf == 'T') {
- sscanf(buf, "T%4d%4d", &x, &y);
- str = buf + 9; sl = strlen(str) - 1;
- ! sw = XTextWidth(font, str, sl);
- switch(jmode) {
- case LEFT: sw = 0; break;
- case CENTRE: sw = -sw/2; break;
-
- --- 178,184 -----
- else if (*buf == 'T') {
- sscanf(buf, "T%4d%4d", &x, &y);
- str = buf + 9; sl = strlen(str) - 1;
- ! sw = XTextWidth(rv.font, str, sl);
- switch(jmode) {
- case LEFT: sw = 0; break;
- case CENTRE: sw = -sw/2; break;
- ***************
- *** 205,210
-
- /*-----------------------------------------------------------------------------
- * gnuplot - Xt callback on input from gnuplot inboard X11 driver
- *---------------------------------------------------------------------------*/
-
- static void
-
- --- 226,232 -----
-
- /*-----------------------------------------------------------------------------
- * gnuplot - Xt callback on input from gnuplot inboard X11 driver
- + * resize - Xt callback when window resized
- *---------------------------------------------------------------------------*/
-
- static void
- ***************
- *** 213,220
- while (fgets(buf, Nbuf, stdin)) {
- if (*buf == 'G') { /* enter graphics mode */
- if (commands) {
- ! int n;
- ! for (n=0; n<nc; n++) XtFree(commands[n]);
- XtFree(commands);
- }
- commands = NULL; nc = 0;
-
- --- 235,241 -----
- while (fgets(buf, Nbuf, stdin)) {
- if (*buf == 'G') { /* enter graphics mode */
- if (commands) {
- ! int n; for (n=0; n<nc; n++) XtFree(commands[n]);
- XtFree(commands);
- }
- commands = NULL; nc = 0;
- ***************
- *** 228,237
- }
- if (feof(stdin) || ferror(stdin)) exit(0);
- }
- -
- - /*-----------------------------------------------------------------------------
- - * resize - Xt callback when window resized
- - *---------------------------------------------------------------------------*/
-
- static void
- resize(w, cd, e) Widget w; char *cd; XConfigureEvent *e; {
-
- --- 249,254 -----
- }
- if (feof(stdin) || ferror(stdin)) exit(0);
- }
-
- static void
- resize(w, cd, e) Widget w; char *cd; XConfigureEvent *e; {
-