Ruby: regerror.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
regerror.c File Reference
`#include "regint.h"`
`#include <stdio.h>`
`#include <stdarg.h>`

Go to the source code of this file.

## Macros
#define | MAX_ERROR_PAR_LEN 50

## Functions
UChar * | onig_error_code_to_format (OnigPosition code)
int | onig_error_code_to_str (UChar *s, OnigPosition code,...)
void | onig_vsnprintf_with_pattern (UChar buf[], int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt, va_list args)

## Macro Definition Documentation

## ◆ MAX_ERROR_PAR_LEN

#define MAX_ERROR_PAR_LEN 50

Definition at line 246 of file regerror.c.

## Function Documentation

## ◆ onig_error_code_to_format()

UChar * onig_error_code_to_format | ( | OnigPosition | code | ) |

Definition at line 37 of file regerror.c.

References ONIG_MISMATCH, ONIG_NO_SUPPORT_CONFIG, ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE, ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE, ONIGERR_CONTROL_CODE_SYNTAX, ONIGERR_DEFAULT_ENCODING_IS_NOT_SET, ONIGERR_EMPTY_CHAR_CLASS, ONIGERR_EMPTY_GROUP_NAME, ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS, ONIGERR_END_PATTERN_AT_CONTROL, ONIGERR_END_PATTERN_AT_ESCAPE, ONIGERR_END_PATTERN_AT_LEFT_BRACE, ONIGERR_END_PATTERN_AT_LEFT_BRACKET, ONIGERR_END_PATTERN_AT_META, ONIGERR_END_PATTERN_IN_GROUP, ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS, ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY, ONIGERR_INVALID_ARGUMENT, ONIGERR_INVALID_BACKREF, ONIGERR_INVALID_CHAR_IN_GROUP_NAME, ONIGERR_INVALID_CHAR_PROPERTY_NAME, ONIGERR_INVALID_CODE_POINT_VALUE, ONIGERR_INVALID_COMBINATION_OF_OPTIONS, ONIGERR_INVALID_CONDITION_PATTERN, ONIGERR_INVALID_GROUP_NAME, ONIGERR_INVALID_LOOK_BEHIND_PATTERN, ONIGERR_INVALID_POSIX_BRACKET_TYPE, ONIGERR_INVALID_REPEAT_RANGE_PATTERN, ONIGERR_MATCH_STACK_LIMIT_OVER, ONIGERR_MEMORY, ONIGERR_META_CODE_SYNTAX, ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE, ONIGERR_MULTIPLEX_DEFINED_NAME, ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, ONIGERR_NESTED_REPEAT_OPERATOR, ONIGERR_NEVER_ENDING_RECURSION, ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION, ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED, ONIGERR_PARSE_DEPTH_LIMIT_OVER, ONIGERR_PARSER_BUG, ONIGERR_PREMATURE_END_OF_CHAR_CLASS, ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR, ONIGERR_STACK_BUG, ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID, ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED, ONIGERR_TOO_BIG_BACKREF_NUMBER, ONIGERR_TOO_BIG_NUMBER, ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE, ONIGERR_TOO_BIG_WIDE_CHAR_VALUE, ONIGERR_TOO_LONG_WIDE_CHAR_VALUE, ONIGERR_TOO_MANY_CAPTURE_GROUPS, ONIGERR_TOO_MANY_MULTI_BYTE_RANGES, ONIGERR_TOO_SHORT_DIGITS, ONIGERR_TOO_SHORT_MULTI_BYTE_STRING, ONIGERR_TYPE_BUG, ONIGERR_UNDEFINED_BYTECODE, ONIGERR_UNDEFINED_GROUP_OPTION, ONIGERR_UNDEFINED_GROUP_REFERENCE, ONIGERR_UNDEFINED_NAME_REFERENCE, ONIGERR_UNEXPECTED_BYTECODE, ONIGERR_UNMATCHED_CLOSE_PARENTHESIS, ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS, ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE, and UChar.

Referenced by onig_error_code_to_str().

## ◆ onig_error_code_to_str()

int onig_error_code_to_str | ( | UChar * | s,
|  | OnigPosition | code,
|  |  | ...
| ) |  |

Definition at line 249 of file regerror.c.

References OnigErrorInfo::enc, len, MAX_ERROR_PAR_LEN, ONIG_ENCODING_ASCII, onig_error_code_to_format(), onigenc_str_bytelen_null(), ONIGERR_INVALID_CHAR_IN_GROUP_NAME, ONIGERR_INVALID_CHAR_PROPERTY_NAME, ONIGERR_INVALID_GROUP_NAME, ONIGERR_MULTIPLEX_DEFINED_NAME, ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL, ONIGERR_UNDEFINED_GROUP_REFERENCE, ONIGERR_UNDEFINED_NAME_REFERENCE, OnigErrorInfo::par, OnigErrorInfo::par_end, UChar, and xmemcpy.

## ◆ onig_vsnprintf_with_pattern()

void onig_vsnprintf_with_pattern | ( | UChar | buf[],
|  | int | bufsize,
|  | OnigEncoding | enc,
|  | UChar * | pat,
|  | UChar * | pat_end,
|  | const UChar * | fmt,
|  | va_list | args
| ) |  |

Definition at line 314 of file regerror.c.

References bp, enclen, len, memcpy, ONIG_ENCODING_ASCII, ONIGENC_IS_CODE_CNTRL, ONIGENC_IS_CODE_PRINT, ONIGENC_IS_CODE_SPACE, ONIGENC_IS_MBC_HEAD, ONIGENC_MBC_MINLEN, onigenc_str_bytelen_null(), UChar, and xvsnprintf.