source: project/wiki/stty @ 7218

Last change on this file since 7218 was 7218, checked in by Alex Shinn, 12 years ago

Changes applied for ashinn (163.221.157.46) through svnwiki:

initial docs

File size: 1.9 KB
Line 
1== High-level interface
2
3=== Procedure: (stty [port] settings ...)
4
5Sets the terminal attributes for PORT (defaulting to
6current-input-port) according to the SETTINGS, which should be a
7list of symbols corresponding to modes in the stty(1) man page,
8or one or more symbols wrapped in a (not ...) list.
9
10To enable a character setting, use a list of the setting name
11followed by the character (or #f to disable), as in
12
13<enscript highlight=scheme>
14     (stty '(erase #\delete))
15</enscript>
16
17The following settings are supported:
18
19     clocal cread crtscts cs5 cs6 cs7 cs8 cstopb hup hupcl parenb
20     parodd brkint icrnl ignbrk igncr ignpar imaxbel inpck istrip
21     ixany ixoff ixon parmrk tandem ocrnl onlcr onlret onocr opost
22     tab0 tab1 tab2 tab3 tabs crterase crtkill ctlecho echo echoctl
23     echoe echoke echonl echoprt icanon iexten isig noflsh prterase
24     tostop xcase eof eol eol2 erase intr kill lnext quit rprnt
25     start stop susp werase raw sane
26
27=== Procedure: (with-stty '(setting ...) thunk)
28
29Sets the terminal attributes with STTY, evaluates THUNK, then
30restores the original attributes and returns the value from
31THUNK.
32
33Example:
34
35<enscript highlight=scheme>
36  (define (read-password prompt)
37    (display prompt)
38    (with-stty '(not echo) read-line))
39</enscript>
40
41== Low-level interface
42
43You shouldn't need to use this.
44
45* Procedure: (get-terminal-attributes [port-or-fd])
46* Procedure: (set-terminal-attributes! port-or-fd action attrs)
47
48* Procedure: (make-term-attrs)
49* Procedure: (free-term-attrs attrs)
50* Procedure: (term-attrs-iflag attrs)
51* Procedure: (term-attrs-oflag attrs)
52* Procedure: (term-attrs-cflag attrs)
53* Procedure: (term-attrs-lflag attrs)
54* Procedure: (term-attrs-cc attrs i)
55* Procedure: (term-attrs-iflag-set! attrs int)
56* Procedure: (term-attrs-oflag-set! attrs int)
57* Procedure: (term-attrs-cflag-set! attrs int)
58* Procedure: (term-attrs-lflag-set! attrs int)
59* Procedure: (term-attrs-cc-set! attrs i char)
Note: See TracBrowser for help on using the repository browser.