Mercurial > hg > Applications > Grep
diff regexParser/sequentialSearchCbC.cc @ 301:4cb6eea3ab12
add CbC version
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 04 Feb 2016 03:26:18 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/regexParser/sequentialSearchCbC.cc Thu Feb 04 03:26:18 2016 +0900 @@ -0,0 +1,31 @@ +#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" + +__code state0(TSValue ts); + +#include "stateCbC.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); + close(fd); + goto state0(tsv); + return 0; +} + +/* end */