MCPcopy Create free account
hub / github.com/NetHack/NetHack / regex_error_desc

Function regex_error_desc

sys/share/posixregex.c:75–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75char *
76regex_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
91boolean
92regex_match(const char *s, struct nhregex *re)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected