Back to index

im-sdk  12.3.91
Defines | Functions | Variables
le_qjbj_punct.c File Reference
#include <stdio.h>

Go to the source code of this file.

Defines

#define MAX_LINE_LEN   256
#define FULLWIDE_CHAR_NUM   94
#define PUNCT_CHAR_NUM   18

Functions

char * get_qj_str (char ch)
char * get_punct_str (char ch)

Variables

char * FullWideCharListByLang_CN [FULLWIDE_CHAR_NUM]
char * FullWideCharListByLang_TW [FULLWIDE_CHAR_NUM]
char PunctChars [PUNCT_CHAR_NUM]
char * PunctCharListByLang_CN [PUNCT_CHAR_NUM]
char * PunctCharListByLang_TW [PUNCT_CHAR_NUM]
char * PunctCharListByLang_HK [PUNCT_CHAR_NUM]

Define Documentation

#define FULLWIDE_CHAR_NUM   94

Definition at line 8 of file le_qjbj_punct.c.

#define MAX_LINE_LEN   256

Definition at line 7 of file le_qjbj_punct.c.

#define PUNCT_CHAR_NUM   18

Definition at line 9 of file le_qjbj_punct.c.


Function Documentation

char* get_punct_str ( char  ch)

Definition at line 291 of file le_qjbj_punct.c.

{
    int i, ch_pos;
    char *str;

    ch_pos = -1;
    for (i = 0; i < PUNCT_CHAR_NUM; i++) {
       if (ch == PunctChars[i]) {
           ch_pos = i;
           break;
       }
    }
    if (ch_pos == -1)
       return (NULL);

#ifdef LE_ZH_CN
    return (PunctCharListByLang_CN[ch_pos]);
#else
#ifdef LE_ZH_TW
    return (PunctCharListByLang_TW[ch_pos]);
#else
    return (PunctCharListByLang_HK[ch_pos]);
#endif
#endif
}
char* get_qj_str ( char  ch)

Definition at line 275 of file le_qjbj_punct.c.

{
    int ch_pos;

    ch_pos = ch - 0x21;

    if (ch_pos < 0 || ch_pos >= FULLWIDE_CHAR_NUM)
       return (NULL);

#ifdef LE_ZH_CN
    return (FullWideCharListByLang_CN[ch_pos]);
#else
    return (FullWideCharListByLang_TW[ch_pos]);
#endif
}

Variable Documentation

Definition at line 11 of file le_qjbj_punct.c.

Definition at line 108 of file le_qjbj_punct.c.

Initial value:
 {
    "!",
    "“",
    "¥",
    "─",
    "‘",
    "(",
    ")",
    ",",
    "。",
    ":",
    ";",
    "》",
    "《",
    "?",
    "@",
    "、",
    "…",
    "__",
}

Definition at line 212 of file le_qjbj_punct.c.

Initial value:
 {
    "!",
    "“",
    "HK$",
    "─",
    "‘",
    "(",
    ")",
    ",",
    "。",
    ":",
    ";",
    "《",
    "》",
    "?",
    "@",
    "、",
    "…",
    "__",
}

Definition at line 254 of file le_qjbj_punct.c.

Initial value:
 {
    "!",
    "“",
    "NT$",
    "─",
    "‘",
    "(",
    ")",
    ",",
    "。",
    ":",
    ";",
    "《",
    "》",
    "?",
    "@",
    "、",
    "…",
    "__",
}

Definition at line 233 of file le_qjbj_punct.c.

Initial value:
 {
    '!', '"', '$', '&', '\'',
    '(', ')', ',', '.',
    ':', ';', '<', '>', '?',
    '@', '\\', '^', '_'
}

Definition at line 205 of file le_qjbj_punct.c.