Mercurial > hg > Applications > Grep
view regexParser/sequentialSearchCbC.cc @ 311:1d79e61a9365
CbC state generator is not work on -O2 but -O1
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Feb 2016 22:12:14 +0900 |
parents | 4cb6eea3ab12 |
children |
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" __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 */