WIP IME
This commit is contained in:
parent
a228b83a15
commit
ee9d020dfb
11 changed files with 166 additions and 11 deletions
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "sj4mkdic.h"
|
||||
|
||||
#include "sj_charset.h"
|
||||
#include "sj4charset.h"
|
||||
|
||||
int cnvyomi(int code) {
|
||||
u_short hh;
|
||||
|
|
|
|||
|
|
@ -154,8 +154,6 @@ skip_blank() {
|
|||
return c;
|
||||
}
|
||||
|
||||
#include "sj_charset.h"
|
||||
|
||||
static int
|
||||
readhinsi() {
|
||||
static int c = 0;
|
||||
|
|
|
|||
22
src/sj4test2/main.c
Normal file
22
src/sj4test2/main.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#include <sj4ime.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define CHARSET SJ4SJIS
|
||||
#else
|
||||
#define CHARSET SJ4UTF8
|
||||
#endif
|
||||
|
||||
int main() {
|
||||
Sj4Ime* ime = sj4_ime(CHARSET, "sj4main.dic");
|
||||
char b;
|
||||
|
||||
if(ime == NULL) {
|
||||
fprintf(stderr, "Failed to create context\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
while(fread(&b, 1, sizeof(b), stdin)) {
|
||||
sj4_ime_key(ime, b);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue