Mercurial > hg > Applications > Grep
comparison regexParser/cerium/CeriumMain.cc @ 280:6bbd1cbf90d0
fix prev initialize in Print.c . Search in a block worked
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 31 Jan 2016 16:59:43 +0900 |
parents | 6cc1d9779f45 |
children | b74e3b4b11d7 |
comparison
equal
deleted
inserted
replaced
279:6cc1d9779f45 | 280:6bbd1cbf90d0 |
---|---|
47 return tsv; | 47 return tsv; |
48 } | 48 } |
49 | 49 |
50 ResultPtr resultPrint(ResultPtr r,const char* comment) { | 50 ResultPtr resultPrint(ResultPtr r,const char* comment) { |
51 ResultPtr prev = NULL; | 51 ResultPtr prev = NULL; |
52 printf("%s\n",comment); | 52 // printf("%s\n",comment); |
53 for (;r;r = r->next) { | 53 for (;r;r = r->next) { |
54 if (r->end == NULL) { | 54 if (r->end == NULL) { |
55 prev = r; | 55 prev = r; |
56 break; | 56 break; |
57 } | 57 } |
58 fwrite(r->begin,r->end - r->begin-1,1,stdout); | 58 fwrite(r->begin,r->end - r->begin-1,1,stdout); |
59 puts("\n"); | 59 puts(""); |
60 } | 60 } |
61 return prev; | 61 return prev; |
62 } | 62 } |
63 | 63 |
64 void ceriumCreateAnyState(TransitionGeneratorPtr tg) { | 64 void ceriumCreateAnyState(TransitionGeneratorPtr tg) { |