Mercurial > hg > Applications > Grep
comparison regexParser/main.cc @ 235:4aab1e93a971
fix condition grepWalk.cc
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 19 Jan 2016 17:16:37 +0900 |
parents | 1a34e702776a |
children | 9493800265a8 |
comparison
equal
deleted
inserted
replaced
234:df4d04b3c34a | 235:4aab1e93a971 |
---|---|
1 #include <stdio.h> | 1 #include <stdio.h> |
2 #include <stdlib.h> | 2 #include <stdlib.h> |
3 #include <string.h> | 3 #include <string.h> |
4 #include <unistd.h> | |
4 #include "regexParser.h" | 5 #include "regexParser.h" |
5 #include "subsetConstruction.h" | 6 #include "subsetConstruction.h" |
6 #include "node.h" | 7 #include "node.h" |
7 #include "grepWalk.h" | 8 #include "grepWalk.h" |
8 #include "fileread.h" | 9 #include "fileread.h" |
56 if (filename != NULL) { | 57 if (filename != NULL) { |
57 int fd = 0; | 58 int fd = 0; |
58 st_mmap_t st_mmap = createSt_mmap(filename,fd); | 59 st_mmap_t st_mmap = createSt_mmap(filename,fd); |
59 Buffer buff = createBuffer(st_mmap); | 60 Buffer buff = createBuffer(st_mmap); |
60 grepWalk(tgv.tg,buff); | 61 grepWalk(tgv.tg,buff); |
62 close(fd); | |
61 } | 63 } |
62 return 0; | 64 return 0; |
63 } | 65 } |