VirtualBox

Changeset 18744 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 6, 2009 11:08:34 AM (16 years ago)
Author:
vboxsync
Message:

Runtime/getopt: provide way to figure out which option definition matched

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/getopt.cpp

    r18100 r18744  
    5353    pState->iNext        = iFirst;
    5454    pState->pszNextShort = NULL;
     55    pState->pDef         = NULL;
    5556
    5657    /* validate the options. */
     
    229230RTDECL(int) RTGetOpt(PRTGETOPTSTATE pState, PRTGETOPTUNION pValueUnion)
    230231{
     232    pState->pDef = NULL;
    231233    /*
    232234     * Make sure the union is completely cleared out, whatever happens below.
     
    466468        }
    467469
     470        pState->pDef = pOpt;
    468471        return pOpt->iShort;
    469472    }
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