Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros | Functions
regerror.c File Reference
`#include "regint.h"`
`#include <stdio.h>`
`#include <varargs.h>`
Include dependency graph for regerror.c:

Go to the source code of this file.

## Macros
#define | va_init_list(a, b) va_start(a)
#define | MAX_ERROR_PAR_LEN 30

## Functions
UChar * | onig_error_code_to_format (OnigPosition code)
static void | sprint_byte (char *s, unsigned int v)
static void | sprint_byte_with_x (char *s, unsigned int v)
static int | to_ascii (OnigEncoding enc, UChar *s, UChar *end, UChar buf[], int buf_size, int *is_over)
int | onig_error_code_to_str (UChar *s, OnigPosition code, va_alist)
void | onig_vsnprintf_with_pattern (UChar buf[], int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt, va_list args)
void | onig_snprintf_with_pattern (buf, int bufsize, OnigEncoding enc, UChar *pat, UChar *pat_end, const UChar *fmt, va_alist)

## Macro Definition Documentation

#define MAX_ERROR_PAR_LEN 30

Definition at line 250 of file regerror.c.

Referenced by onig_error_code_to_str().

#define va_init_list | ( |  | a,
|  |  | b
| ) |  | va_start(a)

Definition at line 39 of file regerror.c.

Referenced by onig_error_code_to_str(), and onig_snprintf_with_pattern().

## Function Documentation

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

Definition at line 43 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_OVER_THREAD_PASS_LIMIT_COUNT, 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_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, p, and UChar.

Referenced by onig_error_code_to_str().

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

Definition at line 256 of file regerror.c.

References OnigErrorInfo::enc, 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, p, OnigErrorInfo::par, OnigErrorInfo::par_end, to_ascii(), UChar, va_init_list, and xmemcpy.

Referenced by make_regexp(), rb_reg_prepare_re(), and rb_reg_search().

void onig_snprintf_with_pattern | ( | buf | ,
|  | int | bufsize,
|  | OnigEncoding | enc,
|  | UChar* | pat,
|  | UChar* | pat_end,
|  | const UChar * | fmt,
|  | va_alist |
| ) |  |

Definition at line 386 of file regerror.c.

References args, onig_vsnprintf_with_pattern(), and va_init_list.

Referenced by set_quantifier().

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 321 of file regerror.c.

References bp, enclen, ONIG_ENCODING_ASCII, ONIGENC_IS_CODE_PRINT, ONIGENC_IS_CODE_SPACE, ONIGENC_IS_MBC_HEAD, ONIGENC_MBC_MINLEN, onigenc_str_bytelen_null(), p, sprint_byte_with_x(), UChar, and xvsnprintf.

Referenced by onig_snprintf_with_pattern(), and onig_syntax_warn().

static void sprint_byte | ( | char * | s,
|  | unsigned int | v
| ) |  |
| static

Definition at line 190 of file regerror.c.

Referenced by to_ascii().

static void sprint_byte_with_x | ( | char * | s,
|  | unsigned int | v
| ) |  |
| static

Definition at line 195 of file regerror.c.

Referenced by onig_vsnprintf_with_pattern(), and to_ascii().

static int to_ascii | ( | OnigEncoding | enc,
|  | UChar * | s,
|  | UChar * | end,
|  | UChar | buf[],
|  | int | buf_size,
|  | int * | is_over
| ) |  |
| static

Definition at line 200 of file regerror.c.

References enclen, MIN, ONIGENC_MBC_MINLEN, ONIGENC_MBC_TO_CODE, p, sprint_byte(), sprint_byte_with_x(), UChar, and xmemcpy.

Referenced by onig_error_code_to_str().