Changeset 178 for trunk/src/helpers/regexp.c
- Timestamp:
- Jun 20, 2002, 10:46:29 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/regexp.c
r155 r178 2524 2524 */ 2525 2525 2526 BOOLEAN rxpMatch_fwd(const ERE * ere,2527 int eremf, 2526 BOOLEAN rxpMatch_fwd(const ERE *ere, // in: compiled ERE (from rxpCompile) 2527 int eremf, // in: EREMF_* flags 2528 2528 const char *str, // in: string to test 2529 2529 int pos, // in: start position 2530 2530 int *pos_match, // out: position of match 2531 2531 int *len_match, // out: length of match 2532 ERE_MATCHINFO * mi)2532 ERE_MATCHINFO *mi) // out: match info (for rxpSubsWith) 2533 2533 { 2534 2534 int len = pos + strlen(str + pos); … … 2577 2577 */ 2578 2578 2579 BOOLEAN rxpMatch_bwd(const ERE * ere, 2580 int eremf, 2581 const char *str, int pos, 2582 int *pos_match, int *len_match, 2583 ERE_MATCHINFO * mi) 2579 BOOLEAN rxpMatch_bwd(const ERE *ere, // in: compiled ERE (from rxpCompile) 2580 int eremf, // in: EREMF_* flags 2581 const char *str, // in: string to test 2582 int pos, // in: start position 2583 int *pos_match, // out: position of match 2584 int *len_match, // out: length of match 2585 ERE_MATCHINFO * mi) // out: match info (for rxpSubsWith) 2584 2586 { 2585 2587 int i; … … 2630 2632 *@@ rxpSubsWith: 2631 2633 * perform a substitution based upon an earlier found match. 2632 */ 2633 2634 BOOLEAN rxpSubsWith(const char *str, // Original string searched 2635 int pos, int len, // Span of the entire match 2636 ERE_MATCHINFO * mi, // Details of sub-spans of match 2637 const char *with, // Specification of replacement 2638 char *out, // Substituted string buffer 2639 int len_out, // How much room in output buffer 2640 int *rc // Error, if FALSE returned 2641 ) 2634 * This allows for implementing a "find and replace" function. 2635 */ 2636 2637 BOOLEAN rxpSubsWith(const char *str, // in: original string searched (same as str given to rxpMatch_fwd) 2638 int pos, // in: span of the entire match (pos_match from rxpMatch_fwd) 2639 int len, // in: span of the entire match (len_match from rxpMatch_fwd) 2640 ERE_MATCHINFO *mi, // in: details of match sub-spans (as from rxpMatch_fwd) 2641 const char *with, // in: replacement string with \1 etc. 2642 char *out, // out: buffer for string substitutions 2643 int len_out, // in: sizeof *out 2644 int *rc) // out: error, if FALSE returned 2642 2645 { 2643 2646 int i = 0;
Note:
See TracChangeset
for help on using the changeset viewer.