mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-27 22:11:24 -04:00
74 lines
2.3 KiB
Plaintext
74 lines
2.3 KiB
Plaintext
$NetBSD: patch-ae,v 1.8 2016/05/01 19:56:40 dholland Exp $
|
|
|
|
- Use pseudo-terminal multiplexor on NetBSD.
|
|
- Correctly set the terminal size on FreeBSD and NetBSD.
|
|
(these parts apparently from upstream)
|
|
|
|
- Use ctype.h functions correctly.
|
|
|
|
--- src/command.c.orig 2005-06-21 20:08:16.000000000 +0000
|
|
+++ src/command.c
|
|
@@ -542,7 +542,7 @@ get_pty(void)
|
|
ptydev = ttydev = _getpty(&fd, O_RDWR | O_NDELAY, 0622, 0);
|
|
if (ptydev == NULL)
|
|
goto Failed;
|
|
-#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__)
|
|
+#elif defined (__svr4__) || defined(__CYGWIN32__) || defined(__lnx21__) || defined(__NetBSD__)
|
|
{
|
|
extern char *ptsname();
|
|
|
|
@@ -1085,6 +1085,8 @@ run_command(char *argv[])
|
|
#endif /* SRIOCSREDIR */
|
|
}
|
|
|
|
+ tt_winsize(0); /* set window size */
|
|
+
|
|
/* reset signals and spin off the command interpreter */
|
|
signal(SIGINT, SIG_DFL);
|
|
signal(SIGQUIT, SIG_DFL);
|
|
@@ -1225,9 +1227,9 @@ init_command(char *argv[])
|
|
meta_char = (Options & Opt_meta8 ? 0x80 : 033);
|
|
if (rs_modifier
|
|
&& strlen(rs_modifier) == 4
|
|
- && toupper(*rs_modifier) == 'M'
|
|
- && toupper(rs_modifier[1]) == 'O'
|
|
- && toupper(rs_modifier[2]) == 'D')
|
|
+ && toupper((unsigned char)*rs_modifier) == 'M'
|
|
+ && toupper((unsigned char)rs_modifier[1]) == 'O'
|
|
+ && toupper((unsigned char)rs_modifier[2]) == 'D')
|
|
switch (rs_modifier[3]) {
|
|
case '2':
|
|
ModXMask = Mod2Mask;
|
|
@@ -1302,13 +1304,13 @@ init_xlocale(void)
|
|
for (s = tmp; *s; s++) {
|
|
char *end, *next_s;
|
|
|
|
- for (; *s && isspace(*s); s++)
|
|
+ for (; *s && isspace((unsigned char)*s); s++)
|
|
/* */ ;
|
|
if (!*s)
|
|
break;
|
|
for (end = s; (*end && (*end != ',')); end++)
|
|
/* */ ;
|
|
- for (next_s = end--; ((end >= s) && isspace(*end)); end--)
|
|
+ for (next_s = end--; ((end >= s) && isspace((unsigned char)*end)); end--)
|
|
/* */ ;
|
|
*++end = '\0';
|
|
if (*s) {
|
|
@@ -1340,13 +1342,13 @@ init_xlocale(void)
|
|
unsigned short i;
|
|
char *end, *next_s;
|
|
|
|
- for (; *s && isspace(*s); s++)
|
|
+ for (; *s && isspace((unsigned char)*s); s++)
|
|
/* */ ;
|
|
if (!*s)
|
|
break;
|
|
for (end = s; (*end && (*end != ',')); end++)
|
|
/* */ ;
|
|
- for (next_s = end--; ((end >= s) && isspace(*end));)
|
|
+ for (next_s = end--; ((end >= s) && isspace((unsigned char)*end));)
|
|
*end-- = 0;
|
|
|
|
if (!strcmp(s, "OverTheSpot"))
|