Changeset 13673 for trunk/FACT++
- Timestamp:
- 05/12/12 12:43:06 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Main.h
r13650 r13673 34 34 ("cmd", vars<string>(), "Execute one or more commands at startup") 35 35 ("exec,e", vars<string>(), "Execute one or more scrips at startup ('file:N' - start at label N)") 36 ("arg:*", var<string>(), "Arguments for script execution, e.g. --val:ra='12.5436'") 36 37 ("quit", po_switch(), "Quit after startup"); 37 38 ; … … 128 129 io_service.Write(now, "\\----------------------- Options ------------------------"); 129 130 const multimap<string,string> mmap = conf.GetOptions(); 130 for ( multimap<string,string>::const_iteratorit=mmap.begin(); it!=mmap.end(); it++)131 for (auto it=mmap.begin(); it!=mmap.end(); it++) 131 132 io_service.Write(now, ": "+it->first+(it->second.empty()?"":" = ")+it->second); 133 134 const map<string,string> &args = conf.GetOptions<string>("arg:"); 135 if (args.size()>0) 136 { 137 io_service.Write(now, "------------------------ Arguments ----------------------", MessageImp::kMessage); 138 139 for (auto it=args.begin(); it!=args.end(); it++) 140 { 141 ostringstream str; 142 str.setf(ios_base::left); 143 str << ": " << it->first << " = " << it->second; 144 io_service.Write(now, str.str(), MessageImp::kMessage); 145 } 146 } 147 132 148 io_service.Write(now, "\\------------------- Evaluating options -----------------"); 133 149 const int rc = io_service.EvalOptions(conf); … … 146 162 147 163 size_t max = 0; 148 for ( map<string,string>::const_iteratorit=wco.begin(); it!=wco.end(); it++)164 for (auto it=wco.begin(); it!=wco.end(); it++) 149 165 if (it->second.length()>max) 150 166 max = it->second.length(); 151 167 152 for ( map<string,string>::const_iteratorit=wco.begin(); it!=wco.end(); it++)168 for (auto it=wco.begin(); it!=wco.end(); it++) 153 169 { 154 170 ostringstream str; … … 180 196 const vector<string> v2 = conf.Vec<string>("exec"); 181 197 for (vector<string>::const_iterator it=v2.begin(); it!=v2.end(); it++) 182 shell.Execute(*it );198 shell.Execute(*it, args); 183 199 184 200 if (!conf.Get<bool>("quit"))
Note:
See TracChangeset
for help on using the changeset viewer.