Libparserutils
|
#include <ctype.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "charset/aliases.h"
#include "utils/utils.h"
#include "aliases.inc"
Go to the source code of this file.
Data Structures | |
struct | lengthed_string |
Macros | |
#define | IS_PUNCT_OR_SPACE(x) |
Functions | |
static int | parserutils_charset_alias_match (const void *a, const void *b) |
parserutils_charset_aliases_canon * | parserutils__charset_alias_canonicalise (const char *alias, size_t len) |
Retrieve the canonical form of an alias name. More... | |
uint16_t | parserutils_charset_mibenum_from_name (const char *alias, size_t len) |
Retrieve the MIB enum value assigned to an encoding name. More... | |
const char * | parserutils_charset_mibenum_to_name (uint16_t mibenum) |
Retrieve the canonical name of an encoding from the MIB enum. More... | |
bool | parserutils_charset_mibenum_is_unicode (uint16_t mibenum) |
Detect if a parserutils_charset is Unicode. More... | |
#define IS_PUNCT_OR_SPACE | ( | x | ) |
parserutils_charset_aliases_canon * parserutils__charset_alias_canonicalise | ( | const char * | alias, |
size_t | len | ||
) |
Retrieve the canonical form of an alias name.
alias | The alias name |
len | The length of the alias name |
Definition at line 79 of file aliases.c.
References len, parserutils_charset_alias_match(), lengthed_string::s, and lengthed_string::slen.
Referenced by parserutils_charset_codec_create(), and parserutils_charset_mibenum_from_name().
|
static |
Definition at line 35 of file aliases.c.
References IS_PUNCT_OR_SPACE, lengthed_string::s, and lengthed_string::slen.
Referenced by parserutils__charset_alias_canonicalise().
uint16_t parserutils_charset_mibenum_from_name | ( | const char * | alias, |
size_t | len | ||
) |
Retrieve the MIB enum value assigned to an encoding name.
alias | The alias to lookup |
len | The length of the alias string |
Definition at line 107 of file aliases.c.
References len, parserutils_charset_aliases_canon::mib_enum, and parserutils__charset_alias_canonicalise().
Referenced by charset_8859_codec_create(), charset_8859_codec_handles_charset(), charset_ascii_codec_handles_charset(), charset_ext8_codec_create(), charset_ext8_codec_handles_charset(), charset_utf16_codec_handles_charset(), charset_utf8_codec_handles_charset(), filter_set_encoding(), parserutils__filter_create(), parserutils_inputstream_change_charset(), parserutils_inputstream_create(), parserutils_inputstream_refill_buffer(), and parserutils_inputstream_strip_bom().
bool parserutils_charset_mibenum_is_unicode | ( | uint16_t | mibenum | ) |
const char * parserutils_charset_mibenum_to_name | ( | uint16_t | mibenum | ) |
Retrieve the canonical name of an encoding from the MIB enum.
mibenum | The MIB enum value |
Definition at line 127 of file aliases.c.
References parserutils_charset_aliases_canon::mib_enum, and parserutils_charset_aliases_canon::name.
Referenced by filter_set_encoding(), parserutils_inputstream_read_charset(), and parserutils_inputstream_refill_buffer().