Mercurial > freewnn
diff Wnn/jutil/atod.c @ 22:c966456648ad
- fixed argument style in function definition
- created header files for prototype check. (in progress)
- suppress warnings
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Thu, 17 Apr 2008 01:17:45 +0900 |
parents | 790205f476c0 |
children | a7ccf412ba02 |
line wrap: on
line diff
--- a/Wnn/jutil/atod.c Tue Apr 15 19:32:47 2008 +0900 +++ b/Wnn/jutil/atod.c Thu Apr 17 01:17:45 2008 +0900 @@ -70,26 +70,69 @@ #include "wnn_string.h" #include "wnn_os.h" -extern int wnn_loadhinsi (), init_heap (), little_endian (), Sorted (), asshuku (), revdic (); -extern void ujis_header (), read_ujis (), reverse_yomi (), create_rev_dict (), -uniq_je (), sort_if_not_sorted (), output_header (), udytoS (), output_ri (), exit1 (), new_pwd (), rev_short_fun (), rev_w_char (); -extern -#ifdef BDIC_WRITE_CHECK - int +/* for prototype */ +#include "atorev.h" +#include "ujisf.h" +#include "atod.h" + +/* prototypes */ +int wnn_loadhinsi (unsigned char *fname); +int init_heap (int hpb, int yhpb, int l, int rl, FILE *ipf); +int little_endian (void); +int revdic (struct JT *jtl, int match); + +int Sorted (register char *st, register int lc, int size, int (*sort_fun) ()); +int asshuku (); + +#ifdef CHINESE +void ujis_header (int *which_dict); #else - void +void ujis_header (void); #endif - put_n_EU_str (); -static void ujistoud (), output_dic_index (), usage (), sdic_sort (), -ujistosd (), not_enough_area (), get_pwd (), output_hindo (), output_hinsi (), output_kanji (), rev_dic_data (), set_pter1 (), output_comment (), output_hinsi_list (); -void upd_kanjicount (), output_dic_data (); + +void read_ujis (int rev, int to_esc, int which_dict); +void uniq_je (int (*func)()); +void reverse_yomi (void); +void sort_if_not_sorted (void); +void exit1 (void); + +void create_rev_dict (void); +void output_header (FILE* ofpter, struct JT* jtp, struct wnn_file_head* fhp); +void udytoS (); +void output_ri (FILE* ofpter); +void new_pwd (); +void rev_short_fun (); +void rev_w_char (); + +#ifdef BDIC_WRITE_CHECK + int put_n_EU_str (); +#else + void put_n_EU_str (); +#endif + +static void ujistoud (void); +static void output_dic_index (void); +static void usage (void); +static void sdic_sort (void); +static void ujistosd (int start_je, int level); +static void not_enough_area (void); +static void get_pwd (char* fname, char* crypted); +static void output_hindo (FILE* ofpter); +static void output_hinsi (FILE* ofpter); +static void output_kanji (FILE* ofpter); +static void rev_dic_data (void); +static void set_pter1 (void); +static void output_comment (FILE* fp); +static void output_hinsi_list (FILE* fp); +void upd_kanjicount (int k); +void output_dic_data (void); /* Switcher variable between UD and SD */ int which_dict = WNN_REV_DICT; #ifdef CHINESE extern int pzy_flag; -static void output_sisheng (); +static void output_sisheng (FILE* ofpter); #endif /* Variables both for UD and SD */ @@ -221,8 +264,7 @@ } } -extern int sort_func_je (); -int sort_func_sdic (const char* a, const char* b); +int sort_func_sdic (const void* a, const void* b); FILE *ofpter; int @@ -545,7 +587,7 @@ } int -sort_func_sdic (const char* a, const char* b) +sort_func_sdic (const void *a, const void *b) { int tmp; struct je *pa, *pb;