/usr/include/anthy/xstr.h is in libanthy-dev 9100h-9ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 102 103 104 105 106 107 108 109 | /*
* AnthyÆâÉô¤Ç»È¤¦Ê¸»úÎó
* Æä˼ÂÁõ¤ò±£Ê䷤褦¤È¤·¤Æ¤¤¤ë¤ï¤±¤Ç¤Ï̵¤¤¤Î¤Ç¡¢
* ¤³¤³¤Ë¤¢¤ë´Ø¿ô¤Î»ÈÍѤ϶¯À©¤·¤Ê¤¤¡£
*/
#ifndef _xstr_h_included_
#define _xstr_h_included_
/** ʸ»ú·¿
* UCS4¤¬Æþ¤Ã¤Æ¤¤¤ë */
typedef int xchar;
/** ʸ»úÎó
* xstr¤Ëtypedef¤µ¤ì¤Æ¤¤¤ë
*/
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 encoding);
int anthy_snputxstr(char *, int , xstr *, int encoding);
/* xstr¤Èstr¶¦¤Ëmalloc¤µ¤ì¤ë¡¢free¤ÇξÊý²òÊü¤¹¤ë¤«anthy_free_xstr¤Ç²òÊü¤¹¤ë */
xstr *anthy_cstr_to_xstr(const char *, int );
/* ·ë²Ì¤Ïmalloc¤Ç³ÎÊݤµ¤ì¤ë */
char *anthy_xstr_to_cstr(xstr *, int);
/* xstr¤Èstr¶¦¤Ëmalloc¤µ¤ì¤ë */
xstr *anthy_xstr_dup(xstr *);
void anthy_free_xstr(xstr *);
/* ·ë²Ì¤Ïmalloc¤Ç³ÎÊݤµ¤ì¤ë */
xchar *anthy_xstr_dup_str(xstr *);
void anthy_free_xstr_str(xstr *);
/* ʸ»úÎó¤ò¥³¥Ô¡¼¤¹¤ë */
xstr* anthy_xstrcpy(xstr *, xstr *);
/* ʸ»úÎó¤òÈæ³Ó¤¹¤ë¡£strcmp¤ÈƱÅù¤ÎÆ°ºî(ÊÖ¤êÃͤÎÉä¹æ¤Ë°ÕÌ£¤¬¤¢¤ë) */
int anthy_xstrcmp(xstr *, xstr *);
/* nʸ»úÌܤޤÇʸ»úÎó¤òÈæ³Ó¤¹¤ë¡£strncmp¤ÈƱÅù¤ÎÆ°ºî(ÊÖ¤êÃͤÎÉä¹æ¤Ë°ÕÌ£¤¬¤¢¤ë) */
int anthy_xstrncmp(xstr *, xstr *, int);
/* s->str¤òrealloc¤¹¤ë */
xstr *anthy_xstrcat(xstr *s, xstr *d);
/* xs->str¤òrealloc¤¹¤ë */
xstr *anthy_xstrappend(xstr *xs, xchar c);
/* strtoll¤ÎxstrÈÇ */
long long anthy_xstrtoll(xstr *);
/* Á´³Ñ¿ô»ú¤«¤éȾ³Ñ¿ô»ú¤Ø¤ÎÊÑ´¹ */
xstr *anthy_xstr_wide_num_to_num(xstr *);
/* ¤Ò¤é¤¬¤Ê¤«¤é¥«¥¿¥«¥Ê¤Ø¤ÎÊÑ´¹ */
xstr *anthy_xstr_hira_to_kata(xstr *);
/**/
xstr *anthy_xstr_hira_to_half_kata(xstr *);
xstr *anthy_conv_half_wide(xstr *xs);
/* 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_SYMBOL 1024
/* ´Á»ú */
#define XCT_KANJI 2048
/* ¶çÆÉÅÀ */
#define XCT_PUNCTUATION 4096
/** XCT_*¤¬Ê֤äƤ¯¤ë */
int anthy_get_xchar_type(const xchar );
/** Á´¤Æ¤Îʸ»ú¤ËÂФ·¤ÆXCT_*¤ÎÏÀÍýÀѤò¤È¤Ã¤¿¤â¤Î */
int anthy_get_xstr_type(const 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 );
int anthy_euc_to_ucs(int ec);
int anthy_ucs_to_euc(int uc);
const char *anthy_utf8_to_ucs4_xchar(const char *s, xchar *res);
/**/
char *anthy_conv_euc_to_utf8(const char *s);
char *anthy_conv_utf8_to_euc(const char *s);
#endif
|