From 2fce43d484e4148ae858f410d51dcd9951d34374 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Sun, 18 Sep 2016 15:45:13 +0000 Subject: remove include & rename --- omegalib/omega/src/pres_gen.cc | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 omegalib/omega/src/pres_gen.cc (limited to 'omegalib/omega/src/pres_gen.cc') diff --git a/omegalib/omega/src/pres_gen.cc b/omegalib/omega/src/pres_gen.cc new file mode 100644 index 0000000..0f05d40 --- /dev/null +++ b/omegalib/omega/src/pres_gen.cc @@ -0,0 +1,45 @@ +#include + +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 -- cgit v1.2.3-70-g09d2