|
| |||||||||||||
#include "mit-copyright.h"#include "main.h"#include "regexp.h"Go to the source code of this file.
Functions | |
| char * | re_comp () |
| int | re_exec () |
| int | ed_regexp_match_p (string test_string, string pattern) |
| char * | re_comp (char *s) |
| int | re_exec (char *s) |
|
||||||||||||
|
Definition at line 52 of file regexp.c. References re_comp(), and re_exec(). 00055 {
00056 char *comp_retval;
00057 int exec_retval;
00058
00059 if (comp_retval = re_comp(pattern)) {
00060 fprintf(stderr, "%s in regex %s\n", comp_retval, pattern);
00061 return (0);
00062 }
00063 if ((exec_retval = re_exec(test_string)) == -1) {
00064 fprintf(stderr, "Internal error in re_exec()");
00065 return (0);
00066 }
00067
00068 return (exec_retval);
00069 }
|
|
|
Definition at line 81 of file regexp.c. 00083 {
00084 if (!s)
00085 return 0;
00086 if (re)
00087 free(re);
00088
00089 if (!(re = regcmp(s, (char *) 0)))
00090 return "Bad argument to re_comp";
00091
00092 return 0;
00093 }
|
|
|
Referenced by ed_regexp_match_p(). |
|
|
Definition at line 96 of file regexp.c. 00098 {
00099 return regex(re, s) != 0;
00100 }
|
|
|
Referenced by ed_regexp_match_p(). |
| Last updated at Tue Dec 18 21:07:42 PST 2007. | This site and project hosted by... |