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

Re: [PATCH] Lining up option descriptions in cmdline binary help

From: <cmpilato_at_collab.net>
Date: 2002-04-14 09:17:20 CEST

cmpilato@collab.net writes:

> My brain feels super-mushy right now, so rather than commit this chunk
> of elementary code, I'll send it to the list for review. I feel sure
> that there's some better way to do what I did here (hopefully not
> involving a series of single-space apr_pstrcat's) but the old
> Thinker's coming up shorthanded. At any rate, the SEGFAULT protection
> code needs to be committed.
>
> --
>
> * subversion/clients/cmdline/main.c
>
> (format_option): Fix potential segfault when OPT is NULL. Also,
> stop using tabs to supposedly attempt to line up the documentation
> strings ... it just doesn't work.

For those wondering what this patch was all about, my goal was to turn
this (output from, say, `svn help commit'):

   [...]
   Valid options:
     -m [--message] arg: specify commit message "ARG"
     -F [--file] arg: read data from file ARG
     -q [--quiet]: print as little as possible
     --targets arg: pass contents of file "ARG" as additional args
     --force: force operation to run
     --username arg: specify a username ARG
     --password arg: specify a password ARG
     --xml-file arg: read/write xml to specified file ARG
     -r [--revision] arg: specify revision number ARG (or X:Y range)

into this, which I find soooo much easier to digest:

   [...]
   Valid options:
     -m [--message] arg : specify commit message "ARG"
     -F [--file] arg : read data from file ARG
     -q [--quiet] : print as little as possible
     --targets arg : pass contents of file "ARG" as additional args
     --force : force operation to run
     --username arg : specify a username ARG
     --password arg : specify a password ARG
     --xml-file arg : read/write xml to specified file ARG
     -r [--revision] arg : specify revision number ARG (or X:Y range)

A total picky thing, I know, but programmers need their artistic sides
catered to as well.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Apr 14 09:19:55 2002

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.