summaryrefslogtreecommitdiff
path: root/dtrain/dtrain.h
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-04-26 09:31:34 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-04-26 09:31:34 +0200
commit8271eb7cfc10e58b2b8ff50d27d6680dedfba043 (patch)
tree2949fb43ace522daf112e534eb4641276d8062df /dtrain/dtrain.h
parentdb98396d948f29470f27970ad94009d49331780c (diff)
merge older changes, more polishing
Diffstat (limited to 'dtrain/dtrain.h')
-rw-r--r--dtrain/dtrain.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/dtrain/dtrain.h b/dtrain/dtrain.h
index 783aa179..61d60657 100644
--- a/dtrain/dtrain.h
+++ b/dtrain/dtrain.h
@@ -1,5 +1,5 @@
-#ifndef _DTRAIN_COMMON_H_
-#define _DTRAIN_COMMON_H_
+#ifndef _DTRAIN_H_
+#define _DTRAIN_H_
#include <iomanip>
#include <climits>
@@ -13,9 +13,9 @@
#include "filelib.h"
-#define DTRAIN_LOCAL
+//#define DTRAIN_LOCAL
-#define DTRAIN_DOTS 10 // when to display a '.'
+#define DTRAIN_DOTS 10 // after how many inputs to display a '.'
#define DTRAIN_GRAMMAR_DELIM "########EOS########"
#define DTRAIN_SCALE 100000
@@ -35,7 +35,10 @@ inline string gettmpf(const string path, const string infix) {
strcat(fn, "/");
strcat(fn, infix.c_str());
strcat(fn, "-XXXXXX");
- mkstemp(fn);
+ if (!mkstemp(fn)) {
+ cerr << "Cannot make temp file in" << path << " , exiting." << endl;
+ exit(1);
+ }
return string(fn);
}