[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 1836 - trunk/subversion/svnadmin trunk/subversion/include trunk/subversion/libsvn_fs trunk/subversion/svnlook trunk/subversion/mod_dav_svn trunk/subversion/clients/cmdline trunk/subversion/tests/libsvn_fs trunk/subversion/tests/libsvn_delta trunk/subversion/libsvn_repos trunk/subversion/libsvn_delta trunk/subversion/libsvn_ra_dav

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-05-01 20:48:41 CEST

kfogel@tigris.org writes:

> Log:
> Centralize the format string for printing revisions. Thanks to Sander
> Striker for the suggestion.
>
> * subversion/include/svn_types.h
> (SVN_REVNUM_T_FMT): New #define.
>
> * everywhere: Use above, instead of "%lu" plus casts.

Lots of places use %ld. For example

libsvn_wc/entries.c:788
libsvn_ra_dav/log.c:268
cmdline/info-cmd.c:150

> Modified: trunk/subversion/include/svn_types.h
> ==============================================================================
> --- trunk/subversion/include/svn_types.h (original)
> +++ trunk/subversion/include/svn_types.h Wed May 1 09:44:04 2002
> @@ -82,6 +82,8 @@
> /* Convert null-terminated C string STR to a revision number. */
> #define SVN_STR_TO_REV(str) ((svn_revnum_t) atol(str))
>
> +/* In printf()-style functions, format revision numbers using this. */
> +#define SVN_REVNUM_T_FMT "lu"

Since it's 'typedef long int svn_revnum_t;' shouldn't that be "ld"?

>
> /* YABT: Yet Another Boolean Type */
> typedef int svn_boolean_t;
>

-- 
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 1 20:49:53 2002

This is an archived mail posted to the Subversion Dev mailing list.