|
ELinks 0.19.1
|
#include <stdio.h>#include <ctype.h>#include <stdlib.h>#include "elinks.h"#include "document/options.h"#include "intl/charsets.h"#include "util/conv.h"#include "util/error.h"#include "util/fastfind.h"#include "util/hash.h"#include "util/memory.h"#include "util/string.h"#include "osdep/osdep.h"#include "intl/codepage.inc"#include "intl/uni_7b.inc"#include "intl/entity.inc"
Data Structures | |
| struct | table_entry |
| struct | codepage_desc |
| struct | el_codepoints |
| struct | entity_cache |
Macros | |
| #define | _GNU_SOURCE /* strcasecmp() */ |
| #define | table table_elinks |
| #define | BIN_SEARCH(table, entry, entries, key, result) |
| #define | SYSTEM_CHARSET_FLAG 128 |
| #define | is_cp_ptr_utf8(cp_ptr) |
| #define | utf8_issingle(p) |
| #define | utf8_islead(p) |
| #define | ENTITY_CACHE_SIZE 10 /* 10 seems a good value. */ |
| #define | ENTITY_CACHE_MAXLEN |
| #define | PUTC |
Functions | |
| NONSTATIC_INLINE char * | encode_utf8 (unicode_val_T u) |
| NONSTATIC_INLINE unicode_val_T | utf8_to_unicode (char **string, const char *end) |
| static void | free_translation_table (struct conv_table *p) |
| static void | new_translation_table (struct conv_table *p) |
| static int | is_codepoint_supported (unicode_val_T u) |
| int | codepoint_replacement (unicode_val_T u) |
| const char * | u2cp_ (unicode_val_T u, int to, enum nbsp_mode nbsp_mode) |
| NONSTATIC_INLINE int | utf8charlen (const char *p) |
| int | strlen_utf8 (char **str) |
| char * | utf8_prevchar (char *current, int pos, char *start) |
| int | utf8_char2cells (const char *utf8_char_const, char *end) |
| int | utf8_ptr2cells (const char *string, char *end) |
| int | utf8_ptr2chars (char *string, char *end) |
| int | utf8_cells2bytes (const char *string, int max_cells, char *end) |
| char * | utf8_step_forward (char *string, char *end, int max, enum utf8_step way, int *count) |
| char * | utf8_step_backward (char *string, char *start, int max, enum utf8_step way, int *count) |
| unicode_val_T | unicode_fold_label_case (unicode_val_T c) |
| static unicode_val_T | cp2u_shared (const struct codepage_desc *from, unsigned char c) |
| unicode_val_T | cp2u (int from, unsigned char c) |
| const char * | cp2utf8 (int from, int c) |
| unicode_val_T | cp_to_unicode (int codepage, char **string, const char *end) |
| static void | add_utf8 (struct conv_table *ct, unicode_val_T u, const char *str) |
| static void | free_utf_table (void) |
| static struct conv_table * | get_translation_table_to_utf8 (int from) |
| void | free_conv_table (void) |
| struct conv_table * | get_translation_table (int from, int to) |
| static int | xxstrcmp (const char *s1, const char *s2, int l2) |
| static int | hits_cmp (const void *v1, const void *v2) |
| static int | compare_entities (const void *key_, const void *element_) |
| const char * | get_entity_string (const char *str, const int strlen, int encoding) |
| char * | convert_string (struct conv_table *convert_table, const char *chars2, int charslen2, int cp, enum convert_string_mode mode, int *length, void(*callback)(void *data, char *buf, int buflen), void *callback_data) |
| void | charsets_list_reset (void) |
| struct fastfind_key_value * | charsets_list_next (void) |
| int | get_cp_index (const char *name) |
| void | make_codepoints (void) |
| void | init_charsets_lookup (void) |
| void | free_charsets_lookup (void) |
| const char * | get_cp_name (int cp_index) |
| const char * | get_cp_config_name (int cp_index) |
| const char * | get_cp_mime_name (int cp_index) |
| int | is_cp_utf8 (int cp_index) |
| const uint16_t * | get_cp_highhalf (const char *name) |
Variables | |
| static const char | strings [256][2] |
| static const char | no_str [] = "*" |
| struct el_codepoints | codepoints |
| static const unicode_val_T | strange_chars [32] |
| static char | utf_buffer [7] |
| static const char | utf8char_len_tab [256] |
| struct conv_table | utf_table [256] |
| int | utf_table_init = 1 |
| static struct conv_table | table [256] |
| static int | first = 1 |
| static unsigned int | i_name = 0 |
| static unsigned int | i_alias = 0 |
| static struct fastfind_index | ff_charsets_index = INIT_FASTFIND_INDEX("charsets_lookup", charsets_list_reset, charsets_list_next) |
| #define _GNU_SOURCE /* strcasecmp() */ |
| #define ENTITY_CACHE_MAXLEN |
| #define ENTITY_CACHE_SIZE 10 /* 10 seems a good value. */ |
| #define is_cp_ptr_utf8 | ( | cp_ptr | ) |
| #define PUTC |
| #define SYSTEM_CHARSET_FLAG 128 |
| #define table table_elinks |
| #define utf8_islead | ( | p | ) |
| #define utf8_issingle | ( | p | ) |
|
static |
| struct fastfind_key_value * charsets_list_next | ( | void | ) |
| void charsets_list_reset | ( | void | ) |
| int codepoint_replacement | ( | unicode_val_T | u | ) |
|
static |
| char * convert_string | ( | struct conv_table * | convert_table, |
| const char * | chars2, | ||
| int | charslen2, | ||
| int | cp, | ||
| enum convert_string_mode | mode, | ||
| int * | length, | ||
| void(* | callback )(void *data, char *buf, int buflen), | ||
| void * | callback_data ) |
| unicode_val_T cp2u | ( | int | from, |
| unsigned char | c ) |
|
static |
| const char * cp2utf8 | ( | int | from, |
| int | c ) |
| unicode_val_T cp_to_unicode | ( | int | codepage, |
| char ** | string, | ||
| const char * | end ) |
| NONSTATIC_INLINE char * encode_utf8 | ( | unicode_val_T | u | ) |
| void free_charsets_lookup | ( | void | ) |
| void free_conv_table | ( | void | ) |
|
static |
|
static |
| const char * get_cp_config_name | ( | int | cp_index | ) |
| const uint16_t * get_cp_highhalf | ( | const char * | name | ) |
| int get_cp_index | ( | const char * | name | ) |
| const char * get_cp_mime_name | ( | int | cp_index | ) |
| const char * get_cp_name | ( | int | cp_index | ) |
| const char * get_entity_string | ( | const char * | str, |
| const int | strlen, | ||
| int | encoding ) |
| struct conv_table * get_translation_table | ( | int | from, |
| int | to ) |
|
static |
|
static |
| void init_charsets_lookup | ( | void | ) |
|
static |
| int is_cp_utf8 | ( | int | cp_index | ) |
| void make_codepoints | ( | void | ) |
|
static |
| int strlen_utf8 | ( | char ** | str | ) |
| const char * u2cp_ | ( | unicode_val_T | u, |
| int | to, | ||
| enum nbsp_mode nbsp_mode | ) |
| unicode_val_T unicode_fold_label_case | ( | unicode_val_T | c | ) |
| int utf8_cells2bytes | ( | const char * | string, |
| int | max_cells, | ||
| char * | end ) |
| int utf8_char2cells | ( | const char * | utf8_char_const, |
| char * | end ) |
| char * utf8_prevchar | ( | char * | current, |
| int | pos, | ||
| char * | start ) |
| int utf8_ptr2cells | ( | const char * | string, |
| char * | end ) |
| int utf8_ptr2chars | ( | char * | string, |
| char * | end ) |
| char * utf8_step_backward | ( | char * | string, |
| char * | start, | ||
| int | max, | ||
| enum utf8_step | way, | ||
| int * | count ) |
| char * utf8_step_forward | ( | char * | string, |
| char * | end, | ||
| int | max, | ||
| enum utf8_step | way, | ||
| int * | count ) |
| NONSTATIC_INLINE unicode_val_T utf8_to_unicode | ( | char ** | string, |
| const char * | end ) |
| NONSTATIC_INLINE int utf8charlen | ( | const char * | p | ) |
|
inlinestatic |
| struct el_codepoints codepoints |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| struct conv_table utf_table[256] |
| int utf_table_init = 1 |