Mercurial > libguess
comparison test.c @ 5:8a64459dab94
make guess_init() and guess_impl_register() static functions.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Thu, 12 Jun 2008 22:54:49 +0900 |
parents | ff05c6c659cb |
children |
comparison
equal
deleted
inserted
replaced
4:ff05c6c659cb | 5:8a64459dab94 |
---|---|
15 if (!fp) { | 15 if (!fp) { |
16 printf("cannot open file \"%s\"\n", *(argv + 1)); | 16 printf("cannot open file \"%s\"\n", *(argv + 1)); |
17 exit(1); | 17 exit(1); |
18 } | 18 } |
19 | 19 |
20 //initialize libguess | |
21 guess_init(); | |
22 | |
23 while (fgets(buf, 1024 * 1024 - 1, fp)) { | 20 while (fgets(buf, 1024 * 1024 - 1, fp)) { |
24 // printf("%s\n", buf); | 21 // printf("%s\n", buf); |
25 printf("length = %d\n", strlen(buf)); | 22 printf("length = %d\n", strlen(buf)); |
26 printf("jp = %s\n", guess_jp(buf, strlen(buf))); | 23 printf("jp = %s\n", guess_jp(buf, strlen(buf))); |
27 printf("tw = %s\n", guess_tw(buf, strlen(buf))); | 24 printf("tw = %s\n", guess_tw(buf, strlen(buf))); |