aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/examples/GNUmakefile3
-rw-r--r--doc/examples/eax_test.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/examples/GNUmakefile b/doc/examples/GNUmakefile
index 83219b00f..c06f52d6e 100644
--- a/doc/examples/GNUmakefile
+++ b/doc/examples/GNUmakefile
@@ -21,3 +21,6 @@ clean:
%: %.cpp
$(CXX) $(FLAGS) $? $(LIBS) -o $@
+
+eax_test: eax_test.cpp
+ $(CXX) $(FLAGS) $? $(LIBS) -lboost_regex -o $@ \ No newline at end of file
diff --git a/doc/examples/eax_test.cpp b/doc/examples/eax_test.cpp
index 18f981531..2e0790257 100644
--- a/doc/examples/eax_test.cpp
+++ b/doc/examples/eax_test.cpp
@@ -168,8 +168,6 @@ void run_tests(std::istream& in)
std::string algo;
std::string key;
- boost::regex vec_regex("^([ 0-9]{3}): (.*), (.*)$");
-
while(in.good())
{
std::string line;
@@ -187,6 +185,8 @@ void run_tests(std::istream& in)
}
else if(algo != "")
{
+ boost::regex vec_regex("^([ 0-9]{3}): (.*), (.*)$");
+
boost::smatch what;
if(boost::regex_match(line, what, vec_regex, boost::match_extra))