From 23f970b82130b63552ab4c1b8f3ced447d7a5b78 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Sat, 18 Feb 1995 01:50:07 +0000 Subject: [PATCH] const added to pformat declartion so we match ansi C --- src/libCom/errPrintfVX.c | 65 +++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 28 deletions(-) diff --git a/src/libCom/errPrintfVX.c b/src/libCom/errPrintfVX.c index 1e32293a8..4fd20dd58 100644 --- a/src/libCom/errPrintfVX.c +++ b/src/libCom/errPrintfVX.c @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -54,8 +55,8 @@ #define LOCAL static #endif /* LOCAL */ -static int mprintf (char *pFormat, ...); -static int vmprintf (char *pFormat, va_list pvar); +static int mprintf (const char *pFormat, ...); +static int vmprintf (const char *pFormat, va_list pvar); extern FILE *iocLogFile; @@ -69,14 +70,15 @@ LOCAL void errPrintfPVT(void); typedef enum{cmdErrPrintf,cmdEpicsPrint} cmdType; LOCAL struct { - cmdType cmd; - int taskid; - long status; - char *pFileName; - int lineno; - char *pformat; - va_list pvar; - int oldtaskid; + cmdType cmd; + int taskid; + long status; + const char *pFileName; + int lineno; + const char *pformat; + va_list pvar; + int oldtaskid; + int printfStatus; }pvtData; void errInit(void) @@ -107,7 +109,7 @@ LOCAL void epicsPrintTask(void) errPrintfPVT(); break; case (cmdEpicsPrint) : - vmprintf(pvtData.pformat,pvtData.pvar); + pvtData.printfStatus = vmprintf(pvtData.pformat,pvtData.pvar); break; } semGive(clientWaitForCompletion); @@ -115,7 +117,8 @@ LOCAL void epicsPrintTask(void) } -void errPrintf(long status, char *pFileName, int lineno, char *pformat, ...) +void errPrintf(long status, const char *pFileName, + int lineno, const char *pformat, ...) { va_list pvar; @@ -127,7 +130,7 @@ void errPrintf(long status, char *pFileName, int lineno, char *pformat, ...) for (i=0; i