Mercurial > hg > Members > masakoha > testcode
view regexParser/sequentialSearch.cc @ 319:7b8234c090f7
bmSearch
author | mir3636 |
---|---|
date | Sun, 08 May 2016 22:53:20 +0900 |
parents | c9ac6f06e706 |
children | 879dc5d1cb6a |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <sys/stat.h> #include <sys/mman.h> #include "fileread.h" #include "threadedSearch.h" #include "state.cc" int main(int argc, char **argv) { char *filename; for (int i = 1; i < argc; i++) { if (strcmp(argv[i],"-file") == 0) { filename = argv[i+1]; i++; } } int fd = 0; st_mmap_t st_mmap = createSt_mmap(filename,fd); Buffer buff = createBuffer(st_mmap); TSValue tsv = createTSValue(NULL,buff); tsv = state0(tsv); close(fd); return 0; } /* end */