Mercurial > hg > Applications > Grep
comparison regexParser/cerium/ppe/Print.cc @ 279:6cc1d9779f45
add CeriumMain.h
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Jan 2016 15:59:11 +0900 |
parents | 8879eb8c64a8 |
children | b74e3b4b11d7 |
comparison
equal
deleted
inserted
replaced
278:99d635926ef3 | 279:6cc1d9779f45 |
---|---|
2 #include <string.h> | 2 #include <string.h> |
3 #include "Print.h" | 3 #include "Print.h" |
4 #include "Func.h" | 4 #include "Func.h" |
5 #include "FileMapReduce.h" | 5 #include "FileMapReduce.h" |
6 #include "regexParser.h" | 6 #include "regexParser.h" |
7 #include "CeriumMain.h" | |
7 | 8 |
8 #define STATUS_NUM 2 | 9 #define STATUS_NUM 2 |
9 /* これは必須 */ | 10 /* これは必須 */ |
10 SchedDefineTask1(Print,run_print); | 11 SchedDefineTask1(Print,run_print); |
11 | 12 |
27 // 前のブロックの matchBegin から最初 result の end までがマッチ | 28 // 前のブロックの matchBegin から最初 result の end までがマッチ |
28 fwrite(prev->begin,r->end - prev->begin,1,stdout); | 29 fwrite(prev->begin,r->end - prev->begin,1,stdout); |
29 } | 30 } |
30 r = r->next; | 31 r = r->next; |
31 } | 32 } |
32 for (;r;r = r->next) { | 33 prev = resultPrint(r,"Print"); |
33 if (r->end == NULL) { | |
34 prev = r; | |
35 break; | |
36 } | |
37 fwrite(r->begin,r->end - r->begin,1,stdout); | |
38 puts("\n"); | |
39 } | |
40 } | 34 } |
41 return 0; | 35 return 0; |
42 } | 36 } |