forked from epics_driver_modules/motorBase
Changed diagnostic message macro 'Debug' to Mark Rivers inline variable argument function calls.
This commit is contained in:
+14
-12
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user