Author: Andreas Beckmann <anbe@debian.org>
Description: fix building with -Werror=implicit-function-declaration

--- a/lib/lisp.c
+++ b/lib/lisp.c
@@ -14,6 +14,8 @@
 
 #include	<juman.h>
 
+int dividing_code_p(int code);
+
 /*
 ------------------------------------------------------------------------------
 	definition of global variables
--- a/lib/pat.c
+++ b/lib/pat.c
@@ -33,6 +33,8 @@ typedef char *	caddr_t;
 
 #include "juman_pat.h"
 
+int hash_check_proc(FILE *f, long index, char *buf);
+
 /* ハッシュテーブルの宣言 */
 #ifdef USE_HASH
 th_hash_node hash_array[HASH_SIZE];
--- a/lib/patfile.c
+++ b/lib/patfile.c
@@ -12,6 +12,8 @@
 #include        <stdlib.h>
 #endif
 
+#include <unistd.h>
+
 #include "juman_pat.h"
 #ifndef _WIN32
 #define O_BINARY (0)
--- a/lib/juman.h
+++ b/lib/juman.h
@@ -56,6 +56,8 @@
 #include 	<fcntl.h>
 #endif
 
+#include 	<unistd.h>
+
 #include	"juman_pat.h"
 
 /*
@@ -410,6 +412,7 @@ typedef struct _cost_omomi  {
 */
 
 /* iotool.c */
+int	check_filesize(FILE *fp);
 FILE	*my_fopen(char *filename, char *mode);
 FILE	*pathfopen(char *filename, char *mode, 
 		   char *path, char *filename_path);
@@ -423,6 +426,7 @@ void	*my_alloc(int n);
 void	*my_realloc(void *ptr, int n);
 void	my_exit(int exit_code);
 void	error(int errno, char *msg, ...);
+void	warning(int errno, char *msg, ...);
 char	lower(char c);
 char	upper(char c);
 int 	my_strlen(U_CHAR *s);
@@ -432,12 +436,17 @@ int 	compare_top_str(U_CHAR *s1, U_CHAR
 int 	compare_top_str1(U_CHAR *s1, U_CHAR *s2);
 int 	compare_top_str2(U_CHAR *s1, U_CHAR *s2);
 int 	compare_end_str(U_CHAR *s1, U_CHAR *s2);
-
 void	ls(FILE *fp, char *p, char *f);
 void	print_current_time(FILE *fp);
 void	print_execute_time(FILE *fp, int dt, float dp);
+void	set_jumanrc_fileptr(char *option_rcfile, int look_rcdefault_p, int exit_rc_notfound_p);
+void	set_jumangram_dirname(void);
+void	cha_exit(int status, char *format, char *a, char *b, char *c, char *d, char *e, char *f, char *g, char *h);
+void	cha_perror(char *s);
 
 /* lisp.c */
+void	set_cha_getc(void);
+void	unset_cha_getc(void);
 int	s_feof(FILE *fp);
 int	s_feof_comment(FILE *fp);
 CELL	*make_cell(void);
@@ -493,6 +502,30 @@ int check_matrix_right(int postcon);
 unsigned char	*zentohan(unsigned char *str1);
 unsigned char	*hantozen(unsigned char *str1);
 
+/* getid.c */
+int	get_hinsi_id(U_CHAR *x);
+int	get_bunrui_id(U_CHAR *x, int hinsi);
+int	get_type_id(U_CHAR *x);
+int	get_form_id(U_CHAR *x, int type);
+
+/* juman_lib.c */
+BOOL	juman_init_rc(FILE *fp);
+int	compile_unkword_patterns(void);
+int	juman_close(void);
+int	utf8_bytes(unsigned char *ucp);
+void 	juman_init_etc(void);
+char	**print_best_path(FILE* output);
+char	**print_all_mrph(FILE* output);
+char	**print_all_path(FILE* output);
+char	**print_homograph_path(FILE* output);
+int	juman_sent(void);
+
+/* juman/client.c */
+int juman_client(int argc, char **argv, char *server, int port);
+
+/* juman/server.c */
+int juman_server(char **argv, int port, int foreground);
+
 /* for edr-dic */
 void check_edrtable(MRPH *mrph_p, CELL *x);
 
--- a/lib/juman_lib.c
+++ b/lib/juman_lib.c
@@ -215,8 +215,6 @@ extern char             Jumangram_Dirnam
 ------------------------------------------------------------------------------
 */
 
-BOOL	juman_init_rc(FILE *fp);
-int	juman_close(void);
 void	realloc_mrph_buffer(void);
 void	realloc_process_buffer(void);
 void    read_class_cost(CELL *cell); /* k.n */
@@ -233,7 +231,6 @@ void    changeDictionary(int number);
 int     trim_space(int pos);
 int	undef_word(int pos);
 int	check_code(U_CHAR *cp, int position);
-void 	juman_init_etc(void);
 int 	suusi_word(int pos , int m_num);
 int	through_word(int pos , int m_num);
 int 	is_through(MRPH *mrph_p);
@@ -244,18 +241,13 @@ int 	is_through(MRPH *mrph_p);
   NACSIS 吉岡
 */   
 void	print_path_mrph(FILE* output, int path_num , int para_flag);
-char	**print_best_path(FILE* output);
-char	**print_all_mrph(FILE* output);
 void	_print_all_mrph(FILE* output, int path_num);
-char	**print_all_path(FILE* output);
 void	_print_all_path(FILE* output, int path_num, int pathes);
-char	**print_homograph_path(FILE* output);
 int	_print_homograph_path(FILE* output, int pbuf_start, int new_p);
 
 int	pos_match_process(int pos, int p_start);
 int	pos_right_process(int position);
 int	check_connect(int pos_start, int m_num, char opt);
-int	juman_sent(void);
 
 /*
 ------------------------------------------------------------------------------
--- a/makeint/trans.c
+++ b/makeint/trans.c
@@ -11,6 +11,8 @@
 
 #include 	"makeint.h"
 
+int hankaku_check(U_CHAR *s);
+
 #define         MRPH_BUF_MAX   1000
 #define         KEITAISO_NUM_MAX  20
 /*
--- a/lib/iotool.c
+++ b/lib/iotool.c
@@ -677,7 +677,7 @@ void cha_exit_file(status, format, a, b,
 void cha_perror(s)
     char *s;
 {
-    cha_exit(-1, "");
+    cha_exit(-1, "", 0, 0, 0, 0, 0, 0, 0, 0);
     perror(s);
 }
 
--- a/juman/client.c
+++ b/juman/client.c
@@ -84,7 +84,7 @@ static void check_status(ifp, mes)
 	if (mes == NULL)
 	  fputs(line + 4, stderr);
 	else
-	  cha_exit(1, mes);
+	  cha_exit(1, mes, 0, 0, 0, 0, 0, 0, 0, 0);
 	exit(1);
     }
 }
@@ -312,7 +312,7 @@ static int open_connection(server, port)
 #if 0
 	cha_perror("inet_addr");
 #endif
-	cha_exit(-1, "Can't get address: %s\n", server);
+	cha_exit(-1, "Can't get address: %s\n", server, 0, 0, 0, 0, 0, 0, 0);
 	return -1;
     }
 
--- a/juman/juman.c
+++ b/juman/juman.c
@@ -75,7 +75,6 @@ void	juman_version(void);
   NACSIS 吉岡
 */
 void    juman_standalone(void);
-void    juman_server(char **argv, int port, int foreground);
 static void set_juman_port(char* port);
 static void set_juman_server(char* server);
 
--- a/makepat/makepat.c
+++ b/makepat/makepat.c
@@ -24,6 +24,7 @@ int number_of_tree = 0; /* 使用する
 /****************************************************
 *                      メイン                       *
 ****************************************************/
+int
 main(int argc, char *argv[])
 {
   char comm;
