help-gengetopt
[Top][All Lists]
Advanced

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

[help-gengetopt] --no-handle-help|version


From: Papp Gyozo (VBuster)
Subject: [help-gengetopt] --no-handle-help|version
Date: Thu, 08 Nov 2007 18:01:08 +0100

Hi there,

another minor issue I've been faced up now. Even if I add '--no-handle-version' 
the processing of the commandline finishes right after it encounters with a 
'-V' or '--version' option.

My application should behave differently, ie. prints the version of other 
loaded libraries if the required options are given. Now the situation is the 
latter one does not print engine and vdb version to the output:

  vbscan --vdb= ... --engine=... --version ; both --vdb and --engine processed
  vbscan --version --vdb= ... --engine=... ; neither --vdb and --engine 
processed

however in general beside this, gengetopt generated parsers do not deal with 
the exact order of the program arguments.

      switch (c)
        {

        case 'V':       /* Print version and exit.  */
        
          if (update_arg( 0 , 
               0 , &(args_info->version_given),
              &(local_args_info.version_given), optarg, 0, 0, ARG_NO,
              check_ambiguity, override, 0, 0,
              "version", 'V',
              additional_error))
            goto failure;
          getoptions_free (&local_args_info);
          return 0;

          break;

I think this 'return 0' should be gone away? What do you think?

--
Papp, Gyozo
Virusbuster Kft




reply via email to

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