FVWM: parsing in restart_function() in fvwm/builtins.c?

From: Dan Astoorian <djast_at_ppp12.utopia.csas.com>
Date: Wed, 20 Aug 1997 21:39:38 -0400

Here's a bug that's been a mild annoyance to me for a while; I
mentioned it when 2.0.44 came out, but it still seems to be there in
2.0.46....

I use FvwmButtons, with this line included in the configuration:

    *FvwmButtons Restart icon.xpm Restart fvwm2

...but whenever I use the button, a warning message is produced:

    [FVWM][Done]: <<ERROR>> Call of 'fvwm2
    ' failed!!!!

When FvwmButtons sends commands to fvwm2, it includes the trailing
newline, and fvwm2 isn't parsing it out, so it tries to start a command
named "fvwm2\n".

This would particularly be a problem if one wanted to start a different
window manager from FvwmButtons, since there's no way to get FvwmButtons
to suppress the newline, and as it stands, no way to get fvwm2 to ignore
it.

Would it break anything if restart_function() were changed to parse out
the first word after the command? I.e., change:

    void restart_function(XEvent *eventp,Window w,FvwmWindow *tmp_win,
                          unsigned long context, char *action, int *Module)
    {
      Done(1, action);
    }

to something along the lines of:

    void restart_function(XEvent *eventp,Window w,FvwmWindow *tmp_win,
                          unsigned long context, char *action, int *Module)
    {
      char *arg=NULL;

      action = GetNextToken(action,&arg);
      if (!(arg && *arg)) arg="fvwm2";
      Done(1, arg);
    }

Comments? (Chuck, could this be fixed in 2.0.47?)

Thanks,

-- People shouldn't think that it's better to have
Dan Astoorian loved and lost than never loved at all. It's
http://www.utopia.csas.com not, it's better to have loved and won. All
djast_at_utopia.csas.com the other options really suck. --Dan Redican

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Aug 20 1997 - 20:45:52 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST