Back to index

im-sdk  12.3.91
Functions | Variables
fullwidth.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <locale.h>
#include "fullwidth.h"

Go to the source code of this file.

Functions

char * get_junja_str (char ch)

Variables

FullWidth half_full_table []

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:


Variable Documentation

Definition at line 10 of file fullwidth.c.