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

Function regex_match

sys/share/posixregex.c:91–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91boolean
92regex_match(const char *s, struct nhregex *re)
93{
94 int result;
95
96 if (!re || !s)
97 return FALSE;
98
99 if ((result = regexec(&re->re, s, 0, (genericptr_t) 0, 0))) {
100 if (result != REG_NOMATCH)
101 re->err = result;
102 return FALSE;
103 }
104 return TRUE;
105}
106
107void
108regex_free(struct nhregex *re)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected