pkgsrc/textproc/qsubst/patches/patch-ab
christos 57dd435d41 - strings.h is really not the right header to include.
- TCSASOFT is useless here; we have the right values for {i,o}speed and cflag.
  In addition it is not portable, so kill it.
- keep the previous unsigned char fix.
2005-03-24 16:27:40 +00:00

52 lines
1.1 KiB
Text

$NetBSD: patch-ab,v 1.2 2005/03/24 16:27:40 christos Exp $
--- qsubst.c.orig 2001-04-22 01:35:35.000000000 -0400
+++ qsubst.c 2005-03-24 11:23:34.000000000 -0500
@@ -105,7 +105,7 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
-#include <strings.h>
+#include <string.h>
#include <termcap.h>
#include <termios.h>
#include <unistd.h>
@@ -166,9 +166,9 @@
{ tstp_self();
return;
}
- tcsetattr(0,TCSAFLUSH|TCSASOFT,&orig_tio);
+ tcsetattr(0,TCSAFLUSH,&orig_tio);
tstp_self();
- tcsetattr(0,TCSADRAIN|TCSASOFT,&tio);
+ tcsetattr(0,TCSADRAIN,&tio);
}
static void limit_above_below(void)
@@ -181,7 +181,7 @@
}
}
-static int issymchar(char c)
+static int issymchar(unsigned char c)
{
return( isascii(c) &&
( isalnum(c) ||
@@ -231,7 +231,7 @@
tio.c_lflag &= ~(ICANON|ECHOKE|ECHOE|ECHO|ECHONL);
tio.c_cc[VMIN] = 1;
tio.c_cc[VTIME] = 0;
- tcsetattr(0,TCSANOW|TCSASOFT,&tio);
+ tcsetattr(0,TCSANOW,&tio);
switch (read(0,&c,1))
{ case -1:
break;
@@ -240,7 +240,7 @@
case 1:
break;
}
- tcsetattr(0,TCSANOW|TCSASOFT,&otio);
+ tcsetattr(0,TCSANOW,&otio);
return(c);
}