VirtualBox

Changeset 25317 in vbox


Ignore:
Timestamp:
Dec 11, 2009 10:28:15 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
55895
Message:

iprt/getopt.h: Use RTGetOptPrintError in the example.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/getopt.h

    r24825 r25317  
    236236                         int iFirst, uint32_t fFlags);
    237237
    238 /**
     238/* *
    239239 * Command line argument parser, handling both long and short options and checking
    240240 * argument formats, if desired.
     
    292292
    293293             default:
    294                  if (ch > 0)
    295                  {
    296                      if (RT_C_IS_GRAPH(ch))
    297                          Error("unhandled option: -%c\n", ch);
    298                      else
    299                          Error("unhandled option: %i\n", ch);
    300                  }
    301                  else if (ch == VERR_GETOPT_UNKNOWN_OPTION)
    302                      Error("unknown option: %s\n", ValueUnion.psz);
    303                  else if (ValueUnion.pDef)
    304                      Error("%s: %Rrs\n", ValueUnion.pDef->pszLong, ch);
    305                  else
    306                      Error("%Rrs\n", ch);
    307                  return 1;
     294                 return RTGetOptPrintError(ch, &ValueUnion);
    308295         }
    309296     }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette