windows-nt/Source/XPSP1/NT/com/ole32/dcomss/actdbg/miscdbg.cxx

54 lines
810 B
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
/*
*
* miscdbg.c
*
* Miscellaneous helper routines.
*
*/
#include "actdbg.hxx"
BOOL
ParseArgString(
IN char * pszArgString,
OUT DWORD * pArgc,
OUT char * Argv[MAXARGS]
)
{
char * pszArg;
*pArgc = 0;
memset( Argv, 0, sizeof(Argv) );
if ( ! pszArgString )
return TRUE;
pszArg = pszArgString;
for (;;)
{
while ( *pszArg == ' ' || *pszArg == '\t' )
pszArg++;
if ( *pszArg )
{
if ( MAXARGS == *pArgc )
return FALSE;
Argv[*pArgc] = pszArg;
(*pArgc)++;
}
while ( *pszArg && *pszArg != L' ' && *pszArg != L'\t' )
pszArg++;
if ( ! *pszArg )
break;
*pszArg++ = 0;
}
return TRUE;
}