1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
*** stty.c.old Tue May 23 13:54:29 1989
--- stty.c Wed Aug 23 13:42:32 1989
***************
*** 20,25 ****
--- 20,28 ----
#include <stdio.h>
#include <sys/ioctl.h>
+ #include <sys/types.h>
+ #define NO_T_CHARS_DEFINES
+ #include <sys/tty.h>
struct
{
***************
*** 145,150 ****
--- 148,156 ----
struct winsize win;
int lmode;
int oldisc, ldisc;
+ #ifdef TIOCGSTATE
+ int extproc;
+ #endif
struct special {
char *name;
***************
*** 188,193 ****
--- 194,203 ----
ioctl(1, TIOCLGET, &lmode);
ioctl(1, TIOCGLTC, <c);
ioctl(1, TIOCGWINSZ, &win);
+ #ifdef TIOCGSTATE
+ ioctl(1, TIOCGSTATE, &extproc);
+ extproc &= TS_EXTPROC;
+ #endif
if(argc == 1) {
prmodes(0);
exit(0);
***************
*** 292,297 ****
--- 302,316 ----
printf("%d %d\n", win.ws_row, win.ws_col);
exit(0);
}
+ #if defined(TIOCEXT)
+ if (eq("extproc") || eq("-extproc")) {
+ if (**argv == '-')
+ extproc = 0;
+ else
+ extproc = 1;
+ ioctl(1, TIOCEXT, &extproc);
+ }
+ #endif
for(i=0; speeds[i].string; i++)
if(eq(speeds[i].string)) {
mode.sg_ispeed = mode.sg_ospeed = speeds[i].speed;
***************
*** 438,443 ****
--- 457,468 ----
lpit(LPENDIN, "-pendin ");
lpit(LDECCTQ, "-decctlq ");
lpit(LNOFLSH, "-noflsh ");
+ #ifdef TIOCGSTATE
+ if (all==2||extproc) {
+ fprintf(stderr,"-extproc"+(extproc!=0));
+ any++;
+ }
+ #endif
if (any || nothing)
fprintf(stderr,"\n");
} else if (!all)
|