This commit was manufactured by cvs2svn to create tag 'LAST_STABLE'.
[claws.git] / libkcc / test_filter.c
blob3485ae54cb21955c5e523b606483ebf3d3e1b5ce
1 #include <stdio.h>
2 #include "kcc.h"
4 main ()
6 FILE *fp;
7 char s[500], d[2000];
8 int i=0, c;
10 fp=fopen("test_file","r");
11 if (fp == NULL) {printf("not found\n"); exit;}
13 while ((c = fgetc(fp)) != EOF && i<490)
15 s[i] = c; i++;
17 s[i]='\0';
19 i = KCC_filter(d, "EUC", s, "AUTO", 0,0,0);
20 printf("code = %x\n%s\n",i,d);
21 i = KCC_filter(d, "SJIS", s, "AUTO", 0,0,0);
22 printf("code = %x\n%s\n",i,d);
23 i = KCC_filter(d, "JIS", s, "AUTO", 0,0,0);
24 printf("code = %x\n%s\n",i,d);