3ff80c84d8
Copy from M17N/fwnn based on submit request 34857 from user coolo OBS-URL: https://build.opensuse.org/request/show/34857 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/fwnn?expand=0&rev=8
303 lines
13 KiB
Diff
303 lines
13 KiB
Diff
--- Wnn/etc/pwd.c
|
||
+++ Wnn/etc/pwd.c
|
||
@@ -61,6 +61,7 @@
|
||
JS_STATIC void new_pwd (char* src, char* encd);
|
||
JS_STATIC int check_pwd (char* src, char* encd);
|
||
|
||
+extern char* crypt (const char *,const char *);
|
||
JS_STATIC void
|
||
new_pwd (char* src, char* encd)
|
||
{
|
||
--- Wnn/include/wnn_string.h
|
||
+++ Wnn/include/wnn_string.h
|
||
@@ -33,26 +33,26 @@
|
||
#ifndef WNN_STRING_H
|
||
#define WNN_STRING_H
|
||
|
||
-extern int wnn_sStrcpy ();
|
||
-extern int wnn_Sstrcpy ();
|
||
-extern void wnn_Sreverse ();
|
||
-extern char *wnn_Stos ();
|
||
-extern char *wnn_sStrncpy ();
|
||
-extern w_char *wnn_Strcat ();
|
||
-extern w_char *wnn_Strncat ();
|
||
-extern int wnn_Strcmp ();
|
||
-extern int wnn_Substr ();
|
||
-extern int wnn_Strncmp ();
|
||
-extern w_char *wnn_Strncpy ();
|
||
-extern int wnn_Strlen ();
|
||
-extern w_char *wnn_Strcpy ();
|
||
-extern void wnn_delete_w_ss2 ();
|
||
-extern int wnn_byte_count ();
|
||
+extern int wnn_sStrcpy (register char*,register w_char*);
|
||
+extern int wnn_Sstrcpy (w_char*,unsigned char*);
|
||
+extern void wnn_Sreverse (w_char*,w_char*);
|
||
+extern char *wnn_Stos (w_char*);
|
||
+extern char *wnn_sStrncpy (register char*,register w_char*,int);
|
||
+extern w_char *wnn_Strcat (register w_char*,register w_char*);
|
||
+extern w_char *wnn_Strncat (register w_char*,register w_char*,int);
|
||
+extern int wnn_Strcmp (register w_char*,register w_char*);
|
||
+extern int wnn_Substr (register w_char*,register w_char*);
|
||
+extern int wnn_Strncmp (register w_char*,register w_char*,int);
|
||
+extern w_char *wnn_Strncpy (register w_char*,register w_char*,int);
|
||
+extern int wnn_Strlen (register w_char*);
|
||
+extern w_char *wnn_Strcpy (register w_char*,register w_char*);
|
||
+extern void wnn_delete_w_ss2 (register w_char*,int);
|
||
+extern int wnn_byte_count (register int);
|
||
#ifndef JS
|
||
-extern int check_pwd ();
|
||
+extern int check_pwd (char*,char*);
|
||
#endif
|
||
#ifdef CHINESE
|
||
-extern int wnn_Sstrcat ();
|
||
+extern int wnn_Sstrcat (w_char*,unsigned char*);
|
||
#endif
|
||
|
||
#endif /* WNN_STRING_H */
|
||
--- Wnn/jutil/atod.c
|
||
+++ Wnn/jutil/atod.c
|
||
@@ -57,6 +57,7 @@
|
||
#if HAVE_UNISTD_H
|
||
# include <unistd.h>
|
||
#endif
|
||
+#include <stdlib.h>
|
||
|
||
#include "commonhd.h"
|
||
#include "wnn_config.h"
|
||
@@ -70,19 +71,24 @@
|
||
#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 int wnn_loadhinsi (unsigned char*), init_heap (int,int,int,int,FILE*), little_endian (), Sorted (register char*,register int,int,int (*sort_fun)(char*,char*)), asshuku (int), revdic (struct JT *,int);
|
||
+#ifdef CHINESE
|
||
+extern void ujis_header (int*);
|
||
+#else
|
||
+extern void ujis_header (void);
|
||
+#endif
|
||
+extern void read_ujis (int,int,int), reverse_yomi (void), create_rev_dict (void),
|
||
+uniq_je (int(*func)(char*,char*)), sort_if_not_sorted (void), output_header (FILE*,struct JT*,struct wnn_file_head*), udytoS (w_char*,int,char*,struct uind1*), output_ri (FILE*), exit1 (void), new_pwd (char*,char*), rev_short_fun (w_char*), rev_w_char (w_char*,int);
|
||
extern
|
||
#ifdef BDIC_WRITE_CHECK
|
||
int
|
||
#else
|
||
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 ();
|
||
+ put_n_EU_str (FILE*,w_char*,int);
|
||
+static void ujistoud (void), output_dic_index (void), usage (void), sdic_sort (void),
|
||
+ujistosd (int,int), not_enough_area (void), get_pwd (char*,char*), output_hindo (FILE*), output_hinsi (FILE*), output_kanji (FILE*), rev_dic_data (void), set_pter1 (void), output_comment (FILE*), output_hinsi_list (FILE*);
|
||
+void upd_kanjicount (int), output_dic_data (void);
|
||
|
||
/* Switcher variable between UD and SD */
|
||
|
||
@@ -115,7 +121,7 @@
|
||
int tnum = 0;
|
||
struct uind2 *uhopter;
|
||
|
||
-char *hinsi_file_name = NULL;
|
||
+unsigned char *hinsi_file_name = NULL;
|
||
|
||
|
||
void
|
||
@@ -221,16 +227,16 @@
|
||
}
|
||
}
|
||
|
||
-extern int sort_func_sdic ();
|
||
-extern int sort_func_je ();
|
||
+extern int sort_func_sdic (char*,char*);
|
||
+extern int sort_func_je (char*,char*);
|
||
FILE *ofpter;
|
||
|
||
int
|
||
main (int argc, char** argv)
|
||
{
|
||
char *cswidth_name;
|
||
- extern char *get_cswidth_name ();
|
||
- extern void set_cswidth ();
|
||
+ extern char *get_cswidth_name (register char*);
|
||
+ extern void set_cswidth (register unsigned int);
|
||
|
||
com_name = argv[0];
|
||
init (argc, argv);
|
||
@@ -301,7 +307,6 @@
|
||
exit (0);
|
||
}
|
||
|
||
-
|
||
w_char *
|
||
addyomient (int tn, w_char* yomi)
|
||
{
|
||
@@ -442,7 +447,7 @@
|
||
{
|
||
if (which_dict == WNN_UD_DICT)
|
||
{
|
||
- fprintf (stderr, " tnum = %d\n ind2= %d\n kanji = %d\n", tnum, (char *) uhopter - (char *) hostart, kanjicount);
|
||
+ fprintf (stderr, " tnum = %d\n ind2= %d\n kanji = %d\n", tnum, (int)((char *) uhopter - (char *) hostart), kanjicount);
|
||
jt.maxtable = tnum;
|
||
jt.maxhontai = (char *) uhopter - (char *) hostart;
|
||
jt.maxri2 = jt.maxri1[D_YOMI] = jt.maxri1[D_KANJI] = 0;
|
||
@@ -470,7 +475,7 @@
|
||
}
|
||
else
|
||
{
|
||
- fprintf (stderr, "node_count = %d ind= %d\n kanji = %d\n", node_count, (char *) hopter - (char *) hostart, kanjicount);
|
||
+ fprintf (stderr, "node_count = %d ind= %d\n kanji = %d\n", node_count, (int)((char *) hopter - (char *) hostart), kanjicount);
|
||
jt.maxtable = 0;
|
||
jt.maxhontai = (char *) hopter - (char *) hostart;
|
||
jt.maxri2 = jt.maxri1[D_YOMI] = jt.maxri1[D_KANJI] = 0;
|
||
--- Wnn/romkan/rk_bltinfn.c
|
||
+++ Wnn/romkan/rk_bltinfn.c
|
||
@@ -371,7 +371,7 @@
|
||
to_digit (in, base, outp)
|
||
letter in, base, **outp;
|
||
{
|
||
- letter c, vtol ();
|
||
+ letter c, vtol (letter);
|
||
|
||
if (c = in, c /= base)
|
||
to_digit (c, base, outp);
|
||
--- Wnn/romkan/rk_fundecl.h
|
||
+++ Wnn/romkan/rk_fundecl.h
|
||
@@ -39,12 +39,12 @@
|
||
***********************************************************************/
|
||
/* Version 3.0
|
||
*/
|
||
-extern letter *ltrncpy ();
|
||
-extern int ltrcmp (), ltrncmp ();
|
||
+extern letter *ltrncpy (letter*,letter*,int);
|
||
+extern int ltrcmp (letter*,letter*), ltrncmp (letter*,letter*,int);
|
||
|
||
-extern int romkan_init (), romkan_init2 (), romkan_init3 ();
|
||
-extern letter romkan_getc (), *romkan_henkan (), romkan_next ();
|
||
-extern letter romkan_ungetc (), romkan_unnext ();
|
||
-extern void romkan_clear ();
|
||
-extern char *romkan_dispmode ();
|
||
+extern int romkan_init (char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)()), romkan_init2 (char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)(),char,char,char), romkan_init3 (char*,letter,letter,letter,letter(*keyinfn)(),int(*bytcntfn)(),int(*kbytcntfn)(),char,int);
|
||
+extern letter romkan_getc (void), *romkan_henkan (letter), romkan_next (void);
|
||
+extern letter romkan_ungetc (letter), romkan_unnext (letter);
|
||
+extern void romkan_clear (void);
|
||
+extern char *romkan_dispmode (void);
|
||
extern char rk_errstat; /* <20><><EFBFBD><EFBFBD><EFBFBD>ϴؿ<CFB4><D8BF>ǤϤʤ<CFA4><CAA4>ѿ<EFBFBD> */
|
||
--- Wnn/romkan/rk_main.c
|
||
+++ Wnn/romkan/rk_main.c
|
||
@@ -91,23 +91,23 @@
|
||
letter saishu_out[OUTSIZ];
|
||
letter delchr, delchr2 = EOLTTR, nisedl; /* DEL<45>Υ<EFBFBD><CEA5><EFBFBD><EFBFBD>饯<EFBFBD><E9A5AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĥޤǻ<DEA4><C7BB>Ƥ<EFBFBD> */
|
||
|
||
-modetyp chgmod (), incmod (), decmod ();
|
||
+modetyp chgmod (int,modetyp), incmod (int,modetyp), decmod (int,modetyp);
|
||
|
||
|
||
/* letter<65><72><EFBFBD>֤<EFBFBD><D6A4>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڤ<EFBFBD><DAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʰ<EFBFBD><CAB0><EFBFBD><EFBFBD>ˤ<EFBFBD>char<61>Τ<EFBFBD><CEA4>Τ⺮<CEA4><E2BAAE><EFBFBD>äƤ<C3A4><C6A4><EFBFBD><EFBFBD><EFBFBD> */
|
||
|
||
-static letter mchedsrc ();
|
||
-letter romkan_next (), romkan_unnext ();
|
||
-letter romkan_getc (), romkan_ungetc (), *romkan_henkan ();
|
||
-letter to_zenalpha (), to_zenhira (), to_zenkata ();
|
||
+static letter mchedsrc (int);
|
||
+letter romkan_next (void), romkan_unnext (letter);
|
||
+letter romkan_getc (void), romkan_ungetc (letter), *romkan_henkan (letter);
|
||
+letter to_zenalpha (letter), to_zenhira (letter), to_zenkata (letter);
|
||
/* to_zenhira;kata <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><CAB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ޤȤ<DEA4><C8A4>ˤ<EFBFBD><CBA4>ʤ<EFBFBD><CAA4><EFBFBD> */
|
||
|
||
-void BUGreport ();
|
||
-static void maeato_henkan (), add_at_eof (), rk_delete (), set_rubout (), mchevl (), codeout_chg (), ltrevlcpy ();
|
||
-int match ();
|
||
-static int p_eq (), hen_ikisrc (), henkan_ok (), rk_rst (), head_bytecount ();
|
||
-extern void readdata (), romkan_reset (), hank_setup (), to_hankata (), to_digit (), dakuadd (), handakuadd (), allchgmod ();
|
||
-extern int ltov ();
|
||
+void BUGreport (int);
|
||
+static void maeato_henkan (letter,letter*,int*), add_at_eof (void), rk_delete (letter), set_rubout (letter*,int,letter), mchevl (letter**,letter*), codeout_chg (void), ltrevlcpy (letter*,letter*);
|
||
+int match (void);
|
||
+static int p_eq (register letter**,register letter**), hen_ikisrc (int,letter), henkan_ok (void), rk_rst (void), head_bytecount (uns_chr*);
|
||
+extern void readdata (letter*,struct dat*,letter**,char*), romkan_reset (void), hank_setup (void), to_hankata (letter,letter**), to_digit (letter,letter,letter**), dakuadd (letter,letter**), handakuadd (letter,letter**), allchgmod (modetyp);
|
||
+extern int ltov (letter);
|
||
|
||
static letter *
|
||
ltrcpy (lp1, lp2)
|
||
@@ -426,6 +426,7 @@
|
||
lastoutlen = lastkbflen = 0;
|
||
}
|
||
|
||
+int romkan_init2 (char*,letter,char,letter(*keyinfn)(),int(*bytcntfn)(),char,char,char);
|
||
/** ɽ<><C9BD><EFBFBD>ɤ߹<C9A4><DFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롣<F2A4B9A4><EBA1A3>part 1<><31>*/
|
||
int
|
||
romkan_init (modhyo, delchr_, chmoutf, keyinfn, bytcntfn)
|
||
@@ -439,6 +440,7 @@
|
||
|
||
#define ifflg(a, b) ((a) ? (b) : 0)
|
||
|
||
+int romkan_init3 (char*,letter,letter,letter,letter(*keyinfn)(),int(*bytcntfn)(),int(*kbytcntfn)(),char,int);
|
||
/** ɽ<><C9BD><EFBFBD>ɤ߹<C9A4><DFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD><D1B4>ν<EFBFBD><CEBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>롣<F2A4B9A4><EBA1A3>part 2: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><CFA4>Ф<EFBFBD>ɬ<EFBFBD><C9AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
<20>֤<EFBFBD><D6A4>褦<EFBFBD>ˤ<EFBFBD><CBA4>뤫<EFBFBD><EBA4AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Хåե<C3A5><D5A5>ꥢ<F2A5AFA5><EAA5A2><EFBFBD>뤫<EFBFBD>ɤ<EFBFBD><C9A4><EFBFBD><EFBFBD>ʤɤ<CAA4><C9A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD>*/
|
||
int
|
||
--- Wnn/romkan/rk_modread.c
|
||
+++ Wnn/romkan/rk_modread.c
|
||
@@ -63,17 +63,17 @@
|
||
|
||
#define Terminator 0 /* int<6E><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>naibu[]<5D>ˤν<CBA4><CEBD>ߥ<EFBFBD><DFA5><EFBFBD><EFBFBD><EFBFBD> */
|
||
|
||
-extern char *chrcat (), *strend (), *ename ();
|
||
+extern char *chrcat (char*,char), *strend (char*), *ename (char*);
|
||
extern void romkan_clear ();
|
||
char *modhyopath;
|
||
|
||
-static void cond_evl (), mystrcpy (), rd_bcksla (), rd_ctrl (), hyouse (), look_choose ();
|
||
+static void cond_evl (char*), mystrcpy (char*,char*), rd_bcksla (register FILE*,char**), rd_ctrl (register FILE*,char**), hyouse (int), look_choose (int**,int);
|
||
void choosehyo ();
|
||
-static int mystrcmp (), read1tm (), mod_evl (), fnmsrc_tourk (), dspnamsrc_tourk (),
|
||
-scan1tm (), modsrc_tourk (), chk_get_int (), pathsrc_tourk (), modnamchk (), ctov (), look_cond (), evlcond (), chkchar_getc ();
|
||
-static char codeeval ();
|
||
-extern void ERRMOD (), ERMOPN (), BUGreport ();
|
||
-extern int filnamchk ();
|
||
+static int mystrcmp (char*,char*), read1tm (char**,int), mod_evl (char*), fnmsrc_tourk (char*), dspnamsrc_tourk (char*),
|
||
+scan1tm (char**,char*,int), modsrc_tourk (char*,int), chk_get_int (char*,unsigned int*,modetyp), pathsrc_tourk (char*), modnamchk (char*), ctov (char), look_cond (int**,int), evlcond (int**), chkchar_getc (FILE*);
|
||
+static char codeeval (register char**);
|
||
+extern void ERRMOD (unsigned int), ERMOPN (unsigned int), BUGreport (int);
|
||
+extern int filnamchk (char*);
|
||
|
||
struct kwdpair
|
||
{
|
||
@@ -122,6 +122,7 @@
|
||
return (i);
|
||
ERRMOD (9);
|
||
/*NOTREACHED*/
|
||
+ return 0;
|
||
}
|
||
|
||
/** <20>⡼<EFBFBD><E2A1BC>ɽ<EFBFBD><C9BD><EFBFBD>ɤ߹<C9A4><DFB9><EFBFBD> */
|
||
--- Wnn/romkan/rk_read.c
|
||
+++ Wnn/romkan/rk_read.c
|
||
@@ -51,16 +51,16 @@
|
||
#include "rk_header.h"
|
||
#include "rk_extvars.h"
|
||
|
||
-letter onescan (), *rangekettei ();
|
||
-char *ename ();
|
||
+letter onescan (letter**,letter*), *rangekettei (int,letter*);
|
||
+char *ename (char*);
|
||
|
||
-extern letter *ltrgrow (), *ltrend (), letterpick (), *ltr1cut ();
|
||
-extern char *chrcat (), *strend ();
|
||
+extern letter *ltrgrow (letter*,letter*), *ltrend (letter*), letterpick (uns_chr**), *ltr1cut (letter*);
|
||
+extern char *chrcat (char*,char), *strend (char*);
|
||
|
||
-static int termsscan (), evalandcpy (), eval1cpy (), partscan (), evlis (), atermscan (), serfun (), hensrc_tourk (), blankpass (), modsrcL (), chkL_get_int ();
|
||
-static void ERRLIN (), ERHOPN (), readhyo (), ltr1tostr (), ERRHYO (), vchk (), rangeset (), de_bcksla (), listscan (), singleqscan (), doubleqscan ();
|
||
-extern void BUGreport (), choosehyo (), readmode ();
|
||
-extern int ltrcmp (), ltrstrcmp (), readfnm (), fixednamep ();
|
||
+static int termsscan (register letter**,letter*,int), evalandcpy (register letter**,int), eval1cpy (letter**,int,int), partscan (register letter**,register letter*), evlis (int,letter**,int), atermscan (register letter**,register letter*,int), serfun (register letter*), hensrc_tourk (letter*,int), blankpass (register letter**,int), modsrcL (letter*), chkL_get_int (letter*,modetyp*,modetyp);
|
||
+static void ERRLIN (unsigned int), ERHOPN (unsigned int), readhyo (int), ltr1tostr (letter,char**), ERRHYO (unsigned int), vchk (letter*), rangeset (int,letter*), de_bcksla (char*,char*), listscan (register letter**,register letter*), singleqscan (letter**,letter*), doubleqscan (letter**,letter*);
|
||
+extern void BUGreport (int), choosehyo (void), readmode (char*);
|
||
+extern int ltrcmp (letter*,letter*), ltrstrcmp (register letter*,register char*), readfnm (int (*readchar_func) (void),int (*unreadc_func) (int),int (*readstr_func) (char**,int),char**,int*), fixednamep (char*);
|
||
|
||
#define IHENSU (1 << 24) /* <20><><EFBFBD><EFBFBD>ɽ<EFBFBD><C9BD><EFBFBD>ξ<EFBFBD><CEBE>̣<EFBFBD><CCA3>Х<EFBFBD><D0A5>Ȥǡ<C8A4><C7A1>ѿ<EFBFBD><D1BF><EFBFBD>ɽ<EFBFBD><C9BD> */
|
||
#define IKANSU (2 << 24) /* <20><> <20>ؿ<EFBFBD><D8BF><EFBFBD>ɽ<EFBFBD><C9BD> */
|