Mercurial > hg > Members > masakoha > testcode
changeset 240:6ed6f385205e
fix fd
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Jan 2016 18:20:48 +0900 |
parents | f5931151d70c |
children | 87ad91af8a15 |
files | regexParser/Makefile regexParser/fileread.cc regexParser/fileread.h regexParser/sequentialSearch.cc |
diffstat | 4 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/regexParser/Makefile Wed Jan 20 18:05:19 2016 +0900 +++ b/regexParser/Makefile Wed Jan 20 18:20:48 2016 +0900 @@ -23,9 +23,10 @@ test/ccMerge: test/ccMerge.cc $(CC) $(CFLAGS) -I. $< subsetConstruction.cc regexParser.cc node.cc error.cc bitVector.cc -o $@ -sequentialSearch: sequentialSearch.cc regexParser +sequentialSearch: sequentialSearch.cc regexParser fileread.o ./regexParser -seq -subset -regex $(REGEX) - $(CC) $(CFLAGS) -I. sequentialSearch.cc -o $@ + $(CC) $(CFLAGS) -I. -c sequentialSearch.cc + $(CC) $(CFLAGS) -I. sequentialSearch.o fileread.o -o $@ gcov:
--- a/regexParser/fileread.cc Wed Jan 20 18:05:19 2016 +0900 +++ b/regexParser/fileread.cc Wed Jan 20 18:20:48 2016 +0900 @@ -7,7 +7,7 @@ #include "fileread.h" -st_mmap_t createSt_mmap(char* filename,int fd) { +st_mmap_t createSt_mmap(char* filename,int &fd) { st_mmap_t st_mmap; int map = MAP_PRIVATE; struct stat sb;
--- a/regexParser/fileread.h Wed Jan 20 18:05:19 2016 +0900 +++ b/regexParser/fileread.h Wed Jan 20 18:20:48 2016 +0900 @@ -1,4 +1,4 @@ #include "regexParser.h" -extern st_mmap_t createSt_mmap(char* filename, int fd); +extern st_mmap_t createSt_mmap(char* filename, int &fd); extern Buffer createBuffer(st_mmap_t st_mmap);