Back to index

im-sdk  12.3.91
Classes | Typedefs | Functions
fullwidth.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _FullWidth

Typedefs

typedef struct _FullWidth FullWidth

Functions

char * get_junja_str (char ch)

Class Documentation

struct _FullWidth

Definition at line 4 of file fullwidth.h.

Class Members
unsigned fullWidth
unsigned char halfWidth

Typedef Documentation

typedef struct _FullWidth FullWidth

Function Documentation

char* get_junja_str ( char  ch)

Definition at line 76 of file fullwidth.c.

{
    int i;
    int n_element = sizeof(half_full_table) / sizeof(half_full_table[0]);
    char *ret = NULL;

    for(i = 0 ; i < n_element; i++){
        if((unsigned char )ch == half_full_table[i].halfWidth){
            ret = calloc(2, sizeof(char));
            *ret = half_full_table[i].fullWidth >> 8;
            *(ret + 1) = half_full_table[i].fullWidth & 0x00ff;
            *(ret + 2) = '\0';
            return ret;
        }
    }
    return ret;
}

Here is the caller graph for this function: