bool CmdHelper::isMissingParms(int n/* = 0*/) { // At 2nd level we expect: // <Prog> <Command> [<ParmList>] [<OptList>] // // Returns false if any kind of help is advisable // and true if all looks good and nobody want help. if(wantHelp()) { initPrinting(); return true; } Option saveInqOpt = mInqOpt; if(mMandatory.size()) { foreach(const StrSet& mo, mMandatory) { bool ok = false; QString opts; foreach(const QString& o, mo) { if(has(o)) { ok = true; break; } opts.append(" --" + o); } if(!ok) error(FUNC, tr("One of these options is mandatory:%1").arg(opts)); }
bool CmdHelper::needHelp(int level) { if(mHelpLevel != level) return false; initPrinting(); return true; }
void doConversion(void **name) { char *newName = *name; initErrorFile(newName); initExpandToken(); initSymbolTable(); newName = initTokenizer(newName); initPrinting(newName); cparseInterface(); zapPrinting(); zapTokenizer(); zapSymbolTable(); zapExpandToken(); zapStringTable(); zapErrorFile(); }