help-gengetopt
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-gengetopt]why are print_version and print_help defined static


From: Berthold Höllmann
Subject: Re: [help-gengetopt]why are print_version and print_help defined static
Date: 30 Jan 2001 17:02:18 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.4

address@hidden (Berthold Höllmann) writes:

> Lorenzo Bettini <address@hidden> writes:
> 
> > Berthold Höllmann wrote:
> > > 
> > > Hello,
> > > 
> > > Why are print_version and print_help defined static in cmdline.c. I
> > > would like to use at least print_help from my programm when i.e. a
> > > given input file can not be found etc.. Why not adding print_version
> > > and print_help to cmdline.h and remove the static specifier?
> > 
> > You're absolutely right: in the next release they'll be non static so
> > that they can be called from the program itself; moreover, one of the
> > next feature, is also to customize, both the help and the version, so
> > that one can print those information in  GNU standard way.
> > 
> > If you feel like making these modifications (or you have already done),
> > please mail them to me :-)
> 
> No, the modifikations weren't done, but they are now. I've added a new
> option
> 
> option  "public-help"   p "make 'print_help' and 'print_version' accessible" n
> 
> to the gengetopt program, which makes print_help and print_version
> avaible to the program. Further I added a command "PURPOSE" to the ggo
> file. This option allows arbitrary characters (including newlines)
> betrween two '"' characters which appear between programname and
> "Usage:".
> 
> Hope this helps
> 
OK, OK, been too fast. To get 'print_help' and 'print_version' into
the generated header file, please add the lines

  if (public_help != NULL)
      printf (""
"void print_version (void) ;\n"
"void print_help (void) ;\n");

to "gm.c" starting with line 306 (in the patched version)

Cheers

Berthold
-- 
       email: address@hidden
   )   tel. : +49 (40) 3 61 49 - 73 74
  (
C[_]  These opinions might be mine, but never those of my employer.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]