|
From: Bastian M. <bma...@we...> - 2005-10-05 12:43:02
Attachments:
win_backlog-20051005.patch
|
Hi, this patch adds two new settings to wgnuplot.ini: `BacklogLength` and `BacklogWidth`. This way a user can adjust the length and width of the internal backlog buffers accordings to his personal preferences. Bastian --=20 Bastian M=E4rkisch Physikalisches Institut, Universit=E4t Heidelberg Philosophenweg 12 69120 Heidelberg |
|
From: Petr M. <mi...@ph...> - 2005-10-05 14:24:40
|
> this patch adds two new settings to wgnuplot.ini: > `BacklogLength` and `BacklogWidth`. This way a user can > adjust the length and width of the internal backlog > buffers accordings to his personal preferences. It compiles well. BTW, what is it "Backlog"? Maybe "CommandScreen"? --- PM |
|
From: Bastian M. <bma...@we...> - 2005-10-05 15:41:11
|
Petr Mikulik wrote: >> this patch adds two new settings to wgnuplot.ini: >> `BacklogLength` and `BacklogWidth`. This way a user can >> adjust the length and width of the internal backlog >> buffers accordings to his personal preferences. >=20 >=20 > It compiles well. > BTW, what is it "Backlog"? Maybe "CommandScreen"? >=20 To me - being a german - 'backlog' did sound like a reasonable name for the display buffer ;). Maybe someone could help with a better name? --=20 Bastian M=E4rkisch Physikalisches Institut, Universit=E4t Heidelberg |
|
From: Robert H. <en...@no...> - 2005-10-05 15:57:24
|
On Wed, 2005-10-05 at 17:40 +0200, Bastian Maerkisch wrote: > > Petr Mikulik wrote: > >> this patch adds two new settings to wgnuplot.ini: > >> `BacklogLength` and `BacklogWidth`. This way a user can > >> adjust the length and width of the internal backlog > >> buffers accordings to his personal preferences. > > > > > > It compiles well. > > BTW, what is it "Backlog"? Maybe "CommandScreen"? > > > > To me - being a german - 'backlog' did sound like a reasonable > name for the display buffer ;). Maybe someone could help with a > better name? > Is this analogous to what would be called a "Scrollback buffer" on a terminal? Rob -- Robert Hart <en...@no...> University of Nottingham This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. |
|
From: Robert H. <en...@no...> - 2005-10-05 15:44:56
|
On Wed, 2005-10-05 at 14:42 +0200, Bastian Maerkisch wrote:
> Hi,
>
> this patch adds two new settings to wgnuplot.ini:
> `BacklogLength` and `BacklogWidth`. This way a user can
> adjust the length and width of the internal backlog
> buffers accordings to his personal preferences.
>
> Bastian
>
> plain text document attachment (win_backlog-20051005.patch)
> diff -ur gnuplot/src/win/wtext.c gnuplot-current/src/win/wtext.c
> --- gnuplot/src/win/wtext.c 2004-07-07 18:56:08.000000000 +0200
> +++ gnuplot-current/src/win/wtext.c 2005-10-05 14:06:48.063228500 +0200
> @@ -323,6 +323,10 @@
> WritePrivateProfileString(section, "TextFont", profile, file);
> wsprintf(profile, "%d", lptw->bSysColors);
> WritePrivateProfileString(section, "SysColors", profile, file);
> + wsprintf(profile, "%d", lptw->ScreenSize.x);
> + WritePrivateProfileString(section, "BacklogWidth", profile, file);
> + wsprintf(profile, "%d", lptw->ScreenSize.x);
Shouldn't one of these by ScreenSize.y?
> + WritePrivateProfileString(section, "BacklogLines", profile, file);
> if (iconic)
> ShowWindow(lptw->hWndParent, SW_SHOWMINIMIZED);
> return;
> @@ -382,6 +386,11 @@
> GetPrivateProfileString(section, "SysColors", "", profile, 80, file);
> if ((p = GetInt(profile, &lptw->bSysColors)) == NULL)
> lptw->bSysColors = 0;
> +
> + if (bOKINI) {
> + lptw->ScreenSize.x = GetPrivateProfileInt(section, "BacklogWidth", 80, file);
> + lptw->ScreenSize.y = GetPrivateProfileInt(section, "BacklogLines", 80, file);
Did you mean 500 here?
> + }
> }
>
>
> --- gnuplot/term/win.trm 2005-08-09 11:07:02.000000000 +0200
> +++ gnuplot-current/term/win.trm 2005-10-05 14:28:23.571548500 +0200
> @@ -609,7 +609,10 @@
> " [WGNUPLOT]",
> " TextOrigin=0 0",
> " TextSize=640 150",
> -" TextFont=Terminal,9",
> +" TextFont=Terminal,9",
> +" SysColors=1",
> +" BacklogWidth=80",
> +" BacklogLines=500",
Or did you mean 80 here?
I think there's a tabs vs. spaces thing going on here. Not sure what
format is preferred, but I'd go with the existing file format.
> " GraphOrigin=0 150",
> " GraphSize=640 330",
> " GraphFont=Arial,10",
> @@ -632,7 +635,9 @@
> " solid line in color mode, or a dashed line in monochrome mode. The default",
> " line width is 1 pixel. If `Linestyle` is negative, it specifies the width of",
> " a SOLID line in pixels. Line1 and any linestyle used with the `points` style",
> -" must be SOLID with unit width.",
> +" must be SOLID with unit width.",
> +" `BacklogWidth` and `BacklogLength` specify the size of the initernal backlog"
> +" of the windows terminal window."
What is the current "hardwired" value, and what is the problem with it?
Would it be possible to come up with a better default? Also what happens
with very large values? Don't you have a 16k limit on the buffer size in
win16? That's only 200 80-character lines.
--
Robert Hart <en...@no...>
University of Nottingham
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
|
|
From: Bastian M. <bma...@we...> - 2005-10-05 16:14:16
|
Robert Hart wrote:
> On Wed, 2005-10-05 at 14:42 +0200, Bastian Maerkisch wrote:
>=20
>>Hi,
>>
>>this patch adds two new settings to wgnuplot.ini:
>>`BacklogLength` and `BacklogWidth`. This way a user can
>>adjust the length and width of the internal backlog
>>buffers accordings to his personal preferences.
>>
>>Bastian
>>
>>plain text document attachment (win_backlog-20051005.patch)
>>diff -ur gnuplot/src/win/wtext.c gnuplot-current/src/win/wtext.c
>>--- gnuplot/src/win/wtext.c 2004-07-07 18:56:08.000000000 +0200
>>+++ gnuplot-current/src/win/wtext.c 2005-10-05 14:06:48.063228500 +0200=
>>@@ -323,6 +323,10 @@
>> WritePrivateProfileString(section, "TextFont", profile, file);
>> wsprintf(profile, "%d", lptw->bSysColors);
>> WritePrivateProfileString(section, "SysColors", profile, file);
>>+ wsprintf(profile, "%d", lptw->ScreenSize.x);
>>+ WritePrivateProfileString(section, "BacklogWidth", profile, file);=
>>+ wsprintf(profile, "%d", lptw->ScreenSize.x);
>=20
> Shouldn't one of these by ScreenSize.y?
Ouch. The second one should have been ScreenSize.y.
>=20
>=20
>>+ WritePrivateProfileString(section, "BacklogLines", profile, file);=
>> if (iconic)
>> ShowWindow(lptw->hWndParent, SW_SHOWMINIMIZED);
>> return;
>>@@ -382,6 +386,11 @@
>> GetPrivateProfileString(section, "SysColors", "", profile, 80, fil=
e);
>> if ((p =3D GetInt(profile, &lptw->bSysColors)) =3D=3D NULL)
>> lptw->bSysColors =3D 0;
>>+
>>+ if (bOKINI) {
>>+ lptw->ScreenSize.x =3D GetPrivateProfileInt(section, "BacklogWidth", =
80, file);
>>+ lptw->ScreenSize.y =3D GetPrivateProfileInt(section, "BacklogLines", =
80, file);
>=20
>=20
> Did you mean 500 here?
No. Current default is 80 for both dimensions.
>=20
>=20
>>+ }
>> }
>>=20
>>
>>--- gnuplot/term/win.trm 2005-08-09 11:07:02.000000000 +0200
>>+++ gnuplot-current/term/win.trm 2005-10-05 14:28:23.571548500 +0200
>>@@ -609,7 +609,10 @@
>> " [WGNUPLOT]",
>> " TextOrigin=3D0 0",
>> " TextSize=3D640 150",
>>-" TextFont=3DTerminal,9",
>>+" TextFont=3DTerminal,9",
>>+" SysColors=3D1",
>>+" BacklogWidth=3D80",
>>+" BacklogLines=3D500",
>=20
>=20
> Or did you mean 80 here?
>=20
> I think there's a tabs vs. spaces thing going on here. Not sure what
> format is preferred, but I'd go with the existing file format.
Sorry for that. Seems like Visual Studio is ignoring my preferences :-(.
But no, both numbers were put in by purpose. It doesn't say in the help
file that the values shown are the default ones. Just an example.
>=20
>=20
>> " GraphOrigin=3D0 150",
>> " GraphSize=3D640 330",
>> " GraphFont=3DArial,10",
>>@@ -632,7 +635,9 @@
>> " solid line in color mode, or a dashed line in monochrome mode. The =
default",
>> " line width is 1 pixel. If `Linestyle` is negative, it specifies the=
width of",
>> " a SOLID line in pixels. Line1 and any linestyle used with the `poin=
ts` style",
>>-" must be SOLID with unit width.",
>>+" must be SOLID with unit width.",
>>+" `BacklogWidth` and `BacklogLength` specify the size of the initernal=
backlog"
>>+" of the windows terminal window."
>=20
>=20
> What is the current "hardwired" value, and what is the problem with it?=
> Would it be possible to come up with a better default? Also what happen=
s
> with very large values? Don't you have a 16k limit on the buffer size i=
n
> win16? That's only 200 80-character lines.
As said above the "hardwired" value is 80 for both dimensions which shoul=
d be
reasonable for most cases. People with large displays may want to avoid
unnecessary line breaks. And I personally like the buffer to be large eno=
ugh
to contain the output of "show all".
I haven't considered 'large' values and I haven't considered Win16.
Would something like this be ok?
#ifdef WIN32
/* wild guess for the limits here */
# define BACKLOG_MAX_LINES 0x1000
# define BACKLOG_MAX_WIDTH 0x400
#else
# define BACKLOG_MAX_LINES 200
# define BACKLOG_MAX_WIDTH 80
#endif
=2E..
lptw->ScreenSize.y =3D GPMIN( GetPrivateProfileInt(section, "BacklogLines=
", 80, file), BACKLOG_MAX_LINES );
lptw->ScreenSize.x =3D GPMIN( GetPrivateProfileInt(section, "BacklogWidth=
", 80, file), BACKLOG_MAX_WIDTH );
--=20
Bastian M=E4rkisch
Physikalisches Institut, Universit=E4t Heidelberg
|
|
From: Petr M. <mi...@ph...> - 2005-10-05 16:31:34
|
It would be useful to set these parameters from a menu / popup menu, instead to search for it in a file. Can the line width be "infinite"? Or even better: cannot it be the number of chars of the terminal window which can be printed (and automatically change it when window size changes)? --- PM |
|
From: Bastian M. <bma...@we...> - 2005-10-05 17:10:49
|
Petr Mikulik wrote: > It would be useful to set these parameters from a menu / popup menu, > instead to search for it in a file. > > Can the line width be "infinite"? Or even better: cannot it be the > number of chars of the terminal window which can be printed (and > automatically change it when window size changes)? That would be nice indeed. But the way it is implemented right now that would be a major change. A dialog would be nice to have, but its not necessary and possibly not worth the effort. We would want to save the value to wgnuplot.ini anyway. Bastian > > --- > PM > |