|
From: Jürgen W. <wie...@fr...> - 2010-03-17 07:41:50
|
> > A remarkably good bug report. As far as I can see, > > do_string_replot() should not call a function which takes a look at > > the command line. > > I think that part is OK. The idea of the "replot" command is that you can > append a string to it. do_string_replot first executes the old plot > command, then executes the extra string. I know. But that should be done in replot_command() not in replotrequest(). do_string_replot() is called only by other ways like mousing, similar to do_string(), never directly by issuing "replot" from the command line. In those cases, the command line can be in any state and is in no way related to the plot command. > > I am surprised that this has not produced more problems so far. > > Me too. But it seems to be a simple initialization failure. > When stepping through the arguments on a command line, the program > initializes c_token if the current argument is a file name but not > if the current argument is '-'. The first time we do an lf_push(), > it pushes the initial value of c_token. If that value is garbage, > then trouble ensues. Well, after lf_pop() we (hopefully) have exactly the same state as before. And as noone is supposed to have a look at the command line, it is fine to have it uninitialized (btw: should initializing entain num_tokens=0 as well?). Juergen |