diff --git a/Operand.cpp b/Operand.cpp index 8916ab6..6cad9fb 100644 --- a/Operand.cpp +++ b/Operand.cpp @@ -94,7 +94,13 @@ namespace jet { } else if(in.ifNextIgnoreCase("CONCAT")) { } else if(in.ifNextIgnoreCase("INTEGER")) { - + if(!in.ifNext("(")) + throw coreutils::Exception("Expecting ( for INTEGER parameters."); + Operand parm1(in, tag); + if(in.ifNext(")")) { + string = parm1.string.asInteger(); + } else + throw coreutils::Exception("Expecting ) at end of INTEGER expression."); } else if(in.ifNextIgnoreCase("ROUND")) { } else if(in.ifNextIgnoreCase("RANDOM")) { diff --git a/__jet.cpp b/__jet.cpp index 64e0fd1..bcb8377 100644 --- a/__jet.cpp +++ b/__jet.cpp @@ -9,7 +9,7 @@ namespace jet { if(keywordDefined("cgi") && (resolveKeyword("cgi") == "true")) { global.cgi = true; - cookies = getenv("HTTP_COOKIE"); +// cookies = getenv("HTTP_COOKIE"); if(keywordDefined("sessiondir")) { global.session = true; @@ -20,7 +20,7 @@ namespace jet { // else // generate new session id. // create session cookie in response. - char hashit[64]; +/* char hashit[64]; char hash[32]; sprintf(hashit, "JETSESSION%ld", time(0)); SHA1(hashit, strlen(hashit), hash); @@ -32,7 +32,7 @@ namespace jet { if(keywordDefined("sessiontimeout")) { time_t timeout = time(0) + keywords["sessiontimeout"].asInteger(); } - +*/ // also save last activity time in session file. } diff --git a/tests/testexpr.jet b/tests/testexpr.jet index 3cc7da4..15a5e21 100755 --- a/tests/testexpr.jet +++ b/tests/testexpr.jet @@ -10,4 +10,6 @@ $[lefty]=01234 $[righty]=56789 $[trim]=this is a test + +$[integer]=12430