- Timestamp:
- 01/17/18 01:52:37 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/paramtree_stdin_test.cpp
r724 r725 13 13 ParamEntry zero_ending = { 0, 0, 0, 0 }; 14 14 entries.push_back(zero_ending); 15 setParamTab(getParamTab()); 15 16 } 16 17 void addGroup(const char* name) … … 32 33 { 33 34 SString group_names; 34 StdioFILE::setStdio();//setup VirtFILE::Vstdin/out/err 35 StdioFILE::setStdio(); //setup VirtFILE::Vstdin/out/err 36 puts("(loading group names from stdin)"); 35 37 loadSString(VirtFILE::Vstdin, group_names); 36 38 int pos = 0; 37 39 SString line; 38 40 EmptyParamWithGroupsForTesting param; 39 puts("(loading group names from stdin)");40 41 while (group_names.getNextToken(pos, line, '\n')) 41 42 { 42 43 if ((line.len() > 0) && (line[line.len() - 1] == '\r')) //support for reading \r\n files... 43 44 line = line.substr(0, line.len() - 1); 44 if (line.len() > 0 && line[0] != '#') // 45 if (line.len() > 0 && line[0] != '#') //skip empty lines and #commment lines 45 46 param.addGroup(line.c_str()); 46 47 }
Note: See TracChangeset
for help on using the changeset viewer.