about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-06 12:21:18 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-06 12:21:27 -0700
commitf278a15d218852980691f4b77fb8ac6a5fe52e4d (patch)
tree516c3f6b9ac1cc253fcdf931b00cdb0375daea46
parent730b03bd75f67053eefee312650f383ad11555ee (diff)
downloadmu-f278a15d218852980691f4b77fb8ac6a5fe52e4d.tar.gz
1027 - reorg includes
-rw-r--r--cpp/001test6
-rw-r--r--cpp/002trace4
-rw-r--r--cpp/009includes48
-rw-r--r--cpp/021call4
4 files changed, 10 insertions, 52 deletions
diff --git a/cpp/001test b/cpp/001test
index 8222adcd..92cbe9cf 100644
--- a/cpp/001test
+++ b/cpp/001test
@@ -91,6 +91,9 @@ int to_int(string n) {
 }
 
 :(before "End Includes")
+#include<assert.h>
+#include<cstdlib>
+
 #include<iostream>
 using std::istream;
 using std::ostream;
@@ -100,3 +103,6 @@ using std::cout;
 using std::cerr;
 
 #include<cstring>
+#include<string>
+using std::string;
+#define NOT_FOUND string::npos  // macro doesn't complain about redef
diff --git a/cpp/002trace b/cpp/002trace
index c01de39e..68b73def 100644
--- a/cpp/002trace
+++ b/cpp/002trace
@@ -455,10 +455,6 @@ bool headmatch(const string& s, const string& pat) {
 :(before "End Includes")
 #include<cstdlib>
 
-#include<string>
-using std::string;
-#define NOT_FOUND string::npos
-
 #include<vector>
 using std::vector;
 #include<list>
diff --git a/cpp/009includes b/cpp/009includes
deleted file mode 100644
index c9f96288..00000000
--- a/cpp/009includes
+++ /dev/null
@@ -1,48 +0,0 @@
-//: Some common includes needed all over the place.
-//: More tightly-targeted includes show up in other files.
-
-:(before "End Includes")
-#include<assert.h>
-#include<cstdio>
-#include<cstring>
-#include<cstdlib>
-#include<errno.h>
-#include<time.h>
-#include<math.h>
-#include<vector>
-using std::vector;
-#include<list>
-using std::list;
-#include<stack>
-using std::stack;
-#include<utility>
-using std::pair;
-
-#include<tr1/unordered_map>
-using std::tr1::unordered_map;
-#include<tr1/unordered_set>
-using std::tr1::unordered_set;
-#include<algorithm>
-
-#include<string>
-using std::string;
-#define NOT_FOUND string::npos  // macro doesn't complain about redef
-
-#include<iostream>
-using std::istream;
-using std::ostream;
-using std::iostream;
-using std::cin;
-using std::cout;
-using std::cerr;
-
-#include<sstream>
-using std::stringstream;
-using std::istringstream;
-using std::ostringstream;
-
-#include<fstream>
-using std::ifstream;
-using std::ofstream;
-
-#define unused  __attribute__((unused))
diff --git a/cpp/021call b/cpp/021call
index 79f86183..d84912c2 100644
--- a/cpp/021call
+++ b/cpp/021call
@@ -71,3 +71,7 @@ while (running_at(rr) >= steps(rr).size()) {
   // todo: no results returned warning
   ++running_at(rr);
 }
+
+:(before "End Includes")
+#include <stack>
+using std::stack;