Renamed rescm.c to re1.c
This commit is contained in:
parent
3e52c5100b
commit
083b345c2e
|
@ -6,6 +6,9 @@
|
||||||
#include "regexp.h"
|
#include "regexp.h"
|
||||||
#include "cstuff.h"
|
#include "cstuff.h"
|
||||||
|
|
||||||
|
/* Make sure our exports match up w/the implementation: */
|
||||||
|
#include "re1.h"
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#define NULL 0
|
#define NULL 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,7 +24,7 @@ void regerror(char *msg) {regexp_error = msg;}
|
||||||
** Returns boolean match/no-match in hit.
|
** Returns boolean match/no-match in hit.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *reg_match(char *re, char *string, int start,
|
char *reg_match(const char *re, const char *string, int start,
|
||||||
scheme_value start_vec, scheme_value end_vec, int *hit)
|
scheme_value start_vec, scheme_value end_vec, int *hit)
|
||||||
{
|
{
|
||||||
regexp *prog = regcomp(re);
|
regexp *prog = regcomp(re);
|
||||||
|
@ -55,11 +58,11 @@ char *reg_match(char *re, char *string, int start,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *filter_stringvec(char *re, char **stringvec, int *nummatch)
|
char *filter_stringvec(const char *re, char const **stringvec, int *nummatch)
|
||||||
{
|
{
|
||||||
regexp *prog = regcomp(re);
|
regexp *prog = regcomp(re);
|
||||||
char **p = stringvec;
|
char const **p = stringvec;
|
||||||
char **q = p;
|
char const **q = p;
|
||||||
|
|
||||||
if( !prog ) return regexp_error;
|
if( !prog ) return regexp_error;
|
||||||
|
|
||||||
|
@ -70,5 +73,5 @@ char *filter_stringvec(char *re, char **stringvec, int *nummatch)
|
||||||
|
|
||||||
Free(prog);
|
Free(prog);
|
||||||
*nummatch = q-stringvec;
|
*nummatch = q-stringvec;
|
||||||
return "";
|
return NULL;
|
||||||
}
|
}
|
Loading…
Reference in New Issue