trunk: changeset 1789

Wed, 06 Oct 2004 18:24:41 +0200

author
tuomov
date
Wed, 06 Oct 2004 18:24:41 +0200
changeset 81
ebefcbcb126f
parent 80
c60bc05a6d38
child 82
895f6304179d

trunk: changeset 1789
Added some macros.

debug.h file | annotate | diff | comparison | revisions
locale.h file | annotate | diff | comparison | revisions
output.h file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/debug.h	Wed Oct 06 18:24:41 2004 +0200
@@ -0,0 +1,19 @@
+/*
+ * libtu/debug.h
+ *
+ * Copyright (c) Tuomo Valkonen 2004. 
+ *
+ * You may distribute and modify this library under the terms of either
+ * the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
+ */
+
+#ifndef LIBTU_DEBUG_H
+#define LIBTU_DEBUG_H
+
+#ifdef CF_DEBUG
+#define D(X) X
+#else
+#define D(X)
+#endif
+
+#endif /* LIBTU_DEBUG_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locale.h	Wed Oct 06 18:24:41 2004 +0200
@@ -0,0 +1,27 @@
+/*
+ * libtu/locale.h
+ *
+ * Copyright (c) Tuomo Valkonen 2004. 
+ *
+ * You may distribute and modify this library under the terms of either
+ * the Clarified Artistic License or the GNU LGPL, version 2.1 or later.
+ */
+
+#ifndef LIBTU_LOCALE_H
+#define LIBTU_LOCALE_H
+
+#ifdef CF_NO_LOCALE
+
+#define TR(X) X
+#define DUMMY_TR(X) X
+
+#else
+
+#include <libintl.h>
+
+#define TR(X) gettext(X)
+#define DUMMY_TR(X) X
+
+#endif
+
+#endif /* LIBTU_LOCALE_H */
--- a/output.h	Sat Jul 31 21:12:01 2004 +0200
+++ b/output.h	Wed Oct 06 18:24:41 2004 +0200
@@ -14,6 +14,14 @@
 
 #include "types.h"
 
+#if __STDC_VERSION__ >= 199901L
+#define WARN_FUNC(...) warn_obj(__func__, __VA_ARGS__)
+#define WARN_ERR_FUNC() warn_err_obj(__func__)
+#else
+#define WARN_FUNC warn
+#define WARN_ERR_FUNC() warn_err()
+#endif
+
 typedef void WarnHandler(const char *);
 extern WarnHandler *set_warn_handler(WarnHandler *handler);
 

mercurial