|
|
|
@ -5,12 +5,15 @@ CLArgs ParseArgs(int argc, char** argv)
|
|
|
|
|
{ |
|
|
|
|
CLArgs out; |
|
|
|
|
|
|
|
|
|
out["_name"] = argv[0]; |
|
|
|
|
for(int i = 0; i < argc; i++) |
|
|
|
|
out["_nargs"] = MString(argc); |
|
|
|
|
|
|
|
|
|
out["_cmdline"] = out["_name"] = out["_arg0"] = argv[0]; |
|
|
|
|
for(int i = 1; i < argc; i++) |
|
|
|
|
{ |
|
|
|
|
MString carg = argv[i]; |
|
|
|
|
out["_arg" + MString(i)] = carg; |
|
|
|
|
bool namevalue = false; |
|
|
|
|
out["_cmdline"] += " " + carg; |
|
|
|
|
|
|
|
|
|
for(size_t c = 0; c < carg.Len(); c++) |
|
|
|
|
if(carg[c] == '=') |
|
|
|
|