summaryrefslogtreecommitdiff
path: root/autoopts/project.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2012-08-11 16:45:31 +0000
committerLorry <lorry@roadtrain.codethink.co.uk>2012-10-18 12:43:06 +0000
commit7c432b265ed7ca5f8304938db73912df8ce35032 (patch)
treec95de7bee7b742ed92b9924d904adca706e48d80 /autoopts/project.h
downloadautogen-7c432b265ed7ca5f8304938db73912df8ce35032.tar.gz
Imported from /srv/lorry/lorry-area/autogen/autogen-5.16.2.tar.gz.HEADautogen-5.16.2master
Diffstat (limited to 'autoopts/project.h')
-rw-r--r--autoopts/project.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/autoopts/project.h b/autoopts/project.h
new file mode 100644
index 0000000..c0df391
--- /dev/null
+++ b/autoopts/project.h
@@ -0,0 +1,50 @@
+
+#ifndef AUTOGEN_PROJECT_H
+#define AUTOGEN_PROJECT_H
+
+#include "config.h"
+#include "compat/compat.h"
+#include "ag-char-map.h"
+
+/*
+ * Procedure success codes
+ *
+ * USAGE: define procedures to return "tSuccess". Test their results
+ * with the SUCCEEDED, FAILED and HADGLITCH macros.
+ *
+ * Microsoft sticks its nose into user space here, so for Windows' sake,
+ * make sure all of these are undefined.
+ */
+#undef SUCCESS
+#undef FAILURE
+#undef PROBLEM
+#undef SUCCEEDED
+#undef SUCCESSFUL
+#undef FAILED
+#undef HADGLITCH
+
+#define SUCCESS ((tSuccess) 0)
+#define FAILURE ((tSuccess)-1)
+#define PROBLEM ((tSuccess) 1)
+
+typedef int tSuccess;
+
+#define SUCCEEDED(p) ((p) == SUCCESS)
+#define SUCCESSFUL(p) SUCCEEDED(p)
+#define FAILED(p) ((p) < SUCCESS)
+#define HADGLITCH(p) ((p) > SUCCESS)
+
+#ifndef STR
+# define __STR(s) #s
+# define STR(s) __STR(s)
+#endif
+
+#ifdef DEFINING
+# define VALUE(s) = s
+# define MODE
+#else
+# define VALUE(s)
+# define MODE extern
+#endif
+
+#endif /* AUTOGEN_PROJECT_H */