git://git.jankratochvil.net
/
vblib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added "vbtest" for simple library testing, command mode is implemented.
[vblib.git]
/
vblib.h
diff --git
a/vblib.h
b/vblib.h
index
0b3e93c
..
c40f47d
100644
(file)
--- a/
vblib.h
+++ b/
vblib.h
@@
-69,10
+69,10
@@
****************************/
#ifndef VB_LOG
****************************/
#ifndef VB_LOG
-#define VB_LOG(lev,msg
...) fprintf(stderr,VB_LOG_##lev ##msg
)
+#define VB_LOG(lev,msg
,args...) fprintf(stderr,VB_LOG_##lev msg "\n", ##args
)
#endif
#ifndef VB_FATAL
#endif
#ifndef VB_FATAL
-#define VB_FATAL(lev,msg
...) do { VB_LOG(lev, ##msg
); exit(EXIT_FAILURE); } while (0)
+#define VB_FATAL(lev,msg
,args...) do { VB_LOG(lev,msg , ##args
); exit(EXIT_FAILURE); } while (0)
#endif
#define VB_LOG_DEBUG "VB_Debug: "
#endif
#define VB_LOG_DEBUG "VB_Debug: "
@@
-98,6
+98,10
@@
#ifndef __NORETURN
#define __NORETURN __attribute__((__noreturn__))
#endif
#ifndef __NORETURN
#define __NORETURN __attribute__((__noreturn__))
#endif
+/* for chat_cmdtable: */
+#ifndef __WEAK
+#define __WEAK __attribute__((__weak__))
+#endif
#define NELEM(a) (sizeof((a))/sizeof(*(a)))
#define XRAWDIGITI(n) ((n)-'0'-((n)>='A'?'A'-('9'+1):0))
#define NELEM(a) (sizeof((a))/sizeof(*(a)))
#define XRAWDIGITI(n) ((n)-'0'-((n)>='A'?'A'-('9'+1):0))