diff options
author | Cameron Katri <me@cameronkatri.com> | 2021-05-09 14:20:58 -0400 |
---|---|---|
committer | Cameron Katri <me@cameronkatri.com> | 2021-05-09 14:20:58 -0400 |
commit | 5fd83771641d15c418f747bd343ba6738d3875f7 (patch) | |
tree | 5abf0f78f680d9837dbd93d4d4c3933bb7509599 /patch_cmds/diffstat/testing/case12.pat | |
download | apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.gz apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.tar.zst apple_cmds-5fd83771641d15c418f747bd343ba6738d3875f7.zip |
Import macOS userland
adv_cmds-176
basic_cmds-55
bootstrap_cmds-116.100.1
developer_cmds-66
diskdev_cmds-667.40.1
doc_cmds-53.60.1
file_cmds-321.40.3
mail_cmds-35
misc_cmds-34
network_cmds-606.40.1
patch_cmds-17
remote_cmds-63
shell_cmds-216.60.1
system_cmds-880.60.2
text_cmds-106
Diffstat (limited to 'patch_cmds/diffstat/testing/case12.pat')
-rw-r--r-- | patch_cmds/diffstat/testing/case12.pat | 163 |
1 files changed, 163 insertions, 0 deletions
diff --git a/patch_cmds/diffstat/testing/case12.pat b/patch_cmds/diffstat/testing/case12.pat new file mode 100644 index 0000000..a781855 --- /dev/null +++ b/patch_cmds/diffstat/testing/case12.pat @@ -0,0 +1,163 @@ +Index: xc/programs/xterm/main.c +diff -u xc/programs/xterm/main.c:1.1.1.22 xc/programs/xterm/main.c:1.2 +--- xc/programs/xterm/main.c:1.1.1.22 Tue Mar 19 07:36:38 1996 ++++ xc/programs/xterm/main.c Sun Mar 24 01:10:29 1996 +@@ -182,6 +182,10 @@ + #undef CAPS_LOCK + #endif + ++#ifdef CSRG_BASED ++#define USE_POSIX_TERMIOS ++#endif ++ + #include <sys/ioctl.h> + #include <sys/stat.h> + +@@ -199,6 +203,9 @@ + #endif + #endif + ++#ifdef USE_POSIX_TERMIOS ++#include <termios.h> ++#else + #ifdef USE_TERMIOS + #include <termios.h> + /* this hacked termios support only works on SYSV */ +@@ -3143,11 +3197,11 @@ + shname_minus = malloc(strlen(shname) + 2); + (void) strcpy(shname_minus, "-"); + (void) strcat(shname_minus, shname); +-#ifndef USE_SYSV_TERMIO ++#if !defined(USE_SYSV_TERMIO) && !defined(USE_POSIX_TERMIOS) + ldisc = XStrCmp("csh", shname + strlen(shname) - 3) == 0 ? + NTTYDISC : 0; + ioctl(0, TIOCSETD, (char *)&ldisc); +-#endif /* !USE_SYSV_TERMIO */ ++#endif /* !USE_SYSV_TERMIO && !USE_POSIX_TERMIOS */ + + #ifdef USE_LOGIN_DASH_P + if (term->misc.login_shell && pw && added_utmp_entry) +Index: xc/programs/xterm/resize.c +diff -u xc/programs/xterm/resize.c:1.1.1.9 xc/programs/xterm/resize.c:1.2 +--- xc/programs/xterm/resize.c:1.1.1.9 Wed Feb 14 21:58:14 1996 ++++ xc/programs/xterm/resize.c Sun Mar 24 01:10:32 1996 +@@ -87,19 +87,19 @@ + #define USE_TERMINFO + #endif + +-#ifdef MINIX ++#if defined(CSRG_BASED) + #define USE_TERMIOS + #endif + + #include <sys/ioctl.h> + #ifdef USE_SYSV_TERMIO +-#include <sys/termio.h> ++# include <sys/termio.h> + #else /* else not USE_SYSV_TERMIO */ +-#ifdef MINIX +-#include <termios.h> +-#else /* !MINIX */ +-#include <sgtty.h> +-#endif /* MINIX */ ++# ifdef USE_TERMIOS ++# include <termios.h> ++# else /* not USE_TERMIOS */ ++# include <sgtty.h> ++# endif /* USE_TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + + #ifdef USE_USG_PTYS +@@ -127,8 +127,9 @@ + #define bzero(s, n) memset(s, 0, n) + #endif /* USE_SYSV_TERMIO */ + +-#ifdef USE_TERMIOS ++#ifdef MINIX + #define USE_SYSV_TERMIO ++#include <sys/termios.h> + #define termio termios + #define TCGETA TCGETS + #define TCSETAW TCSETSW +@@ -190,7 +191,11 @@ + #ifdef USE_SYSV_TERMIO + struct termio tioorig; + #else /* not USE_SYSV_TERMIO */ ++# ifdef USE_TERMIOS ++struct termios tioorig; ++# else /* not USE_TERMIOS */ + struct sgttyb sgorig; ++# endif /* USE_TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + char *size[EMULATIONS] = { + "\033[%d;%dR", +@@ -244,7 +249,11 @@ + #ifdef USE_SYSV_TERMIO + struct termio tio; + #else /* not USE_SYSV_TERMIO */ ++#ifdef USE_TERMIOS ++ struct termios tio; ++#else /* not USE_TERMIOS */ + struct sgttyb sg; ++#endif /* USE_TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + #ifdef USE_TERMCAP + char termcap [1024]; +@@ -366,10 +375,20 @@ + tio.c_cc[VMIN] = 6; + tio.c_cc[VTIME] = 1; + #else /* else not USE_SYSV_TERMIO */ ++#if defined(USE_TERMIOS) ++ tcgetattr(tty, &tioorig); ++ tio = tioorig; ++ tio.c_iflag &= ~ICRNL; ++ tio.c_lflag &= ~(ICANON | ECHO); ++ tio.c_cflag |= CS8; ++ tio.c_cc[VMIN] = 6; ++ tio.c_cc[VTIME] = 1; ++#else /* not USE_TERMIOS */ + ioctl (tty, TIOCGETP, &sgorig); + sg = sgorig; + sg.sg_flags |= RAW; + sg.sg_flags &= ~ECHO; ++#endif /* USE_TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + signal(SIGINT, onintr); + signal(SIGQUIT, onintr); +@@ -377,7 +396,11 @@ + #ifdef USE_SYSV_TERMIO + ioctl (tty, TCSETAW, &tio); + #else /* not USE_SYSV_TERMIO */ ++#ifdef USE_TERMIOS ++ tcsetattr(tty, TCSADRAIN, &tio); ++#else /* not USE_TERMIOS */ + ioctl (tty, TIOCSETP, &sg); ++#endif /* USE_TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + + if (argc == 2) { +@@ -434,7 +457,11 @@ + #ifdef USE_SYSV_TERMIO + ioctl (tty, TCSETAW, &tioorig); + #else /* not USE_SYSV_TERMIO */ ++#ifdef USE_TERMIOS ++ tcsetattr(tty, TCSADRAIN, &tioorig); ++#else /* not USE_TERMIOS */ + ioctl (tty, TIOCSETP, &sgorig); ++#endif /* USE_TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + signal(SIGINT, SIG_DFL); + signal(SIGQUIT, SIG_DFL); +@@ -595,7 +622,11 @@ + #ifdef USE_SYSV_TERMIO + ioctl (tty, TCSETAW, &tioorig); + #else /* not USE_SYSV_TERMIO */ ++#ifdef USE_TERMIOS ++ tcsetattr (tty, TCSADRAIN, &tioorig); ++#else /* not USE_TERMIOS */ + ioctl (tty, TIOCSETP, &sgorig); ++#endif /* use TERMIOS */ + #endif /* USE_SYSV_TERMIO */ + exit(1); + } + |