aboutsummaryrefslogtreecommitdiffstats
path: root/misc/mshell
diff options
context:
space:
mode:
authorjmz <jmz@FreeBSD.org>2007-04-14 20:17:55 +0800
committerjmz <jmz@FreeBSD.org>2007-04-14 20:17:55 +0800
commit9749a3f3b61f51fdd0a44377d15ef3cffb337903 (patch)
tree0f90f569317db685510d24a18249468c0cc8c070 /misc/mshell
parentfbc2d7291a78174d9c26ce2ba74fd4ddb06f8709 (diff)
downloadfreebsd-ports-gnome-9749a3f3b61f51fdd0a44377d15ef3cffb337903.tar.gz
freebsd-ports-gnome-9749a3f3b61f51fdd0a44377d15ef3cffb337903.tar.zst
freebsd-ports-gnome-9749a3f3b61f51fdd0a44377d15ef3cffb337903.zip
Use <termios.h> instead of <sgtty.h>
PR: ports/110384 Submitted by: Ed Schouten <ed@fxq.nl>
Diffstat (limited to 'misc/mshell')
-rw-r--r--misc/mshell/Makefile2
-rw-r--r--misc/mshell/files/patch-ab83
-rw-r--r--misc/mshell/files/patch-ag6
3 files changed, 42 insertions, 49 deletions
diff --git a/misc/mshell/Makefile b/misc/mshell/Makefile
index 3ddebce88e1e..10dda8ccaf6f 100644
--- a/misc/mshell/Makefile
+++ b/misc/mshell/Makefile
@@ -7,7 +7,7 @@
PORTNAME= mshell
PORTVERSION= 1.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= jmz
diff --git a/misc/mshell/files/patch-ab b/misc/mshell/files/patch-ab
index a7a739994612..8c6ebc6fcae2 100644
--- a/misc/mshell/files/patch-ab
+++ b/misc/mshell/files/patch-ab
@@ -1,46 +1,37 @@
-*** settatr.c.orig Sat Sep 24 00:47:17 1994
---- settatr.c Sat Sep 24 00:49:46 1994
-***************
-*** 15,21 ****
- ioctl ( 0, TIOCGETP, &sg );
- if (access(".stty", 0) == -1) { /* not already set up */
- sg.sg_erase = '';
-! sg.sg_kill = '';
- sg.sg_flags |= XTABS;
- }
- sg.sg_flags |= ECHO;
---- 15,21 ----
- ioctl ( 0, TIOCGETP, &sg );
- if (access(".stty", 0) == -1) { /* not already set up */
- sg.sg_erase = '';
-! sg.sg_kill = 21; /* ^U */
- sg.sg_flags |= XTABS;
- }
- sg.sg_flags |= ECHO;
-***************
-*** 25,36 ****
- ioctl ( 0, TIOCSETP, &sg );
-
- ioctl ( 0, TIOCGETC, &tc );
-! tc.t_intrc = '';
- ioctl ( 0, TIOCSETC, &tc );
-
- ioctl ( 0, TIOCGLTC, &lt );
-! lt.t_werasc = '';
-! lt.t_rprntc = '';
- ioctl ( 0, TIOCSLTC, &lt );
- #endif
- #ifdef SYSV
---- 25,36 ----
- ioctl ( 0, TIOCSETP, &sg );
-
- ioctl ( 0, TIOCGETC, &tc );
-! tc.t_intrc = 3; /* ^C */
- ioctl ( 0, TIOCSETC, &tc );
-
- ioctl ( 0, TIOCGLTC, &lt );
-! lt.t_werasc = 23; /* ^W */
-! lt.t_rprntc = 18; /* ^R */
- ioctl ( 0, TIOCSLTC, &lt );
- #endif
- #ifdef SYSV
+--- settatr.c.orig Mon Mar 26 14:59:01 2007
++++ settatr.c Mon Mar 26 15:00:41 2007
+@@ -4,7 +4,7 @@
+
+ set_terminal_attributes()
+ {
+-#ifdef BSD
++#if 0
+ struct sgttyb sg;
+ struct tchars tc;
+ struct ltchars lt;
+@@ -33,20 +33,19 @@
+ lt.t_rprntc = '';
+ ioctl ( 0, TIOCSLTC, &lt );
+ #endif
+-#ifdef SYSV
+- struct termio t;
++#if 1
++ struct termios t;
+
+- ioctl ( 0, TCGETA, &t );
++ tcgetattr(0, &t);
+
+ t.c_cc[VINTR] = '\003';
+ t.c_cc[VERASE] = '\b';
+ t.c_cc[VKILL] = '\025';
+ t.c_iflag = IGNBRK | IGNPAR | ICRNL | IXON ;
+- t.c_oflag = OPOST | ONLCR ;
++ t.c_oflag = OPOST | ONLCR | OXTABS;
+ t.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK ;
+- t.c_cflag |= TAB3;
+
+- ioctl ( 0, TCSETA, &t );
++ tcsetattr(0, TCSANOW, &t);
+ #endif
+ }
+ set_resource_limits()
diff --git a/misc/mshell/files/patch-ag b/misc/mshell/files/patch-ag
index 3a538ac4e0b4..cd3d7a2b3a45 100644
--- a/misc/mshell/files/patch-ag
+++ b/misc/mshell/files/patch-ag
@@ -1,11 +1,13 @@
--- mshell.h.orig Sun Oct 20 16:15:25 2002
+++ mshell.h Sun Oct 20 16:14:30 2002
-@@ -5,7 +5,7 @@
+@@ -5,8 +5,8 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef BSD
-#include <sys/dir.h> /* accessing the directory structure */
+-#include <sgtty.h> /* struct for terminal attributes */
+#include <dirent.h> /* accessing the directory structure */
- #include <sgtty.h> /* struct for terminal attributes */
++#include <termios.h> /* struct for terminal attributes */
#endif
#ifdef SYSV
+ #define index strchr