openbsd-ports/japanese/Wnn/patches/patch-Wnn_conv_cvt_read_c
espie e8c9eaf450 Loads of changes, not quite finished yet.
- format man pages using new jgroff, so that we can install a full set
of documentation.
- move INSTALL script into a separate script, so that adding a new user
need not be done at the time of INSTALL.
- add a few strlcpy to fix a few holes. This stuff is rather bad, though.
- use terminfo instead of termcap, for better keycap names, fixing quite
a few bugs that made it impossible to build that version along the way...
- move scripts into /usr/local/bin instead of /usr/local/bin/Wnn4.

- use @comment no checksum
in packing list, even though pkg_add does not support that yet.
Not quite completely ready, but getting there...
2000-04-16 21:53:26 +00:00

80 lines
2.6 KiB
Plaintext
Raw Blame History

$OpenBSD: patch-Wnn_conv_cvt_read_c,v 1.1 2000/04/16 21:53:30 espie Exp $
--- Wnn/conv/cvt_read.c.orig Thu Apr 8 03:59:13 1993
+++ Wnn/conv/cvt_read.c Sun Apr 16 02:05:08 2000
@@ -72,6 +72,13 @@
#endif /* TERMINFO */
#include <term.h>
#endif
+#ifdef __OpenBSD__
+#ifdef TERMINFO
+#include <curses.h>
+#endif
+#include <term.h>
+#include <fcntl.h>
+#endif
#define ENTRY_LEN 10 /* コンバート表のエントリ名の最大長 */
@@ -437,6 +444,40 @@ int flg; /* verboseモードで起こすかのフ<E381AE>
keydef_key[i++] = stradd(&tdataptr, key_f29);
keydef_key[i++] = stradd(&tdataptr, key_f30);
keydef_key[i++] = stradd(&tdataptr, key_f31);
+#ifndef uniosu
+ keydef_key[i++] = stradd(&tdataptr, key_f32);
+ keydef_key[i++] = stradd(&tdataptr, key_f33);
+ keydef_key[i++] = stradd(&tdataptr, key_f34);
+ keydef_key[i++] = stradd(&tdataptr, key_f35);
+ keydef_key[i++] = stradd(&tdataptr, key_f36);
+ keydef_key[i++] = stradd(&tdataptr, key_f37);
+ keydef_key[i++] = stradd(&tdataptr, key_f38);
+ keydef_key[i++] = stradd(&tdataptr, key_f39);
+ keydef_key[i++] = stradd(&tdataptr, key_f40);
+ keydef_key[i++] = stradd(&tdataptr, key_f41);
+ keydef_key[i++] = stradd(&tdataptr, key_f42);
+ keydef_key[i++] = stradd(&tdataptr, key_f43);
+ keydef_key[i++] = stradd(&tdataptr, key_f44);
+ keydef_key[i++] = stradd(&tdataptr, key_f45);
+ keydef_key[i++] = stradd(&tdataptr, key_f46);
+ keydef_key[i++] = stradd(&tdataptr, key_f47);
+ keydef_key[i++] = stradd(&tdataptr, key_f48);
+ keydef_key[i++] = stradd(&tdataptr, key_f49);
+ keydef_key[i++] = stradd(&tdataptr, key_f50);
+ keydef_key[i++] = stradd(&tdataptr, key_f51);
+ keydef_key[i++] = stradd(&tdataptr, key_f52);
+ keydef_key[i++] = stradd(&tdataptr, key_f53);
+ keydef_key[i++] = stradd(&tdataptr, key_f54);
+ keydef_key[i++] = stradd(&tdataptr, key_f55);
+ keydef_key[i++] = stradd(&tdataptr, key_f56);
+ keydef_key[i++] = stradd(&tdataptr, key_f57);
+ keydef_key[i++] = stradd(&tdataptr, key_f58);
+ keydef_key[i++] = stradd(&tdataptr, key_f59);
+ keydef_key[i++] = stradd(&tdataptr, key_f60);
+ keydef_key[i++] = stradd(&tdataptr, key_f61);
+ keydef_key[i++] = stradd(&tdataptr, key_f62);
+ keydef_key[i++] = stradd(&tdataptr, key_f63);
+#endif
#endif /* SUPPORT_TWODIGIT_FUNCTIONS */
/* 以下順に
"kcuu1", "kcuf1", "kcub1", "kcud1", "khome",
@@ -505,14 +546,18 @@ int flg;
termname);
fd = open("/dev/null", O_WRONLY, 0);
setupterm(termname, fd, &rsl);
- close(fd);
+#ifndef __OpenBSD__
+ close(fd);
+#endif
if(rsl != 1){
errdsp2("Can't get terminfo entry", termname);
/* このときresetterm()は必要か? */
return(1);
}
convert_getstrs(flg);
- resetterm();
+#ifndef __OpenBSD__
+ resetterm();
+#endif
return(0);
}
#endif