----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.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