several optimization

This commit is contained in:
Nishi 2026-09-23 13:24:26 +09:00
commit c52b21c9ee
12 changed files with 214 additions and 111 deletions

View file

@ -33,18 +33,11 @@
#include "sj_const.h"
#include "sj_dict.h"
#define NO_EUC_CODESIZE_INLINE
#include "sj_kanakan.h"
int euc_codesize(u_char c) {
if((c & KANJIMODEMASK) == 0x90) {
return 1;
} else if(isknj1(c)) {
return 2;
} else if(c == SS3) {
return 3;
} else {
return 1;
}
return euc_codesize_inline(c);
}
int hzstrlen(u_char* ptr, int len) {