Revision: 1168 Author: mwhapples@xxxxxxxxx Date: Tue May 6 17:09:19 2014 UTC Log: Change lou_logPrint to accept const char * http://code.google.com/p/liblouis/source/detail?r=1168 Modified: /trunk/liblouis/compileTranslationTable.c /trunk/liblouis/liblouis.h.in /trunk/windows/include/liblouis.h ======================================= --- /trunk/liblouis/compileTranslationTable.c Tue May 6 09:15:32 2014 UTC +++ /trunk/liblouis/compileTranslationTable.c Tue May 6 17:09:19 2014 UTC @@ -184,7 +184,7 @@ } void EXPORT_CALL -lou_logPrint (char *format, ...) +lou_logPrint (const char *format, ...) { #ifndef __SYMBIAN32__ va_list argp; @@ -5165,13 +5165,7 @@ static void defaultLogCallback(int level, const char *message) { - char *tmpMsg = malloc(strlen(message)+1); - if (tmpMsg) - { - strcpy(tmpMsg, message); - lou_logPrint(tmpMsg); - free(tmpMsg); - } + lou_logPrint(message); } static logcallback logCallbackFunction = defaultLogCallback; ======================================= --- /trunk/liblouis/liblouis.h.in Mon Apr 28 17:08:29 2014 UTC +++ /trunk/liblouis/liblouis.h.in Tue May 6 17:09:19 2014 UTC @@ -116,7 +116,7 @@ int *outlen, formtype *typeform, char *spacing, int *outputPos, int *inputPos, int *cursorPos, int mode); - void EXPORT_CALL lou_logPrint (char *format, ...); + void EXPORT_CALL lou_logPrint (const char *format, ...); /* prints error messages to a file */ void EXPORT_CALL lou_logFile (const char *filename); ======================================= --- /trunk/windows/include/liblouis.h Mon Apr 28 17:08:29 2014 UTC +++ /trunk/windows/include/liblouis.h Tue May 6 17:09:19 2014 UTC @@ -105,7 +105,7 @@ formtype *typeform, char *spacing, int *outputPos, int *inputPos, int *cursorPos, int mode); - void EXPORT_CALL lou_logPrint (char *format, ...); + void EXPORT_CALL lou_logPrint (const char *format, ...); /* prints error messages to a file */ void EXPORT_CALL lou_logFile (const char *filename); For a description of the software, to download it and links to project pages go to http://www.abilitiessoft.com