Commit 9975f197 authored by yiwenshao's avatar yiwenshao

add new global constants

parent 0fa3f2a9
...@@ -10,4 +10,6 @@ useSalt:true ...@@ -10,4 +10,6 @@ useSalt:true
BS_STR:MIN BS_STR:MIN
BS_IA:MIN BS_IA:MIN
BS_IH:MIN BS_IH:MIN
#true or false
USE_ASHE:true
other:1 other:1
...@@ -108,10 +108,20 @@ globalConstants initGlobalConstants(){ ...@@ -108,10 +108,20 @@ globalConstants initGlobalConstants(){
POINT POINT
assert(0); assert(0);
} }
}else if(head == "USE_ASHE") {
std::string sub = line.substr(index+1);
if(sub=="true"){
res.USE_ASHE = true;
}else if(sub=="false"){
res.USE_ASHE = false;
}else{ }else{
POINT POINT
assert(0); assert(0);
} }
}else {
POINT
assert(0);
}
} }
/* the following values need not be determined /* the following values need not be determined
at runtime.*/ at runtime.*/
......
...@@ -21,6 +21,7 @@ struct globalConstants{ ...@@ -21,6 +21,7 @@ struct globalConstants{
int BS_STR; int BS_STR;
int BS_IA; int BS_IA;
int BS_IH; int BS_IH;
bool USE_ASHE;
std::string logFile;/*file name for log*/ std::string logFile;/*file name for log*/
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment