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

Re: [PATCH] Fix encoding bug of 'svnserve -h' (was: [PATCH] svnserve -h)

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-11-07 00:18:59 CET

Index: subversion/include/svn_opt.h
===================================================================
--- subversion/include/svn_opt.h (revision 11748)
+++ subversion/include/svn_opt.h (working copy)
@@ -139,6 +139,9 @@
 /**
  * Print an option @a opt nicely into a @a string allocated in @a pool.
  * If @a doc is set, include the generic documentation string of option.
+ *
+ * When you write @a string to stdout/stderr, note that the documentation
+ * string is localized even if it is not marked with N_() in its definition.

You could skip the part about stout/stderr. Just point out that the
docstring is translated to the current locale.

  */
 void
 svn_opt_format_option (const char **string,
Index: subversion/svnserve/main.c
===================================================================
--- subversion/svnserve/main.c (revision 11748)
+++ subversion/svnserve/main.c (working copy)
@@ -142,7 +142,7 @@
     {
       const char *optstr;
       svn_opt_format_option(&optstr, svnserve__options + i, TRUE, pool);
- fprintf(stdout, " %s\n", optstr);
+ svn_error_clear (svn_cmdline_fprintf(stdout, pool, " %s\n", optstr));
     }
   fprintf(stdout, "\n");
   exit(1);

I understand that your goal was to create a minimal patch for the next
patch release. But I think you should at least be consistent about what
output routines you use in this function.

Thanks for keeping a eye on encoding bugs,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Nov 7 00:09:17 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.