Changeset 10222
- Timestamp:
- 03/03/11 19:31:38 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/argv.cc
r10183 r10222 4 4 5 5 using namespace std; 6 7 const string name_mapper(const string &str)8 {9 if (str=="LINUX") return "linux";10 if (str=="PATH") return "path";11 if (str=="DIM_DNS_SERVER") return "dns";12 13 return "";14 }15 6 16 7 // -------------------------------------------------------------------------- … … 118 109 ; 119 110 111 conf.AddEnv("linux", "LINUX"); 112 conf.AddEnv("path", "PATH"); 113 conf.AddEnv("dns", "DIM_DNS_SERVER"); 120 114 121 115 // define translation from position to name … … 125 119 p.add("input-file", -1); // All others go to... 126 120 127 128 121 conf.AddOptionsCommandline(config); 129 122 conf.AddOptionsCommandline(sections); … … 139 132 140 133 conf.SetArgumentPositions(p); 141 142 conf.SetNameMapper(name_mapper);143 134 } 144 135
Note:
See TracChangeset
for help on using the changeset viewer.