Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromagician committed Apr 10, 2022
1 parent 3b923c9 commit 3d1552a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file modified Bin/MessageBox.exe
Binary file not shown.
7 changes: 4 additions & 3 deletions UTL_Cmd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ UTL_Cmd::~UTL_Cmd()

void UTL_Cmd::Help()
{
_tprintf(_T("MessageBox 0.2\n"));
_tprintf(_T("MessageBox 0.3\n"));
_tprintf(_T(" MessageBox for command line. Amiga Rulez!\n"));
_tprintf(_T("\nUsage:\n"));
_tprintf(_T(" MessageBox [OPTIONS]\n"));
Expand Down Expand Up @@ -40,12 +40,13 @@ void UTL_Cmd::Add(ARGUMENT_TYPE _type, int _num, ...)
va_start(arglist, _num);
for (int x = 0; x < argCount; x++) {
LPCWSTR tmp = va_arg(arglist, LPCWSTR);
arg.text.push_back(tmp);
arg.text.push_back(UTL_Conversion::ToLower(UTL_Conversion::TrimWhiteChar(tmp)));
}
arg.help = va_arg(arglist, LPCWSTR);
arg.pVar = static_cast <void*> (va_arg(arglist, void*));
if (_type == _ENUM) arg.pTable = static_cast <map<wstring, UINT> *> (va_arg(arglist, void*));
else arg.pTable = nullptr;

va_end(arglist);

mArguments.push_back(arg);
Expand Down Expand Up @@ -104,7 +105,7 @@ int UTL_Cmd::ParseCommandLine(int _argc, _TCHAR* _pArgv[], int& _correctParamete
else if (mArguments[a].type == _ENUM) {
i++;
if (i < _argc) {
wstring key = UTL_Conversion::TrimWhiteChar(_pArgv[i]);
wstring key = UTL_Conversion::ToLower(UTL_Conversion::TrimWhiteChar(_pArgv[i]));
auto search = mArguments[a].pTable->find(key);
if (search != mArguments[a].pTable->end()) {
*((UINT*)mArguments[a].pVar) = search->second;
Expand Down
Binary file modified project.rc
Binary file not shown.

0 comments on commit 3d1552a

Please sign in to comment.