diff regexParser/cerium/ppe/Print.cc @ 272:5aa9d01926f1

Cerium version no compile errors
author kono
date Fri, 29 Jan 2016 20:38:18 +0900
parents e51cac73e42a
children 8879eb8c64a8
line wrap: on
line diff
--- a/regexParser/cerium/ppe/Print.cc	Fri Jan 29 19:37:11 2016 +0900
+++ b/regexParser/cerium/ppe/Print.cc	Fri Jan 29 20:38:18 2016 +0900
@@ -3,6 +3,7 @@
 #include "Print.h"
 #include "Func.h"
 #include "FileMapReduce.h"
+#include "regexParser.h"
 
 #define STATUS_NUM 2
 /* これは必須 */
@@ -13,19 +14,19 @@
 {
     MapReduce *w = (MapReduce*)s->get_input(0);
     
-    unsigned char* buff = (unsigned char*)w->i_data;
     int out_size = w->division_out_size / sizeof(unsigned long long);
+    int out_task_num = w->task_num;
     ResultPtr prev = NULL;
     for (int i = 0; i < out_task_num ; i++) {
         ResultPtr *idata = (ResultPtr*)w->o_data[i*3+0];
-        StatePtr *blockEnd = (StatePtr)w->o_data[i*3+2];
-        StatePtr *blockBegin = (StatePtr)w->o_data[i*3+4]; // next Block's blockBegin.
+        StatePtr blockEnd = (StatePtr)w->o_data[i*3+2];
+        StatePtr blockBegin = (StatePtr)w->o_data[i*3+4]; // next Block's blockBegin.
         ResultPtr r = idata[i*out_size];
         if (prev && i != out_task_num-1) {
             // 最後のブロックでなく、前の blockEnd が state 1 でない場合)
-            if (blockBegin->bi.bitContainer & blockEnd->bi.bitContainer) {
+            if ((blockBegin->bitState.bitContainer & ~blockEnd->bitState.bitContainer)==0) {
                 // 前のブロックの matchBegin から最初 result の end までがマッチ
-                fwrite(prev->result,r->end - prev->begin,1,stdout);
+                fwrite(prev->begin,r->end - prev->begin,1,stdout);
             }
             r = r->next;
         }