1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

- Eliminate sgtty dependency.

- Bump PORTREVISION.

PR:			ports/124460
Submitted by:		ed@
This commit is contained in:
Stanislav Sedov 2008-06-14 14:14:58 +00:00
parent b233ce918b
commit 702a1ead1e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=214835
3 changed files with 48 additions and 23 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= calctool
PORTVERSION= 2.4.13
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= math
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= nsayer

View File

@ -1,22 +0,0 @@
*** tty.c.orig Wed Dec 4 12:43:55 1996
--- tty.c Wed Dec 4 12:45:33 1996
***************
*** 1,5 ****
- /*LINTLIBRARY*/
-
/* @(#)tty.c 1.14 90/02/06
*
* These are the dumb tty dependent graphics routines used by calctool.
--- 1,3 ----
***************
*** 21,26 ****
--- 19,26 ----
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/time.h>
+ #include <sys/termios.h>
+ #include <sys/ioctl_compat.h>
#include "calctool.h"
#include "color.h"
#include "extern.h"

View File

@ -0,0 +1,47 @@
--- tty.c.orig 2008-06-14 18:05:30.000000000 +0400
+++ tty.c 2008-06-14 18:08:25.000000000 +0400
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <strings.h>
#include <signal.h>
+#include <termios.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/time.h>
@@ -30,7 +31,7 @@
char *getenv(), *tgetstr(), *tgoto() ;
int destroy_frame(), outc() ;
-struct sgttyb in_new, in_old ;
+struct termios in_new, in_old ;
SIGRET
@@ -90,7 +91,7 @@
}
do_move(0, 0) ;
SIGNAL(SIGINT, SIG_IGN) ;
- IOCTL(0, TIOCSETP, &in_old) ;
+ tcsetattr(0, TCSANOW, &in_old) ;
exit(0) ;
}
@@ -315,11 +316,14 @@
SIGNAL(SIGINT, cleanup) ;
- IOCTL(0, TIOCGETP, &in_old) ; /* Setup standard input. */
+ tcgetattr(0, &in_old) ; /* Setup standard input. */
in_new = in_old ;
- in_new.sg_flags |= RAW ;
- in_new.sg_flags &= ~(ECHO | CRMOD) ;
- IOCTL(0, TIOCSETP, &in_new) ;
+ in_new.c_iflag |= IGNBRK;
+ in_new.c_iflag &= ~ICRNL;
+ in_new.c_lflag &= ~(ECHOCTL|ISIG|ICANON|IEXTEN);
+ in_new.c_oflag &= ~ONLCR;
+ in_new.c_lflag &= ~ECHO;
+ tcsetattr(0, TCSANOW, &in_new) ;
setbuf(stdout, (char *) NULL) ;