getopt.cpp revision ace1bd26de13b01a8f9be12462def436fdb68681
/* $Id$ */
/** @file
* innotek Portable Runtime - Command Line Parsing
*/
/*
* Copyright (C) 2007 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
RTDECL(int) RTGetOpt(int argc, char *argv[], PCRTOPTIONDEF paOptions, size_t cOptions, int *piThis, PRTOPTIONUNION pValueUnion)
{
if ( !piThis
)
return 0;
if (*pszArgThis == '-')
{
{
bool fShort = false;
)
)
{
{
{
case RTGETOPT_REQ_STRING:
break;
case RTGETOPT_REQ_INT32:
{
break;
}
case RTGETOPT_REQ_UINT32:
{
break;
}
default:
return VERR_INTERNAL_ERROR;
}
}
}
}
}
/** @todo Sort options and arguments (i.e. stuff that doesn't start with '-'), stop when
* encountering the first argument. */
return VERR_GETOPT_UNKNOWN_OPTION;
}