windows-nt/Source/XPSP1/NT/windows/feime/fe/infcat/cmd.cpp
2020-09-26 16:20:57 +08:00

46 lines
581 B
C++

#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;
}