about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-06-21 00:24:12 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-06-21 00:24:12 -0700
commit467046ef11ddd4b0ff1abb89f873bbfde8a419c4 (patch)
treea3ecb8554a7e41179ace8875c5b5390b6636c169
parentc518212143598243cd803fb2656c111c521c3565 (diff)
downloadmu-467046ef11ddd4b0ff1abb89f873bbfde8a419c4.tar.gz
1614
-rw-r--r--003trace.cc3
-rw-r--r--020run.cc5
-rw-r--r--042new.cc3
-rw-r--r--070display.cc3
4 files changed, 3 insertions, 11 deletions
diff --git a/003trace.cc b/003trace.cc
index 8db6f54d..9d32cf76 100644
--- a/003trace.cc
+++ b/003trace.cc
@@ -170,6 +170,7 @@ struct die {};
 :(before "End Tracing")
 ostream& operator<<(ostream& os, unused die) {
   if (Hide_warnings) return os;
+  tb_shutdown();
   os << "dying";
   if (Trace_stream) Trace_stream->newline();
   exit(1);
@@ -349,6 +350,8 @@ using std::ostringstream;
 using std::ifstream;
 using std::ofstream;
 
+#include"termbox/termbox.h"
+
 #define unused  __attribute__((unused))
 
 :(before "End Globals")
diff --git a/020run.cc b/020run.cc
index 020764e1..3a9c08e5 100644
--- a/020run.cc
+++ b/020run.cc
@@ -196,7 +196,6 @@ void write_memory(reagent x, vector<double> data) {
   if (is_literal(x)) return;
   long long int base = x.value;
   if (size_mismatch(x, data)) {
-    tb_shutdown();
     raise << current_recipe_name() << ": size mismatch in storing to " << x.to_string() << " at " << current_instruction().to_string() << '\n' << die();
   }
   for (long long int offset = 0; offset < SIZE(data); ++offset) {
@@ -215,10 +214,6 @@ long long int size_of(const vector<type_number>& types) {
 }
 
 bool size_mismatch(const reagent& x, const vector<double>& data) {
-  if (size_of(x) != SIZE(data)) {
-    tb_shutdown();
-    cerr << size_of(x) << " vs " << SIZE(data) << '\n';
-  }
   return size_of(x) != SIZE(data);
 }
 
diff --git a/042new.cc b/042new.cc
index 324fad16..0e685095 100644
--- a/042new.cc
+++ b/042new.cc
@@ -250,6 +250,3 @@ long long int unicode_length(const string& s) {
   }
   return result;
 }
-
-:(before "End Includes")
-#include"termbox/termbox.h"  // for unicode primitives
diff --git a/070display.cc b/070display.cc
index 61d7c0bc..0ca9fd13 100644
--- a/070display.cc
+++ b/070display.cc
@@ -263,6 +263,3 @@ case READ_KEY_FROM_KEYBOARD: {
   products.at(1).push_back(found);
   break;
 }
-
-:(before "End Includes")
-#include"termbox/termbox.h"