#include #include #include #include "locale_impl.h" /* Error message strings for error codes listed in `regex.h'. This list needs to be in sync with the codes listed there, naturally. */ /* Converted to single string by Rich Felker to remove the need for * data relocations at runtime, 27 Feb 2006. */ static const char messages[] = { "No error0円" "No match0円" "Invalid regexp0円" "Unknown collating element0円" "Unknown character class name0円" "Trailing backslash0円" "Invalid back reference0円" "Missing ']'0円" "Missing ')'0円" "Missing '}'0円" "Invalid contents of {}0円" "Invalid character range0円" "Out of memory0円" "Repetition not preceded by valid expression0円" "0円Unknown error" }; size_t regerror(int e, const regex_t *restrict preg, char *restrict buf, size_t size) { const char *s; for (s=messages; e && *s; e--, s+=strlen(s)+1); if (!*s) s++; s = LCTRANS_CUR(s); return 1+snprintf(buf, size, "%s", s); }

AltStyle によって変換されたページ (->オリジナル) /