| 951 | } |
| 952 | |
| 953 | bool execfile(const char *cfgfile) |
| 954 | { |
| 955 | string s; |
| 956 | copystring(s, cfgfile); |
| 957 | setcontext("file", cfgfile); |
| 958 | bool oldpersist = persistidents; |
| 959 | char *buf = loadfile(path(s), NULL); |
| 960 | if(!buf) |
| 961 | { |
| 962 | resetcontext(); |
| 963 | return false; |
| 964 | } |
| 965 | if(!currentcontextisolated && !strstr(s, "docs.cfg")) cleancubescript(buf); |
| 966 | execute(buf); |
| 967 | delete[] buf; |
| 968 | resetcontext(); |
| 969 | persistidents = oldpersist; |
| 970 | return true; |
| 971 | } |
| 972 | |
| 973 | void exec(const char *cfgfile) |
| 974 | { |
no test coverage detected