Develop and Download Open Source Software

Browse CVS Repository

Contents of /freewnn/FreeWnn/PubdicPlus/ctopd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Mon Sep 2 11:01:39 2013 UTC (10 years, 7 months ago) by itisango
Branch: MAIN
CVS Tags: freewnn-1-1-1-a023-1, freewnn-1-1-1-a023, freewnn-1-1-1-a022I002, HEAD
Changes since 1.2: +2 -1 lines
File MIME type: text/x-csrc
* ChangeLog.en ChangeLog:
Added a message .

* Branched 1.1.1-a022I001 by <bkbin005@rinku.zaq.ne.jp@>

* Merged many patches from openSUSE:

Please see also:
http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-September/000183.html
https://build.opensuse.org/package/show/M17N/fwnn

- modified: Wnn/jutil/wdreg.c
I found type missmatches in main() .
Old code gave "" to js_dic_file_create(),
but js_dic_file_create()'s argument has a w_char * type .
So added w_char W_CHAR_NUL_STR[] = { 0 };
and gave it to js_dic_file_create() .

- modified: cWnn/include/Makefile.in cWnn/jserver/Makefile.in
kWnn/include/Makefile.in

Added header files .
So changed Makefile.in .

- new file: Wnn/include/conv.h Wnn/include/etc.h
Wnn/include/jlib_hide.h Wnn/include/jutil.h Wnn/include/romkan.h
- modified: Wnn/conv/cvt_key.c Wnn/conv/cvt_read.c Wnn/etc/bdic.c
Wnn/etc/dic_atojis.c Wnn/etc/gethinsi.c Wnn/etc/hindo.c Wnn/etc/msg.c
Wnn/etc/pwd.c Wnn/etc/revdic.c Wnn/etc/sstrings.c Wnn/etc/xutoj.c
Wnn/etc/yincoding.c Wnn/include/jdata.h Wnn/include/jllib.h
Wnn/include/jslib.h Wnn/include/msg.h Wnn/jlib.V3/jlv3.c Wnn/jlib/jl.c
Wnn/jlib/js.c Wnn/jserver/daibn_kai.c Wnn/jserver/de.c
Wnn/jserver/de_header.h Wnn/jserver/do_dic_env.c
Wnn/jserver/do_filecom.c Wnn/jserver/do_henkan.c
Wnn/jserver/do_henkan1.c Wnn/jserver/do_hindo_s.c Wnn/jserver/fzk.c
Wnn/jserver/get_kaiarea.c Wnn/jserver/hinsi_list.c Wnn/jserver/jbiki.c
Wnn/jserver/jbiki_b.c Wnn/jserver/jikouho.c Wnn/jserver/jikouho_d.c
Wnn/jserver/jishoop.c Wnn/jserver/jishosub.c Wnn/jserver/mknode0.c
Wnn/jserver/mknode1.c Wnn/jserver/mknode2.c Wnn/jserver/rd_jishoop.c
Wnn/jserver/readfile.c Wnn/jserver/sisheng.c Wnn/jserver/w_string.c
Wnn/jutil/atod.c Wnn/jutil/atof.c Wnn/jutil/atorev.c
Wnn/jutil/dic_head.c Wnn/jutil/dtoa.c Wnn/jutil/oldatonewa.c
Wnn/jutil/ujisf.c Wnn/jutil/wddel.c Wnn/jutil/wdreg.c
Wnn/jutil/wnnkill.c Wnn/jutil/wnnstat.c Wnn/jutil/wnntouch.c
Wnn/romkan/rk_bltinfn.c Wnn/uum/basic_op.c Wnn/uum/header.c
Wnn/uum/history.c Wnn/uum/inspect.c Wnn/uum/jhlp.c Wnn/uum/jikouho.c
Wnn/uum/jis_in.c Wnn/uum/jutil.c Wnn/uum/key_bind.c Wnn/uum/kuten.c
Wnn/uum/printf.c Wnn/uum/prologue.c Wnn/uum/screen.c Wnn/uum/sdefine.h
Wnn/uum/select_ele.c Wnn/uum/sheader.h Wnn/uum/termio.c
Wnn/uum/touroku.c Wnn/uum/ttyfdslot.c Wnn/uum/uif.c Wnn/uum/wnnrc_op.c
Prototype declarations for reducing compilation warnings .
- modified: Wnn/jserver/hinsi_list.c
I found a bug in make_hinsi_list(), then fixed it .
Please see also:
http://lists.opensuse.org/opensuse-ja/2013-08/msg00035.html

- modified: Wnn/include/msg.h
Bugfix: In openSUSE 13.1 Milestone 3,
uum could not get error messages .
This issue's cause is that we forgot prototype declaration
of msg_get() in Wnn/include/msg.h .
http://lists.opensuse.org/opensuse-ja/2013-08/msg00014.html
http://sourceforge.jp/projects/freewnn/lists/archive/users/2013-August/000140.html

- modified: Wnn/include/jllib.h Wnn/include/jslib.h
Wnn/include/wnn_string.h Wnn/jlib/jl.c Wnn/jserver/error.c
Wnn/jutil/atod.c Wnn/romkan/rk_bltinfn.c Wnn/romkan/rk_fundecl.h
Wnn/romkan/rk_main.c Wnn/romkan/rk_modread.c Wnn/romkan/rk_read.c
Xwnmo/xwnmo/do_socket.c
Added many prototype declarations .

- modified: PubdicPlus/ctopd.c PubdicPlus/wtopd.c
Added #include <string.h> and <unistd.h> .

- modified: Wnn/jlib.V3/jlv3.c
Fixed casts in jd_dicadd() .

- modified: Wnn/jserver/error.c Xwnmo/xwnmo/do_socket.c
Changed some types of variables .

- modified: Wnn/jlib/jl.c Wnn/jlib/js.c
Modified definication of message_out() .
Modified argument's types:
jl_connect_lang(), jl_open_lang(), create_pwd_file(),
jl_set_env_wnnrc(), jl_set_env_wnnrc1(), create_file(),
make_dir_rec1(), make_dir1(), call_error_handler(), message_out() ...
Fixed casts .

- modified:   Wnn/jserver/de.c
Added signal handler .
Server's exit status changed .

1 /* Copyright 1994 Pubdic Project.
2 *
3 * Permission to use, copy, modify, distribute and sell this software
4 * and its documentation for any purpose is hereby granted without
5 * fee, provided that the above copyright notice appear in all copies
6 * and that both that copyright notice and this permission notice
7 * appear in supporting documentation, and that the name of Pubdic
8 * Project not be used in advertising or publicity pertaining to
9 * distribution of the software without specific, written prior
10 * permission. Pubdic Project makes no representations about the
11 * suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
13 *
14 * PUBDIC PROJECT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
16 * NO EVENT SHALL PUBDIC PROJECT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
18 * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
19 * OTHER TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
21 */
22
23 #ifndef lint
24 static char rcsid[] = "$Id: ctopd.c,v 1.2 2001/06/14 18:15:54 ura Exp $";
25 #endif
26
27 #include <stdio.h>
28 #include <string.h>
29
30 static char *program;
31
32 #define READBUFSIZE 1024
33
34 char *
35 extstr (p, pp)
36 char *p, **pp;
37 {
38 char *res;
39
40 while (*p == ' ' || *p == '\t')
41 p++;
42 res = p;
43 while (*p && *p != ' ' && *p != '\t' && *p != '\n')
44 p++;
45 *p++ = '\0';
46 if (pp)
47 *pp = p;
48 return res;
49 }
50
51 static void
52 ctop (file)
53 FILE *file;
54 {
55 char readbuf[READBUFSIZE], *p, *yomi, *hinshi, *kouho;
56 int hindo;
57
58 while (p = fgets (readbuf, sizeof (readbuf), file))
59 {
60 yomi = extstr (p, &p);
61 hinshi = extstr (p, &p);
62 kouho = extstr (p, &p);
63
64 if (kouho[0] == '@' && !kouho[1])
65 {
66 kouho = yomi;
67 }
68
69 hindo = 0;
70 for (p = hinshi; *p; p++)
71 {
72 if (*p == '*')
73 {
74 *p++ = '\0';
75 hindo = atoi (p);
76 }
77 }
78
79 printf ("%s %s %s %d\n", yomi, kouho, hinshi, hindo);
80 }
81 }
82
83 main (argc, argv)
84 int argc;
85 char *argv[];
86 {
87 FILE *ins = stdin;
88
89 for (program = argv[0] + strlen (argv[0]); argv[0] < program; program--)
90 {
91 if (program[0] == '/')
92 {
93 program++;
94 break;
95 }
96 }
97
98 if (argc > 1)
99 {
100 ins = fopen (argv[1], "r");
101 if (!ins)
102 {
103 fprintf (stderr, "%s: can not open file \"%s\".\n", program, argv[1]);
104 }
105 }
106 ctop (ins);
107 fclose (ins);
108 exit (0);
109 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26