Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
581 B

#include "stdafx.h"
#include "cmd.h"
CCmd::CCmd()
{
m_argc = 0;
m_argv = NULL;
}
CCmd::~CCmd()
{
}
CCmd::bInit(int argc, LPSTR argv[])
{
m_argc = argc;
m_argv = argv;
return ParseCmdLine();
}
BOOL CCmd::ParseCmdLine()
{
int argc;
LPTSTR *argv;
argc = m_argc;
argv = m_argv;
if (argc > 1) {
argc--;
argv++;
} else {
return FALSE;
}
while(argc) {
if (ProcessToken(*argv)) {
argc--;
argv++;
} else {
return FALSE;
}
}
return TRUE;
}