/[pcre]/code/trunk/pcredemo.c
ViewVC logotype

Diff of /code/trunk/pcredemo.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 75 by nigel, Sat Feb 24 21:40:37 2007 UTC revision 91 by nigel, Sat Feb 24 21:41:34 2007 UTC
# Line 117  if (rc < 0) Line 117  if (rc < 0)
117      */      */
118      default: printf("Matching error %d\n", rc); break;      default: printf("Matching error %d\n", rc); break;
119      }      }
120    free(re);     /* Release memory used for the compiled pattern */    pcre_free(re);     /* Release memory used for the compiled pattern */
121    return 1;    return 1;
122    }    }
123    
# Line 223  if (namecount <= 0) printf("No named sub Line 223  if (namecount <= 0) printf("No named sub
223    
224  if (!find_all)  if (!find_all)
225    {    {
226    free(re);   /* Release the memory used for the compiled pattern */    pcre_free(re);   /* Release the memory used for the compiled pattern */
227    return 0;   /* Finish unless -g was given */    return 0;        /* Finish unless -g was given */
228    }    }
229    
230  /* Loop for second and subsequent matches */  /* Loop for second and subsequent matches */
# Line 276  for (;;) Line 276  for (;;)
276    if (rc < 0)    if (rc < 0)
277      {      {
278      printf("Matching error %d\n", rc);      printf("Matching error %d\n", rc);
279      free(re);    /* Release memory used for the compiled pattern */      pcre_free(re);    /* Release memory used for the compiled pattern */
280      return 1;      return 1;
281      }      }
282    
# Line 317  for (;;) Line 317  for (;;)
317    }      /* End of loop to find second and subsequent matches */    }      /* End of loop to find second and subsequent matches */
318    
319  printf("\n");  printf("\n");
320  free(re);       /* Release memory used for the compiled pattern */  pcre_free(re);       /* Release memory used for the compiled pattern */
321  return 0;  return 0;
322  }  }
323    

Legend:
Removed from v.75  
changed lines
  Added in v.91

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12