| 50 | } |
| 51 | |
| 52 | char * |
| 53 | regex_error_desc(struct nhregex *re, char *errbuf) |
| 54 | { |
| 55 | if (!re) { |
| 56 | Strcpy(errbuf, "no regexp"); |
| 57 | } else if (!re->err) { |
| 58 | Strcpy(errbuf, "no explanation"); |
| 59 | } else { |
| 60 | errbuf[0] = '\0'; |
| 61 | (void) strncat(errbuf, re->err->what(), BUFSZ - 1); |
| 62 | if (!errbuf[0]) |
| 63 | Strcpy(errbuf, "unspecified regexp error"); |
| 64 | } |
| 65 | return errbuf; |
| 66 | } |
| 67 | |
| 68 | boolean |
| 69 | regex_match(const char *s, struct nhregex *re) |
no outgoing calls