6 fpos(const std::string& name, int l = 1, int c = 1) : filename(name), line(l), col(c) {}
9 return filename + ":" + ConvToStr(line) + ":" + ConvToStr(col);
22 std::vector<std::string> reading;
23 std::map<std::string, std::string> vars;
24 ConfigDataHash& output;
25 ConfigFileCache& FilesOutput;
26 std::stringstream& errstr;
28 ParseStack(ServerConfig* conf)
29 : output(conf->config_data), FilesOutput(conf->Files), errstr(conf->errstr)
33 vars["newline"] = vars["nl"] = "\n";
35 bool ParseFile(const std::string& name, int flags);
36 bool ParseExec(const std::string& name, int flags);
37 void DoInclude(ConfigTag* includeTag, int flags);
38 void DoReadFile(const std::string& key, const std::string& file, int flags, bool exec);
41 /** RAII wrapper on FILE* to close files on exceptions */
45 FileWrapper(FILE* file) : f(file) {}
46 operator bool() { return f; }
47 operator FILE*() { return f; }