Update README and HACKING.
[libradsec.git] / lib / debug.h
index 1dada4e..c319085 100644 (file)
@@ -1,4 +1,5 @@
-/* See the file COPYING for licensing information.  */
+/* Copyright 2011 NORDUnet A/S. All rights reserved.
+   See LICENSE for licensing information.  */
 
 #define hd(p, l) { int i;              \
     for (i = 1; i <= l; i++) {         \
@@ -7,5 +8,20 @@
       if (i % 16 == 0) printf ("\n"); }        \
     printf ("\n"); }
 
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+struct rs_packet;
 void rs_dump_packet (const struct rs_packet *pkt);
-void rs_dump_attr (const struct rs_attr *attr);
+int _rs_debug (const char *fmt, ...);
+
+#if defined (DEBUG)
+#define rs_debug(x) _rs_debug x
+#else
+#define rs_debug(x) do {;} while (0)
+#endif
+
+#if defined (__cplusplus)
+}
+#endif