16 |
*/ |
*/ |
17 |
|
|
18 |
|
|
19 |
|
#ifdef HAVE_CONFIG_H |
20 |
|
# include <config.h> |
21 |
|
#endif |
22 |
|
|
23 |
#include <stdio.h> |
#include <stdio.h> |
24 |
#include <string.h> |
#include <string.h> |
25 |
#include <pcre.h> |
#include <pcre.h> |
121 |
*/ |
*/ |
122 |
default: printf("Matching error %d\n", rc); break; |
default: printf("Matching error %d\n", rc); break; |
123 |
} |
} |
124 |
free(re); /* Release memory used for the compiled pattern */ |
pcre_free(re); /* Release memory used for the compiled pattern */ |
125 |
return 1; |
return 1; |
126 |
} |
} |
127 |
|
|
227 |
|
|
228 |
if (!find_all) |
if (!find_all) |
229 |
{ |
{ |
230 |
free(re); /* Release the memory used for the compiled pattern */ |
pcre_free(re); /* Release the memory used for the compiled pattern */ |
231 |
return 0; /* Finish unless -g was given */ |
return 0; /* Finish unless -g was given */ |
232 |
} |
} |
233 |
|
|
234 |
/* Loop for second and subsequent matches */ |
/* Loop for second and subsequent matches */ |
280 |
if (rc < 0) |
if (rc < 0) |
281 |
{ |
{ |
282 |
printf("Matching error %d\n", rc); |
printf("Matching error %d\n", rc); |
283 |
free(re); /* Release memory used for the compiled pattern */ |
pcre_free(re); /* Release memory used for the compiled pattern */ |
284 |
return 1; |
return 1; |
285 |
} |
} |
286 |
|
|
321 |
} /* End of loop to find second and subsequent matches */ |
} /* End of loop to find second and subsequent matches */ |
322 |
|
|
323 |
printf("\n"); |
printf("\n"); |
324 |
free(re); /* Release memory used for the compiled pattern */ |
pcre_free(re); /* Release memory used for the compiled pattern */ |
325 |
return 0; |
return 0; |
326 |
} |
} |
327 |
|
|