| 73 | } |
| 74 | |
| 75 | char * |
| 76 | regex_error_desc(struct nhregex *re, char *errbuf) |
| 77 | { |
| 78 | if (!re) { |
| 79 | Strcpy(errbuf, "no regexp"); |
| 80 | } else if (!re->err) { |
| 81 | Strcpy(errbuf, "no explanation"); |
| 82 | } else { |
| 83 | errbuf[0] = '\0'; |
| 84 | regerror(re->err, &re->re, errbuf, BUFSZ); |
| 85 | if (!errbuf[0]) |
| 86 | Strcpy(errbuf, "unspecified regexp error"); |
| 87 | } |
| 88 | return errbuf; |
| 89 | } |
| 90 | |
| 91 | boolean |
| 92 | regex_match(const char *s, struct nhregex *re) |
nothing calls this directly
no outgoing calls
no test coverage detected