MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / SetExec

Method SetExec

Applications/Shell/menu.cpp:84–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 1

InitializeMenuFunction · 0.80

Calls 3

strdupFunction · 0.85
lengthMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected