comparison Wnn/jserver/de.c @ 27:6bfa7ea3b75b

- resolved conflict between pointer and int - more warning suppression
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 06 Mar 2010 18:29:27 +0900
parents 466fe6732d8d
children
comparison
equal deleted inserted replaced
26:6dcfbd28e807 27:6bfa7ea3b75b
26 */ 26 */
27 27
28 /* 28 /*
29 Jserver (Nihongo Daemon) 29 Jserver (Nihongo Daemon)
30 */ 30 */
31 static char rcs_id[] = "$Id: de.c,v 1.36 2004/06/18 16:32:41 hiroo Exp $";
32 31
33 #if defined(HAVE_CONFIG_H) 32 #if defined(HAVE_CONFIG_H)
34 # include <config.h> 33 # include <config.h>
35 #endif 34 #endif
36 #include "getopt.h" 35 #include "getopt.h"
214 213
215 /* No arguments are used. Only options. */ 214 /* No arguments are used. Only options. */
216 int 215 int
217 main (int argc, char *argv[]) 216 main (int argc, char *argv[])
218 { 217 {
219 int tmpttyfd;
220 char *cswidth_name; 218 char *cswidth_name;
221 extern char *get_cswidth_name (); 219 extern char *get_cswidth_name ();
222 extern void set_cswidth (); 220 extern void set_cswidth ();
223 221
224 char nlspath[64]; 222 char nlspath[64];
321 #else /* !SETPGRP_VOID */ 319 #else /* !SETPGRP_VOID */
322 # if !defined(TIOCNOTTY) && defined(SVR4) 320 # if !defined(TIOCNOTTY) && defined(SVR4)
323 # define TIOCNOTTY _IO('t', 113) 321 # define TIOCNOTTY _IO('t', 113)
324 # endif /* !defined(TIOCNOTTY) && defined(SVR4) */ 322 # endif /* !defined(TIOCNOTTY) && defined(SVR4) */
325 #ifndef HITACHI 323 #ifndef HITACHI
326 if ((tmpttyfd = open ("/dev/tty", O_RDWR)) >= 0) 324 int tmpttyfd;
325 if ((tmpttyfd = open ("/dev/tty", O_RDWR)) >= 0)
327 { 326 {
328 ioctl (tmpttyfd, TIOCNOTTY, 0); 327 ioctl (tmpttyfd, TIOCNOTTY, 0);
329 close (tmpttyfd); 328 close (tmpttyfd);
330 } 329 }
331 #endif /* HITACHI */ 330 #endif /* HITACHI */
1176 1175
1177 static void 1176 static void
1178 get_options (int argc, char **argv) 1177 get_options (int argc, char **argv)
1179 { 1178 {
1180 int c; 1179 int c;
1181 int digit_optind = 0;
1182 1180
1183 strcpy (jserverrcfile, LIBDIR); /* usr/local/lib/wnn */ 1181 strcpy (jserverrcfile, LIBDIR); /* usr/local/lib/wnn */
1184 strcat (jserverrcfile, SERVER_INIT_FILE); /* ja_JP/jserverrc */ 1182 strcat (jserverrcfile, SERVER_INIT_FILE); /* ja_JP/jserverrc */
1185 1183
1186 while (1) 1184 while (1)
1187 { 1185 {
1188 int this_option_optind = optind ? optind : 1;
1189 int option_index = 0; 1186 int option_index = 0;
1190 static struct option long_options[] = 1187 static struct option long_options[] =
1191 { 1188 {
1192 {"baseport", 1, NULL, 'p'}, 1189 {"baseport", 1, NULL, 'p'},
1193 {"inet", 0, NULL, '4'}, 1190 {"inet", 0, NULL, '4'},