summaryrefslogtreecommitdiff
path: root/inputmethod/canna/patches/patch-canuum_canna.c
blob: a558a383eaa31044605198609ee31a4d4ac0291f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$NetBSD: patch-canuum_canna.c,v 1.1 2015/10/18 03:58:31 tsutsui Exp $

- Appease prototype warnings.
- Remove unnecessary ops.

--- canuum/canna.c.orig	2003-09-17 08:50:52.000000000 +0000
+++ canuum/canna.c
@@ -52,4 +52,16 @@ static char rcsid[] = "$Id: canna.c,v 1.
 #endif
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#if STDC_HEADERS
+#  include <string.h>
+#else
+#  if HAVE_STRINGS_H
+#    include <strings.h>
+#  endif
+#endif /* STDC_HEADERS */
+
 #include "commonhd.h"
 #include "sdefine.h"
@@ -95,6 +107,4 @@ static char rcsid[] = "$Id: canna.c,v 1.
 #define NOREDRAW      0
 
-extern	int	errno;
-
 static int maxmodelen;
 static int maxwidth = 0;
@@ -1239,8 +1249,6 @@ int flag;
 
 #ifdef TERMINFO
-  int fd, res;
 
-  fd = open("/dev/null", O_WRONLY, &res);
-  setupterm(term, fd, (int *)0);
+  setupterm(term, 0, NULL);
 
   cannakeyentry(key_f1,    CANNA_KEY_F1);
@@ -1271,5 +1279,4 @@ int flag;
 #endif
 
-  resetterm();
 #endif