From fbba835d7efaa4ee1d28bf5c7e2232e53d84af5e Mon Sep 17 00:00:00 2001 From: deva Date: Mon, 5 Jul 2010 09:01:54 +0000 Subject: Remove PRACRO_ prefix from debug macros. --- server/src/macroparser.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'server/src/macroparser.cc') 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) { -- cgit v1.2.3