| 239 | |
| 240 | Assumes the `allocated' (and perhaps `buffer') and `translate' fields |
| 241 | are set in BUFP on entry. */ |
| 242 | |
| 243 | const char * |
| 244 | re_compile_pattern (const char *pattern, |
| 245 | size_t length, |
| 246 | struct re_pattern_buffer *bufp) |
| 247 | { |
| 248 | reg_errcode_t ret; |
| 249 | |
| 250 | /* And GNU code determines whether or not to get register information |
| 251 | by passing null for the REGS argument to re_match, etc., not by |
| 252 | setting no_sub, unless RE_NO_SUB is set. */ |
| 253 | bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); |
| 254 | |
| 255 | /* Match anchors at newline. */ |
| 256 | bufp->newline_anchor = 1; |
| 257 | |
| 258 | ret = re_compile_internal (bufp, pattern, length, re_syntax_options); |
| 259 | |
| 260 | if (!ret) |
| 261 | return NULL; |
| 262 | return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); |
| 263 | } |
| 264 | #ifdef _LIBC |
nothing calls this directly
no test coverage detected