Changed diagnostic message macro 'Debug' to Mark Rivers inline variable argument function calls.

This commit is contained in:
Ron Sluiter
2011-11-29 21:52:25 +00:00
parent 5da19bdf31
commit a491da41f4
+14 -12
View File
@@ -3,9 +3,10 @@ FILENAME... drvPIC848.cc
USAGE... Motor record driver level support for Physik Instrumente (PI)
GmbH & Co. C-848 motor controller.
Version: $Revision: 1.3 $
Modified By: $Author: sluiter $
Last Modified: $Date: 2007-10-17 19:55:42 $
Version: $Revision$
Modified By: $Author$
Last Modified: $Date$
HeadURL: $URL$
*/
/*
@@ -61,17 +62,18 @@ DESIGN LIMITATIONS...
#define BUFF_SIZE 100 /* Maximum length of string to/from PIC848 */
/*----------------debugging-----------------*/
#ifdef __GNUG__
#ifdef DEBUG
#define Debug(l, f, args...) { if(l<=drvPIC848debug) printf(f,## args); }
#else
#define Debug(l, f, args...)
#endif
#else
#define Debug()
#endif
volatile int drvPIC848debug = 0;
extern "C" {epicsExportAddress(int, drvPIC848debug);}
static inline void Debug(int level, const char *format, ...) {
#ifdef DEBUG
if (level < drvPIC848debug) {
va_list pVar;
va_start(pVar, format);
vprintf(format, pVar);
va_end(pVar);
}
#endif
}
/* --- Local data. --- */
int PIC848_num_cards = 0;