Corrected compiler error
[rofl0r-motor.git] / src / motormisc.cc
blob282e26acacfe2ae86ce375c9258bba71ff3e6222
1 #include "motormisc.h"
2 #include "kkfsys.h"
4 string findprogram(const string &progname) {
5 static string spath;
7 if(spath.empty()) {
8 spath = getenv("PATH") ? getenv("PATH") : "";
9 if(!spath.empty()) spath += ":";
10 spath += (string) getenv("HOME") + "/.motor";
13 return pathfind(progname, spath);
16 string getparsed(motorproject &pf, const string &placefrom) {
17 pparamslist *p;
18 string r;
19 char *pbuf;
21 p = pparamslist_create();
22 pf.populateparselist(p);
23 r = pbuf = sstrparse(placefrom.c_str(), p);
24 delete pbuf;
25 pparamslist_free(p);
27 return r;