int EclCMDShell::processCMD(ArgvIterator &iter) { Owned<IEclCommand> c = factory(cmd.get()); if (!c) { if (cmd.length()) { if (runExternals) return callExternal(iter); fprintf(stderr, "ecl '%s' command not found\n", cmd.sget()); } usage(); return 1; } if (optHelp) { c->usage(); return 0; } if (!c->parseCommandLineOptions(iter)) return 0; if (!c->finalizeOptions(globals)) return 0; return c->processCMD(); }
int EclCMDShell::processCMD(ArgvIterator &iter) { Owned<IEclCommand> c = factory(cmd.get()); if (!c) { if (cmd.length()) { if (runExternals) return callExternal(iter); fprintf(stderr, "ecl '%s' command not found\n", cmd.str()); } usage(); return 1; } if (optHelp) { c->usage(); return 0; } switch (c->parseCommandLineOptions(iter)) { case EclCmdOptionNoMatch: c->usage(); //fall through case EclCmdOptionCompletion: return 0; } if (!c->finalizeOptions(globals)) { c->usage(); return 0; } return c->processCMD(); }