Term-Gnuplot
view release on metacpan or search on metacpan
gnuterm/README view on Meta::CPAN
Even if all the snow were burnt, ashes would remain.
---------------------------------------------------------------------------
2001/07/24: I made a lot of changes in the expression parser /
evaluator subsystem. The interface from the expression evaluator to
the rest of gnuplot is now through only *one* header file, eval.h. The
headers interpol.h, specfun.h and standard.h are now used only for
communication to eval.c and its helpers. Other modules should #include
only eval.h, or parse.h if they need to handle user input (parse.h
includes eval.h).
I've also renamed all those incomprehendible functions 'aterms()'
through 'hterms()' in parser.c, according to the type of expression
they actually parse. The expression type names follow those in the C
standard grammar. In order of increasing operator precedence:
express --> parse_expression
xterms --> parse_conditional_expression
aterms --> parse_logical_OR_expression
bterms --> parse_logical_AND_expression
cterms --> parse_inclusive_OR_expression
dterms --> parse_exclusive_OR_expression
eterms --> parse_AND_expression
fterms --> parse_equality_expression
gterms --> parse_relational_expression
hterms --> parse_additive_expression
iterms --> parse_multiplicative_expression
unary --> parse_unary_expression
factor --> parse_primary_expression
Those are the functions that actually parse expressions of a given type
based upon lexical symbols found in the input. A second set of functions
represent the grammar states:
xterm --> accept_logical_OR_expression
aterm --> accept_logical_AND_expression
bterm --> accept_inclusive_OR_expression
cterm --> accept_exclusive_OR_expression
dterm --> accept_AND_expression
eterm --> accept_equality_expression
fterm --> accept_relational_expression
gterm --> accept_additive_expression
hterm --> accept_multiplicative_expression
*******************************************************************************
*******************************************************************************
TECHNICAL DETAILS FOR HOTKEYS/MOUSE COMMUNICATION
=================================================
The communication between a mouseable terminal and the main gnuplot core goes
via structures defined in mousecmn.h. Further, the following terminal entries
are used (see USE_MOUSE #defined code in .trm files):
void XX_set_ruler (int, int);
void XX_set_cursor (int, int, int);
void XX_put_tmptext (int, const char str[]);
void XX_set_clipboard (const char[]);
On OS/2, the communication of these structures between the stand-alone
terminals gnupmdrv.exe or gnuplot_x11.exe and the main gnuplot.exe executable
is implemented by shared memory and an event semaphore.
On Unix, a bidirectional pipe is implemented for the ipc (inter-process)
communication between gnuplot_x11 and gnuplot. The readline interfaces were
modified to listen to both stdin and the ipc file descriptor. (Well, that's
just the usual way). Note that if compiling with gnu readline, you must have a
gnu readline version > 2.2 (3.0). This will not be a major drawback, as 2.2 is
out for years now and the current gnu readline version is 4.0.
On VGAGL, the communication is done by...?
On Windows, the windows terminal is a part of the gnuplot executable
wgnuplot.exe. Thus it is possible to call the executing routine do_event(&ge);
directly, without any communication at all.
History of mouseable terminals:
(*) March 1998: Implementation of mousing in OS/2 Presentation Manager terminal
(Petr Mikulik).
(*) April 1999: Proper implementation of the gnupmdrv-gnuplot communication by
shared memory and event semaphores (Franz Bakan, Petr Mikulik).
(*) October 1999: Mouseable X11 terminal on Unix and OS/2 (Johannes Zellner,
Petr Mikulik).
The stand-alone terminals gnupmdrv.exe and gnuplot_x11(.exe) had full control
over mousing over its displayed graph (all relevant gnuplot structures were
passed into the terminal).
(*) January 2000: Mousing re-implemented by means of new terminal (.trm)
entries, i.e. with a call-back of events passed from the stand-alone terminal
to the main gnuplot (Pieter-Tjerk de Boer, Johannes Zellner, Petr Mikulik).
(*) January 2000: Implemented mousing in vgagl terminal, the fast linux console
terminal (Johannes Zellner).
(*) February 2002: Implemented mousing in windows terminal (Petr Mikulik,
Hans-Bernhard Broeker).
*******************************************************************************
*******************************************************************************
TECHNICAL DETAILS FOR FAST MOUSE ROTATION OF 3D SURFACES
========================================================
For splots (3d) the data of all surfaces of the current graph are cached and
can therefore be redrawn very quickly, without rereading and reparsing the
input files. This enables smooth rotating and zooming of splots. Note that
gnuplot frees the allocated data of the current graph when it starts to plot a
new graph.
*******************************************************************************
*******************************************************************************
( run in 1.800 second using v1.01-cache-2.11-cpan-2398b32b56e )