1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
/*
* AnthyǻȤʸ
* ä˼ä褦ȤƤ櫓Ǥ̵Τǡ
* ˤؿλѤ϶ʤ
*/
#ifndef _xstr_h_included_
#define _xstr_h_included_
/** ʸ
* EUCäƤ */
typedef int xchar;
/** ʸ
* xstrtypedefƤ
*/
typedef struct xstr_ {
/** ʸؤΥݥ */
xchar *str;
/** xcharο */
int len;
} xstr;
/* ǥХåѤνϴؿ */
void anthy_putxchar(xchar );
void anthy_putxstr(xstr *);
void anthy_putxstrln(xstr *);
/* CʸؤνФ */
int anthy_sputxchar(char *, xchar , int encoding);
int anthy_sputxstr(char *, xstr *);
int anthy_snputxstr(char *, int , xstr *, int encoding);
/* xstrstrmalloc롢freeξ뤫anthy_free_xstrDz */
xstr *anthy_cstr_to_xstr(const char *, int );
/* ̤mallocdzݤ */
char *anthy_xstr_to_cstr(xstr *, int);
xstr *anthy_file_dic_str_to_xstr(const char *);
char *anthy_xstr_to_file_dic_str(xstr *);
/* xstrstrmalloc */
xstr *anthy_xstr_dup(xstr *);
void anthy_free_xstr(xstr *);
/* ̤mallocdzݤ */
xchar *anthy_xstr_dup_str(xstr *);
void anthy_free_xstr_str(xstr *);
/* ʸԡ */
xstr* anthy_xstrcpy(xstr *, xstr *);
/* ʸӤ롣strcmpƱư(֤ͤ˰̣) */
int anthy_xstrcmp(xstr *, xstr *);
/* s->strrealloc */
xstr *anthy_xstrcat(xstr *s, xstr *d);
/* xs->strrealloc */
xstr *anthy_xstrappend(xstr *xs, xchar c);
/* strtollxstr */
long long anthy_xstrtoll(xstr *);
/* Ҥ餬ʤ饫ʤؤѴ */
xstr *anthy_xstr_hira_to_kata(xstr *);
/* xcharη */
#define XCT_ALL 0xffffffff
#define XCT_NONE 0
#define XCT_HIRA 1
#define XCT_KATA 2
#define XCT_ASCII 4
#define XCT_NUM 8
#define XCT_WIDENUM 16
#define XCT_OPEN 32
#define XCT_CLOSE 64
/* ľʸΰ */
#define XCT_PART 128
/* */
#define XCT_DEP 256
/* ³°ʸ */
#define XCT_STRONG 512
/* */
#define XCT_SYMBOL 1024
/* */
#define XCT_KANJI 2048
/** XCT_*֤äƤ */
int anthy_get_xchar_type(xchar );
/** ƤʸФXCT_*ѤȤä */
int anthy_get_xstr_type(xstr *);
/* hash */
int anthy_xstr_hash(xstr *);
/* xstr.c */
int anthy_init_xstr(void);
void anthy_quit_xstr(void);
void anthy_xstr_set_print_encoding(int );
/* file_dic.cѤ뤿Υǥطδؿ
USE_UCS4줿ȤΤ¸ߤ */
const char *
anthy_utf8_to_ucs4_xchar(const char *s, xchar *res);
#endif
|