YAZ
5.34.0
|
Danmarc2 character set decoding. More...
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <yaz/log.h>
#include <yaz/xmalloc.h>
#include "iconv-p.h"
Go to the source code of this file.
Data Structures | |
struct | decoder_data |
Macros | |
#define | MAX_COMP 4 |
Functions | |
static unsigned long | read_useq (yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read) |
static unsigned long | read_danmarc (yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read) |
unsigned long | yaz_danmarc_swap_to_danmarc (unsigned long x) |
static unsigned long | yaz_danmarc_swap_to_utf8 (unsigned long x) |
static unsigned long | read_danmarc_comb (yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read) |
static size_t | init_danmarc (yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read) |
void | destroy_danmarc (yaz_iconv_decoder_t d) |
yaz_iconv_decoder_t | yaz_danmarc_decoder (const char *fromcode, yaz_iconv_decoder_t d) |
int | yaz_danmarc_is_combining (unsigned long x) |
Variables | |
static unsigned long | swap_seq [] |
Danmarc2 character set decoding.
Definition in file iconv_decode_danmarc.c.
#define MAX_COMP 4 |
Definition at line 23 of file iconv_decode_danmarc.c.
void destroy_danmarc | ( | yaz_iconv_decoder_t | d | ) |
Definition at line 203 of file iconv_decode_danmarc.c.
References yaz_iconv_decoder_s::data, and xfree.
Referenced by yaz_danmarc_decoder().
|
static |
Definition at line 194 of file iconv_decode_danmarc.c.
References yaz_iconv_decoder_s::data, and decoder_data::sz.
Referenced by yaz_danmarc_decoder().
|
static |
Definition at line 74 of file iconv_decode_danmarc.c.
References read_useq(), YAZ_ICONV_EINVAL, and yaz_iconv_set_errno().
Referenced by read_danmarc_comb().
|
static |
Definition at line 164 of file iconv_decode_danmarc.c.
References decoder_data::comp, yaz_iconv_decoder_s::data, MAX_COMP, decoder_data::no_read, read_danmarc(), decoder_data::sz, yaz_danmarc_is_combining(), and yaz_danmarc_swap_to_utf8().
Referenced by yaz_danmarc_decoder().
|
static |
Definition at line 31 of file iconv_decode_danmarc.c.
References YAZ_ICONV_EINVAL, and yaz_iconv_set_errno().
Referenced by read_danmarc().
yaz_iconv_decoder_t yaz_danmarc_decoder | ( | const char * | fromcode, |
yaz_iconv_decoder_t | d | ||
) |
Definition at line 209 of file iconv_decode_danmarc.c.
References yaz_iconv_decoder_s::data, destroy_danmarc(), yaz_iconv_decoder_s::destroy_handle, init_danmarc(), yaz_iconv_decoder_s::init_handle, read_danmarc_comb(), yaz_iconv_decoder_s::read_handle, xmalloc, and yaz_matchstr().
Referenced by prepare_decoders().
int yaz_danmarc_is_combining | ( | unsigned long | x | ) |
Definition at line 227 of file iconv_decode_danmarc.c.
Referenced by read_danmarc_comb(), and write_danmarc().
unsigned long yaz_danmarc_swap_to_danmarc | ( | unsigned long | x | ) |
Definition at line 146 of file iconv_decode_danmarc.c.
References swap_seq.
Referenced by flush_danmarc().
|
static |
Definition at line 155 of file iconv_decode_danmarc.c.
References swap_seq.
Referenced by read_danmarc_comb().
|
static |
Definition at line 130 of file iconv_decode_danmarc.c.
Referenced by yaz_danmarc_swap_to_danmarc(), and yaz_danmarc_swap_to_utf8().