Fix -Wimplicit-int warning

Signed-off-by: Masanori Ogino <mogino@acm.org>
This commit is contained in:
SASANO Takayoshi 2023-11-29 22:04:00 +09:00 • committed by Masanori Ogino
commit 198a48f516
6 changed files with 27 additions and 0 deletions

View file

@ -44,6 +44,7 @@
static int euc_mode; static int euc_mode;
int
init_code() init_code()
{ {
char *loc; char *loc;
@ -74,6 +75,7 @@ init_code()
return 1; return 1;
} }
void
cnvcode(s) cnvcode(s)
unsigned char *s; unsigned char *s;
{ {
@ -110,6 +112,7 @@ unsigned char *s;
} }
} }
void
printout_mb(fp, s) printout_mb(fp, s)
FILE *fp; FILE *fp;
unsigned char *s; unsigned char *s;
@ -118,6 +121,7 @@ unsigned char *s;
fflush(fp); fflush(fp);
} }
void
printout(fp, s) printout(fp, s)
FILE *fp; FILE *fp;
unsigned char *s; unsigned char *s;
@ -132,6 +136,7 @@ unsigned char *s;
fflush(fp); fflush(fp);
} }
void
normal_out(fmt, p1, p2, p3, p4, p5) normal_out(fmt, p1, p2, p3, p4, p5)
char *fmt; char *fmt;
int p1, p2, p3, p4, p5; int p1, p2, p3, p4, p5;
@ -142,6 +147,7 @@ int p1, p2, p3, p4, p5;
printout(stdout, buf); printout(stdout, buf);
} }
void
error_out(fmt, p1, p2, p3, p4, p5) error_out(fmt, p1, p2, p3, p4, p5)
char *fmt; char *fmt;
int p1, p2, p3, p4, p5; int p1, p2, p3, p4, p5;

View file

@ -39,6 +39,7 @@
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
void
dictdisp(output) dictdisp(output)
char *output; char *output;
{ {

View file

@ -135,6 +135,7 @@ char *y, *k, *h;
} }
} }
void
dictmake(input) dictmake(input)
char *input; char *input;
{ {

View file

@ -39,6 +39,7 @@
#include <stdio.h> #include <stdio.h>
#include "sj3err.h" #include "sj3err.h"
void
sj3error(fp, code) sj3error(fp, code)
FILE *fp; FILE *fp;
int code; int code;

View file

@ -59,6 +59,7 @@ static char *rcfile = ".sjrc";
static int user_euc = 0; static int user_euc = 0;
static int file_code = SYS_SJIS; static int file_code = SYS_SJIS;
void setrc();
int set_dict(), set_server(); int set_dict(), set_server();
struct functbl { struct functbl {
@ -73,6 +74,7 @@ struct functbl {
#define TOLOWER(c) (isupper(c) ? tolower(c) : (c)) #define TOLOWER(c) (isupper(c) ? tolower(c) : (c))
int
sjset_code() sjset_code()
{ {
char *loc; char *loc;
@ -106,6 +108,7 @@ sjset_code()
} }
int
getsjrc () getsjrc ()
{ {
FILE *fd; FILE *fd;
@ -140,6 +143,7 @@ getsjrc ()
} }
void
setrc (file, fd) setrc (file, fd)
char *file; char *file;
FILE *fd; FILE *fd;
@ -166,6 +170,7 @@ FILE *fd;
} }
int
much(s1, s2) much(s1, s2)
char *s1, *s2; char *s1, *s2;
{ {
@ -183,6 +188,7 @@ char *s1, *s2;
} }
int
getword (s, word) getword (s, word)
register char *s; register char *s;
struct wordent word[]; struct wordent word[];
@ -272,36 +278,42 @@ struct wordent word[];
return wcount; return wcount;
} }
int
IsTerminator (c) IsTerminator (c)
u_char c; u_char c;
{ {
return (c == '\n') ? 1 : 0; return (c == '\n') ? 1 : 0;
} }
int
isTerminator (c) isTerminator (c)
u_char c; u_char c;
{ {
return (c == '#') ? 1 : 0; return (c == '#') ? 1 : 0;
} }
int
IsEscape (c) IsEscape (c)
u_char c; u_char c;
{ {
return (c == '\\') ? 1 : 0; return (c == '\\') ? 1 : 0;
} }
int
IsDelimitor (c) IsDelimitor (c)
u_char c; u_char c;
{ {
return (c == ' ' || c == '\t' || c == '.') ? 1 : 0; return (c == ' ' || c == '\t' || c == '.') ? 1 : 0;
} }
int
set_dict (word) set_dict (word)
struct wordent word[]; struct wordent word[];
{ {
setdicname(word[1].word_str); setdicname(word[1].word_str);
} }
int
set_server(word) set_server(word)
struct wordent word[]; struct wordent word[];
{ {

View file

@ -63,6 +63,8 @@
unsigned short sjis2euc(), euc2sjis(); unsigned short sjis2euc(), euc2sjis();
#endif #endif
void sj_sjis2jis(), sj_jis2sjis();
int int
sj3_str_sjistoeuc(out, outlen, in, sjis_default, useflag) sj3_str_sjistoeuc(out, outlen, in, sjis_default, useflag)
unsigned char *out, *in, *sjis_default; unsigned char *out, *in, *sjis_default;
@ -207,6 +209,7 @@ int slen, elen;
return sj3_str_euctosjis(s, slen, e, def_char, &dummy); return sj3_str_euctosjis(s, slen, e, def_char, &dummy);
} }
void
sj_euc2sjis (s) sj_euc2sjis (s)
unsigned char *s; unsigned char *s;
{ {
@ -215,6 +218,7 @@ unsigned char *s;
sj_jis2sjis (s); sj_jis2sjis (s);
} }
void
sj_jis2sjis (s) sj_jis2sjis (s)
unsigned char *s; unsigned char *s;
{ {
@ -237,6 +241,7 @@ unsigned char *s;
s[1] = nl; s[1] = nl;
} }
void
sj_sjis2euc (s) sj_sjis2euc (s)
unsigned char *s; unsigned char *s;
{ {
@ -245,6 +250,7 @@ unsigned char *s;
s[1] |= MSB; s[1] |= MSB;
} }
void
sj_sjis2jis (s) sj_sjis2jis (s)
unsigned char *s; unsigned char *s;
{ {