summaryrefslogtreecommitdiff
path: root/tools/hi-test.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-07-30 00:00:15 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-30 00:00:15 (GMT)
commit63be414b62f3234ad80607b95e8e71e33bfd8025 (patch)
treeba9ed3dbc8508f64cddc09e3d0c59c2e635de061 /tools/hi-test.c
parentd2564d25e802d1ee3230cf045c4940e836b5c6a2 (diff)
move more stuff to utils.c ... I hate duplication of code
Diffstat (limited to 'tools/hi-test.c')
-rw-r--r--tools/hi-test.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/tools/hi-test.c b/tools/hi-test.c
index 0661ada..cd0152c 100644
--- a/tools/hi-test.c
+++ b/tools/hi-test.c
@@ -6,6 +6,7 @@
#include <sstream>
#include <stdio.h> /* perror() */
+#include "utils.h"
using namespace std;
@@ -16,13 +17,6 @@ const int sa_usage(64);
int verbosity(0);
-////////////////
-// little utility to help with argument parsing:
-//
-int prefix(const string shorter, const string longer){
- return shorter == longer.substr(0, shorter.length());
-}
-
void exeunt(const int sts){
if (sts == sa_good) exit(sts);
@@ -69,12 +63,6 @@ void countsome(const int unit){
<< " read " << total << " bytes from unit " << unit << endl;
}
-string basename(const string path){
- size_t where = path.rfind("/");
- if (where != string::npos) return path.substr(1+where);
- return path;
-}
-
int main(int _argc, const char** _argv){
int snooze(0);
int status(0);