----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 = _("-f FILENAME ");
> ... etc ...
> #endif /* not HAVE_GETOPT_LONG */
>
> printf(_(" %s output file name\n"), f_option);
> ... etc ...
>
> That seems to reduce the amount of duplication without breaking things
> up into chunks that aren't independent concepts.
Thank you for your comment, Tom.
A slightly more readable version of the above could be:
> #ifdef HAVE_GETOPT_LONG
> char* data_only_option = _("-f, --file=FILENAME ");
> char* blobs_option = _("-b, --blobs ");
> ... etc ...
> #else /* not HAVE_GETOPT_LONG */
> char* data_only_option = _("-f FILENAME ");
> char* blobs_option = _("-b ");
> ... etc ...
> #endif /* not HAVE_GETOPT_LONG */
>
> printf(_(" %s output file name\n"), data_only_option);
> printf(_(" %s include large objects in dump\n"), blobs_option);
> ... etc ...
It loos like better than the current setup.
Either way, something has to be donw about this...
-s
In response to
Responses
pgsql-hackers by date
| Next: | From: Peter Childs | Date: 2003-01-02 08:17:11 |
| Subject: Re: Cast your vote ... |
| Previous: | From: Christopher Kings-Lynne | Date: 2003-01-02 06:43:15 |
| Subject: Re: Cast your vote ... |
pgsql-patches by date
| Next: | From: Serguei Mokhov | Date: 2003-01-02 08:41:57 |
| Subject: more adequate usage msg: pg_controldata.diff |
| Previous: | From: Tom Lane | Date: 2003-01-02 06:34:23 |
| Subject: Re: pg_dump.options.diff |