aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/stty.c
AgeCommit message (Collapse)Author
2017-12-03Commands in pending should default n.Rob Landley
2017-12-03Add stty(1).Elliott Hughes
Full POSIX stty with Linux extensions. Output and behavior match coreutils 8.26 as far as I can tell. For some reason busybox 1.22 stty always shows all the special characters, even when they match "sane". I've matched coreutils, since "shows differences from sane" is easy to describe and obviously useful. Flags in the various arrays are not in the order they're introduced in POSIX or in the Linux header file: they're in the order that they're output by coreutils' stty. The -g output matches coreutils and busybox. I implemented iuclc, xcase, and olcuc even though they've been removed from POSIX because the others implement them, and "man stty" defines "raw" and "sane" in terms of them (where POSIX doesn't define "sane" in any useful sense). This builds fine against glibc 2.24, and as far as I can tell all the constants used were in Linux 2.6 so I'm assuming that there shouldn't be any #ifdef nonsense needed for any reasonable vintage of C library.