1 /*
2 * Copyright (C) 2020 The HIME team, Taiwan
3 * Copyright (C) 2011 Edward Der-Hua Liu, Hsin-Chu, Taiwan
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation version 2.1
8 * of the License.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #include <stdio.h>
21 #include <string.h>
22
23 #include "hime.h"
24
main(void)25 int main (void) {
26 FILE *fp = fopen ("tsin.src", "r");
27
28 if (!fp)
29 p_err ("cannot open");
30
31 while (!feof (fp)) {
32 char aa[128];
33 char bb[128];
34 int usecount;
35 char line[256];
36
37 fgets (line, sizeof (line), fp);
38 sscanf (line, "%s %s %d", aa, bb, &usecount);
39
40 if (utf8_str_N (aa) == 1)
41 printf ("%s", line);
42 }
43
44 return 0;
45 }
46