sic/src/testfoohash.cc

32 lines
562 B
C++
Raw Normal View History

2013-11-22 15:35:29 +01:00
#include <cstring>
#include <iostream>
using std::strcmp;
#include "Foohash.H"
using std::cout;
using std::endl;
2013-11-24 05:46:24 +01:00
/*struct RouterOp {*/
2013-11-28 03:32:05 +01:00
//const char *name;
2013-11-24 05:46:24 +01:00
//int op;
/*};*/
2013-11-22 15:35:29 +01:00
int main(int argc, char *argv[])
{
Foohash fh;
2013-11-28 06:35:58 +01:00
const RouterOp *blub;
2013-11-24 05:58:02 +01:00
blub = fh.in_word_set("/static" , sizeof("/static")-1);
if(blub)
2013-11-24 06:03:17 +01:00
cout << "found! : "
2013-11-28 03:32:05 +01:00
<< blub->name
2013-11-24 06:03:17 +01:00
<< " ,op:"
2013-11-28 06:35:58 +01:00
<< blub->op
2013-11-24 06:03:17 +01:00
<< endl;
2013-11-24 05:58:02 +01:00
else
cout << "not found stuff!" << endl;
2013-11-22 15:35:29 +01:00
if(argc) argv++;
}
// http://www.ibm.com/developerworks/linux/library/l-gperf/index.html#toggle