Changeset View
Changeset View
Standalone View
Standalone View
bin/stty/print.c
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | case CRTS_IFLOW: | ||||
break; | break; | ||||
default: | default: | ||||
put("-crtscts", CCTS_OFLOW | CRTS_IFLOW, 0); | put("-crtscts", CCTS_OFLOW | CRTS_IFLOW, 0); | ||||
break; | break; | ||||
} | } | ||||
put("-dsrflow", CDSR_OFLOW, 0); | put("-dsrflow", CDSR_OFLOW, 0); | ||||
put("-dtrflow", CDTR_IFLOW, 0); | put("-dtrflow", CDTR_IFLOW, 0); | ||||
put("-mdmbuf", MDMBUF, 0); /* XXX mdmbuf == dtrflow */ | put("-mdmbuf", MDMBUF, 0); /* XXX mdmbuf == dtrflow */ | ||||
put("--rtsdtr", CNO_RTSDTR, 0); /* This is an inverted flag, hence the -- */ | |||||
ian: This seems insane, we have no precedent I can think of for a '--something' setting in stty, and… | |||||
impUnsubmitted Done Inline ActionsYes. I concur. imp: Yes. I concur.
| |||||
/* special control characters */ | /* special control characters */ | ||||
cc = tp->c_cc; | cc = tp->c_cc; | ||||
if (fmt == POSIX) { | if (fmt == POSIX) { | ||||
binit("cchars"); | binit("cchars"); | ||||
for (p = cchars1; p->name; ++p) { | for (p = cchars1; p->name; ++p) { | ||||
(void)snprintf(buf1, sizeof(buf1), "%s = %s;", | (void)snprintf(buf1, sizeof(buf1), "%s = %s;", | ||||
p->name, ccval(p, cc[p->sub])); | p->name, ccval(p, cc[p->sub])); | ||||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |
This seems insane, we have no precedent I can think of for a '--something' setting in stty, and it creates a potential conflict with getopt_long() style args, which are supported by linux stty, so you gotta think some day someone is going to add that to our version.
The option name should be nortsdtr, or the whole concept should be inverted to make it a positive CRTSDTR flag that's on by default and off with -rtsdtr.