diff options
author | Derick Huth <derickhuth@gmail.com> | 2014-10-06 12:42:34 -0600 |
---|---|---|
committer | Derick Huth <derickhuth@gmail.com> | 2014-10-06 12:42:34 -0600 |
commit | 8d73c8fcc75556c1df71dd39dd99783f8f86fc3e (patch) | |
tree | 157d627863d76a4c256a27cae27ce2e8566c7ea0 /omega/omega_lib/src/pres_gen.cc | |
parent | e87b55ad69f0ac6211daae741b32c8ee9dcbe470 (diff) | |
parent | 8c646f24570079eac53e58fcf42d0d4fbc437ee3 (diff) | |
download | chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.gz chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.tar.bz2 chill-8d73c8fcc75556c1df71dd39dd99783f8f86fc3e.zip |
Merge pull request #2 from dhuth/master
Moved omega into chill.
Diffstat (limited to 'omega/omega_lib/src/pres_gen.cc')
-rw-r--r-- | omega/omega_lib/src/pres_gen.cc | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/omega/omega_lib/src/pres_gen.cc b/omega/omega_lib/src/pres_gen.cc new file mode 100644 index 0000000..0f05d40 --- /dev/null +++ b/omega/omega_lib/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 |