From: Elena Mamontova Date: Thu, 3 Dec 2015 09:00:45 +0000 (+0200) Subject: Ticket 42. 'DOTCONF++:' removed, 'file' changed to 'File' in the X-Git-Tag: 2.409~174^2~8^2 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/df1494d7585660ac34bdda6118420ea7e939e7bf Ticket 42. 'DOTCONF++:' removed, 'file' changed to 'File' in the snprintf() third parameter in if(lineNum) construction of error() function. The third parameter changed to "%s", fourth parameter removed in the if(realpath() == Null) of setContent() function. --- diff --git a/stglibs/dotconfpp.lib/dotconfpp.cpp b/stglibs/dotconfpp.lib/dotconfpp.cpp index caf5a590..8f766f01 100644 --- a/stglibs/dotconfpp.lib/dotconfpp.cpp +++ b/stglibs/dotconfpp.lib/dotconfpp.cpp @@ -336,7 +336,7 @@ int DOTCONFDocument::setContent(const char * _fileName) char realpathBuf[PATH_MAX]; if(realpath(_fileName, realpathBuf) == NULL){ - error(0, _fileName, "realpath('%s') failed: %s", _fileName, strerror(errno)); + error(0, _fileName, "%s", strerror(errno)); return -1; } @@ -514,9 +514,9 @@ void DOTCONFDocument::error(int lineNum, const char * fileName, const char * fmt char * buf = (char*)mempool->alloc(len); if(lineNum) - (void) snprintf(buf, len, "DOTCONF++: file '%s', line %d: %s\n", fileName, lineNum, msg); + (void) snprintf(buf, len, "File '%s', line %d: %s\n", fileName, lineNum, msg); else - (void) snprintf(buf, len, "DOTCONF++: file '%s': %s\n", fileName, msg); + (void) snprintf(buf, len, "File '%s': %s\n", fileName, msg); if (errorCallback) { errorCallback(errorCallbackData, buf);