diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-26 09:31:34 +0200 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2012-04-26 09:31:34 +0200 |
commit | d19af7519f57589373569cc592ae49b7cba55e15 (patch) | |
tree | f7ddade1517751880929b1ece4dbf7b4fcb16e98 /dtrain/dtrain.h | |
parent | 48bfd6dd2319c5b21fdbc963ee5be4eb048a0b13 (diff) |
merge older changes, more polishing
Diffstat (limited to 'dtrain/dtrain.h')
-rw-r--r-- | dtrain/dtrain.h | 13 |
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); } |