Add sj4_ime_length
This commit is contained in:
parent
e1a5f58d90
commit
4f5463b884
5 changed files with 125 additions and 19 deletions
|
|
@ -40,8 +40,9 @@ Sj4Lib* sj4_open(int charset, const char* dic) {
|
|||
|
||||
#define RUNME(PROC) \
|
||||
PROC \
|
||||
ctx->kouho->take = len; \
|
||||
\
|
||||
len2 = sj4_charset_to(ctx->charset, ctx->kouho->buffer.raw, ctx->kouho->intbuf + sizeof(STDYOUT), strlen(ctx->kouho->intbuf + sizeof(STDYOUT))); \
|
||||
len2 = sj4_charset_to(ctx->charset, ctx->kouho->buffer.raw, ctx->kouho->intbuf + sizeof(STDYOUT), strlen(ctx->kouho->intbuf + sizeof(STDYOUT))); \
|
||||
\
|
||||
memcpy(ctx->wrkbuf, ctx->inbuf, len); \
|
||||
len = sj4_charset_to(ctx->charset, ctx->wrk2buf, ctx->wrkbuf, len); \
|
||||
|
|
@ -81,6 +82,14 @@ int sj4_nextkan(Sj4Lib* ctx) {
|
|||
});
|
||||
}
|
||||
|
||||
int sj4_prevkan(Sj4Lib* ctx) {
|
||||
int len, len2;
|
||||
|
||||
RUNME({
|
||||
len = prevcl(ctx->ctx, ctx->kouho->intbuf, 0);
|
||||
});
|
||||
}
|
||||
|
||||
void sj4_close(Sj4Lib* ctx) {
|
||||
free_context(ctx->ctx);
|
||||
free(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue