da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/***********************************************************************
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* This software is part of the ast package *
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner* Copyright (c) 1992-2010 AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* and is licensed under the *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Common Public License, Version 1.0 *
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin* by AT&T Intellectual Property *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* A copy of the License is available at *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Information and Software Systems Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* AT&T Research *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Florham Park NJ *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* Glenn Fowler <gsf@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin* David Korn <dgk@research.att.com> *
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin***********************************************************************/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Written by David Korn
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Tue Apr 4 10:46:00 EDT 1995
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz"[-?@(#)$Id: stty (AT&T Research) 2008-11-10 $\n]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+NAME?stty - set or get terminal modes]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+DESCRIPTION?\bstty\b sets certain terminal I/O modes for the device "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "that is the current standard input; without arguments, it writes "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "the settings of certain modes to standard output.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[a:all?Writes to standard output all of the mode settings.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[g:save?Writes the current settings to standard output in a form that can "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "be used as an argument to another \bstty\b command. The \brows\b "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "and \bcolumns\b values are not included.]"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin"[t:terminal-group?Print the terminal group id of the device, -1 if unknown.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"\n[mode ...]\n"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXTENDED DESCRIPTION?Modes are specified either as a single name or "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "as a name followed by a value. As indicated below, many of the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "mode names can be preceded by a \b-\b to negate its meaning. "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "Modes are listed by group corresponding to field in the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "\btermios\b structure defined in \b<termios.h>\b. Modes "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "in the last group are implemented using options in the previous "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "groups. Note that many combinations of modes make no sense, but "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "no sanity checking is performed. The modes are selected from the "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "following:]{\fabc\f}"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+EXIT STATUS?]{"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+0?All modes reported or set successfully.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "[+>0?Standard input not a terminaol or one or more modes failed.]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin"[+SEE ALSO?\btegetattr\b(2), \btcsetattr\b(2), \bioctl\b(2)]"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define C(x) ERROR_catalog(x)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* command options */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin/* termios fields */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ispeed", NUM, C_SPEED,0, CBAUD, 0, C("\an\a is the input baud rate") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ospeed", NUM, C_SPEED,0, CBAUD, 0, C("\an\a is the output baud rate") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "rows", WIND, W_SIZE, IG, 0, 24, C("\an\a is the number of lines for display") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cols", WIND, W_SIZE, IG, 1, 80, C("\an\a is the number of columns for display") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "columns", WIND, W_SIZE, IG, 1, 80, C("Same as \bcols\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "intr", CHAR, T_CHAR, SS, VINTR, 'C', C("Send an interrupt signal") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "quit", CHAR, T_CHAR, SS, VQUIT, '|', C("Send a quit signal") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "erase", CHAR, T_CHAR, SS, VERASE, 'H', C("Erase the last character entered") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "kill", CHAR, T_CHAR, NL|SS, VKILL, 'U', C("Erase the current line") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "eof", CHAR, T_CHAR, SS, VEOF, 'D', C("Send an end of file") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "eol2", CHAR, T_CHAR, US, VEOL2, _POSIX_VDISABLE, C("Alternate character to end the line") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VEOL2 */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "swtch", CHAR, T_CHAR, US, VSWTCH, _POSIX_VDISABLE, C("Switch to a different shell layer") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VSWTCH */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "eol", CHAR, T_CHAR, NL|US, VEOL, _POSIX_VDISABLE, C("End the line") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "start", CHAR, T_CHAR, SS, VSTART, 'Q', C("Restart the output after stopping it") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VSTART */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "stop", CHAR, T_CHAR, SS, VSTOP, 'S', C("Stop the output") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VSTOP */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "dsusp", CHAR, T_CHAR, SS, VDSUSP, 'Y', C("Send a terminal stop signal after flushing the input") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VDSUSP */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "susp", CHAR, T_CHAR, NL|SS, VSUSP, 'Z', C("Send a terminal stop signal") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VSUSP */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "rprnt", CHAR, T_CHAR, SS, VREPRINT, 'R', C("Redraw the current line") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VREPRINT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "flush", CHAR, T_CHAR, SS, VDISCARD, 'O', C("Discard output") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VDISCARD */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "werase", CHAR, T_CHAR, SS, VWERASE, 'W', C("Erase the last word entered") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VWERASE */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "lnext", CHAR, T_CHAR, NL|SS, VLNEXT, 'V', C("Enter the next input character literally") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* VLNEXT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "line", NUM, C_LINE, 0, 0, 0, C("Line discipline number") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "min", NUM, T_CHAR, 0, VMIN, 0, C("Mininmum number of characters to read in raw mode") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "time", NUM, T_CHAR, 0, VTIME, 0, C("Number of .1 second intervals with raw mode") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "parenb", BIT, C_FLAG, 0, PARENB, PARENB, C("Enable (disable) parity generation and detection") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "parodd", BIT, C_FLAG, 0, PARODD, PARODD, C("Use odd (even) parity") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* PAREXT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cread", BIT, C_FLAG, SS, CREAD, CREAD, C("Enable (disable) input") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* CREAD */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cs5", SIZE, C_FLAG, 0, CSIZE, CS5 , C("Char size 5") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cs6", SIZE, C_FLAG, 0, CSIZE, CS6 , C("Char size 6") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cs7", SIZE, C_FLAG, 0, CSIZE, CS7 , C("Char size 7") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cs8", SIZE, C_FLAG, 0, CSIZE, CS8 , C("Char size 8") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "hupcl", BIT, C_FLAG, 0, HUPCL, HUPCL, C("Hangup (do not hangup) connection on last close") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "hup", BIT, C_FLAG, IG, HUPCL, HUPCL, C("Same as \bhupcl\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cstopb", BIT, C_FLAG, 0, CSTOPB, CSTOPB, C("Use two (one) stop bits") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "crtscts", BIT, C_FLAG, 0, CRTSCTS, CRTSCTS, C("Enable (disable) RTS/CTS handshaking") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* CRTSCTS */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "clocal", BIT, C_FLAG, NL, CLOCAL, CLOCAL, C("Disable (enable) modem control signals") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ignbrk", BIT, I_FLAG, US, IGNBRK, IGNBRK, C("Ignore (do not ignore) break characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "brkint", BIT, I_FLAG, SS, BRKINT, BRKINT, C("Generate (do not generate) INTR signal on break") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ignpar", BIT, I_FLAG, 0, IGNPAR, IGNPAR, C("Ignore (do not ignore) characters with parity errors") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "parmrk", BIT, I_FLAG, 0, PARMRK, PARMRK, C("Mark (do not mark) parity errors") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "inpck", BIT, I_FLAG, 0, INPCK, INPCK, C("Enable (disable) input parity checking") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "istrip", BIT, I_FLAG, 0, ISTRIP, ISTRIP, C("Clear (do not clear) high bit of input characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "inlcr", BIT, I_FLAG, US, INLCR, INLCR, C("Translate (do not translate) carriage return to newline") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "igncr", BIT, I_FLAG, US, IGNCR, IGNCR, C("Ignore (do not ignore) carriage return") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "iuclc", BIT, I_FLAG, US, IUCLC, IUCLC, C("Map (do not map) upper-case to lower case") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* IUCLC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ixon", BIT, I_FLAG, 0, IXON, IXON, C("Enable (disable) XON/XOFF flow control. \bstop\b character stops output") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ixany", BIT, I_FLAG, US, IXANY, IXANY, C("Any character (only start character) can restart output.") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "decctlq", BIT, I_FLAG, IG, IXANY, 0, C("Same as \b-ixany\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* IXANY */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ixoff", BIT, I_FLAG, US, IXOFF, IXOFF, C("Disable (enable) XON/XOFF flow control") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "imaxbel", BIT, I_FLAG, SS, IMAXBEL, IMAXBEL, C("Beep (do not beep) if a character arrives with full input buffer") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* IMAXBEL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "icrnl", BIT, I_FLAG, NL|SS, ICRNL, ICRNL, C("Translate (do not translate) carriage return to newline") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "isig", BIT, L_FLAG, SS, ISIG, ISIG, C("Enable (disable) \bintr\b, \bquit\b, and \bsusp\b special characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "icanon", BIT, L_FLAG, SS, ICANON, ICANON, C("Enable (disable) \berase\b, \bkill\b, \bwerase\b, and \brprnt\b special characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "iexten", BIT, L_FLAG, SS, IEXTEN, IEXTEN, C("Enable (disable) non-POSIX special characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* IEXTEN */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echo", BIT, L_FLAG, SS, ECHO|ECHONL, ECHO|ECHONL, C("Echo (do not echo) input characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echoe", BIT, L_FLAG, SS, ECHOE, ECHOE, C("Echo (do not echo) erase characters as backspace-space-backspace") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echok", BIT, L_FLAG, SS, ECHOK, ECHOK, C("Echo (do not echo) a newline after a kill character") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echoke", BIT, L_FLAG, SS, ECHOKE, ECHOKE, C("Echo (do not echo) a newline after a kill character") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "lfkc", BIT, L_FLAG, IG, ECHOK, ECHOK, C("Same as \bechok\b (\b-echok\b); obsolete") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echonl", BIT, L_FLAG, SS, ECHONL, ECHONL,"Echo (do not echo) newline even if not echoing other character" },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echoctl", BIT, L_FLAG, SS, ECHOCTL, ECHOCTL, C("Echo (do not echo) control characters as \b^\b\ac\a") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* ECHOCTL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "echoprt", BIT, L_FLAG, US, ECHOPRT, ECHOPRT, C("Echo (do not echo) erased characters backward, between '\\' and '/'") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* ECHOPRT */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "xcase", BIT, L_FLAG, US, XCASE, XCASE, C("Enable (disable) \bicanon\b uppercase as lowercase with '\\' prefix") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* XCASE */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* DEFECHO */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "flusho", BIT, L_FLAG, 0, FLUSHO, FLUSHO, C("Discard (do not discard) written data. Cleared by subsequent input") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* FLUSHO */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "pendin", BIT, L_FLAG, 0, PENDIN, PENDIN, C("Redisplay pending input at next read and then automatically clear \bpendin\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* PENDIN */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "noflsh", BIT, L_FLAG, US, NOFLSH, NOFLSH, C("Disable (enable) flushing after \bintr\b and \bquit\b special characters") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "tostop", BIT, L_FLAG, NL|US, TOSTOP, TOSTOP, C("Stop (do not stop) background jobs that try to write to the terminal") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* TOSTOP */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "olcuc", BIT, O_FLAG, US, OLCUC, OLCUC, C("Translate (do not translate) lowercase characters to uppercase") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* OLCUC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "onlcr", BIT, O_FLAG, SS, ONLCR, ONLCR, C("Translate (do not translate) newline to carriage return-newline") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* ONLCR */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "onlret", BIT, O_FLAG, US, ONLRET, ONLRET, C("Newline performs (does not perform) a carriage return") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* ONLRET */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ocrnl", BIT, O_FLAG, US, OCRNL, OCRNL, C("Translate (do not translate) carriage return to newline") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* OCRNL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "onocr", BIT, O_FLAG, US, ONOCR, ONOCR, C("Do not (do) print carriage returns in the first column") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* ONOCR */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ofill", BIT, O_FLAG, US, OFILL, OFILL, C("Use fill characters (use timing) for delays") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* OFILL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ofdel", BIT, O_FLAG, US, OFDEL, OFDEL, C("Use DEL (NUL) as fill characters for delays") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* OFDEL */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "opost", BIT, O_FLAG, SS, OPOST, OPOST, C(" Postprocess (do not postprocess) output") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "tabs", TABS, O_FLAG, IG, TABDLY, TAB3, C("Preserve (expand to spaces) tabs") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "evenp", MIXED, C_FLAG, IG, PARENB, 0, C("Same as \bparenb -parodd cs7\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "oddp", MIXED, C_FLAG, IG, PARODD, 0, C("Same as \bparenb parodd cs7\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "parity", MIXED, C_FLAG, IG, 0, 0, C("Same as parenb \b-parodd cs7\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "ek", MIXED, C_FLAG, IG, 0, 0, C("Reset the \berase\b and \bkill\b special characters to their default values") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "sane", SANE, C_FLAG, IG, 0, 0, C("Reset all modes to some reasonable values") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "cooked", COOKED, C_FLAG, IG, 0, 0, C("Disable raw input and output") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "raw", COOKED, C_FLAG, IG, 0, 0, C("Enable raw input and output") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "lcase", CASE, C_FLAG, IG, 0 , 0, C("Set \bxcase\b, \biuclc\b, and \bolcuc\b") },
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin{ "LCASE", CASE, C_FLAG, IG, 0 , 0, C("Same as \blcase\b") }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#define cntl(x) (((x)=='?')?ccmapc(0177,CC_ASCII,CC_NATIVE):ccmapc(ccmapc(x,CC_NATIVE,CC_ASCII)&037,CC_ASCII,CC_NATIVE))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin for (tp = Ttable; tp < &Ttable[elementsof(Ttable)]; tp++)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin register int i;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin for(i=0;i< NCCS; i++)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(1);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin register int i;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin for(i=0;i< NCCS; i++)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sfstdout,"%s = ^%c;%c",tp->name,off==0177?'?':(off^0100),delim);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sfstdout,"%s = ^%c;%c",tp->name,off==0177?'?':ccmapc(off^0100,CC_ASCII,CC_NATIVE),delim);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if(flags || (sp->c_cflag&CSIZE) != (tty.c_cflag&CSIZE))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sfstdout,"%sspeed %s baud; rows %d; columns %d;\n",schar,tp->name,win.ws_row,win.ws_col);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sfstdout,"%sspeed %s baud;\n",schar,tp->name);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin register int i;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(&Ttable[i]);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin register int i;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(&Ttable[i]);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(-1);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return((unsigned)cp[0]);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(-1);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(-1);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(*((unsigned char*)cp));
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if(!(tp=lookup(cp)) || (off && (tp->type!=BIT) && (tp->type!=TABS)))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sfstdout,"%d\n",tp->mask?win.ws_col:win.ws_row);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin error(ERROR_system(1),"%d: invalid number of %s",argv[-1],tp->name);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if (tp = getspeed(*tp->name == 'i' ? cfgetispeed(sp) : cfgetospeed(sp)))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin error(ERROR_exit(1), "%s: missing numeric argument", tp->name);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin error(ERROR_exit(1), "%s: %s: numeric argument expected", tp->name, cp);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin error(ERROR_exit(1), "%s: %s: invalid speed", tp->name, cp);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#endif /* OLCUC && IUCLC */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sp,"[+%s \a%c\a?%s.]",Ttable[i].name,c,Ttable[i].description);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstatic void listgroup(Sfio_t *sp,int type, const char *description)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstatic void listmask(Sfio_t *sp,unsigned int mask,const char *description)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if(Ttable[i].field==field && Ttable[i].type==BIT && *Ttable[i].description)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sp,"[+%s (-%s)?%s.]",Ttable[i].name,Ttable[i].name,Ttable[i].description);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sp,"[+%s?%s.]",name,lookup(name)->description);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinstatic int infof(Opt_t* op, Sfio_t* sp, const char* s, Optdisc_t* dp)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin listgroup(sp,SPEED,"Attempt to set input and output baud rate to number given. A value of \b0\b causes immediate hangup");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin sfprintf(sp,"}[+Control Assignments.?If \ac\a is \bundef\b or an empty "
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin "string then the control assignment is disabled.]{");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return(1);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# define tcgetpgrp(a) (ioctl(a, TIOCGPGRP, &_i_)>=0?_i_:-1)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# endif /* TIOCGPGRP */
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#endif /* _lib_tcgetpgrp */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin register int n;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_INTERACTIVE);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin if (!opt_info.offset || !argv[opt_info.index][opt_info.offset])
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin switch (n)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin /*FALLTHROUGH*/
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin else if (!(tp = lookup(argv[opt_info.index]+1)) || (tp->type != BIT && tp->type != TABS))
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin error(ERROR_exit(1), "%s: unknown mode", argv[opt_info.index]);
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin if (error_info.errors || (flags && *argv) || (flags&(flags-1)))