#define MICHLIB_NOSOURCE #include "ParseArgs.h" CLArgs ParseArgs(int argc, char** argv) { CLArgs out; out["_name"] = argv[0]; for(int i = 0; i < argc; i++) { MString carg = argv[i]; out["_arg" + MString(i)] = carg; bool namevalue = false; for(size_t c = 0; c < carg.Len(); c++) if(carg[c] == '=') { MString name = carg.SubStr(1, c); MString val = carg.SubStr(c + 2, carg.Len() - c - 1); out[name] = val; namevalue = true; break; } if(!namevalue) out[carg] = ""; } SList sl; michlib_internal::ParseParameterFile("/etc/odm.conf", sl, 0); return out; }