This file is indexed.

/usr/include/cangjie/cangjie.h is in libcangjie2-dev 1.2-2.

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
/* Copyright (c) 2013 - The libcangjie authors.
 *
 * This file is part of libcangjie.
 *
 * libcangjie is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * libcangjie is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with libcangjie.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef CANGJIE_H__
#define CANGJIE_H__

#include <stdint.h>

#include <sqlite3.h>

#include "cangjiecommon.h"
#include "cangjiecharlist.h"
#include "cangjieerrors.h"


CANGJIE_BEGIN_DECL

typedef enum CangjieVersion {
    CANGJIE_VERSION_3 = 3,
    CANGJIE_VERSION_5 = 5,
} CangjieVersion;


typedef enum CangjieFilter {
    CANGJIE_FILTER_BIG5        = 1 << 0,
    CANGJIE_FILTER_HKSCS       = 1 << 1,
    CANGJIE_FILTER_PUNCTUATION = 1 << 2,
    CANGJIE_FILTER_CHINESE     = 1 << 3,
    CANGJIE_FILTER_ZHUYIN      = 1 << 4,
    CANGJIE_FILTER_KANJI       = 1 << 5,
    CANGJIE_FILTER_KATAKANA    = 1 << 6,
    CANGJIE_FILTER_HIRAGANA    = 1 << 7,
    CANGJIE_FILTER_SYMBOLS     = 1 << 8,
} CangjieFilter;


typedef struct Cangjie {
    uint32_t version;
    uint32_t filter_flags;

    sqlite3 *db;
    char *cj_query;
    char *shortcode_query;
} Cangjie;

CANGJIE_EXTERN int cangjie_new(Cangjie        **cj,
                CangjieVersion   version,
                CangjieFilter    filter_flags);

CANGJIE_EXTERN int cangjie_get_characters(Cangjie          *cj,
                           char             *code,
                           CangjieCharList **l);

CANGJIE_EXTERN int cangjie_get_characters_by_shortcode(Cangjie          *cj,
                                        char             *shortcode,
                                        CangjieCharList **l);

CANGJIE_EXTERN int cangjie_get_radical(Cangjie     *cj,
                        const char   key,
                        char       **radical);

CANGJIE_EXTERN int cangjie_is_input_key(Cangjie    *cj,
                         const char  key);

CANGJIE_EXTERN int cangjie_free(Cangjie *cj);

CANGJIE_END_DECL

#endif