summaryrefslogtreecommitdiff
path: root/lib/omega/src/pres_gen.cc
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-09-19 21:14:58 +0000
committerTuowen Zhao <ztuowen@gmail.com>2016-09-19 21:14:58 +0000
commit210f77d2c32f14d2e99577fd3c9842bb19d47e50 (patch)
tree5edb327c919b8309e301c3440fb6668a0075c8ef /lib/omega/src/pres_gen.cc
parenta66ce5cd670c4d3c0dc449720f5bc45dd4c281b8 (diff)
downloadchill-210f77d2c32f14d2e99577fd3c9842bb19d47e50.tar.gz
chill-210f77d2c32f14d2e99577fd3c9842bb19d47e50.tar.bz2
chill-210f77d2c32f14d2e99577fd3c9842bb19d47e50.zip
Moved most modules into lib
Diffstat (limited to 'lib/omega/src/pres_gen.cc')
-rw-r--r--lib/omega/src/pres_gen.cc45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/omega/src/pres_gen.cc b/lib/omega/src/pres_gen.cc
new file mode 100644
index 0000000..0f05d40
--- /dev/null
+++ b/lib/omega/src/pres_gen.cc
@@ -0,0 +1,45 @@
+#include <omega/pres_gen.h>
+
+namespace omega {
+
+int skip_finalization_check=0;
+// int skip_set_checks=0;
+
+int pres_debug=0 ;
+FILE *DebugFile=stderr; // This is the default; it's best to set it yourself.
+
+negation_control pres_legal_negations = any_negation;
+
+//
+// I/O utility functions.
+//
+// void PresErrAssert(const char *t) {
+// fprintf(stdout, "\nERROR: %s\n", t);
+// if(pres_debug) {
+// fprintf(DebugFile, "\nERROR: %s\n", t);
+// }
+// exit(1);
+// }
+
+
+
+//
+// Needed for gprof
+//
+#if defined PROFILE_MALLOCS
+void* operator new(size_t n) {
+ void *result = malloc (n < 1 ? 1 : n);
+ if (result)
+ return result;
+ else {
+ write(2,"Virtual memory exceeded in new\n",32);
+ return 0;
+ }
+}
+
+void operator delete (void* f) {
+ if (f) free(f);
+}
+#endif
+
+} // namespace