|
From: Ethan M. <merritt@u.washington.edu> - 2004-12-21 20:53:41
|
The structure gnuplot uses for event handling is defined in mousecmn.h
struct gp_event_t {
int type; /* see below */
int mx, my; /* current mouse coordinates */
int par1, par2; /* other parameters, depending on the event type */
char text[100]; /* literal command string for type=GE_cmd */
};
As of this morning, there are exactly zero uses of text[] in gnuplot
code, and no instances that generate event types GE_stderr, GE_stdout,
or GE_cmd.
I propose to remove all of these, but there is one bit of OS2-specific
code that puzzles me. At the very end of src/gpexecute.c is this:
/* OS/2 communication via shared memory; coded according to gp_execute() */
#ifdef OS2_IPC
if (input_from_PM_Terminal == NULL)
return;
((char *) input_from_PM_Terminal)[0] = '%';
/* copy the command to shared memory */
memcpy(((char *) input_from_PM_Terminal) + 1, &ge, sizeof(ge));
if (pausing) { /* no communication during pause */
/* DosBeep(440,111); */
((char *) input_from_PM_Terminal)[0] = 0;
return;
}
gp_post_shared_mem();
#endif
Who is at the other end of this communication channel?
Does it go to some external program that thinks it knows sizeof(gp_event_t)?
Is struct gp_event_t (including the 100 char text field) a native
structure in OS2 that gnuplot tries to be compatible with?
Petr:
Could you check whether the attached small patch removing unused
commands and text array breaks the pm terminal?
--
Ethan A Merritt merritt@u.washington.edu
Biomolecular Structure Center
Mailstop 357742
University of Washington, Seattle, WA 98195
|