Echo only issue %s

2013-04-16 Thread Dominique Michel
After updating from fvwm-2.6.5 to 2.6.6 (from cvs), the Echo command
stopped to work. I have a few of them. As example

Echo Amiga recipe loading from $.

return

[fvwm][]: 
Echo %s

Any Echo statement always return 'Echo %s' now. And the output at
stderr is on 2 lines when it is one 1 line with 2.6.5

Dominique
 
-- 
"We have the heroes we deserve."



Re: Echo only issue %s

2013-04-16 Thread Thomas Adam
On Tue, Apr 16, 2013 at 11:13:45AM +0200, Dominique Michel wrote:
> After updating from fvwm-2.6.5 to 2.6.6 (from cvs), the Echo command
> stopped to work. I have a few of them. As example
> 
>   Echo Amiga recipe loading from $.
> 
> return
> 
> [fvwm][]: 
> Echo %s
> 
> Any Echo statement always return 'Echo %s' now. And the output at
> stderr is on 2 lines when it is one 1 line with 2.6.5

Try the patch attched.

-- Thomas Adam
Index: fvwm/misc.c
===
RCS file: /home/cvs/fvwm/fvwm/fvwm/misc.c,v
retrieving revision 1.151.4.1
diff -u -p -r1.151.4.1 misc.c
--- fvwm/misc.c	22 Jan 2013 08:32:35 -	1.151.4.1
+++ fvwm/misc.c	16 Apr 2013 10:09:54 -
@@ -340,7 +340,7 @@ Bool UngrabEm(int ungrab_context)
 */
 static char *fvwm_msg_strings[] =
 {
-	"<> ", "", "", "<> ", "<> ", "<> "
+	"<> ", "Echo", "", "<> ", "<> ", "<> "
 };
 
 void fvwm_msg(fvwm_msg_t type, char *id, char *msg, ...)
@@ -384,19 +384,19 @@ void fvwm_msg(fvwm_msg_t type, char *id,
 
 	if (type == ECHO)
 	{
-		/* user echos must be printed as a literal string */
-		fprintf(stderr, "%s\n", msg);
+		printf(stderr, "%s", msg);
+		return;
 	}
-	else
+
+	if (type != ERR)
 	{
 		va_start(args, msg);
-		asprintf(&mfmt, "%s\n", msg);
+		asprintf(&mfmt, "%s", msg);
 		vfprintf(stderr, mfmt, args);
 		va_end(args);
 		free(mfmt);
 	}
-
-	if (type == ERR)
+	else
 	{
 		/* I hate to use a fixed length but this will do for now */
 		char tmp[2 * MAX_TOKEN_LENGTH];


CVS tadam: Fix Echo command displaying messages

2013-04-16 Thread cvs
CVSROOT:/home/cvs/fvwm
Module name:fvwm
Changes by: tadam   13/04/16 09:53:26

Modified files:
fvwm   : Tag: branch-2_6 builtins.c misc.c 

Log message:
Fix Echo command displaying messages

This fixes Echo when using fvwm_msg()




CVS tadam: Changelog for previous commit.

2013-04-16 Thread cvs
CVSROOT:/home/cvs/fvwm
Module name:fvwm
Changes by: tadam   13/04/16 09:55:36

Modified files:
.  : Tag: branch-2_6 ChangeLog 

Log message:
Changelog for previous commit.




Re: CVS tadam: Fix Echo command displaying messages

2013-04-16 Thread Dan Espen
c...@math.uh.edu writes:

> CVSROOT:  /home/cvs/fvwm
> Module name:  fvwm
> Changes by:   tadam   13/04/16 09:53:26
>
> Modified files:
>   fvwm   : Tag: branch-2_6 builtins.c misc.c 
>
> Log message:
> Fix Echo command displaying messages
>
> This fixes Echo when using fvwm_msg()

I saw some bad echos during testing, but I think I saw some good ones
too.  I eventually decided everything was okay since I wasn't messing
with the echo code.

-- 
Dan Espen



Re: CVS tadam: Fix Echo command displaying messages

2013-04-16 Thread Dominique Michel
Le Tue, 16 Apr 2013 09:53:26 -0500,
c...@math.uh.edu a écrit :

> CVSROOT:  /home/cvs/fvwm
> Module name:  fvwm
> Changes by:   tadam   13/04/16 09:53:26
> 
> Modified files:
>   fvwm   : Tag: branch-2_6 builtins.c misc.c 
> 
> Log message:
> Fix Echo command displaying messages
> 
> This fixes Echo when using fvwm_msg()
> 

I didn't see that before, sorry, but now it is another issue.
The Echo statements are working fine, but when I have a button
with some binding on a non existing function, it is no error message
any more. Before, it was something like:

[fvwm][menu_func]: <> No such menu /Speed
[fvwm][__execute_function]: <> No such command 'Music-Seek'

Now, fvwm is completely silent..
Dominique

> 


-- 
"We have the heroes we deserve."



Re: CVS tadam: Fix Echo command displaying messages

2013-04-16 Thread Thomas Adam
On Tue, Apr 16, 2013 at 05:43:09PM +0200, Dominique Michel wrote:
> Le Tue, 16 Apr 2013 09:53:26 -0500,
> c...@math.uh.edu a écrit :
> 
> > CVSROOT:/home/cvs/fvwm
> > Module name:fvwm
> > Changes by: tadam   13/04/16 09:53:26
> > 
> > Modified files:
> > fvwm   : Tag: branch-2_6 builtins.c misc.c 
> > 
> > Log message:
> > Fix Echo command displaying messages
> > 
> > This fixes Echo when using fvwm_msg()
> > 
> 
> I didn't see that before, sorry, but now it is another issue.
> The Echo statements are working fine, but when I have a button
> with some binding on a non existing function, it is no error message
> any more. Before, it was something like:
> 
> [fvwm][menu_func]: <> No such menu /Speed
> [fvwm][__execute_function]: <> No such command 'Music-Seek'

Works for me.  Can you show me the config part which fails?

-- Thomas Adam