aboutsummaryrefslogtreecommitdiffstats
path: root/chinese
diff options
context:
space:
mode:
authoravl <avl@FreeBSD.org>2009-10-07 14:10:05 +0800
committeravl <avl@FreeBSD.org>2009-10-07 14:10:05 +0800
commit5cd19813f8f3bf1a718f79d09786f6492c915ba2 (patch)
treec3383124a895e841af629878b9f18f12126ed152 /chinese
parent8b497ccc50f94d90ede85c209e2c97f1e4693034 (diff)
downloadfreebsd-ports-gnome-5cd19813f8f3bf1a718f79d09786f6492c915ba2.tar.gz
freebsd-ports-gnome-5cd19813f8f3bf1a718f79d09786f6492c915ba2.tar.zst
freebsd-ports-gnome-5cd19813f8f3bf1a718f79d09786f6492c915ba2.zip
- Fix the terminal initial problem with color redraw
- Pass maintainership to submitter PR: ports/137858 Submitted by: Hung-Yi Chen <gaod@hychen.org>
Diffstat (limited to 'chinese')
-rw-r--r--chinese/ve/Makefile4
-rw-r--r--chinese/ve/files/patch-bbs.h21
-rw-r--r--chinese/ve/files/patch-editor.c14
-rw-r--r--chinese/ve/files/patch-screen.c17
-rw-r--r--chinese/ve/files/patch-term.c76
5 files changed, 84 insertions, 48 deletions
diff --git a/chinese/ve/Makefile b/chinese/ve/Makefile
index fe2640dba627..ee3df7712cc0 100644
--- a/chinese/ve/Makefile
+++ b/chinese/ve/Makefile
@@ -7,12 +7,12 @@
PORTNAME= ve
PORTVERSION= 1.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= chinese
MASTER_SITES= LOCAL/chinsan
EXTRACT_SUFX= .tgz
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= gaod@hychen.org
COMMENT= NTHU-CS Maple BBS 2.36 BBS-like editor
.include <bsd.port.mk>
diff --git a/chinese/ve/files/patch-bbs.h b/chinese/ve/files/patch-bbs.h
index b4bb4fcc98fb..3d1542f1cce7 100644
--- a/chinese/ve/files/patch-bbs.h
+++ b/chinese/ve/files/patch-bbs.h
@@ -1,9 +1,18 @@
---- bbs.h.orig 2008-05-01 19:32:07.000000000 +0800
-+++ bbs.h 2008-05-01 19:45:36.000000000 +0800
-@@ -25,14 +25,6 @@
+--- bbs.h.orig 2009-10-06 23:10:03.000000000 +0800
++++ bbs.h 2009-10-06 23:14:01.000000000 +0800
+@@ -12,6 +12,7 @@
+ #define BIT8
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <setjmp.h>
+ #include <signal.h>
+ #include <unistd.h>
+@@ -24,14 +25,7 @@
+ #include <sys/time.h>
#include <sys/stat.h>
#include <sys/file.h>
-
+-
-
-#ifdef LINUX
-#include <bsd/sgtty.h>
@@ -11,7 +20,7 @@
-#include <sgtty.h>
-#endif
-
--
++#include <termios.h>
+
#ifdef SYSV
- #ifndef LOCK_EX
diff --git a/chinese/ve/files/patch-editor.c b/chinese/ve/files/patch-editor.c
index e11452792df3..924d35129cf1 100644
--- a/chinese/ve/files/patch-editor.c
+++ b/chinese/ve/files/patch-editor.c
@@ -1,10 +1,10 @@
---- editor.c.orig 2008-12-21 22:42:24.000000000 +0800
-+++ editor.c 2008-12-21 22:42:35.000000000 +0800
-@@ -21,6 +21,7 @@
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
+--- edit.c.orig 2009-10-06 23:06:44.000000000 +0800
++++ edit.c 2009-10-06 23:06:57.000000000 +0800
+@@ -6,7 +6,6 @@
+ /* update : 95/12/15 */
+ /*-------------------------------------------------------*/
-+#include <stdlib.h>
+-#include <stdlib.h>
+ #include <sys/param.h>
#include "bbs.h"
- #define gtty(fd,data) tcgetattr(fd,data)
diff --git a/chinese/ve/files/patch-screen.c b/chinese/ve/files/patch-screen.c
index b643c45ad398..dccb82180d82 100644
--- a/chinese/ve/files/patch-screen.c
+++ b/chinese/ve/files/patch-screen.c
@@ -1,16 +1,15 @@
---- screen.c_orig 2008-12-21 22:41:24.000000000 +0800
-+++ screen.c 2008-12-21 22:41:40.000000000 +0800
-@@ -6,7 +6,8 @@
+--- screen.c.orig 2009-10-06 23:07:16.000000000 +0800
++++ screen.c 2009-10-06 23:15:01.000000000 +0800
+@@ -6,7 +6,7 @@
/* update : 95/12/15 */
/*-------------------------------------------------------*/
-#include <varargs.h>
+#include <stdarg.h>
-+#include <stdlib.h>
#include "bbs.h"
extern char clearbuf[];
-@@ -46,8 +47,6 @@
+@@ -46,8 +46,6 @@
{
if (!dumb_term && !big_picture)
{
@@ -19,7 +18,7 @@
scr_lns = t_lines;
scr_cols = t_columns = ANSILINELEN;
/* scr_cols = MIN(t_columns, ANSILINELEN); */
-@@ -601,13 +600,12 @@
+@@ -601,14 +599,13 @@
void
@@ -30,9 +29,11 @@
va_list args;
- char buff[512], *fmt;
+ char buff[512];
++
++ va_start(args, fmt);
- va_start(args);
-+ va_start(args, fmt);
- fmt = va_arg(args, char *);
+- fmt = va_arg(args, char *);
vsprintf(buff, fmt, args);
va_end(args);
+ outs(buff);
diff --git a/chinese/ve/files/patch-term.c b/chinese/ve/files/patch-term.c
index 29f3a625f47a..cad35e7daa7f 100644
--- a/chinese/ve/files/patch-term.c
+++ b/chinese/ve/files/patch-term.c
@@ -1,27 +1,24 @@
---- term.c.orig 2008-05-01 19:34:15.000000000 +0800
-+++ term.c 2008-05-01 19:44:06.000000000 +0800
-@@ -9,17 +9,16 @@
-
+--- term.c.orig 2009-10-06 23:10:29.000000000 +0800
++++ term.c 2009-10-06 23:20:40.000000000 +0800
+@@ -10,16 +10,7 @@
#include "bbs.h"
#include <sys/ioctl.h>
-+#include <stdlib.h>
-
- #ifdef HP_UX
- #define O_HUPCL 01
- #define O_XTABS 02
- #endif
+-#ifdef HP_UX
+-#define O_HUPCL 01
+-#define O_XTABS 02
+-#endif
+-
-#ifdef LINUX
-#include <linux/termios.h>
-#define stty(fd, data) tcsetattr( fd, TCSETS, data )
-+#include <termios.h>
-+#define stty(fd, data) tcsetattr( fd, TCSANOW, data )
- #define gtty(fd, data) tcgetattr( fd, data )
+-#define gtty(fd, data) tcgetattr( fd, data )
-#endif
++#define stty(fd, data) tcsetattr( fd, TCSANOW, data )
#ifndef TANDEM
#define TANDEM 0x00000001
-@@ -29,11 +28,7 @@
+@@ -29,11 +20,7 @@
#define CBREAK 0x00000002
#endif
@@ -33,10 +30,29 @@
/* ----------------------------------------------------- */
-@@ -62,37 +57,11 @@
- }
- memcpy(&tty_new, &tty_state, sizeof(tty_new));
+@@ -44,7 +31,7 @@
+ void
+ get_tty()
+ {
+- if (gtty (1, &tty_state) < 0)
++ if (tcgetattr(1, &tty_state) < 0)
+ {
+ fprintf (stderr, "gtty failed\n");
+ exit (-1);
+@@ -53,46 +40,23 @@
+
+ void
+-init_tty()
++init_tty(void)
+ {
+- if (gtty(1, &tty_state) < 0)
+- {
+- fprintf(stderr, "gtty failed\n");
+- exit(-1);
+- }
+- memcpy(&tty_new, &tty_state, sizeof(tty_new));
+-
-#ifdef LINUX
-
- tty_new.c_lflag &= ~(ICANON | ECHO | RAW | ISIG);
@@ -52,13 +68,24 @@
-#else
- tty_new.sg_flags &= ~(TANDEM | CBREAK | LCASE | ECHO | CRMOD);
-#endif
--
-+ tty_new.c_lflag &= ~(ICANON | ECHO | ISIG);
- stty(1, &tty_new);
++ struct termios tty_state, tty_new;
+
+- stty(1, &tty_new);
-#endif
++ if (tcgetattr(1, &tty_state) < 0) {
++ fprintf(stderr, "tcgetattr(): %m");
++ return;
++ }
++ memcpy(&tty_new, &tty_state, sizeof(tty_new));
++ tty_new.c_lflag &= ~(ICANON | ECHO | ISIG);
++ /*
++ * tty_new.c_cc[VTIME] = 0; tty_new.c_cc[VMIN] = 1;
++ */
++ tcsetattr(1, TCSANOW, &tty_new);
++ system("stty raw -echo");
}
-
+-
-#ifdef LINUX
-reset_tty()
-{
@@ -72,16 +99,15 @@
void
reset_tty()
{
-@@ -104,8 +73,6 @@
+@@ -104,7 +68,6 @@
stty(1, &tty_new);
}
-#endif
--
- /* ----------------------------------------------------- */
-@@ -171,11 +138,7 @@
+
+@@ -171,11 +134,7 @@
char *sbp, *s;
char *tgetstr();