Update of /cvsroot/perfparse/_perfparse/db_tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5894
Modified Files:
convert.c
Log Message:
dived into regex
Index: convert.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/db_tools/convert.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** convert.c 6 Dec 2006 13:45:30 -0000 1.7
--- convert.c 7 Dec 2006 00:14:03 -0000 1.8
***************
*** 141,145 ****
regex_t *preg=&preg_struct;
char regex[512];
! size_t nmatch=0;
regmatch_t pmatch[10];
int i;
--- 141,145 ----
regex_t *preg=&preg_struct;
char regex[512];
! size_t nmatch=10;
regmatch_t pmatch[10];
int i;
***************
*** 157,162 ****
i=regexec(preg,resultstr,nmatch,pmatch,REG_NOTEOL);
printf("Returncode matching the pattern is %d\n",i);
if(i==0) {
! printf("Jumpin in matches\n");
for (i=0;i<nmatch;i++) {
printf("Match %d so: %d, eo:%d\n",i,pmatch[i].rm_so,pmatch[i].rm_eo);
--- 157,165 ----
i=regexec(preg,resultstr,nmatch,pmatch,REG_NOTEOL);
printf("Returncode matching the pattern is %d\n",i);
+ if(i==REG_NOMATCH) {
+ printf("That means: no match!\n");
+ }
if(i==0) {
! printf("Jumpin in matches. nmatch=%d\n",nmatch);
for (i=0;i<nmatch;i++) {
printf("Match %d so: %d, eo:%d\n",i,pmatch[i].rm_so,pmatch[i].rm_eo);
|