Add function to convert a svn_revnum_t to a string.

* subversion/include/svn_types.h:
  (svn_revnum_to_cstring): New function.
* subversion/libsvn_subr/type_conversion.c
  New file.

Index: subversion/include/svn_types.h
===================================================================
--- subversion/include/svn_types.h	(revision 9650)
+++ subversion/include/svn_types.h	(arbetskopia)
@@ -112,7 +112,12 @@
 /** In @c printf()-style functions, format revision numbers using this. */
 #define SVN_REVNUM_T_FMT "ld"
 
+/** Convert @a revnum to an UTF-8 encoded <tt>const char* *</tt> allocated in
+ * @a pool.  */
 
+const char *svn_revnum_to_cstring (svn_revnum_t revnum,
+				   apr_pool_t *pool);
+
 /** The size of a file in the Subversion FS. */
 typedef apr_int64_t svn_filesize_t;
 
Index: subversion/libsvn_subr/type_conversion.c
===================================================================
--- subversion/libsvn_subr/type_conversion.c	(revision 0)
+++ subversion/libsvn_subr/type_conversion.c	(revision 0)
@@ -0,0 +1,38 @@
+/*
+ * type_conversion.c:  various type conversions
+ *
+ * ====================================================================
+ * Copyright (c) 2000-2004 CollabNet.  All rights reserved.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution.  The terms
+ * are also available at http://subversion.tigris.org/license-1.html.
+ * If newer versions of this license are posted there, you may use a
+ * newer version instead, at your option.
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals.  For exact contribution history, see the revision
+ * history and logs, available at http://subversion.tigris.org/.
+ * ====================================================================
+ */
+
+/* ==================================================================== */
+
+
+
+/*** Includes. ***/
+
+#include "svn_types.h"
+
+
+/*** Code. ***/
+
+const char *
+svn_revnum_to_cstring (svn_revnum_t revnum,
+		       apr_pool_t* pool)
+{
+  /* The version number should consist of only decimal digits.
+     Since we only support systems where the execution character set is a
+     subset of ASCII, we don't need to do an UTF-8 conversion.  */
+  return apr_psprintf (pool, "%" SVN_REVNUM_T_FMT, revnum);
+}

Property changes on: subversion/libsvn_subr/type_conversion.c
___________________________________________________________________
Name: svn:eol-style
   + native

