FreeBSD kernel libkern code
iconv_xlat16.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/iconv.h>
#include "iconv_converter_if.h"
Include dependency graph for iconv_xlat16.c:

Go to the source code of this file.

Data Structures

struct  iconv_xlat16
 

Macros

#define C2I1(c)   ((c) & 0x8000 ? ((c) & 0xff) | 0x100 : (c) & 0xff)
 
#define C2I2(c)   ((c) & 0x8000 ? ((c) >> 8) & 0x7f : ((c) >> 8) & 0xff)
 

Functions

 __FBSDID ("$FreeBSD$")
 
static int iconv_xlat16_open (struct iconv_converter_class *dcp, struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
 
static int iconv_xlat16_close (void *data)
 
static int iconv_xlat16_conv (void *d2p, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int convchar, int casetype)
 
static const char * iconv_xlat16_name (struct iconv_converter_class *dcp)
 
static int iconv_xlat16_tolower (void *d2p, int c)
 
static int iconv_xlat16_toupper (void *d2p, int c)
 
 KICONV_CONVERTER (xlat16, sizeof(struct iconv_xlat16))
 

Variables

static kobj_method_t iconv_xlat16_methods []
 

Macro Definition Documentation

◆ C2I1

#define C2I1 (   c)    ((c) & 0x8000 ? ((c) & 0xff) | 0x100 : (c) & 0xff)

Definition at line 48 of file iconv_xlat16.c.

◆ C2I2

#define C2I2 (   c)    ((c) & 0x8000 ? ((c) >> 8) & 0x7f : ((c) >> 8) & 0xff)

Definition at line 49 of file iconv_xlat16.c.

Function Documentation

◆ __FBSDID()

__FBSDID ( "$FreeBSD$"  )

◆ iconv_xlat16_close()

static int iconv_xlat16_close ( void *  data)
static

Definition at line 99 of file iconv_xlat16.c.

References iconv_xlat16::d_csp, iconv_xlat16::f_ctp, iconv_close(), and iconv_xlat16::t_ctp.

Here is the call graph for this function:

◆ iconv_xlat16_conv()

static int iconv_xlat16_conv ( void *  d2p,
const char **  inbuf,
size_t *  inbytesleft,
char **  outbuf,
size_t *  outbytesleft,
int  convchar,
int  casetype 
)
static

Definition at line 113 of file iconv_xlat16.c.

References C2I1, C2I2, casetype, convchar, iconv_xlat16::d_table, iconv_xlat16::f_ctp, inbuf, inbytesleft, outbuf, outbytesleft, iconv_xlat16::t_ctp, towlower(), and towupper().

Here is the call graph for this function:

◆ iconv_xlat16_name()

static const char * iconv_xlat16_name ( struct iconv_converter_class *  dcp)
static

Definition at line 296 of file iconv_xlat16.c.

◆ iconv_xlat16_open()

static int iconv_xlat16_open ( struct iconv_converter_class *  dcp,
struct iconv_cspair *  csp,
struct iconv_cspair *  cspf,
void **  dpp 
)
static

Definition at line 63 of file iconv_xlat16.c.

References iconv_xlat16::d_csp, iconv_xlat16::d_table, iconv_xlat16::f_ctp, iconv_open(), strcmp(), and iconv_xlat16::t_ctp.

Here is the call graph for this function:

◆ iconv_xlat16_tolower()

static int iconv_xlat16_tolower ( void *  d2p,
int  c 
)
static

Definition at line 302 of file iconv_xlat16.c.

References c, C2I1, C2I2, and iconv_xlat16::d_table.

◆ iconv_xlat16_toupper()

static int iconv_xlat16_toupper ( void *  d2p,
int  c 
)
static

Definition at line 327 of file iconv_xlat16.c.

References c, C2I1, C2I2, and iconv_xlat16::d_table.

◆ KICONV_CONVERTER()

KICONV_CONVERTER ( xlat16  ,
sizeof(struct iconv_xlat16  
)

Variable Documentation

◆ iconv_xlat16_methods

kobj_method_t iconv_xlat16_methods[]
static
Initial value:
= {
KOBJMETHOD(iconv_converter_open, iconv_xlat16_open),
KOBJMETHOD(iconv_converter_close, iconv_xlat16_close),
KOBJMETHOD(iconv_converter_conv, iconv_xlat16_conv),
KOBJMETHOD(iconv_converter_name, iconv_xlat16_name),
KOBJMETHOD(iconv_converter_tolower, iconv_xlat16_tolower),
KOBJMETHOD(iconv_converter_toupper, iconv_xlat16_toupper),
{0, 0}
}
static const char * iconv_xlat16_name(struct iconv_converter_class *dcp)
Definition: iconv_xlat16.c:296
static int iconv_xlat16_close(void *data)
Definition: iconv_xlat16.c:99
static int iconv_xlat16_tolower(void *d2p, int c)
Definition: iconv_xlat16.c:302
static int iconv_xlat16_toupper(void *d2p, int c)
Definition: iconv_xlat16.c:327
static int iconv_xlat16_conv(void *d2p, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft, int convchar, int casetype)
Definition: iconv_xlat16.c:113
static int iconv_xlat16_open(struct iconv_converter_class *dcp, struct iconv_cspair *csp, struct iconv_cspair *cspf, void **dpp)
Definition: iconv_xlat16.c:63

Definition at line 350 of file iconv_xlat16.c.