#include <stdlib.h>
#include <stdio.h>
#include <endian.h>
#include <byteswap.h>
#include <string.h>
#include "utrac.h"
#include "ut_charset.h"
#include "debug.h"
Include dependency graph for ut_charset.c:
Go to the source code of this file.
Classes | |
struct | UtCharmapLink |
Link used to store temporarily UtCharset structures in a linked list. More... | |
Typedefs | |
typedef UtCharmapLink | UtCharmapLink |
Link used to store temporarily UtCharset structures in a linked list. | |
Functions | |
bool | is_blank (char c) |
test si le caractère ASCII (sur un octet) est un espace ou une tabulation | |
bool | is_eol (char c) |
test si le caractère ASCII (sur un octet) est une fin de ligne | |
bool | is_eol_c (char c) |
test si le caractère ASCII (sur un octet) est une fin de ligne ou un début de commentaire | |
UtCode | expend_lang_sys (UtLangSys *lang_sys) |
Expend size of an UtLangSys dynamic array. | |
UtCode | parse_string_line (char **scan_in, char **dst) |
Copy a string from file buffer. | |
UtCode | parse_lang_sys_def_line (char **scan_in, UtLangSys *lang_sys) |
Parse parameter of a "DefineLanguage" or "DefineSystem" line. | |
UtCode | parse_charmap_line (char **scan_in, UtCharmapLink **current_link) |
Parse parameter of a "Charmap"line. | |
UtCode | parse_lang_sys_line (char **scan_in, UtLangSys *lang_sys, char *lang_sys_coef) |
Parse parameter of a "Language" or "System" line. | |
UtCode | parse_charmap_entry (char **scan_in, UtCharset *charset) |
Parse charmap entry. | |
bool | streq (const char *src, char **cmp) |
Compare a null-ended string with a non-null-ended string. | |
UtCode | ut_print_charsets () |
UtCode | ut_load_charsets () |
Loads and parses file charset.dat. | |
Variables | |
const char * | charmap_keyword = "Charmap:" |
Keywords used in file charset.dat. | |
const char * | alias_keyword = "Alias:" |
const char * | common_name_keyword = "CommonName:" |
const char * | comment_keyword = "Comment:" |
const char * | language_keyword = "Language:" |
const char * | system_keyword = "System:" |
const char * | language_def_keyword = "DefineLanguage:" |
const char * | system_def_keyword = "DefineSystem:" |
const char * | SCRIPT_NAME [] = { "LATIN", "CYRILLIC", "ARABIC", "GREEK", "HEBREW", "THAI", NULL} |
Alphabet names that can be recognized in file charset.dat. |
Definition in file ut_charset.c.
|
Link used to store temporarily UtCharset structures in a linked list.
Referenced by ut_load_charsets(). |
|
Expend size of an UtLangSys dynamic array.
Definition at line 116 of file ut_charset.c. References UtLangSys::code, UtLangSys::n_max, and UtLangSys::name. Referenced by parse_lang_sys_def_line(). |
|
test si le caractère ASCII (sur un octet) est un espace ou une tabulation
Definition at line 73 of file ut_charset.c. Referenced by parse_charmap_entry(), parse_lang_sys_def_line(), parse_lang_sys_line(), parse_string_line(), and ut_load_charsets(). |
|
test si le caractère ASCII (sur un octet) est une fin de ligne
Definition at line 89 of file ut_charset.c. Referenced by ut_load_charsets(). |
|
test si le caractère ASCII (sur un octet) est une fin de ligne ou un début de commentaire
Definition at line 96 of file ut_charset.c. Referenced by parse_lang_sys_def_line(), parse_lang_sys_line(), and parse_string_line(). |
|
Copy a string from file buffer.
Definition at line 145 of file ut_charset.c. References is_blank(), and is_eol_c(). Referenced by parse_charmap_line(), parse_lang_sys_def_line(), and ut_load_charsets(). |
Here is the call graph for this function:
|
Loads and parses file charset.dat. This function loads and parses file charset.dat containing all informations about charset in a UtCharset array in UtSession::charset.
Definition at line 472 of file ut_charset.c. References UtCharset::alias, UtCharset::char_type, charmap_keyword, UtCharmapLink::charset, UtSession::charset, UtCharset::comment, UtCharset::common_name, UtSession::error_string, is_blank(), is_eol(), UtSession::language, UtCharset::language, UtCharset::name, UtSession::nb_charsets, UtCharmapLink::next, parse_charmap_entry(), parse_charmap_line(), parse_lang_sys_def_line(), parse_lang_sys_line(), parse_string_line(), streq(), UtSession::system, UtCharset::system, UtCharset::type, UtCharset::unicode, UT_ERROR_STRING_SIZE, ut_load_charset_file(), and UtCharmapLink. Referenced by ut_init_noalloc(). |
Here is the call graph for this function: