Convert K&R definitions to ANSI C

This commit is contained in:
Nishi 2026-06-18 14:01:01 +09:00
commit a2161ba1b0
45 changed files with 521 additions and 1073 deletions

View file

@ -32,9 +32,7 @@
#include "key.h"
extern int rkerrbell;
exec_romaji(c)
wchar16_t c;
int exec_romaji(wchar16_t c)
{
Conversion* cv;
wchar16_t* p;
@ -196,8 +194,7 @@ exec_romaji(c)
cv->out_point = op;
return (i);
}
move_cur(kval) int kval;
int move_cur(int kval)
{
Conversion* cv;
int i;
@ -238,8 +235,7 @@ move_cur(kval) int kval;
}
}
}
addten(pos, c) unsigned short pos, c;
int addten(unsigned short pos, unsigned short c)
{
unsigned short prefix;
Conversion* cv;
@ -248,17 +244,14 @@ addten(pos, c) unsigned short pos, c;
prefix = cv->out_buf[pos];
return (sj_addten(prefix, c));
}
getipos(pos) unsigned short pos;
int getipos(unsigned short pos)
{
Conversion* cv;
cv = GetConversion();
return (getipos2(cv->out_mode, pos));
}
getipos2(omode, pos) unsigned short* omode;
unsigned short pos;
int getipos2(unsigned short * omode, unsigned short pos)
{
unsigned short ipos;
int i;
@ -269,11 +262,7 @@ unsigned short pos;
}
return (ipos);
}
sj_rkconv(s1, s2, len)
wchar16_t* s1,
*s2;
int len;
int sj_rkconv(wchar16_t * s1, wchar16_t * s2, int len)
{
int i, rlen;
unsigned int* kp;
@ -326,12 +315,7 @@ int len;
sj3_rkebell(rkerrbell);
return (klen);
}
sj_rkconv2(s1, s2, omode, len)
wchar16_t* s1,
*s2;
unsigned short* omode;
int len;
int sj_rkconv2(wchar16_t * s1, wchar16_t * s2, unsigned short * omode, int len)
{
int i, rlen;
unsigned int* kp;
@ -442,12 +426,7 @@ int len;
sj3_rkebell(rkerrbell);
return (klen);
}
exec_romaji2(c, hbuf, kbuf, omode, cur, hcur)
wchar16_t c,
*hbuf, *kbuf;
unsigned short* omode;
int cur, hcur;
int exec_romaji2(wchar16_t c, wchar16_t * hbuf, wchar16_t * kbuf, unsigned short * omode, int cur, int hcur)
{
unsigned short c1, cc;
unsigned int c2;