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

Re: [PATCH] Preview of printf -> svn_cmdline_printf etc.

From: Erik Huelsmann <e.huelsmann_at_gmx.net>
Date: 2004-05-17 21:16:34 CEST


> I am now starting the work of replacing printf, fprintf and fputs with the
> corresponding svn_cmdline_* variants. This patch is only the beginning to
> give everybody a chance to see what it will look like with the current
> implementation of these three functions. Because we have both a longer
> function name and SVN_ERR and we need to not have longer lines than 80
> cols (I'm on such a TTY, so I won't break it intentionally:-), the message
> strings will be split into many lines sometimes. I don't see a way to
> avoid this, though.

Some parts of the code move the opening paren to the next line. When you
use emacs, it then indents the lines near the beginning of the function name
it belongs to.

Index: subversion/clients/cmdline/propdel-cmd.c
--- subversion/clients/cmdline/propdel-cmd.c (revision 9747)
+++ subversion/clients/cmdline/propdel-cmd.c (arbetskopia)
@@ -31,6 +31,7 @@
 #include "svn_delta.h"
 #include "svn_error.h"
 #include "svn_utf.h"
+#include "svn_path.h"
 #include "cl.h"
@@ -92,11 +93,10 @@
                                        &rev, FALSE, ctx, pool));
       if (! opt_state->quiet)
- const char *pname_stdout;
- SVN_ERR (svn_cmdline_cstring_from_utf8 (&pname_stdout,
- pname_utf8, pool));
- printf (_("property '%s' deleted from repository revision
- pname_stdout, rev);
+ SVN_ERR (svn_cmdline_printf (pool,
+ _("property '%s' deleted from"
+ " repository revision %ld\n"),
+ pname_utf8, rev));
   else if (opt_state->start_revision.kind != svn_opt_revision_unspecified)

The above example would then be wrapped as:

+ (svn_cmdline_printf
+ (pool,
+ _("property '%s' deleted from repository revision %ld\n"),
+ pname_utf8, rev));

(bad example though, because the string didn't fit any better on the line,
but I think you get the idea?)



NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/dsl
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 17 21:17:49 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.