0
|
1 #include <stdio.h>
|
|
2 #include <string.h>
|
|
3 #include "Print.h"
|
|
4 #include "Func.h"
|
|
5 #include "WordGrep.h"
|
|
6
|
|
7 /* これは必須 */
|
|
8 SchedDefineTask1(Print,run_print);
|
|
9
|
|
10 //終了後のプリント
|
|
11 static int run_print(SchedTask *s, void *rbuf, void *wbuf){
|
|
12 WordGrep *w = *(WordGrep**)rbuf;
|
|
13 int out_task_num = w->out_task_num;
|
|
14 int *hits = w->o_data;
|
|
15 int total = 0;
|
|
16
|
|
17 for (int i = 0; i < out_task_num ; i++) {
|
|
18 total += hits[i*w->out_size+0];
|
|
19 }
|
|
20 printf("%d hits!!\n",total);
|
|
21 //何もしてない
|
|
22 return 0;
|
|
23 } |