summaryrefslogtreecommitdiff
path: root/server/src/macroparser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/macroparser.cc')
-rw-r--r--server/src/macroparser.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/server/src/macroparser.cc b/server/src/macroparser.cc
index 863c52e..eca189e 100644
--- a/server/src/macroparser.cc
+++ b/server/src/macroparser.cc
@@ -54,12 +54,12 @@
void MacroParser::error(const char* fmt, ...)
{
- PRACRO_ERR_LOG(macro, "Error in MacroParser: ");
+ ERR_LOG(macro, "Error in MacroParser: ");
{
va_list argp;
va_start(argp, fmt);
- PRACRO_ERR_LOG_VA(macro, fmt, argp);
+ ERR_LOG_VA(macro, fmt, argp);
va_end(argp);
fprintf(stderr, "\n");
@@ -87,7 +87,7 @@ MacroParser::MacroParser(std::string macrofile)
file = macrofile;
- PRACRO_DEBUG(macro, "Using macro file: %s\n", file.c_str());
+ DEBUG(macro, "Using macro file: %s\n", file.c_str());
fd = open(file.c_str(), O_RDONLY);
if(fd == -1) error("Could not open file %s", file.c_str());
@@ -293,12 +293,12 @@ void MacroParser::endTag(std::string name)
int MacroParser::readData(char *data, size_t size)
{
if(fd == -1) {
- PRACRO_ERR_LOG(macro, "Invalid file descriptor.\n");
+ ERR_LOG(macro, "Invalid file descriptor.\n");
return 0;
}
ssize_t r = read(fd, data, size);
if(r == -1) {
- PRACRO_ERR_LOG(macro, "Could not read...%s\n", strerror(errno));
+ ERR_LOG(macro, "Could not read...%s\n", strerror(errno));
return 0;
}
return r;
@@ -306,10 +306,11 @@ int MacroParser::readData(char *data, size_t size)
void MacroParser::parseError(const char *buf, size_t len, std::string error, int lineno)
{
- PRACRO_ERR_LOG(macro, "MacroParser[%s] error at line %d: %s\n", file.c_str(), lineno, error.c_str());
- PRACRO_ERR_LOG(macro, "\tBuffer %u bytes: [", len);
+ ERR_LOG(macro, "MacroParser[%s] error at line %d: %s\n",
+ file.c_str(), lineno, error.c_str());
+ ERR_LOG(macro, "\tBuffer %u bytes: [", len);
if(fwrite(buf, len, 1, stderr) != len) {}
- PRACRO_ERR_LOG(macro, "]\n");
+ ERR_LOG(macro, "]\n");
char *slineno;
if(asprintf(&slineno, " at line %d\n", lineno) != -1) {