Fix all compilation errors
This commit is contained in:
parent
73cb09624a
commit
4ebce359ea
13 changed files with 48 additions and 45 deletions
|
|
@ -1,2 +1,5 @@
|
|||
#!/bin/sh
|
||||
while [ ! -d .git ]; do
|
||||
cd ..
|
||||
done
|
||||
clang-format --verbose -i `find src lib include -name "*.c" -or -name "*.h"`
|
||||
|
|
|
|||
|
|
@ -140,12 +140,12 @@ typedef struct dict {
|
|||
TypeDicSeg segunit;
|
||||
TypeDicSeg maxunit;
|
||||
|
||||
IFunc getofs;
|
||||
IFunc getidx;
|
||||
IFunc getdic;
|
||||
IFunc putidx;
|
||||
IFunc putdic;
|
||||
IFunc rszdic;
|
||||
IFuncDict getofs;
|
||||
IFuncDict getidx;
|
||||
IFunc getdic;
|
||||
IFunc putidx;
|
||||
IFunc putdic;
|
||||
IFunc rszdic;
|
||||
} DICT;
|
||||
|
||||
typedef struct dictl {
|
||||
|
|
|
|||
|
|
@ -46,9 +46,11 @@ typedef unsigned char u_char;
|
|||
typedef unsigned short u_short;
|
||||
typedef unsigned int u_int;
|
||||
|
||||
typedef void (*VFunc)();
|
||||
typedef u_char* (*UCPFunc)();
|
||||
typedef int (*IFunc)();
|
||||
typedef void (*VFunc)(void*, void*, void*);
|
||||
typedef u_char* (*UCPFunc)(u_char*, u_char*, int);
|
||||
typedef int (*IFunc)(void*, int);
|
||||
|
||||
typedef int (*IFuncDict)(void*);
|
||||
|
||||
typedef u_char TypeGroup;
|
||||
typedef u_char TypeGram;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static u_char *delcldata(), *srchclpos();
|
||||
static u_char *delcldata(u_char*), *srchclpos(u_char*);
|
||||
static int delclold();
|
||||
|
||||
int clstudy(u_char* yomi1, u_char* yomi2, STDYOUT* stdy) {
|
||||
|
|
|
|||
|
|
@ -39,33 +39,31 @@
|
|||
#include "sj_kanakan.h"
|
||||
|
||||
VFunc cvtnum_func[] = {
|
||||
num_type00, num_type01, num_type02, num_type03,
|
||||
num_type04, num_type05, num_type06, num_type07,
|
||||
num_type08, num_type09, num_type10, num_type11,
|
||||
num_type12, num_type13, num_type14};
|
||||
(VFunc)num_type00, (VFunc)num_type01, (VFunc)num_type02, (VFunc)num_type03,
|
||||
(VFunc)num_type04, (VFunc)num_type05, (VFunc)num_type06, (VFunc)num_type07,
|
||||
(VFunc)num_type08, (VFunc)num_type09, (VFunc)num_type10, (VFunc)num_type11,
|
||||
(VFunc)num_type12, (VFunc)num_type13, (VFunc)num_type14};
|
||||
|
||||
UCPFunc getkan_func[] = {
|
||||
getkan_norm, getkan_norm, getkan_hira, getkan_kata,
|
||||
getkan_knj, getkan_ofs, getkan_norm, getkan_none,
|
||||
getkan_norm, getkan_norm, getkan_hira, getkan_kata,
|
||||
getkan_knj, getkan_ofs, getkan_norm, getkan_none};
|
||||
(UCPFunc)getkan_norm, (UCPFunc)getkan_norm, (UCPFunc)getkan_hira, (UCPFunc)getkan_kata,
|
||||
(UCPFunc)getkan_knj, (UCPFunc)getkan_ofs, (UCPFunc)getkan_norm, (UCPFunc)getkan_none,
|
||||
(UCPFunc)getkan_norm, (UCPFunc)getkan_norm, (UCPFunc)getkan_hira, (UCPFunc)getkan_kata,
|
||||
(UCPFunc)getkan_knj, (UCPFunc)getkan_ofs, (UCPFunc)getkan_norm, (UCPFunc)getkan_none};
|
||||
|
||||
IFunc setjrec_func[] = {
|
||||
setj_norm2, setj_norm2, setj_norm1, setj_norm1,
|
||||
setj_knj, setj_ofs, setj_norm2, setj_atrb,
|
||||
setj_norm2, setj_norm2, setj_norm1, setj_norm1,
|
||||
setj_knj, setj_ofs, setj_norm2, setj_atrb};
|
||||
(IFunc)setj_norm2, (IFunc)setj_norm2, (IFunc)setj_norm1, (IFunc)setj_norm1,
|
||||
(IFunc)setj_knj, (IFunc)setj_ofs, (IFunc)setj_norm2, (IFunc)setj_atrb,
|
||||
(IFunc)setj_norm2, (IFunc)setj_norm2, (IFunc)setj_norm1, (IFunc)setj_norm1,
|
||||
(IFunc)setj_knj, (IFunc)setj_ofs, (IFunc)setj_norm2, (IFunc)setj_atrb};
|
||||
|
||||
IFunc hiraknj_func[] = {
|
||||
hiraknj_hira, hiraknj_norm, hiraknj_hask, hiraknj_kask,
|
||||
hiraknj_knj, hiraknj_ofs, hiraknj_norm, hiraknj_atrb,
|
||||
hiraknj_hira, hiraknj_norm, hiraknj_hask, hiraknj_kask,
|
||||
hiraknj_knj, hiraknj_ofs, hiraknj_norm, hiraknj_atrb};
|
||||
(IFunc)hiraknj_hira, (IFunc)hiraknj_norm, (IFunc)hiraknj_hask, (IFunc)hiraknj_kask,
|
||||
(IFunc)hiraknj_knj, (IFunc)hiraknj_ofs, (IFunc)hiraknj_norm, (IFunc)hiraknj_atrb,
|
||||
(IFunc)hiraknj_hira, (IFunc)hiraknj_norm, (IFunc)hiraknj_hask, (IFunc)hiraknj_kask,
|
||||
(IFunc)hiraknj_knj, (IFunc)hiraknj_ofs, (IFunc)hiraknj_norm, (IFunc)hiraknj_atrb};
|
||||
|
||||
u_char *makekan_1byte(), *makekan_knj(), *makekan_ofs();
|
||||
u_char *makekan_norm(), *makekan_none();
|
||||
UCPFunc makekan_func[] = {
|
||||
makekan_norm, makekan_norm, makekan_1byte, makekan_1byte,
|
||||
makekan_knj, makekan_ofs, makekan_norm, makekan_none,
|
||||
makekan_norm, makekan_norm, makekan_1byte, makekan_1byte,
|
||||
makekan_knj, makekan_ofs, makekan_norm, makekan_none};
|
||||
(UCPFunc)makekan_norm, (UCPFunc)makekan_norm, (UCPFunc)makekan_1byte, (UCPFunc)makekan_1byte,
|
||||
(UCPFunc)makekan_knj, (UCPFunc)makekan_ofs, (UCPFunc)makekan_norm, (UCPFunc)makekan_none,
|
||||
(UCPFunc)makekan_norm, (UCPFunc)makekan_norm, (UCPFunc)makekan_1byte, (UCPFunc)makekan_1byte,
|
||||
(UCPFunc)makekan_knj, (UCPFunc)makekan_ofs, (UCPFunc)makekan_norm, (UCPFunc)makekan_none};
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static u_char* code2kanji();
|
||||
static u_char* code2kanji(u_char* s, u_char* d, u_char* ym, int yl, int flg);
|
||||
|
||||
u_char*
|
||||
getkan_none(u_char* s, u_char* d, u_char* ym, int yl, int flg) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static void setstynum(), setnspr(), regetrank();
|
||||
static void setstynum(), setnspr(KHREC*, STDYIN*), regetrank();
|
||||
|
||||
void getrank() {
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static void dic_mu(), dic_cl();
|
||||
static void dic_mu(int), dic_cl();
|
||||
|
||||
void mkjiritu(int mode) {
|
||||
u_char chkind1;
|
||||
|
|
|
|||
|
|
@ -41,10 +41,10 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static void getkhtbl(), cl_kanji();
|
||||
static int diffknj();
|
||||
static void cl_numcmn();
|
||||
static u_char* makekan();
|
||||
static void getkhtbl(CLREC*), cl_kanji(JREC*, CLREC*);
|
||||
static int diffknj(JREC*, u_char*, int);
|
||||
static void cl_numcmn(JREC*, CLREC*);
|
||||
static u_char* makekan(u_char*, u_char*, int);
|
||||
|
||||
void mkkouho() {
|
||||
CLREC* clrec;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
|
||||
static int prev_kanji(), prev_hinsi(), prev_douon();
|
||||
static int next_kanji(), next_hinsi(), next_douon();
|
||||
static void set_kanji(), set_buf(), add_yomi();
|
||||
static void set_kanji(), set_buf(u_char*), add_yomi();
|
||||
static void set_idxyomi();
|
||||
|
||||
static void cd2sjh_chr(u_char ch, u_char* dst);
|
||||
|
|
|
|||
|
|
@ -294,10 +294,10 @@ opendict(char* name, char* passwd) {
|
|||
dfp->dict.seglen = get4byte(dp + DICTSEGLEN);
|
||||
dfp->dict.segunit = get4byte(dp + DICTSEGNUM);
|
||||
dfp->dict.maxunit = i ? get4byte(dp + DICTSEGMAX) : 0;
|
||||
dfp->dict.getofs = getofs;
|
||||
dfp->dict.getidx = getidx;
|
||||
dfp->dict.getofs = (IFuncDict)getofs;
|
||||
dfp->dict.getidx = (IFuncDict)getidx;
|
||||
dfp->dict.getdic = (IFunc)getdic;
|
||||
dfp->dict.putidx = putidx;
|
||||
dfp->dict.putidx = (IFunc)putidx;
|
||||
dfp->dict.putdic = (IFunc)putdic;
|
||||
dfp->dict.rszdic = (IFunc)rszdic;
|
||||
dfp->refcnt = 1;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static int hiraknj();
|
||||
static int hiraknj(u_char*);
|
||||
|
||||
void setkouho(CLREC* clrec, TypeDicOfs offs, int mode) {
|
||||
JREC* jrec;
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#include "sj_kanakan.h"
|
||||
|
||||
static void srch_kurai1(), srch_kurai2();
|
||||
static void srch_kurai1(u_char*, u_char*), srch_kurai2(u_char*, u_char*);
|
||||
|
||||
static void
|
||||
srch_josuu_sub(JREC* jrec, TypeGram gram) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue