VirtualBox

Changeset 64602 in vbox for trunk


Ignore:
Timestamp:
Nov 8, 2016 5:28:25 PM (8 years ago)
Author:
vboxsync
Message:

IPRT: Added RTGetOptNonOptionArrayPtr.

Location:
trunk
Files:
3 edited

Legend:

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

    r62473 r64602  
    377377
    378378/**
     379 * Gets the pointer to the argv entry of the current non-option argument.
     380 *
     381 * This function ASSUMES the previous RTGetOpt() call returned
     382 * VINF_GETOPT_NOT_OPTION and require RTGETOPTINIT_FLAGS_OPTS_FIRST to be
     383 * specified to RTGetOptInit().
     384 *
     385 * @returns Pointer to the argv entry of the current non-option.  NULL if
     386 *          (detectable) precondition isn't fullfilled (asserted)
     387 * @param   pState      The state previously initialized with RTGetOptInit.
     388 */
     389RTDECL(char **) RTGetOptGetNonOptionArrayPtr(PRTGETOPTSTATE pState);
     390
     391/**
    379392 * Print error messages for a RTGetOpt default case.
    380393 *
  • trunk/include/iprt/mangling.h

    r64340 r64602  
    918918# define RTGetOptFetchValue                             RT_MANGLER(RTGetOptFetchValue)
    919919# define RTGetOptInit                                   RT_MANGLER(RTGetOptInit)
     920# define RTGetOptNonOptionArrayPtr                      RT_MANGLER(RTGetOptNonOptionArrayPtr)
    920921# define RTGetOptPrintError                             RT_MANGLER(RTGetOptPrintError)
    921922# define RTHandleClose                                  RT_MANGLER(RTHandleClose)
  • trunk/src/VBox/Runtime/common/misc/getopt.cpp

    r62477 r64602  
    728728
    729729
     730RTDECL(char **) RTGetOptNonOptionArrayPtr(PRTGETOPTSTATE pState)
     731{
     732    AssertReturn(pState->fFlags & RTGETOPTINIT_FLAGS_OPTS_FIRST, NULL);
     733    return &pState->argv[pState->iNext - 1];
     734}
     735RT_EXPORT_SYMBOL(RTGetOptNonOptionArrayPtr);
     736
     737
    730738RTDECL(RTEXITCODE) RTGetOptPrintError(int ch, PCRTGETOPTUNION pValueUnion)
    731739{
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