Mercurial > hg > Members > masakoha > testcode
changeset 44:62739627f8ec
fix
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 03 Mar 2015 17:23:47 +0900 |
parents | ead0a307449e |
children | 89a198fa6b23 |
files | regex/main.cc regex/regex.cc |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/regex/main.cc Tue Mar 03 00:44:39 2015 +0900 +++ b/regex/main.cc Tue Mar 03 17:23:47 2015 +0900 @@ -89,6 +89,7 @@ regexD->searchWord = searchWord; regexD->searchWordLen = strlen((const char*)regexD->searchWord); regex(regexD); + free(regexD); }else{ puts(usr_help_mode); exit(1);
--- a/regex/regex.cc Tue Mar 03 00:44:39 2015 +0900 +++ b/regex/regex.cc Tue Mar 03 17:23:47 2015 +0900 @@ -15,4 +15,17 @@ int readTextLen = regexD->readTextLen; char* searchWord = regexD->searchWord; int searchWordLen = regexD->searchWordLen; + + char* blockWord; + char** blockWordArray; + int allocateSize = 0; + + // "+" が含まれている時だけを考えてみる + for (int i = 0; i < searchWordLen; i++) { + if ((searchWord[i] == 43) && (i != 0)) { // 43 ASCII-> "+" + + }else { // 普通の文字列の場合 + + } + } }