From b9ddaa780b290887c55e6d9d69184d0b13664d68 Mon Sep 17 00:00:00 2001 From: john stone Date: Sun, 24 Nov 2013 05:58:02 +0100 Subject: [PATCH] fixed subtle error --- src/eventrouter.gperf | 6 +++--- src/testfoohash.cc | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/eventrouter.gperf b/src/eventrouter.gperf index 043da3f..54f1c87 100644 --- a/src/eventrouter.gperf +++ b/src/eventrouter.gperf @@ -5,6 +5,6 @@ struct RouterOp }; %% /files, 1 -/date , 2 -/static , 4 -/upload , 5 +/date, 2 +/static, 4 +/upload, 5 diff --git a/src/testfoohash.cc b/src/testfoohash.cc index 04c656b..f03cb10 100644 --- a/src/testfoohash.cc +++ b/src/testfoohash.cc @@ -17,8 +17,12 @@ int main(int argc, char *argv[]) { Foohash fh; RouterOp *blub; - blub = fh.in_word_set("/static" , sizeof("/static")); - cout << "aaa" << blub->txt << endl; + blub = fh.in_word_set("/static" , sizeof("/static")-1); + if(blub) + cout << "found! : " << blub->txt << " ,op:" << blub->op << endl; + else + cout << "not found stuff!" << endl; + if(argc) argv++; } // http://www.ibm.com/developerworks/linux/library/l-gperf/index.html#toggle