home *** CD-ROM | disk | FTP | other *** search
- diff -pru gnuplot-3.7.0.9-pm3d-patch/config/makefile.os2 gnuplot-3.7.0.9.my/config/makefile.os2
- --- gnuplot-3.7.0.9-pm3d-patch/config/makefile.os2 Fri Mar 2 18:52:52 2001
- +++ gnuplot-3.7.0.9.my/config/makefile.os2 Fri Oct 8 01:03:42 1999
- @@ -115,7 +115,7 @@ O2 = obj
- O3 = o
-
- # Flags for compiler and linker under OS/2
- -OS2FLAGS = -DOS2 -DHELPFILE=\"$(HELPFILE)\"
- +OS2FLAGS = -DOS2 -DHELPFILE=\"$(HELPFILE)\" -DPM3D=1
-
- # Flags for compiling with EMX/GCC
- # Special note: -ffloat-store is necessary to avoid some
- @@ -206,6 +206,7 @@ endif
- #
- # Include dependencies valid for all platforms from makefile.all
- #
- +###include makefile.all
- include makefile.all
-
- #
- diff -pru gnuplot-3.7.0.9-pm3d-patch/config/makefile.os2.orig gnuplot-3.7.0.9.my/config/makefile.os2.orig
- --- gnuplot-3.7.0.9-pm3d-patch/config/makefile.os2.orig Sun Jun 6 13:31:12 1999
- +++ gnuplot-3.7.0.9.my/config/makefile.os2.orig Thu Oct 7 02:47:26 1999
- @@ -196,6 +196,7 @@ endif
- #
- # Include dependencies valid for all platforms from makefile.all
- #
- +###include makefile.all
- include makefile.all
-
- #
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/command.c gnuplot-3.7.0.9.my/src/command.c
- --- gnuplot-3.7.0.9-pm3d-patch/src/command.c Mon Jul 5 08:12:50 1999
- +++ gnuplot-3.7.0.9.my/src/command.c Thu Oct 7 02:48:38 1999
- @@ -76,7 +76,7 @@ extern int PM_pause(char *);
- extern int ExecuteMacro(char *, int); /* plot.c */
- extern TBOOLEAN CallFromRexx; /* plot.c */
- # ifdef USE_MOUSE
- -PVOID input_from_PM_Terminal = NULL;
- +void* input_from_PM_Terminal = NULL;
- char mouseShareMemName[40] = "";
- # define INCL_DOSMEMMGR
- # include <os2.h>
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/gnuplot.opt gnuplot-3.7.0.9.my/src/gnuplot.opt
- --- gnuplot-3.7.0.9-pm3d-patch/src/gnuplot.opt Fri Mar 2 18:52:52 2001
- +++ gnuplot-3.7.0.9.my/src/gnuplot.opt Fri Oct 8 00:36:40 1999
- @@ -30,3 +30,5 @@ util.obj
- util3d.obj
- variable.obj
- version.obj
- +color.obj
- +pm3d.obj
- \ No newline at end of file
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/help.c gnuplot-3.7.0.9.my/src/help.c
- --- gnuplot-3.7.0.9-pm3d-patch/src/help.c Tue Jun 22 07:00:48 1999
- +++ gnuplot-3.7.0.9.my/src/help.c Fri Oct 8 01:12:02 1999
- @@ -549,6 +549,10 @@ TBOOLEAN *subtopics; /* (out) are there
- }
- starts[stopics++] = start;
- prev = start;
- + if (stopics >= MAXSTARTS) {
- + printf("Panic: Too many subtopics!\n");
- + return;
- + }
- }
- } else {
- /* new topic */
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/makefile.all gnuplot-3.7.0.9.my/src/makefile.all
- --- gnuplot-3.7.0.9-pm3d-patch/src/makefile.all Fri Mar 2 18:53:02 2001
- +++ gnuplot-3.7.0.9.my/src/makefile.all Fri Oct 8 00:54:02 1999
- @@ -8,6 +8,8 @@ plot.$(O) plot2d.$(O) plot3d.$(O) pm3d.$
- show.$(O) specfun.$(O) standard.$(O) stdfn.$(O) term.$(O) time.$(O) \
- util.$(O) util3d.$(O) variable.$(O)
-
- +# pm3d.$(O) color.$(O)
- +
- # List of terminal driver sources
- CORETERM = $(T)aed.trm $(T)ai.trm $(T)amiga.trm $(T)apollo.trm \
- $(T)atariaes.trm $(T)atarivdi.trm $(T)be.trm $(T)cgi.trm $(T)cgm.trm \
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/Makefile.in gnuplot-3.7.0.9.my/src/Makefile.in
- --- gnuplot-3.7.0.9-pm3d-patch/src/Makefile.in Fri Mar 2 18:53:02 2001
- +++ gnuplot-3.7.0.9.my/src/Makefile.in Fri Oct 8 00:42:12 1999
- @@ -104,7 +104,7 @@ fit.h graph3d.c graphics.c graphics.h he
- interpol.c matrix.c matrix.h misc.c national.h parse.c plot.c plot.h \
- plot2d.c plot3d.c protos.h readline.c scanner.c set.c setshow.h show.c \
- specfun.c standard.c stdfn.c stdfn.h syscfg.h term.c term.h time.c util.c \
- -util.h util3d.c util3d.h variable.c variable.h version.c
- +util.h util3d.c util3d.h variable.c variable.h version.c pm3d.c color.c
-
-
- EXTRA_gnuplot_SOURCES = @NEXTOBJS@
- @@ -137,7 +137,7 @@ datafile.$(O) eval.$(O) fit.$(O) graph3d
- hidden3d.$(O) internal.$(O) interpol.$(O) matrix.$(O) misc.$(O) parse.$(O) \
- plot.$(O) plot2d.$(O) plot3d.$(O) readline.$(O) scanner.$(O) set.$(O) \
- show.$(O) specfun.$(O) standard.$(O) stdfn.$(O) term.$(O) time.$(O) \
- -util.$(O) util3d.$(O) variable.$(O)
- +util.$(O) util3d.$(O) variable.$(O) pm3d.$(O) color.$(O)
-
-
- # List of terminal driver sources
- @@ -183,7 +183,7 @@ contour$U.o datafile$U.o eval$U.o fit$U.
- help$U.o hidden3d$U.o internal$U.o interpol$U.o matrix$U.o misc$U.o \
- parse$U.o plot$U.o plot2d$U.o plot3d$U.o readline$U.o scanner$U.o \
- set$U.o show$U.o specfun$U.o standard$U.o stdfn$U.o term$U.o time$U.o \
- -util$U.o util3d$U.o variable$U.o version$U.o
- +util$U.o util3d$U.o variable$U.o version$U.o pm3d.o color.o
- gnuplot_OBJECTS = $(am_gnuplot_OBJECTS)
- gnuplot_DEPENDENCIES =
- gnuplot_LDFLAGS =
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/os2/gclient.c gnuplot-3.7.0.9.my/src/os2/gclient.c
- --- gnuplot-3.7.0.9-pm3d-patch/src/os2/gclient.c Fri Mar 2 18:53:02 2001
- +++ gnuplot-3.7.0.9.my/src/os2/gclient.c Sat Oct 9 18:44:00 1999
- @@ -131,8 +131,11 @@ static long lCols[16] = { CLR_BLACK,
- CLR_BROWN,
- CLR_PALEGRAY,
- CLR_WHITE } ;
- +static long lCols_init = 0;
- +static long lCols_num = 16;
- +static long bkColor = -1;
-
- -static LONG alColourTable[ 16 ] ;
- +static LONG alColourTable[ 18 ] ;
-
- #define GNUBUF 1024 /* buffer for gnuplot commands */
- #define PIPEBUF 4096 /* size of pipe buffers */
- @@ -373,10 +376,20 @@ MRESULT EXPENTRY DisplayClientWndProc(HW
- //PM: show the Mouse menu if connected to mouseable PM terminal
- if (1 || mouseTerminal) //PM workaround for a bug---SEE "BUGS 2" IN README!!!
- // if (mouseTerminal)
- + {
- WinEnableMenuItem(
- WinWindowFromID( WinQueryWindow( hApp, QW_PARENT ), FID_MENU ),
- IDM_MOUSE, TRUE ) ;
- // get details of command-line window
- + if (!input_from_PM_Terminal) {
- + WinEnableMenuItem( // Useless: no feedback channel
- + WinWindowFromID( WinQueryWindow( hApp, QW_PARENT ), FID_MENU ),
- + IDM_MOUSE_GRID, FALSE ) ;
- + WinEnableMenuItem( // Useless: no feedback channel
- + WinWindowFromID( WinQueryWindow( hApp, QW_PARENT ), FID_MENU ),
- + IDM_MOUSE_LINLOGY, FALSE ) ;
- + }
- + }
- hSwitch = WinQuerySwitchHandle( 0, ppidGnu ) ;
- WinQuerySwitchEntry( hSwitch, &swGnu ) ;
- if( firstcall ) {
- @@ -566,7 +579,31 @@ case WM_MOUSEMOVE:
-
- MousePosToGraphPos( &x, &y, hWnd, mx, my, mouse_mode ); // transform mouse->real graph coords
-
- - sprintf(s,"[%g,%g]",x,y);
- + s[0] = 0;
- + if (ruler.on) { // append this info coming from the ruler position
- + if (mouse_mode!=MOUSE_COORDINATES_REAL)
- + sprintf(s,"ruler[%g,%g], point: ",ruler.x,ruler.y); // distance makes no sense
- + else {
- + double dx, dy;
- + if (gp4mouse.is_log_x) // ratio for log, distance for linear
- + dx = (ruler.x==0) ? 99999 : x / ruler.x;
- + else dx = x - ruler.x;
- + if (gp4mouse.is_log_y) dy = (ruler.y==0) ? 99999 : y / ruler.y;
- + else dy = y - ruler.y;
- + sprintf(s,"ruler[%g,%g], distance(%g;%g)",ruler.x,ruler.y,dx,dy);
- + // polar coords of distance (axes cannot be logarithmic)
- + if (bMousePolarDistance && !gp4mouse.is_log_x && !gp4mouse.is_log_y) {
- + double rho = sqrt((x-ruler.x)*(x-ruler.x)+(y-ruler.y)*(y-ruler.y));
- + double phi = (180/M_PI)*atan2(y-ruler.y,x-ruler.x);
- +
- + sprintf(s + strlen(s)," (%g;%.4g°), ",rho,phi);
- + }
- + else
- + sprintf(s + strlen(s), ", ");
- + }
- + }
- +
- + sprintf(s + strlen(s),"[%g,%g]",x,y);
-
- /* For negative table position, shift it to the top of the window.
- This could be done like that: */
- @@ -594,30 +631,6 @@ case WM_MOUSEMOVE:
- pt.x = xMouseTableOrig+2;
- pt.y = yMouseTableOrig+2;
-
- - if (ruler.on) { // append this info coming from the ruler position
- - char p[255];
- - if (mouse_mode!=MOUSE_COORDINATES_REAL)
- - sprintf(p," ruler: [%g,%g]",ruler.x,ruler.y); // distance makes no sense
- - else {
- - double dx, dy;
- - if (gp4mouse.is_log_x) // ratio for log, distance for linear
- - dx = (ruler.x==0) ? 99999 : x / ruler.x;
- - else dx = x - ruler.x;
- - if (gp4mouse.is_log_y) dy = (ruler.y==0) ? 99999 : y / ruler.y;
- - else dy = y - ruler.y;
- - if (mouse_mode==MOUSE_COORDINATES_REAL)
- - sprintf(p," ruler: [%g,%g] distance: %g;%g",ruler.x,ruler.y,dx,dy);
- - // polar coords of distance (axes cannot be logarithmic)
- - if (bMousePolarDistance && !gp4mouse.is_log_x && !gp4mouse.is_log_y) {
- - double rho = sqrt((x-ruler.x)*(x-ruler.x)+(y-ruler.y)*(y-ruler.y));
- - double phi = (180/M_PI)*atan2(y-ruler.y,x-ruler.x);
- - strcat(s,p);
- - sprintf(p," (%g;%.4g°)",rho,phi);
- - }
- - }
- - strcat(s,p);
- - }
- -
- GpiCharStringAt(hps,&pt,(long)strlen(s),s);
- WinReleasePS(hps);
-
- @@ -652,7 +665,9 @@ case WM_BUTTON1DBLCLK:
-
-
- case WM_BUTTON2CLICK: // WM_BUTTON2UP:
- +case WM_BUTTON1DOWN:
- if (IGNORE_MOUSE) return 0L;
- + if (!input_from_PM_Terminal) return 0L;
- // make zoom
- {
-
- @@ -671,14 +686,14 @@ case WM_BUTTON2CLICK: // WM_BUTTON2UP:
- WinQueryWindowRect(hWnd,&ti.rclBoundary);
-
- // set minimum/maximum size for window = size of the present window
- - ti.ptlMinTrackSize.x = ti.rclBoundary.xLeft;
- - ti.ptlMinTrackSize.y = ti.rclBoundary.yBottom;
- - ti.ptlMaxTrackSize.x = ti.rclBoundary.xRight;
- - ti.ptlMaxTrackSize.y = ti.rclBoundary.yTop;
- + ti.ptlMinTrackSize.x = ti.rclBoundary.xLeft - MOUSEMSG(&message)->x;
- + ti.ptlMinTrackSize.y = ti.rclBoundary.yBottom - MOUSEMSG(&message)->y;
- + ti.ptlMaxTrackSize.x = ti.rclBoundary.xRight - MOUSEMSG(&message)->x;
- + ti.ptlMaxTrackSize.y = ti.rclBoundary.yTop - MOUSEMSG(&message)->x;
-
- // set initial initial tracking (zoomed) window
- - ti.rclTrack.xRight = 50 + (ti.rclTrack.xLeft=MOUSEMSG(&message)->x);
- - ti.rclTrack.yTop = 50 + (ti.rclTrack.yBottom=MOUSEMSG(&message)->y);
- + ti.rclTrack.xRight = 1 + (ti.rclTrack.xLeft=MOUSEMSG(&message)->x);
- + ti.rclTrack.yTop = 1 + (ti.rclTrack.yBottom=MOUSEMSG(&message)->y);
-
- // track the zooming rectangle, return when mouse is lifted
- ti.fs = TF_TOP | TF_RIGHT | TF_SETPOINTERPOS;
- @@ -720,7 +735,7 @@ case WM_BUTTON3UP: // WM_BUTTON3DBLCLK:
- SHORT mx=MOUSEMSG(&message)->x; // mouse position
- SHORT my=MOUSEMSG(&message)->y;
- char s[256];
- - POINTL pt;
- + POINTL pt, pt1;
- double x,y;
- HPS hps = WinGetPS(hWnd);
-
- @@ -731,6 +746,13 @@ case WM_BUTTON3UP: // WM_BUTTON3DBLCLK:
- GpiSetCharMode(hps,CM_MODE1);
- pt.x = mx; pt.y = my;
- GpiCharStringAt(hps,&pt,(long)strlen(s),s);
- + // Mark point to which the annotation relates
- + GpiMove(hps,&pt);
- + pt1.x = mx-5; pt1.y = my-3;
- + GpiLine(hps,&pt1);
- + GpiMove(hps,&pt);
- + pt1.x = mx-3; pt1.y = my-5;
- + GpiLine(hps,&pt1);
- WinReleasePS(hps);
- }
- return 0L; // end of case WM_BUTTON3...
- @@ -982,7 +1004,8 @@ MRESULT WmClientCmdProc(HWND hWnd, ULONG
- sprintf(s,"set xr[%g:%g];set yr[%g:%g];rep",unzoom_xmin,unzoom_xmax,unzoom_ymin,unzoom_ymax);
- // make the command as short as possible so that it prints on one line
- TextToClipboard ( s );
- - sprintf(input_from_PM_Terminal,"%s",s); //fraba: send the command to gnuplot
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"%s",s); //fraba: send the command to gnuplot
- }
- return 0L;
-
- @@ -1013,13 +1036,16 @@ MRESULT WmClientCmdProc(HWND hWnd, ULONG
- case IDM_MOUSE_GRID:
- if (bhave_grid) { //fraba
- bhave_grid = FALSE;
- - sprintf(input_from_PM_Terminal,"set nogrid; replot");
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"set nogrid; replot");
- } else {
- bhave_grid = TRUE;
- #if 0 /* 0 ... main grid, 1 ... fine grid */
- - sprintf(input_from_PM_Terminal,"set grid; replot");
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"set grid; replot");
- #else
- - sprintf(input_from_PM_Terminal,"set mxtics 2; set mytics 2; set grid x y mx my; replot");
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"set mxtics 2; set mytics 2; set grid x y mx my; replot");
- #endif
- }
- return 0L;
- @@ -1028,8 +1054,9 @@ MRESULT WmClientCmdProc(HWND hWnd, ULONG
- // NOTE: if log, then take care of positive y min!
- if (bhave_log) { //fraba
- bhave_log = FALSE;
- - sprintf(input_from_PM_Terminal, "set nolog y; replot" );
- - } else {
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal, "set nolog y; replot" );
- + } else if (input_from_PM_Terminal) {
- if (gp4mouse.ymin <= 0 || gp4mouse.ymax <= 0) {
- sprintf(input_from_PM_Terminal, "# Hey! y range must be greater than 0 for log scale.");
- DosBeep(300,10);
- @@ -1422,6 +1449,23 @@ HPS InitScreenPS()
- LCOL_RESET,
- LCOLF_CONSECRGB,
- 0, nColour, alColourTable ) ;
- + if (!lCols_init) {
- + int i = -1;
- +
- + lCols_init = 1;
- + GpiQueryLogColorTable( hpsScreen, 0, 0, 16, alColourTable + 2 ) ;
- + alColourTable[2+CLR_WHITE] = 0xffffff; // -2
- + alColourTable[2+CLR_BLACK] = 0; // -1
- + bkColor = alColourTable[2+CLR_BACKGROUND];
- + while (i++ < 16) {
- + if (alColourTable[2+lCols[i]] == bkColor) {
- + while (i++ < 16)
- + lCols[i - 1] = lCols[i];
- + lCols_num--;
- + break;
- + }
- + }
- + }
- return hpsScreen ;
- }
-
- @@ -1710,8 +1754,10 @@ server:
- sprintf( mouseShareMemName, "\\SHAREMEM\\GP%i_Mouse_Input", (int)ppidGnu ); //PM 11.5.1999
- if (DosGetNamedSharedMem(&input_from_PM_Terminal, //fraba
- mouseShareMemName,
- - PAG_WRITE))
- - DosBeep(1440L,1000L); /* indicates error */
- + PAG_WRITE)) {
- + /* DosBeep(1440L,1000L); */ /* error indicated by graying menus */
- + input_from_PM_Terminal = 0;
- + }
-
- // DosPostEventSem( semStartSeq ) ; /* once we've got pidGnu */
- WinPostMsg( hApp, WM_GPSTART, 0, 0 ) ;
- @@ -1906,7 +1952,7 @@ server:
- DosExitCritSec() ;
- BufRead(hRead, str, len*sizeof(int), &cbR) ;
- lCurCol = GpiQueryColor( hps ) ;
- - GpiSetColor( hps, CLR_BLACK ) ;
- + GpiSetColor( hps, CLR_NEUTRAL ) ;
- sw = QueryTextBox( hps, strlen(str), str ) ;
- switch(jmode) {
- case LEFT: sw = 0; break;
- @@ -1978,7 +2024,7 @@ server:
- else GpiSetLineWidthGeom( hps, linewidth ) ;
- if( lt < 0 ) lt = 0 ;
- lt = (lt%8);
- - col = (col+2)%16 ;
- + col = (col+2) % lCols_num;
- GpiLabel( hps, lLineTypes[lt] ) ;
- lOldLine=lt ;
- LType( (bLineTypes||bBW)?lt:0 ) ;
- @@ -1986,7 +2032,7 @@ lOldLine=lt ;
- if( !bBW ) { /* maintain some flexibility here in case we don't want
- the model T option */
- if( bColours ) GpiSetColor( hps, lCols[col] ) ;
- - else GpiSetColor( hps, CLR_BLACK ) ;
- + else GpiSetColor( hps, CLR_NEUTRAL ) ;
- }
- }
- break ;
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/os2/gclient.c.orig gnuplot-3.7.0.9.my/src/os2/gclient.c.orig
- --- gnuplot-3.7.0.9-pm3d-patch/src/os2/gclient.c.orig Tue Jun 22 06:55:52 1999
- +++ gnuplot-3.7.0.9.my/src/os2/gclient.c.orig Thu Oct 7 23:54:04 1999
- @@ -131,8 +131,11 @@ static long lCols[16] = { CLR_BLACK,
- CLR_BROWN,
- CLR_PALEGRAY,
- CLR_WHITE } ;
- +static long lCols_init = 0;
- +static long lCols_num = 16;
- +static long bkColor = -1;
-
- -static LONG alColourTable[ 16 ] ;
- +static LONG alColourTable[ 18 ] ;
-
- #define GNUBUF 1024 /* buffer for gnuplot commands */
- #define PIPEBUF 4096 /* size of pipe buffers */
- @@ -373,10 +376,20 @@ MRESULT EXPENTRY DisplayClientWndProc(HW
- //PM: show the Mouse menu if connected to mouseable PM terminal
- if (1 || mouseTerminal) //PM workaround for a bug---SEE "BUGS 2" IN README!!!
- // if (mouseTerminal)
- + {
- WinEnableMenuItem(
- WinWindowFromID( WinQueryWindow( hApp, QW_PARENT ), FID_MENU ),
- IDM_MOUSE, TRUE ) ;
- // get details of command-line window
- + if (!input_from_PM_Terminal) {
- + WinEnableMenuItem( // Useless: no feedback channel
- + WinWindowFromID( WinQueryWindow( hApp, QW_PARENT ), FID_MENU ),
- + IDM_MOUSE_GRID, FALSE ) ;
- + WinEnableMenuItem( // Useless: no feedback channel
- + WinWindowFromID( WinQueryWindow( hApp, QW_PARENT ), FID_MENU ),
- + IDM_MOUSE_LINLOGY, FALSE ) ;
- + }
- + }
- hSwitch = WinQuerySwitchHandle( 0, ppidGnu ) ;
- WinQuerySwitchEntry( hSwitch, &swGnu ) ;
- if( firstcall ) {
- @@ -566,7 +579,31 @@ case WM_MOUSEMOVE:
-
- MousePosToGraphPos( &x, &y, hWnd, mx, my, mouse_mode ); // transform mouse->real graph coords
-
- - sprintf(s,"[%g,%g]",x,y);
- + s[0] = 0;
- + if (ruler.on) { // append this info coming from the ruler position
- + if (mouse_mode!=MOUSE_COORDINATES_REAL)
- + sprintf(s,"ruler[%g,%g], point: ",ruler.x,ruler.y); // distance makes no sense
- + else {
- + double dx, dy;
- + if (gp4mouse.is_log_x) // ratio for log, distance for linear
- + dx = (ruler.x==0) ? 99999 : x / ruler.x;
- + else dx = x - ruler.x;
- + if (gp4mouse.is_log_y) dy = (ruler.y==0) ? 99999 : y / ruler.y;
- + else dy = y - ruler.y;
- + sprintf(s,"ruler[%g,%g], distance(%g;%g)",ruler.x,ruler.y,dx,dy);
- + // polar coords of distance (axes cannot be logarithmic)
- + if (bMousePolarDistance && !gp4mouse.is_log_x && !gp4mouse.is_log_y) {
- + double rho = sqrt((x-ruler.x)*(x-ruler.x)+(y-ruler.y)*(y-ruler.y));
- + double phi = (180/M_PI)*atan2(y-ruler.y,x-ruler.x);
- +
- + sprintf(s + strlen(s)," (%g;%.4g°), ",rho,phi);
- + }
- + else
- + sprintf(s + strlen(s), ", ");
- + }
- + }
- +
- + sprintf(s + strlen(s),"[%g,%g]",x,y);
-
- /* For negative table position, shift it to the top of the window.
- This could be done like that: */
- @@ -594,30 +631,6 @@ case WM_MOUSEMOVE:
- pt.x = xMouseTableOrig+2;
- pt.y = yMouseTableOrig+2;
-
- - if (ruler.on) { // append this info coming from the ruler position
- - char p[255];
- - if (mouse_mode!=MOUSE_COORDINATES_REAL)
- - sprintf(p," ruler: [%g,%g]",ruler.x,ruler.y); // distance makes no sense
- - else {
- - double dx, dy;
- - if (gp4mouse.is_log_x) // ratio for log, distance for linear
- - dx = (ruler.x==0) ? 99999 : x / ruler.x;
- - else dx = x - ruler.x;
- - if (gp4mouse.is_log_y) dy = (ruler.y==0) ? 99999 : y / ruler.y;
- - else dy = y - ruler.y;
- - if (mouse_mode==MOUSE_COORDINATES_REAL)
- - sprintf(p," ruler: [%g,%g] distance: %g;%g",ruler.x,ruler.y,dx,dy);
- - // polar coords of distance (axes cannot be logarithmic)
- - if (bMousePolarDistance && !gp4mouse.is_log_x && !gp4mouse.is_log_y) {
- - double rho = sqrt((x-ruler.x)*(x-ruler.x)+(y-ruler.y)*(y-ruler.y));
- - double phi = (180/M_PI)*atan2(y-ruler.y,x-ruler.x);
- - strcat(s,p);
- - sprintf(p," (%g;%.4g°)",rho,phi);
- - }
- - }
- - strcat(s,p);
- - }
- -
- GpiCharStringAt(hps,&pt,(long)strlen(s),s);
- WinReleasePS(hps);
-
- @@ -653,6 +666,7 @@ case WM_BUTTON1DBLCLK:
-
- case WM_BUTTON2CLICK: // WM_BUTTON2UP:
- if (IGNORE_MOUSE) return 0L;
- + if (!input_from_PM_Terminal) return 0L;
- // make zoom
- {
-
- @@ -720,7 +734,7 @@ case WM_BUTTON3UP: // WM_BUTTON3DBLCLK:
- SHORT mx=MOUSEMSG(&message)->x; // mouse position
- SHORT my=MOUSEMSG(&message)->y;
- char s[256];
- - POINTL pt;
- + POINTL pt, pt1;
- double x,y;
- HPS hps = WinGetPS(hWnd);
-
- @@ -731,6 +745,13 @@ case WM_BUTTON3UP: // WM_BUTTON3DBLCLK:
- GpiSetCharMode(hps,CM_MODE1);
- pt.x = mx; pt.y = my;
- GpiCharStringAt(hps,&pt,(long)strlen(s),s);
- + // Mark point to which the annotation relates
- + GpiMove(hps,&pt);
- + pt1.x = mx-5; pt1.y = my-3;
- + GpiLine(hps,&pt1);
- + GpiMove(hps,&pt);
- + pt1.x = mx-3; pt1.y = my-5;
- + GpiLine(hps,&pt1);
- WinReleasePS(hps);
- }
- return 0L; // end of case WM_BUTTON3...
- @@ -982,7 +1003,8 @@ MRESULT WmClientCmdProc(HWND hWnd, ULONG
- sprintf(s,"set xr[%g:%g];set yr[%g:%g];rep",unzoom_xmin,unzoom_xmax,unzoom_ymin,unzoom_ymax);
- // make the command as short as possible so that it prints on one line
- TextToClipboard ( s );
- - sprintf(input_from_PM_Terminal,"%s",s); //fraba: send the command to gnuplot
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"%s",s); //fraba: send the command to gnuplot
- }
- return 0L;
-
- @@ -1013,13 +1035,16 @@ MRESULT WmClientCmdProc(HWND hWnd, ULONG
- case IDM_MOUSE_GRID:
- if (bhave_grid) { //fraba
- bhave_grid = FALSE;
- - sprintf(input_from_PM_Terminal,"set nogrid; replot");
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"set nogrid; replot");
- } else {
- bhave_grid = TRUE;
- #if 0 /* 0 ... main grid, 1 ... fine grid */
- - sprintf(input_from_PM_Terminal,"set grid; replot");
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"set grid; replot");
- #else
- - sprintf(input_from_PM_Terminal,"set mxtics 2; set mytics 2; set grid x y mx my; replot");
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal,"set mxtics 2; set mytics 2; set grid x y mx my; replot");
- #endif
- }
- return 0L;
- @@ -1028,8 +1053,9 @@ MRESULT WmClientCmdProc(HWND hWnd, ULONG
- // NOTE: if log, then take care of positive y min!
- if (bhave_log) { //fraba
- bhave_log = FALSE;
- - sprintf(input_from_PM_Terminal, "set nolog y; replot" );
- - } else {
- + if (input_from_PM_Terminal)
- + sprintf(input_from_PM_Terminal, "set nolog y; replot" );
- + } else if (input_from_PM_Terminal) {
- if (gp4mouse.ymin <= 0 || gp4mouse.ymax <= 0) {
- sprintf(input_from_PM_Terminal, "# Hey! y range must be greater than 0 for log scale.");
- DosBeep(300,10);
- @@ -1422,6 +1448,23 @@ HPS InitScreenPS()
- LCOL_RESET,
- LCOLF_CONSECRGB,
- 0, nColour, alColourTable ) ;
- + if (!lCols_init) {
- + int i = -1;
- +
- + lCols_init = 1;
- + GpiQueryLogColorTable( hpsScreen, 0, 0, 16, alColourTable + 2 ) ;
- + alColourTable[2+CLR_WHITE] = 0xffffff; // -2
- + alColourTable[2+CLR_BLACK] = 0; // -1
- + bkColor = alColourTable[2+CLR_BACKGROUND];
- + while (i++ < 16) {
- + if (alColourTable[2+lCols[i]] == bkColor) {
- + while (i++ < 16)
- + lCols[i - 1] = lCols[i];
- + lCols_num--;
- + break;
- + }
- + }
- + }
- return hpsScreen ;
- }
-
- @@ -1706,8 +1749,10 @@ server:
- sprintf( mouseShareMemName, "\\SHAREMEM\\GP%i_Mouse_Input", (int)ppidGnu ); //PM 11.5.1999
- if (DosGetNamedSharedMem(&input_from_PM_Terminal, //fraba
- mouseShareMemName,
- - PAG_WRITE))
- - DosBeep(1440L,1000L); /* indicates error */
- + PAG_WRITE)) {
- + /* DosBeep(1440L,1000L); */ /* error indicated by graying menus */
- + input_from_PM_Terminal = 0;
- + }
-
- // DosPostEventSem( semStartSeq ) ; /* once we've got pidGnu */
- WinPostMsg( hApp, WM_GPSTART, 0, 0 ) ;
- @@ -1902,7 +1947,7 @@ server:
- DosExitCritSec() ;
- BufRead(hRead, str, len*sizeof(int), &cbR) ;
- lCurCol = GpiQueryColor( hps ) ;
- - GpiSetColor( hps, CLR_BLACK ) ;
- + GpiSetColor( hps, CLR_NEUTRAL ) ;
- sw = QueryTextBox( hps, strlen(str), str ) ;
- switch(jmode) {
- case LEFT: sw = 0; break;
- @@ -1974,7 +2019,7 @@ server:
- else GpiSetLineWidthGeom( hps, linewidth ) ;
- if( lt < 0 ) lt = 0 ;
- lt = (lt%8);
- - col = (col+2)%16 ;
- + col = (col+2) % lCols_num;
- GpiLabel( hps, lLineTypes[lt] ) ;
- lOldLine=lt ;
- LType( (bLineTypes||bBW)?lt:0 ) ;
- @@ -1982,7 +2027,7 @@ lOldLine=lt ;
- if( !bBW ) { /* maintain some flexibility here in case we don't want
- the model T option */
- if( bColours ) GpiSetColor( hps, lCols[col] ) ;
- - else GpiSetColor( hps, CLR_BLACK ) ;
- + else GpiSetColor( hps, CLR_NEUTRAL ) ;
- }
- }
- break ;
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/readline.c gnuplot-3.7.0.9.my/src/readline.c
- --- gnuplot-3.7.0.9-pm3d-patch/src/readline.c Tue Jun 22 06:59:20 1999
- +++ gnuplot-3.7.0.9.my/src/readline.c Thu Oct 7 02:26:18 1999
- @@ -584,7 +584,7 @@ const char *prompt;
- redraw_line(prompt);
- #endif /* VREPRINT */
- #ifndef USE_MOUSE
- -#ifdef VSUSP
- +#if defined(VSUSP) && defined(SIGTSTP)
- } else if (cur_char == term_chars[VSUSP]) {
- reset_termio();
- kill(0, SIGTSTP);
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/set.c gnuplot-3.7.0.9.my/src/set.c
- --- gnuplot-3.7.0.9-pm3d-patch/src/set.c Fri Mar 2 18:53:02 2001
- +++ gnuplot-3.7.0.9.my/src/set.c Fri Oct 8 00:44:08 1999
- @@ -582,6 +582,10 @@ reset_command()
- pointsize = 1.0;
- encoding = ENCODING_DEFAULT;
-
- +#ifdef PM3D
- + pm3d.where[0] = 0;
- +#endif
- +
- init_locale();
- clear_loadpath();
-
- diff -pru gnuplot-3.7.0.9-pm3d-patch/src/stdfn.c gnuplot-3.7.0.9.my/src/stdfn.c
- --- gnuplot-3.7.0.9-pm3d-patch/src/stdfn.c Sat Jun 19 15:55:04 1999
- +++ gnuplot-3.7.0.9.my/src/stdfn.c Thu Oct 7 02:53:28 1999
- @@ -416,7 +416,7 @@ size_t n;
- * based in misc.c(instring) */
- size_t
- gp_strcspn(str1, str2)
- -const char *str1, str2;
- +const char *str1, *str2;
- {
- char *s;
- size_t pos;
-