Tom Lane writes:
> > As long as we're spending time on this, why not just write our own version
> > of getopt_long()?
>
> Seems like a fine idea to me ... who's volunteering?
Doing it now...
--
Peter Eisentraut [EMAIL PROTECTED]
---(end of broadcast)-
Peter Eisentraut <[EMAIL PROTECTED]> writes:
> As long as we're spending time on this, why not just write our own version
> of getopt_long()?
Seems like a fine idea to me ... who's volunteering?
regards, tom lane
---(end of broadcast)--
Serguei Mokhov writes:
> #if defined(HAVE_GETOPT_LONG)
> #define xo(long,short,desc) printf("%s %s\n", long, desc)
> #else
> #define xo(long,short,desc) printf("%s %s\n", short, desc)
> #endif
>
> seems relatively generic, so it could be used by more than one tool.
As long as we're spending tim
hmmm... hate to resend it, but i have never seen this passing through...
re-attempt
- Original Message -
From: "Serguei Mokhov" <[EMAIL PROTECTED]>
Sent: January 02, 2003 6:37 PM
Subject: Re: [HACKERS] pg_dump.options.diff -- Take III
> - Original Message -
"Serguei Mokhov" <[EMAIL PROTECTED]> writes:
>> But there's no good place to put it. I'd say just stick it into each
>> tool; it's no worse than repeating the existence of a "usage()"
>> subroutine in each tool.
> It ended up being in dumputils.h
I really don't like putting a macro with a name a
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
Sent: January 02, 2003 3:20 PM
> > #if defined(HAVE_GETOPT_LONG)
> > #define xo(long,short,desc) printf("%s %s\n", long, desc)
> > #else
> > #define xo(long,short,desc) printf("%s %s\n", short, desc)
> > #endif
>
> > seems relat
"Serguei Mokhov" <[EMAIL PROTECTED]> writes:
> Now, this:
> #if defined(HAVE_GETOPT_LONG)
> #define xo(long,short,desc) printf("%s %s\n", long, desc)
> #else
> #define xo(long,short,desc) printf("%s %s\n", short, desc)
> #endif
> seems relatively generic, so it could be used by more than one to
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
Sent: January 02, 2003 1:58 PM
> "Serguei Mokhov" <[EMAIL PROTECTED]> writes:
> > Looks good to me, but there is still a little inconvenience
> > of multiline option descriptions, and the above won't handle
> > it nicely.
>
> True
"Serguei Mokhov" <[EMAIL PROTECTED]> writes:
> Looks good to me, but there is still a little inconvenience
> of multiline option descriptions, and the above won't handle
> it nicely.
True, a multiline description would have to look like
xo(_("-f, --file=FILENAME"),
_("-f FI
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
Sent: January 02, 2003 9:29 AM
> Maybe we should not try to be cute, but just do
>
> #if defined(HAVE_GETOPT_LONG)
> #define xo(long,short,desc) printf("%s %s\n", long, desc)
> #else
> #define xo(long,short,desc) printf("%s %s\n
Manfred Koizar <[EMAIL PROTECTED]> writes:
> Just another way to do it:
> #define xo explain_option
> xo("f", "file", "FILENAME", "output file name");
Perhaps better would be:
#if defined(HAVE_GETOPT_LONG)
#define xo(long,short,desc) printf("%-27s %s\n", long, desc)
#else
#define xo(long,
On Thu, 2 Jan 2003 01:44:21 -0500, "Serguei Mokhov" <[EMAIL PROTECTED]> wrote:
>Either way, something has to be donw about this...
Just another way to do it:
#if defined(HAVE_GETOPT_LONG)
#define PARMPREFIX '='
#else
#define PARMPREFIX ' '
#endif
static void
explain_option(char *shortform, char
- Original Message -
From: "Tom Lane" <[EMAIL PROTECTED]>
Sent: January 02, 2003 1:34 AM
> Perhaps it would work better to do something like
>
> #ifdef HAVE_GETOPT_LONG
> char* f_option = _("-f, --file=FILENAME ");
> ... etc ...
> #else /* not HAVE_GETOPT_LONG */
> char* f_option = _
"Serguei Mokhov" <[EMAIL PROTECTED]> writes:
> Attached is an attempt to eliminate duplicate pg_dump
> option descriptions, and have a single description for both
> short and long options. For me, as for a translator, this
> eliminates the need to maintain the two, exactly same, sets of
> 24 sente
Hello,
Happy New Year everyone,
Attached is an attempt to eliminate duplicate pg_dump
option descriptions, and have a single description for both
short and long options. For me, as for a translator, this
eliminates the need to maintain the two, exactly same, sets of
24 sentences.
If this is acc
15 matches
Mail list logo