Added very primitive documentation files.
[vblib.git] / vblib.h
diff --git a/vblib.h b/vblib.h
index 0b3e93c..c40f47d 100644 (file)
--- a/vblib.h
+++ b/vblib.h
  ****************************/
 
 #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
-#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: "
 #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))