| 82 | } |
| 83 | |
| 84 | void SetExec(const std::string& e){ |
| 85 | exec = e; |
| 86 | |
| 87 | args.clear(); |
| 88 | |
| 89 | std::string temp; |
| 90 | for(char c : exec){ |
| 91 | if(c == ' '){ |
| 92 | args.push_back(strdup(temp.c_str())); |
| 93 | |
| 94 | temp.clear(); |
| 95 | } else { |
| 96 | temp += c; |
| 97 | } |
| 98 | } |
| 99 | |
| 100 | if(temp.length()){ |
| 101 | args.push_back(strdup(temp.c_str())); // Any args left over? |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | std::string& GetExec(){ |
| 106 | return exec; |
no test coverage detected