Processed: Re: Bug#458246: report xrdb: filename:, not stdin

2008-01-07 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 tags 458246 +fixed-upstream
Bug#458246: report xrdb: filename:, not stdin
Tags were: patch upstream
Tags added: fixed-upstream

 thank you
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#458246: report xrdb: filename:, not stdin

2008-01-07 Thread Brice Goglin
tags 458246 +fixed-upstream
thank you



Luca Capello wrote:
 Against the Debian package (which is upstream 1.0.4 and the same as the
 upstream git at [1]) and very similar to the WIN32 part:
   

Pushed upstream as commit 09ef847d16333d6ae04c3f88ff7f535381cb9405

Thanks a lot
Brice




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Processed: Re: Bug#458246: report xrdb: filename:, not stdin

2008-01-06 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 tags 458246 + upstream
Bug#458246: report xrdb: filename:, not stdin
There were no tags set.
Tags added: upstream

 tags 458246 + patch
Bug#458246: report xrdb: filename:, not stdin
Tags were: upstream
Tags added: patch

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#458246: report xrdb: filename:, not stdin

2008-01-06 Thread Luca Capello
tags 458246 + upstream
tags 458246 + patch
thanks

Hello!

On Sun, 30 Dec 2007 19:40:09 +0100, Brice Goglin wrote:
 [EMAIL PROTECTED] wrote:
 $ xrdb zz
 stdin:42:20: warning: missing terminating ' character

 I clearly gave it a filename, as the xrdb man page instructs, but
 instead it reports stdin. This causes _many hours_ of chasing down
 the source of errors when used in scripts!

 xrdb invokes cpp with your file as stdin. This first warning comes
 from cpp, that's why the warning talks about stdin, as opposed to
 other warnings that are issued by xrdb itself.

 As always, patches are welcome. Given how simple this program is, it
 would be a good programming exercise for anybody, even a newbie.

Against the Debian package (which is upstream 1.0.4 and the same as the
upstream git at [1]) and very similar to the WIN32 part:

--8---cut here---start-8---
--- x11-xserver-utils-7.3+2/xrdb/xrdb.c.ORG 2006-07-11 04:54:07.0 
+0200
+++ x11-xserver-utils-7.3+2/xrdb/xrdb.c 2008-01-06 20:14:06.0 +0100
@@ -1203,10 +1203,13 @@
 #else
if((cmd = (char *)
malloc(strlen(cpp_program) + strlen(includes.val) + 1 +
-  strlen(defines.val) + 1)) ==
+  strlen(defines.val) + 1 +
+  strlen(filename ? filename : ) + 1)) ==
   NULL)
fatal(%s: Out of memory\n, ProgramName);
-   sprintf(cmd, %s%s %s, cpp_program, includes.val, defines.val);
+   sprintf(cmd, %s%s %s %s, cpp_program,
+   includes.val, defines.val,
+   filename ? filename : );
if (!(input = popen(cmd, r)))
fatal(%s: cannot run '%s'\n, ProgramName, cmd);
free(cmd);
--8---cut here---end---8---

This has been tested on my sid-amd64:
=
[EMAIL PROTECTED]:~/test/x11-xserver-utils-7.3+2/xrdb$ ./configure
[...]
[EMAIL PROTECTED]:~/test/x11-xserver-utils-7.3+2/xrdb$ make
[...]
[EMAIL PROTECTED]:~/test/x11-xserver-utils-7.3+2/xrdb$ make
[empty, waiting for input as expected until CTRL-C]

[EMAIL PROTECTED]:~/test/x11-xserver-utils-7.3+2/xrdb$ ./xrdb -merge 
~/.Xresources
/home/luca/.Xresources:16:13: warning: missing terminating ' character
/home/luca/.Xresources:18:17: warning: missing terminating ' character
/home/luca/.Xresources:20:18: warning: missing terminating ' character
[EMAIL PROTECTED]:~/test/x11-xserver-utils-7.3+2/xrdb$
=

Fixing this bug would mean closing bug #443537: since xrdb calls cpp,
these warnings (not errors) will always be shown.

Thx, bye,
Gismo / Luca

Footnotes: 
[1] http://gitweb.freedesktop.org/?p=xorg/app/xrdb.git;a=summary



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#458246: report xrdb: filename:, not stdin

2007-12-30 Thread jidanni
reopen 458246
retitle 458246 report xrdb: filename:, not stdin
reassign 458246 x11-xserver-utils
thanks

Case 1:
$ xrdb zz
stdin:42:20: warning: missing terminating ' character

I clearly gave it a filename, as the xrdb man page instructs, but
instead it reports stdin. This causes _many hours_ of chasing down
the source of errors when used in scripts!

Case 2:
$ xrdb yy
xrdb: colon missing on line 1, ignoring line

Here it says it's own name, at least.

I have an idea: why doesn't it say both!
xrdb: xx: missing blob at line 47, ...

(Must I supply you with the lines that triggered these? OK, though
irrelevant: j and ! bla'.)



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#458246: report xrdb: filename:, not stdin

2007-12-30 Thread Brice Goglin

[EMAIL PROTECTED] wrote:

$ xrdb zz
stdin:42:20: warning: missing terminating ' character

I clearly gave it a filename, as the xrdb man page instructs, but
instead it reports stdin. This causes _many hours_ of chasing down
the source of errors when used in scripts!
  



xrdb invokes cpp with your file as stdin. This first warning comes from 
cpp, that's why the warning talks about stdin, as opposed to other 
warnings that are issued by xrdb itself.


As always, patches are welcome. Given how simple this program is, it 
would be a good programming exercise for anybody, even a newbie.


Brice




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]