Mercurial > hg > Applications > Grep
comparison regexParser/main.cc @ 262:157f6886ba55
write driver of threadedSearch
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jan 2016 19:32:18 +0900 |
parents | 3f3c9902bb6d |
children | e51cac73e42a |
comparison
equal
deleted
inserted
replaced
261:2b36dde3ffb7 | 262:157f6886ba55 |
---|---|
59 | 59 |
60 if (filename != NULL) { | 60 if (filename != NULL) { |
61 int fd = 0; | 61 int fd = 0; |
62 st_mmap_t st_mmap = createSt_mmap(filename,fd); | 62 st_mmap_t st_mmap = createSt_mmap(filename,fd); |
63 Buffer buff = createBuffer(st_mmap); | 63 Buffer buff = createBuffer(st_mmap); |
64 TSValue tsv; | 64 if (ts) threadedSearch(tgv.tg,buff); |
65 tsv.buff = buff; | |
66 if (ts) tSearch(tsv); | |
67 else grepWalk(tgv.tg,buff); | 65 else grepWalk(tgv.tg,buff); |
68 close(fd); | 66 close(fd); |
69 } | 67 } |
70 return 0; | 68 return 0; |
71 } | 69 } |