]> granicus.if.org Git - graphviz/commitdiff
separate boolean logic defs from types.h and macros.h
authorellson <devnull@localhost>
Tue, 18 Oct 2005 18:31:17 +0000 (18:31 +0000)
committerellson <devnull@localhost>
Tue, 18 Oct 2005 18:31:17 +0000 (18:31 +0000)
lib/common/logic.h [new file with mode: 0644]

diff --git a/lib/common/logic.h b/lib/common/logic.h
new file mode 100644 (file)
index 0000000..65d3d01
--- /dev/null
@@ -0,0 +1,51 @@
+/* $Id$ $Revision$ */
+/* vim:set shiftwidth=4 ts=8: */
+
+/**********************************************************
+*      This software is part of the graphviz package      *
+*                http://www.graphviz.org/                 *
+*                                                         *
+*            Copyright (c) 1994-2004 AT&T Corp.           *
+*                and is licensed under the                *
+*            Common Public License, Version 1.0           *
+*                      by AT&T Corp.                      *
+*                                                         *
+*        Information and Software Systems Research        *
+*              AT&T Research, Florham Park NJ             *
+**********************************************************/
+
+#ifndef GV_LOGIC_H
+#define GV_LOGIC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef unsigned char boolean;
+
+#define NOT(v) (!(v))
+#ifndef FALSE
+#define        FALSE 0
+#endif
+#ifndef TRUE
+#define TRUE NOT(FALSE)
+#endif
+
+#ifndef NOTUSED
+#define NOTUSED(var) (void) var
+#endif
+
+#ifndef NULL
+#define NULL (void *)0
+#endif
+
+#ifndef NIL
+#define NIL(type) ((type)0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+