You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Peter N. Lundblad" <lu...@softhome.net> on 2004/05/12 12:42:44 UTC
[PATCH] svn_cmdline_printf and friends, take2
Hi,
I'm still awaiting feedback about svn_cmdline_f?printf and
svn_cmdline_fputs. Here is the patch again. The only difference is the
addition of comments explaining what we are doing with character
encodings. Might be good to remember the reasoning here.
Regards,
//Peter
Re: [PATCH] svn_cmdline_printf and friends, take2
Posted by "Peter N. Lundblad" <lu...@softhome.net>.
On Wed, 12 May 2004, Erik Huelsmann wrote:
>
> > This is important for strings without format specifiers if I understand
> > correctly. Probably should be done for svn_error_createf too.
>
> That would raise the current requirement of GNU gettext from 0.12 (current)
> to 0.13 (first --flag support). [ Which is fine by me; I just thought you
Maybe not woth it then. printf calls without format specifiers could be
puts instead.
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_cmdline_printf and friends, take2
Posted by Erik Huelsmann <e....@gmx.net>.
> > And it would be useful to add the --flag option to the xgettext
> > invocation so that format strings are properly marked as such.
> >
> This is important for strings without format specifiers if I understand
> correctly. Probably should be done for svn_error_createf too.
That would raise the current requirement of GNU gettext from 0.12 (current)
to 0.13 (first --flag support). [ Which is fine by me; I just thought you
ought to know ]
bye,
Erik.
--
"Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
Jetzt aktivieren unter http://www.gmx.net/info
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_cmdline_printf and friends, take2
Posted by "Peter N. Lundblad" <lu...@softhome.net>.
On Wed, 12 May 2004, Nicolás Lichtmaier wrote:
> >+svn_error_t *svn_cmdline_printf (apr_pool_t *pool,
> >+ const char *fmt,
> >+ ...);
> >
> >
>
> By using "printf" subversion has been taking advantage of a GCC feature:
> to report error in format strings. This is a very good thing, as thee
> inconsistencies are common and can be fatal. It would be wise to add the
Very good idea. svn_error_createf already does that.
It seems like APR (apr.h) defines __attribute__ for us if we're not on a
recent enough GCC, so we could probably just add what you proposed. I'll
do that.
> And it would be useful to add the --flag option to the xgettext
> invocation so that format strings are properly marked as such.
>
This is important for strings without format specifiers if I understand
correctly. Probably should be done for svn_error_createf too.
Thanks,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_cmdline_printf and friends, take 3
Posted by "Peter N. Lundblad" <lu...@softhome.net>.
Hi,
On Wed, 12 May 2004, [UTF-8] Branko �^Libej wrote:
> Peter N. Lundblad wrote:
>
> Looks good. +1.
>
r9704. Thanks..
> And now for the big one, actually using these in the code... :-)
>
I'll do this in parts, since, as you say, it will be huge...
Regards,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_cmdline_printf and friends, take 3
Posted by Branko Čibej <br...@xbc.nu>.
Peter N. Lundblad wrote:
>On Wed, 12 May 2004, Nicolás Lichtmaier wrote:
>
>
>
>>>+svn_error_t *svn_cmdline_printf (apr_pool_t *pool,
>>>+ const char *fmt,
>>>+ ...);
>>>
>>>
>>>
>>>
>>By using "printf" subversion has been taking advantage of a GCC feature:
>>to report error in format strings. This is a very good thing, as thee
>>
>>
>
>Updated my patch with __attribute__ declarations for GCC, relying on APR
>to define it to nothing on other compilers.
>
>
Looks good. +1.
And now for the big one, actually using these in the code... :-)
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] svn_cmdline_printf and friends, take 3
Posted by "Peter N. Lundblad" <lu...@softhome.net>.
On Wed, 12 May 2004, Nicolás Lichtmaier wrote:
>
> >+svn_error_t *svn_cmdline_printf (apr_pool_t *pool,
> >+ const char *fmt,
> >+ ...);
> >
> >
>
> By using "printf" subversion has been taking advantage of a GCC feature:
> to report error in format strings. This is a very good thing, as thee
Updated my patch with __attribute__ declarations for GCC, relying on APR
to define it to nothing on other compilers.
//P
Re: [PATCH] svn_cmdline_printf and friends, take2
Posted by Nicolás Lichtmaier <ni...@reloco.com.ar>.
>+svn_error_t *svn_cmdline_printf (apr_pool_t *pool,
>+ const char *fmt,
>+ ...);
>
>
By using "printf" subversion has been taking advantage of a GCC feature:
to report error in format strings. This is a very good thing, as thee
inconsistencies are common and can be fatal. It would be wise to add the
gettext "hint" informing that these functions are "printf like".
It would be:
svn_error_t *svn_cmdline_printf (apr_pool_t *pool,+ const char *fmt,+ ...)
__attribute__ ((format (printf, 2, 3)));
Of course, this should be only done for GCC.
GLib has a macro for this, which is defined to do nothing if !GCC:
http://developer.gnome.org/doc/API/2.0/glib/glib-Miscellaneous-Macros.html#G-GNUC-PRINTF-CAPS
And it would be useful to add the --flag option to the xgettext
invocation so that format strings are properly marked as such.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org