aboutsummaryrefslogtreecommitdiff
path: root/japanese/kon2-16dot
diff options
context:
space:
mode:
authorShigeyuki Fukushima <shige@FreeBSD.org>1999-08-06 20:45:37 +0000
committerShigeyuki Fukushima <shige@FreeBSD.org>1999-08-06 20:45:37 +0000
commitee6528788ea85dc3a344b58104c328cfb2148f27 (patch)
tree041b5f21ee3fed9ae8cf9c7aace70f312f765698 /japanese/kon2-16dot
parent4211e63856e465fb63e743b14970ff78f8a7de96 (diff)
downloadports-ee6528788ea85dc3a344b58104c328cfb2148f27.tar.gz
ports-ee6528788ea85dc3a344b58104c328cfb2148f27.zip
Notes
Diffstat (limited to 'japanese/kon2-16dot')
-rw-r--r--japanese/kon2-16dot/files/patch-af13
-rw-r--r--japanese/kon2-16dot/files/patch-ai10
-rw-r--r--japanese/kon2-16dot/files/patch-aj6
-rw-r--r--japanese/kon2-16dot/files/patch-ak25
-rw-r--r--japanese/kon2-16dot/files/patch-al159
5 files changed, 204 insertions, 9 deletions
diff --git a/japanese/kon2-16dot/files/patch-af b/japanese/kon2-16dot/files/patch-af
index 93fbdc542c5b..2c939e69dd91 100644
--- a/japanese/kon2-16dot/files/patch-af
+++ b/japanese/kon2-16dot/files/patch-af
@@ -1,6 +1,13 @@
---- src/term.c.orig Sat Jan 25 00:03:58 1997
-+++ src/term.c Sat Apr 26 03:54:03 1997
-@@ -205,7 +205,7 @@
+--- src/term.c.orig Sat Aug 7 05:07:34 1999
++++ src/term.c Sat Aug 7 05:07:39 1999
+@@ -201,11 +201,14 @@
+ }
+ if (FD_ISSET(0, &readFds)) {
+ i = read(0, buff, BUFSIZ);
++#if defined(__FreeBSD__)
++ i = cons25tovt100(buff, i, BUFSIZ);
++#endif
+ if (i > 0) write(masterPty, buff, i);
PollCursor(TRUE);
}
if (FD_ISSET(sockFd, &readFds)) SocketInterface(sockFd);
diff --git a/japanese/kon2-16dot/files/patch-ai b/japanese/kon2-16dot/files/patch-ai
index c75fac3016b2..4f7e70b7e1d2 100644
--- a/japanese/kon2-16dot/files/patch-ai
+++ b/japanese/kon2-16dot/files/patch-ai
@@ -1,8 +1,12 @@
---- doc/CHANGES.orig Fri Jan 23 01:41:23 1998
-+++ doc/CHANGES Fri Jan 23 01:40:52 1998
-@@ -128,3 +128,5 @@
+--- doc/CHANGES.orig Sat Aug 7 05:03:30 1999
++++ doc/CHANGES Sat Aug 7 05:03:34 1999
+@@ -128,3 +128,9 @@
FreeBSD での kon.cfg, kon のインストール時のパーミッション修正
KON2 0.3(97/2/06) manabe@dsl.ics.tut.ac.jp
FreeBSD 版 kon.cfg での VGA レジスタ値を Linux でも利用
+KON2 0.3(98/1/23) s-nabe@cs.titech.ac.jp
+ FreeBSD でのビープがなるようにした
++KON2 0.3(98/10/31) s-nabe@cs.titech.ac.jp
++ FreeBSD でカーソルキーが正常に使えるようにした
++KON2 0.3(98/1/23) s-nabe@cs.titech.ac.jp
++ FreeBSD でのビープがなるようにした
diff --git a/japanese/kon2-16dot/files/patch-aj b/japanese/kon2-16dot/files/patch-aj
index 55d44e251818..a1c3a1493e52 100644
--- a/japanese/kon2-16dot/files/patch-aj
+++ b/japanese/kon2-16dot/files/patch-aj
@@ -1,5 +1,5 @@
---- include/version.h.orig Fri Jan 23 01:41:39 1998
-+++ include/version.h Fri Jan 23 01:36:12 1998
+--- include/version.h.orig Sat Aug 7 05:04:19 1999
++++ include/version.h Sat Aug 7 05:04:26 1999
@@ -1 +1 @@
-#define VERSION "ver.0.3 (01/28)"
-+#define VERSION "ver.0.3 (1998/01/23)"
++#define VERSION "ver.0.3 (1998/10/31)"
diff --git a/japanese/kon2-16dot/files/patch-ak b/japanese/kon2-16dot/files/patch-ak
new file mode 100644
index 000000000000..bd724bb48035
--- /dev/null
+++ b/japanese/kon2-16dot/files/patch-ak
@@ -0,0 +1,25 @@
+--- include/vt.h.orig Fri Jan 24 16:08:13 1997
++++ include/vt.h Sat Aug 7 05:06:49 1999
+@@ -59,7 +59,12 @@
+ ins,
+ active,
+ wrap,
++#if defined(__FreeBSD__)
++ text_mode,
++ cursor_key_mode;
++#else
+ text_mode;
++#endif
+ };
+
+ extern struct _con_info con;
+@@ -75,6 +80,9 @@
+ extern void VtStart(void);
+ extern void VtEmu(const char*, int nchars);
+ extern void VtCleanup(void);
++#if defined(__FreeBSD__)
++extern int cons25tovt100(u_char *buff, int len, const int max);
++#endif
+
+ #define sjistojis(ch, cl)\
+ {\
diff --git a/japanese/kon2-16dot/files/patch-al b/japanese/kon2-16dot/files/patch-al
new file mode 100644
index 000000000000..5555214c56d5
--- /dev/null
+++ b/japanese/kon2-16dot/files/patch-al
@@ -0,0 +1,159 @@
+--- src/vt.c.orig Sat Jan 25 17:55:02 1997
++++ src/vt.c Sat Aug 7 05:09:15 1999
+@@ -185,6 +185,11 @@
+ static void VtSetMode(u_char mode, bool sw)
+ {
+ switch(mode) {
++#if defined(__FreeBSD__)
++ case 1:
++ con.cursor_key_mode = sw;
++ break;
++#endif
+ case 4:
+ con.ins = sw;
+ break;
+@@ -654,4 +659,144 @@
+ con.sb = lInfo.sb;
+ con.db = lInfo.db|LATCH_1;
+ con.active = cInfo.sw = TRUE;
++#if defined(__FreeBSD__)
++ con.cursor_key_mode = FALSE;
++#endif
+ }
++
++#if defined(__FreeBSD__)
++
++static int ReplaceString(char *sp, const int len, const int maxlen,
++ const int oldlen, const char *newstr)
++{
++ int newlen, copylen, diff;
++
++ newlen = strlen(newstr);
++ diff = newlen - oldlen;
++ copylen = len - oldlen;
++
++ if(len + diff > maxlen){
++ diff -= (len + diff - maxlen);
++ copylen = maxlen - newlen;
++ }
++ if(copylen > 0)
++ memcpy(sp + newlen, sp + oldlen, copylen);
++
++ copylen = newlen;
++ if(newlen > maxlen){
++ copylen = maxlen;
++ diff = maxlen - len;
++ }
++ if(copylen > 0)
++ memcpy(sp, newstr, copylen);
++
++ return(diff);
++}
++
++int cons25tovt100(u_char *buff, int len, const int max)
++{
++ u_char *p;
++ int i;
++ int newlen = len;
++
++ p = buff;
++
++ for(i=0; i<newlen; i++, p++){
++ switch(*p){
++ case '\177':
++ newlen += ReplaceString(p, len-i, max-i, 1, "\x1b[3~");
++ i += 3; p += 3;
++ break;
++ case '\033': /* ESC */
++ if(i + 2 <= newlen && *(p+1) == '['){
++ switch(*(p+2)){
++ case 'A': /* up arrow */
++ if(con.cursor_key_mode)
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1bOA");
++ break;
++ case 'B': /* down arrow */
++ if(con.cursor_key_mode)
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1bOB");
++ break;
++ case 'C': /* right arrow */
++ if(con.cursor_key_mode)
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1bOC");
++ break;
++ case 'D': /* left arrow */
++ if(con.cursor_key_mode)
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1bOD");
++ break;
++ case 'L': /* insert */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[2~");
++ i++; p++;
++ break;
++ case 'H': /* home key */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[4~");
++ i++; p++;
++ break;
++ case 'I': /* prev page */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[5~");
++ i++; p++;
++ break;
++ case 'G': /* next page */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[6~");
++ i++; p++;
++ break;
++ case 'M': /* F1 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[11~");
++ i += 2; p += 2;
++ break;
++ case 'N': /* F2 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[12~");
++ i += 2; p += 2;
++ break;
++ case 'O': /* F3 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[13~");
++ i += 2; p += 2;
++ break;
++ case 'P': /* F4 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[14~");
++ i += 2; p += 2;
++ break;
++ case 'Q': /* F5 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[15~");
++ i += 2; p += 2;
++ break;
++ case 'R': /* F6 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[17~");
++ i += 2; p += 2;
++ break;
++ case 'S': /* F7 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[18~");
++ i += 2; p += 2;
++ break;
++ case 'T': /* F8 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[19~");
++ i += 2; p += 2;
++ break;
++ case 'U': /* F9 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[20~");
++ i += 2; p += 2;
++ break;
++ case 'V': /* F10 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[21~");
++ i += 2; p += 2;
++ break;
++ case 'W': /* F11 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[23~");
++ i += 2; p += 2;
++ break;
++ case 'X': /* F12 */
++ newlen += ReplaceString(p, len-i, max-i, 3, "\x1b[24~");
++ i += 2; p += 2;
++ break;
++ }
++ i += 2; p += 2;
++ }
++ }
++ }
++
++ return(newlen);
++}
++
++#endif