home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: 4
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 73 74 | 65 76 65 40 63 69 74 35 |From: st|eve@cit5|
|00000010| 2e 63 69 74 2e 6f 7a 2e | 41 55 20 28 53 74 65 76 |.cit.oz.|AU (Stev|
|00000020| 65 20 42 61 6c 6f 67 68 | 29 0a 4e 65 77 73 67 72 |e Balogh|).Newsgr|
|00000030| 6f 75 70 73 3a 20 63 6f | 6d 70 2e 73 6f 75 72 63 |oups: co|mp.sourc|
|00000040| 65 73 2e 6d 69 73 63 0a | 53 75 62 6a 65 63 74 3a |es.misc.|Subject:|
|00000050| 20 50 43 20 63 75 72 73 | 65 73 20 6d 61 6e 75 61 | PC curs|es manua|
|00000060| 6c 20 70 61 67 65 73 20 | 2d 20 50 61 72 74 20 34 |l pages |- Part 4|
|00000070| 2f 34 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |/4.Messa|ge-ID: <|
|00000080| 31 30 35 32 40 62 61 73 | 73 65 72 2e 6f 7a 3e 0a |1052@bas|ser.oz>.|
|00000090| 44 61 74 65 3a 20 39 20 | 4f 63 74 20 38 37 20 31 |Date: 9 |Oct 87 1|
|000000a0| 35 3a 31 37 3a 30 35 20 | 47 4d 54 0a 53 65 6e 64 |5:17:05 |GMT.Send|
|000000b0| 65 72 3a 20 6a 6f 68 6e | 40 62 61 73 73 65 72 2e |er: john|@basser.|
|000000c0| 6f 7a 0a 4c 69 6e 65 73 | 3a 20 31 33 36 36 0a 41 |oz.Lines|: 1366.A|
|000000d0| 70 70 72 6f 76 65 64 3a | 20 6a 6f 68 6e 40 62 61 |pproved:| john@ba|
|000000e0| 73 73 65 72 2e 63 73 2e | 73 75 2e 6f 7a 2e 41 55 |sser.cs.|su.oz.AU|
|000000f0| 0a 58 2d 41 72 63 68 69 | 76 65 3a 20 63 6f 6d 70 |.X-Archi|ve: comp|
|00000100| 2e 73 6f 75 72 63 65 73 | 2e 6d 69 73 63 2f 38 37 |.sources|.misc/87|
|00000110| 31 30 2f 70 63 2d 63 75 | 72 73 65 73 2d 64 6f 63 |10/pc-cu|rses-doc|
|00000120| 2f 34 0a 0a 23 21 20 2f | 62 69 6e 2f 73 68 0a 23 |/4..#! /|bin/sh.#|
|00000130| 20 54 68 69 73 20 69 73 | 20 61 20 73 68 65 6c 6c | This is| a shell|
|00000140| 20 61 72 63 68 69 76 65 | 2c 20 6d 65 61 6e 69 6e | archive|, meanin|
|00000150| 67 3a 0a 23 20 31 2e 20 | 52 65 6d 6f 76 65 20 65 |g:.# 1. |Remove e|
|00000160| 76 65 72 79 74 68 69 6e | 67 20 61 62 6f 76 65 20 |verythin|g above |
|00000170| 74 68 65 20 23 21 20 2f | 62 69 6e 2f 73 68 20 6c |the #! /|bin/sh l|
|00000180| 69 6e 65 2e 0a 23 20 32 | 2e 20 53 61 76 65 20 74 |ine..# 2|. Save t|
|00000190| 68 65 20 72 65 73 75 6c | 74 69 6e 67 20 74 65 78 |he resul|ting tex|
|000001a0| 74 20 69 6e 20 61 20 66 | 69 6c 65 2e 0a 23 20 33 |t in a f|ile..# 3|
|000001b0| 2e 20 45 78 65 63 75 74 | 65 20 74 68 65 20 66 69 |. Execut|e the fi|
|000001c0| 6c 65 20 77 69 74 68 20 | 2f 62 69 6e 2f 73 68 20 |le with |/bin/sh |
|000001d0| 28 6e 6f 74 20 63 73 68 | 29 20 74 6f 20 63 72 65 |(not csh|) to cre|
|000001e0| 61 74 65 20 74 68 65 20 | 66 69 6c 65 73 2e 0a 23 |ate the |files..#|
|000001f0| 20 54 68 69 73 20 61 72 | 63 68 69 76 65 20 63 72 | This ar|chive cr|
|00000200| 65 61 74 65 64 3a 20 57 | 65 64 20 4f 63 74 20 20 |eated: W|ed Oct |
|00000210| 37 20 31 37 3a 34 39 3a | 33 38 20 45 53 54 20 31 |7 17:49:|38 EST 1|
|00000220| 39 38 37 0a 23 20 41 72 | 63 68 69 76 65 64 20 62 |987.# Ar|chived b|
|00000230| 79 3a 20 53 74 65 76 65 | 20 42 61 6c 6f 67 68 20 |y: Steve| Balogh |
|00000240| 2d 20 73 74 65 76 65 25 | 63 69 74 35 2e 63 69 74 |- steve%|cit5.cit|
|00000250| 2e 6f 7a 40 75 75 6e 65 | 74 2e 75 75 2e 6e 65 74 |.oz@uune|t.uu.net|
|00000260| 0a 65 78 70 6f 72 74 20 | 50 41 54 48 3b 20 50 41 |.export |PATH; PA|
|00000270| 54 48 3d 2f 62 69 6e 3a | 24 50 41 54 48 0a 65 63 |TH=/bin:|$PATH.ec|
|00000280| 68 6f 20 73 68 61 72 3a | 20 65 78 74 72 61 63 74 |ho shar:| extract|
|00000290| 69 6e 67 20 22 27 6d 61 | 6b 65 6c 69 6e 6b 73 27 |ing "'ma|kelinks'|
|000002a0| 22 20 27 28 32 35 35 33 | 20 63 68 61 72 61 63 74 |" '(2553| charact|
|000002b0| 65 72 73 29 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |ers)'.if| test -f|
|000002c0| 20 27 6d 61 6b 65 6c 69 | 6e 6b 73 27 0a 74 68 65 | 'makeli|nks'.the|
|000002d0| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|000002e0| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|000002f0| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00000300| 22 27 6d 61 6b 65 6c 69 | 6e 6b 73 27 22 0a 65 6c |"'makeli|nks'".el|
|00000310| 73 65 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |se.sed '|s/^X//' |
|00000320| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00000330| 6d 61 6b 65 6c 69 6e 6b | 73 27 0a 58 6c 6e 20 62 |makelink|s'.Xln b|
|00000340| 65 65 70 2e 6d 20 66 6c | 61 73 68 2e 6d 0a 58 6c |eep.m fl|ash.m.Xl|
|00000350| 6e 20 6d 6f 76 65 2e 6d | 20 77 6d 6f 76 65 2e 6d |n move.m| wmove.m|
|00000360| 0a 58 6c 6e 20 65 72 61 | 73 65 2e 6d 20 77 65 72 |.Xln era|se.m wer|
|00000370| 61 73 65 2e 6d 0a 58 6c | 6e 20 74 61 62 73 69 7a |ase.m.Xl|n tabsiz|
|00000380| 65 2e 6d 20 77 74 61 62 | 73 69 7a 65 2e 6d 0a 58 |e.m wtab|size.m.X|
|00000390| 6c 6e 20 63 6c 65 61 72 | 2e 6d 20 77 63 6c 65 61 |ln clear|.m wclea|
|000003a0| 72 2e 6d 0a 58 6c 6e 20 | 73 65 74 73 63 72 72 65 |r.m.Xln |setscrre|
|000003b0| 67 2e 6d 20 77 73 65 74 | 73 63 72 72 65 67 2e 6d |g.m wset|scrreg.m|
|000003c0| 0a 58 6c 6e 20 6f 76 65 | 72 6c 61 79 2e 6d 20 6f |.Xln ove|rlay.m o|
|000003d0| 76 65 72 77 72 69 74 65 | 2e 6d 0a 58 6c 6e 20 77 |verwrite|.m.Xln w|
|000003e0| 6e 6f 75 74 72 65 66 72 | 65 73 68 2e 6d 20 72 65 |noutrefr|esh.m re|
|000003f0| 66 72 65 73 68 2e 6d 0a | 58 6c 6e 20 77 6e 6f 75 |fresh.m.|Xln wnou|
|00000400| 74 72 65 66 72 65 73 68 | 2e 6d 20 77 72 65 66 72 |trefresh|.m wrefr|
|00000410| 65 73 68 2e 6d 0a 58 6c | 6e 20 69 6e 63 68 2e 6d |esh.m.Xl|n inch.m|
|00000420| 20 6d 76 69 6e 63 68 2e | 6d 0a 58 6c 6e 20 69 6e | mvinch.|m.Xln in|
|00000430| 63 68 2e 6d 20 6d 76 77 | 69 6e 63 68 2e 6d 0a 58 |ch.m mvw|inch.m.X|
|00000440| 6c 6e 20 69 6e 63 68 2e | 6d 20 77 69 6e 63 68 2e |ln inch.|m winch.|
|00000450| 6d 0a 58 6c 6e 20 62 6f | 78 2e 6d 20 77 62 6f 78 |m.Xln bo|x.m wbox|
|00000460| 2e 6d 0a 58 6c 6e 20 63 | 6c 72 74 6f 65 6f 6c 2e |.m.Xln c|lrtoeol.|
|00000470| 6d 20 6d 76 63 6c 72 74 | 6f 65 6f 6c 2e 6d 0a 58 |m mvclrt|oeol.m.X|
|00000480| 6c 6e 20 63 6c 72 74 6f | 65 6f 6c 2e 6d 20 6d 76 |ln clrto|eol.m mv|
|00000490| 77 63 6c 72 74 6f 65 6f | 6c 2e 6d 0a 58 6c 6e 20 |wclrtoeo|l.m.Xln |
|000004a0| 63 6c 72 74 6f 65 6f 6c | 2e 6d 20 77 63 6c 72 74 |clrtoeol|.m wclrt|
|000004b0| 6f 65 6f 6c 2e 6d 0a 58 | 6c 6e 20 63 62 72 65 61 |oeol.m.X|ln cbrea|
|000004c0| 6b 2e 6d 20 63 72 6d 6f | 64 65 2e 6d 0a 58 6c 6e |k.m crmo|de.m.Xln|
|000004d0| 20 63 62 72 65 61 6b 2e | 6d 20 65 63 68 6f 2e 6d | cbreak.|m echo.m|
|000004e0| 0a 58 6c 6e 20 63 62 72 | 65 61 6b 2e 6d 20 6e 6f |.Xln cbr|eak.m no|
|000004f0| 63 62 72 65 61 6b 2e 6d | 0a 58 6c 6e 20 63 62 72 |cbreak.m|.Xln cbr|
|00000500| 65 61 6b 2e 6d 20 6e 6f | 63 72 6d 6f 64 65 2e 6d |eak.m no|crmode.m|
|00000510| 0a 58 6c 6e 20 63 62 72 | 65 61 6b 2e 6d 20 6e 6f |.Xln cbr|eak.m no|
|00000520| 65 63 68 6f 2e 6d 0a 58 | 6c 6e 20 63 62 72 65 61 |echo.m.X|ln cbrea|
|00000530| 6b 2e 6d 20 6e 6f 72 61 | 77 2e 6d 0a 58 6c 6e 20 |k.m nora|w.m.Xln |
|00000540| 63 62 72 65 61 6b 2e 6d | 20 72 61 77 2e 6d 0a 58 |cbreak.m| raw.m.X|
|00000550| 6c 6e 20 63 62 72 65 61 | 6b 2e 6d 20 72 65 66 72 |ln cbrea|k.m refr|
|00000560| 62 72 6b 2e 6d 0a 58 6c | 6e 20 63 6c 72 62 6f 74 |brk.m.Xl|n clrbot|
|00000570| 2e 6d 20 6d 76 63 6c 72 | 74 6f 62 6f 74 2e 6d 0a |.m mvclr|tobot.m.|
|00000580| 58 6c 6e 20 63 6c 72 62 | 6f 74 2e 6d 20 6d 76 77 |Xln clrb|ot.m mvw|
|00000590| 63 6c 72 74 6f 62 6f 74 | 2e 6d 0a 58 6c 6e 20 63 |clrtobot|.m.Xln c|
|000005a0| 6c 72 62 6f 74 2e 6d 20 | 77 63 6c 72 74 6f 62 6f |lrbot.m |wclrtobo|
|000005b0| 74 2e 6d 0a 58 6c 6e 20 | 69 6e 73 65 72 74 6c 6e |t.m.Xln |insertln|
|000005c0| 2e 6d 20 6d 76 69 6e 73 | 65 72 74 6c 6e 2e 6d 0a |.m mvins|ertln.m.|
|000005d0| 58 6c 6e 20 69 6e 73 65 | 72 74 6c 6e 2e 6d 20 6d |Xln inse|rtln.m m|
|000005e0| 76 77 69 6e 73 65 72 74 | 6c 6e 2e 6d 0a 58 6c 6e |vwinsert|ln.m.Xln|
|000005f0| 20 69 6e 73 65 72 74 6c | 6e 2e 6d 20 77 69 6e 73 | insertl|n.m wins|
|00000600| 65 72 74 6c 6e 2e 6d 0a | 58 6c 6e 20 69 6e 73 63 |ertln.m.|Xln insc|
|00000610| 68 2e 6d 20 6d 76 69 6e | 73 63 68 2e 6d 0a 58 6c |h.m mvin|sch.m.Xl|
|00000620| 6e 20 69 6e 73 63 68 2e | 6d 20 6d 76 77 69 6e 73 |n insch.|m mvwins|
|00000630| 63 68 2e 6d 0a 58 6c 6e | 20 69 6e 73 63 68 2e 6d |ch.m.Xln| insch.m|
|00000640| 20 77 69 6e 73 63 68 2e | 6d 0a 58 6c 6e 20 66 69 | winsch.|m.Xln fi|
|00000650| 78 74 65 72 6d 2e 6d 20 | 62 61 75 64 72 61 74 65 |xterm.m |baudrate|
|00000660| 2e 6d 0a 58 6c 6e 20 66 | 69 78 74 65 72 6d 2e 6d |.m.Xln f|ixterm.m|
|00000670| 20 65 72 61 73 65 63 68 | 61 72 2e 6d 0a 58 6c 6e | erasech|ar.m.Xln|
|00000680| 20 66 69 78 74 65 72 6d | 2e 6d 20 67 65 74 74 6d | fixterm|.m gettm|
|00000690| 6f 64 65 2e 6d 0a 58 6c | 6e 20 66 69 78 74 65 72 |ode.m.Xl|n fixter|
|000006a0| 6d 2e 6d 20 6b 69 6c 6c | 63 68 61 72 2e 6d 0a 58 |m.m kill|char.m.X|
|000006b0| 6c 6e 20 66 69 78 74 65 | 72 6d 2e 6d 20 72 65 73 |ln fixte|rm.m res|
|000006c0| 65 74 74 65 72 6d 2e 6d | 0a 58 6c 6e 20 66 69 78 |etterm.m|.Xln fix|
|000006d0| 74 65 72 6d 2e 6d 20 72 | 65 73 65 74 74 79 2e 6d |term.m r|esetty.m|
|000006e0| 0a 58 6c 6e 20 66 69 78 | 74 65 72 6d 2e 6d 20 73 |.Xln fix|term.m s|
|000006f0| 61 76 65 6f 6c 64 74 65 | 72 6d 2e 6d 0a 58 6c 6e |aveoldte|rm.m.Xln|
|00000700| 20 66 69 78 74 65 72 6d | 2e 6d 20 73 61 76 65 74 | fixterm|.m savet|
|00000710| 65 72 6d 2e 6d 0a 58 6c | 6e 20 66 69 78 74 65 72 |erm.m.Xl|n fixter|
|00000720| 6d 2e 6d 20 73 61 76 65 | 74 74 79 2e 6d 0a 58 6c |m.m save|tty.m.Xl|
|00000730| 6e 20 66 69 78 74 65 72 | 6d 2e 6d 20 73 65 74 74 |n fixter|m.m sett|
|00000740| 65 72 6d 2e 6d 0a 58 6c | 6e 20 66 69 78 74 65 72 |erm.m.Xl|n fixter|
|00000750| 6d 2e 6d 20 73 65 74 75 | 70 74 65 72 6d 2e 6d 0a |m.m setu|pterm.m.|
|00000760| 58 6c 6e 20 61 64 64 73 | 74 72 2e 6d 20 6d 76 61 |Xln adds|tr.m mva|
|00000770| 64 64 73 74 72 2e 6d 0a | 58 6c 6e 20 61 64 64 73 |ddstr.m.|Xln adds|
|00000780| 74 72 2e 6d 20 6d 76 77 | 61 64 64 73 74 72 2e 6d |tr.m mvw|addstr.m|
|00000790| 0a 58 6c 6e 20 61 64 64 | 73 74 72 2e 6d 20 77 61 |.Xln add|str.m wa|
|000007a0| 64 64 73 74 72 2e 6d 0a | 58 6c 6e 20 64 65 6c 65 |ddstr.m.|Xln dele|
|000007b0| 74 65 6c 6e 2e 6d 20 6d | 76 64 65 6c 65 74 65 6c |teln.m m|vdeletel|
|000007c0| 6e 2e 6d 0a 58 6c 6e 20 | 64 65 6c 65 74 65 6c 6e |n.m.Xln |deleteln|
|000007d0| 2e 6d 20 6d 76 77 64 65 | 6c 65 74 65 6c 6e 2e 6d |.m mvwde|leteln.m|
|000007e0| 0a 58 6c 6e 20 64 65 6c | 65 74 65 6c 6e 2e 6d 20 |.Xln del|eteln.m |
|000007f0| 77 64 65 6c 65 74 65 6c | 6e 2e 6d 0a 58 6c 6e 20 |wdeletel|n.m.Xln |
|00000800| 64 65 6c 63 68 2e 6d 20 | 6d 76 64 65 6c 63 68 2e |delch.m |mvdelch.|
|00000810| 6d 0a 58 6c 6e 20 64 65 | 6c 63 68 2e 6d 20 6d 76 |m.Xln de|lch.m mv|
|00000820| 77 64 65 6c 63 68 2e 6d | 0a 58 6c 6e 20 64 65 6c |wdelch.m|.Xln del|
|00000830| 63 68 2e 6d 20 77 64 65 | 6c 63 68 2e 6d 0a 58 6c |ch.m wde|lch.m.Xl|
|00000840| 6e 20 61 64 64 63 68 2e | 6d 20 6d 76 61 64 64 63 |n addch.|m mvaddc|
|00000850| 68 2e 6d 0a 58 6c 6e 20 | 61 64 64 63 68 2e 6d 20 |h.m.Xln |addch.m |
|00000860| 6d 76 77 61 64 64 63 68 | 2e 6d 0a 58 6c 6e 20 61 |mvwaddch|.m.Xln a|
|00000870| 64 64 63 68 2e 6d 20 6e | 65 77 6c 69 6e 65 2e 6d |ddch.m n|ewline.m|
|00000880| 0a 58 6c 6e 20 61 64 64 | 63 68 2e 6d 20 77 61 64 |.Xln add|ch.m wad|
|00000890| 64 63 68 2e 6d 0a 58 6c | 6e 20 6d 61 6b 65 6e 65 |dch.m.Xl|n makene|
|000008a0| 77 2e 6d 20 6e 65 77 77 | 69 6e 2e 6d 0a 58 6c 6e |w.m neww|in.m.Xln|
|000008b0| 20 6d 61 6b 65 6e 65 77 | 2e 6d 20 73 75 62 77 69 | makenew|.m subwi|
|000008c0| 6e 2e 6d 0a 58 6c 6e 20 | 77 61 74 74 72 6f 6e 2e |n.m.Xln |wattron.|
|000008d0| 6d 20 61 74 74 72 6f 66 | 66 2e 6d 0a 58 6c 6e 20 |m attrof|f.m.Xln |
|000008e0| 77 61 74 74 72 6f 6e 2e | 6d 20 61 74 74 72 6f 6e |wattron.|m attron|
|000008f0| 2e 6d 0a 58 6c 6e 20 77 | 61 74 74 72 6f 6e 2e 6d |.m.Xln w|attron.m|
|00000900| 20 61 74 74 72 73 65 74 | 2e 6d 0a 58 6c 6e 20 77 | attrset|.m.Xln w|
|00000910| 61 74 74 72 6f 6e 2e 6d | 20 73 74 61 6e 64 65 6e |attron.m| standen|
|00000920| 64 2e 6d 0a 58 6c 6e 20 | 77 61 74 74 72 6f 6e 2e |d.m.Xln |wattron.|
|00000930| 6d 20 73 74 61 6e 64 6f | 75 74 2e 6d 0a 58 6c 6e |m stando|ut.m.Xln|
|00000940| 20 77 61 74 74 72 6f 6e | 2e 6d 20 77 61 74 74 72 | wattron|.m wattr|
|00000950| 6f 66 66 2e 6d 0a 58 6c | 6e 20 77 61 74 74 72 6f |off.m.Xl|n wattro|
|00000960| 6e 2e 6d 20 77 61 74 74 | 72 73 65 74 2e 6d 0a 58 |n.m watt|rset.m.X|
|00000970| 6c 6e 20 77 61 74 74 72 | 6f 6e 2e 6d 20 77 73 74 |ln wattr|on.m wst|
|00000980| 61 6e 64 65 6e 64 2e 6d | 0a 58 6c 6e 20 77 61 74 |andend.m|.Xln wat|
|00000990| 74 72 6f 6e 2e 6d 20 77 | 73 74 61 6e 64 6f 75 74 |tron.m w|standout|
|000009a0| 2e 6d 0a 58 6c 6e 20 62 | 61 63 6b 63 68 61 72 2e |.m.Xln b|ackchar.|
|000009b0| 6d 20 67 65 74 73 74 72 | 2e 6d 0a 58 6c 6e 20 62 |m getstr|.m.Xln b|
|000009c0| 61 63 6b 63 68 61 72 2e | 6d 20 6d 76 67 65 74 73 |ackchar.|m mvgets|
|000009d0| 74 72 2e 6d 0a 58 6c 6e | 20 62 61 63 6b 63 68 61 |tr.m.Xln| backcha|
|000009e0| 72 2e 6d 20 6d 76 77 67 | 65 74 73 74 72 2e 6d 0a |r.m mvwg|etstr.m.|
|000009f0| 58 6c 6e 20 62 61 63 6b | 63 68 61 72 2e 6d 20 77 |Xln back|char.m w|
|00000a00| 67 65 74 73 74 72 2e 6d | 0a 58 6c 6e 20 63 6c 65 |getstr.m|.Xln cle|
|00000a10| 61 72 73 63 72 65 65 6e | 2e 6d 20 63 6c 72 75 70 |arscreen|.m clrup|
|00000a20| 64 61 74 65 2e 6d 0a 58 | 6c 6e 20 63 6c 65 61 72 |date.m.X|ln clear|
|00000a30| 73 63 72 65 65 6e 2e 6d | 20 64 6f 75 70 64 61 74 |screen.m| doupdat|
|00000a40| 65 2e 6d 0a 58 6c 6e 20 | 63 6c 65 61 72 73 63 72 |e.m.Xln |clearscr|
|00000a50| 65 65 6e 2e 6d 20 67 6f | 74 6f 78 79 2e 6d 0a 58 |een.m go|toxy.m.X|
|00000a60| 6c 6e 20 63 6c 65 61 72 | 73 63 72 65 65 6e 2e 6d |ln clear|screen.m|
|00000a70| 20 70 75 74 63 68 61 72 | 2e 6d 0a 58 6c 6e 20 63 | putchar|.m.Xln c|
|00000a80| 6c 65 61 72 73 63 72 65 | 65 6e 2e 6d 20 74 72 61 |learscre|en.m tra|
|00000a90| 6e 73 66 6f 72 6d 6c 69 | 6e 2e 6d 0a 58 2f 2a 6c |nsformli|n.m.X/*l|
|00000aa0| 6e 20 63 6c 65 61 72 73 | 63 72 65 65 6e 2e 6d 20 |n clears|creen.m |
|00000ab0| 74 72 61 6e 73 66 6f 72 | 6d 6c 69 6e 65 2e 6d 20 |transfor|mline.m |
|00000ac0| 20 20 20 20 6f 6e 6c 79 | 20 69 66 20 3e 31 34 63 | only| if >14c|
|00000ad0| 68 61 72 20 66 69 6c 65 | 6e 61 6d 65 73 20 61 6c |har file|names al|
|00000ae0| 6c 6f 77 65 64 2a 2f 0a | 58 6c 6e 20 63 6c 65 61 |lowed*/.|Xln clea|
|00000af0| 72 6f 6b 2e 6d 20 63 75 | 72 73 6f 66 66 2e 6d 0a |rok.m cu|rsoff.m.|
|00000b00| 58 6c 6e 20 63 6c 65 61 | 72 6f 6b 2e 6d 20 63 75 |Xln clea|rok.m cu|
|00000b10| 72 73 6f 6e 2e 6d 0a 58 | 6c 6e 20 63 6c 65 61 72 |rson.m.X|ln clear|
|00000b20| 6f 6b 2e 6d 20 69 64 6c | 6f 6b 2e 6d 0a 58 6c 6e |ok.m idl|ok.m.Xln|
|00000b30| 20 63 6c 65 61 72 6f 6b | 2e 6d 20 6b 65 79 70 61 | clearok|.m keypa|
|00000b40| 64 2e 6d 0a 58 6c 6e 20 | 63 6c 65 61 72 6f 6b 2e |d.m.Xln |clearok.|
|00000b50| 6d 20 6c 65 61 76 65 6f | 6b 2e 6d 0a 58 6c 6e 20 |m leaveo|k.m.Xln |
|00000b60| 63 6c 65 61 72 6f 6b 2e | 6d 20 6d 65 74 61 2e 6d |clearok.|m meta.m|
|00000b70| 0a 58 6c 6e 20 63 6c 65 | 61 72 6f 6b 2e 6d 20 6e |.Xln cle|arok.m n|
|00000b80| 6f 64 65 6c 61 79 2e 6d | 0a 58 6c 6e 20 63 6c 65 |odelay.m|.Xln cle|
|00000b90| 61 72 6f 6b 2e 6d 20 73 | 63 72 6f 6c 6c 6f 6b 2e |arok.m s|crollok.|
|00000ba0| 6d 0a 58 6c 6e 20 66 6c | 75 73 68 69 6e 70 2e 6d |m.Xln fl|ushinp.m|
|00000bb0| 20 63 75 72 73 65 73 70 | 65 6e 64 63 68 2e 6d 0a | cursesp|endch.m.|
|00000bc0| 58 2f 2a 6c 6e 20 66 6c | 75 73 68 69 6e 70 2e 6d |X/*ln fl|ushinp.m|
|00000bd0| 20 5f 63 75 72 73 65 73 | 70 65 6e 64 63 68 2e 6d | _curses|pendch.m|
|00000be0| 20 20 20 20 20 20 20 20 | 6f 6e 6c 79 20 69 66 20 | |only if |
|00000bf0| 3e 31 34 63 68 61 72 20 | 66 69 6c 65 6e 61 6d 65 |>14char |filename|
|00000c00| 73 20 61 6c 6c 6f 77 65 | 64 2a 2f 0a 58 6c 6e 20 |s allowe|d*/.Xln |
|00000c10| 66 6c 75 73 68 69 6e 70 | 2e 6d 20 67 65 74 63 68 |flushinp|.m getch|
|00000c20| 2e 6d 0a 58 6c 6e 20 66 | 6c 75 73 68 69 6e 70 2e |.m.Xln f|lushinp.|
|00000c30| 6d 20 6d 76 67 65 74 63 | 68 2e 6d 0a 58 6c 6e 20 |m mvgetc|h.m.Xln |
|00000c40| 66 6c 75 73 68 69 6e 70 | 2e 6d 20 6d 76 77 67 65 |flushinp|.m mvwge|
|00000c50| 74 63 68 2e 6d 0a 58 6c | 6e 20 66 6c 75 73 68 69 |tch.m.Xl|n flushi|
|00000c60| 6e 70 2e 6d 20 72 61 77 | 67 65 74 63 68 2e 6d 0a |np.m raw|getch.m.|
|00000c70| 58 6c 6e 20 66 6c 75 73 | 68 69 6e 70 2e 6d 20 73 |Xln flus|hinp.m s|
|00000c80| 79 73 67 65 74 63 68 2e | 6d 0a 58 6c 6e 20 66 6c |ysgetch.|m.Xln fl|
|00000c90| 75 73 68 69 6e 70 2e 6d | 20 76 61 6c 69 64 63 68 |ushinp.m| validch|
|00000ca0| 61 72 2e 6d 0a 58 6c 6e | 20 66 6c 75 73 68 69 6e |ar.m.Xln| flushin|
|00000cb0| 70 2e 6d 20 77 67 65 74 | 63 68 2e 6d 0a 58 6c 6e |p.m wget|ch.m.Xln|
|00000cc0| 20 66 6c 75 73 68 69 6e | 70 2e 6d 20 77 75 6e 67 | flushin|p.m wung|
|00000cd0| 65 74 63 68 2e 6d 0a 58 | 6c 6e 20 6d 76 70 72 69 |etch.m.X|ln mvpri|
|00000ce0| 6e 74 77 2e 6d 20 6d 76 | 73 63 61 6e 77 2e 6d 0a |ntw.m mv|scanw.m.|
|00000cf0| 58 6c 6e 20 6d 76 70 72 | 69 6e 74 77 2e 6d 20 6d |Xln mvpr|intw.m m|
|00000d00| 76 77 70 72 69 6e 74 77 | 2e 6d 0a 58 6c 6e 20 6d |vwprintw|.m.Xln m|
|00000d10| 76 70 72 69 6e 74 77 2e | 6d 20 6d 76 77 73 63 61 |vprintw.|m mvwsca|
|00000d20| 6e 77 2e 6d 0a 58 6c 6e | 20 6d 76 70 72 69 6e 74 |nw.m.Xln| mvprint|
|00000d30| 77 2e 6d 20 70 62 6c 65 | 6e 2e 6d 0a 58 6c 6e 20 |w.m pble|n.m.Xln |
|00000d40| 6d 76 70 72 69 6e 74 77 | 2e 6d 20 70 72 69 6e 74 |mvprintw|.m print|
|00000d50| 77 2e 6d 0a 58 6c 6e 20 | 6d 76 70 72 69 6e 74 77 |w.m.Xln |mvprintw|
|00000d60| 2e 6d 20 73 63 61 6e 77 | 2e 6d 0a 58 6c 6e 20 6d |.m scanw|.m.Xln m|
|00000d70| 76 70 72 69 6e 74 77 2e | 6d 20 77 70 72 69 6e 74 |vprintw.|m wprint|
|00000d80| 77 2e 6d 0a 58 6c 6e 20 | 6d 76 70 72 69 6e 74 77 |w.m.Xln |mvprintw|
|00000d90| 2e 6d 20 77 73 63 61 6e | 77 2e 6d 0a 53 48 41 52 |.m wscan|w.m.SHAR|
|00000da0| 5f 45 4f 46 0a 69 66 20 | 74 65 73 74 20 32 35 35 |_EOF.if |test 255|
|00000db0| 33 20 2d 6e 65 20 22 60 | 77 63 20 2d 63 20 3c 20 |3 -ne "`|wc -c < |
|00000dc0| 27 6d 61 6b 65 6c 69 6e | 6b 73 27 60 22 0a 74 68 |'makelin|ks'`".th|
|00000dd0| 65 6e 0a 09 65 63 68 6f | 20 73 68 61 72 3a 20 65 |en..echo| shar: e|
|00000de0| 72 72 6f 72 20 74 72 61 | 6e 73 6d 69 74 74 69 6e |rror tra|nsmittin|
|00000df0| 67 20 22 27 6d 61 6b 65 | 6c 69 6e 6b 73 27 22 20 |g "'make|links'" |
|00000e00| 27 28 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 |'(should| have be|
|00000e10| 65 6e 20 32 35 35 33 20 | 63 68 61 72 61 63 74 65 |en 2553 |characte|
|00000e20| 72 73 29 27 0a 66 69 0a | 66 69 20 23 20 65 6e 64 |rs)'.fi.|fi # end|
|00000e30| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00000e40| 63 68 65 63 6b 0a 65 63 | 68 6f 20 73 68 61 72 3a |check.ec|ho shar:|
|00000e50| 20 65 78 74 72 61 63 74 | 69 6e 67 20 22 27 6d 61 | extract|ing "'ma|
|00000e60| 6b 65 6e 65 77 2e 6d 27 | 22 20 27 28 31 31 37 39 |kenew.m'|" '(1179|
|00000e70| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00000e80| 20 74 65 73 74 20 2d 66 | 20 27 6d 61 6b 65 6e 65 | test -f| 'makene|
|00000e90| 77 2e 6d 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |w.m'.the|n..echo |
|00000ea0| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00000eb0| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00000ec0| 6e 67 20 66 69 6c 65 20 | 22 27 6d 61 6b 65 6e 65 |ng file |"'makene|
|00000ed0| 77 2e 6d 27 22 0a 65 6c | 73 65 0a 73 65 64 20 27 |w.m'".el|se.sed '|
|00000ee0| 73 2f 5e 58 2f 2f 27 20 | 3c 3c 20 5c 53 48 41 52 |s/^X//' |<< \SHAR|
|00000ef0| 5f 45 4f 46 20 3e 20 27 | 6d 61 6b 65 6e 65 77 2e |_EOF > '|makenew.|
|00000f00| 6d 27 0a 58 4e 41 4d 45 | 0a 58 09 6d 61 6b 65 6e |m'.XNAME|.X.maken|
|00000f10| 65 77 28 29 20 6e 65 77 | 77 69 6e 28 29 20 73 75 |ew() new|win() su|
|00000f20| 62 77 69 6e 28 29 20 2d | 20 63 72 65 61 74 65 20 |bwin() -| create |
|00000f30| 61 20 6e 65 77 20 77 69 | 6e 64 6f 77 20 6f 72 20 |a new wi|ndow or |
|00000f40| 73 75 62 77 69 6e 64 6f | 77 0a 58 0a 58 53 59 4e |subwindo|w.X.XSYN|
|00000f50| 4f 50 53 49 53 0a 58 09 | 23 69 6e 63 6c 75 64 65 |OPSIS.X.|#include|
|00000f60| 20 3c 73 74 64 69 6f 2e | 68 3e 0a 58 09 23 69 6e | <stdio.|h>.X.#in|
|00000f70| 63 6c 75 64 65 20 3c 63 | 75 72 73 65 73 2e 68 3e |clude <c|urses.h>|
|00000f80| 0a 58 09 23 69 6e 63 6c | 75 64 65 20 3c 63 75 72 |.X.#incl|ude <cur|
|00000f90| 73 70 72 69 76 2e 68 3e | 0a 58 0a 58 09 73 74 61 |spriv.h>|.X.X.sta|
|00000fa0| 74 69 63 20 57 49 4e 44 | 4f 57 20 2a 6d 61 6b 65 |tic WIND|OW *make|
|00000fb0| 6e 65 77 28 6e 75 6d 5f | 6c 69 6e 65 73 2c 20 6e |new(num_|lines, n|
|00000fc0| 75 6d 5f 63 6f 6c 75 6d | 6e 73 2c 20 62 65 67 79 |um_colum|ns, begy|
|00000fd0| 2c 20 62 65 67 78 29 0a | 58 09 69 6e 74 20 6e 75 |, begx).|X.int nu|
|00000fe0| 6d 5f 6c 69 6e 65 73 2c | 20 6e 75 6d 5f 63 6f 6c |m_lines,| num_col|
|00000ff0| 75 6d 6e 73 2c 20 62 65 | 67 79 2c 20 62 65 67 78 |umns, be|gy, begx|
|00001000| 3b 0a 58 0a 58 09 57 49 | 4e 44 4f 57 20 2a 6e 65 |;.X.X.WI|NDOW *ne|
|00001010| 77 77 69 6e 28 6e 75 6d | 5f 6c 69 6e 65 73 2c 20 |wwin(num|_lines, |
|00001020| 6e 75 6d 5f 63 6f 6c 75 | 6d 6e 73 2c 20 62 65 67 |num_colu|mns, beg|
|00001030| 79 2c 20 62 65 67 78 29 | 0a 58 09 69 6e 74 20 6e |y, begx)|.X.int n|
|00001040| 75 6d 5f 6c 69 6e 65 73 | 2c 20 6e 75 6d 5f 63 6f |um_lines|, num_co|
|00001050| 6c 75 6d 6e 73 2c 20 62 | 65 67 79 2c 20 62 65 67 |lumns, b|egy, beg|
|00001060| 78 3b 0a 58 0a 58 09 57 | 49 4e 44 4f 57 20 2a 73 |x;.X.X.W|INDOW *s|
|00001070| 75 62 77 69 6e 28 6f 72 | 69 67 2c 20 6e 75 6d 5f |ubwin(or|ig, num_|
|00001080| 6c 69 6e 65 73 2c 20 6e | 75 6d 5f 63 6f 6c 75 6d |lines, n|um_colum|
|00001090| 6e 73 2c 20 62 65 67 79 | 2c 20 62 65 67 78 29 0a |ns, begy|, begx).|
|000010a0| 58 09 57 49 4e 44 4f 57 | 20 2a 6f 72 69 67 3b 0a |X.WINDOW| *orig;.|
|000010b0| 58 09 69 6e 74 20 6e 75 | 6d 5f 6c 69 6e 65 73 2c |X.int nu|m_lines,|
|000010c0| 20 6e 75 6d 5f 63 6f 6c | 75 6d 6e 73 2c 20 62 65 | num_col|umns, be|
|000010d0| 67 79 2c 20 62 65 67 78 | 3b 0a 58 0a 58 44 45 53 |gy, begx|;.X.XDES|
|000010e0| 43 52 49 50 54 49 4f 4e | 0a 58 09 6d 61 6b 65 6e |CRIPTION|.X.maken|
|000010f0| 65 77 28 29 20 61 6c 6c | 6f 63 61 74 65 73 20 61 |ew() all|ocates a|
|00001100| 6c 6c 20 64 61 74 61 20 | 66 6f 72 20 61 20 6e 65 |ll data |for a ne|
|00001110| 77 20 77 69 6e 64 6f 77 | 20 65 78 63 65 70 74 20 |w window| except |
|00001120| 74 68 65 20 20 0a 58 09 | 61 63 74 75 61 6c 20 6c |the .X.|actual l|
|00001130| 69 6e 65 73 20 74 68 65 | 6d 73 65 6c 76 65 73 2e |ines the|mselves.|
|00001140| 20 20 0a 58 0a 58 09 6e | 65 77 77 69 6e 28 29 20 | .X.X.n|ewwin() |
|00001150| 63 72 65 61 74 65 73 20 | 61 20 6e 65 77 20 77 69 |creates |a new wi|
|00001160| 6e 64 6f 77 20 77 69 74 | 68 20 73 69 7a 65 20 6e |ndow wit|h size n|
|00001170| 75 6d 5f 6c 69 6e 65 73 | 20 2a 20 6e 75 6d 5f 63 |um_lines| * num_c|
|00001180| 6f 2d 20 20 0a 58 09 6c | 75 6d 6e 73 2c 20 61 6e |o- .X.l|umns, an|
|00001190| 64 20 6f 72 69 67 69 6e | 20 62 65 67 78 2c 62 65 |d origin| begx,be|
|000011a0| 67 79 20 72 65 6c 61 74 | 69 76 65 20 74 6f 20 74 |gy relat|ive to t|
|000011b0| 68 65 20 53 43 52 45 45 | 4e 2e 20 53 70 65 63 69 |he SCREE|N. Speci|
|000011c0| 61 6c 20 20 0a 58 09 63 | 61 73 65 3a 20 69 66 20 |al .X.c|ase: if |
|000011d0| 6e 75 6d 5f 6c 69 6e 65 | 73 20 61 6e 64 2f 6f 72 |num_line|s and/or|
|000011e0| 20 6e 75 6d 5f 63 6f 6c | 75 6d 6e 73 20 69 73 20 | num_col|umns is |
|000011f0| 30 2c 20 74 68 65 20 72 | 65 6d 61 69 6e 64 65 72 |0, the r|emainder|
|00001200| 20 6f 66 20 20 0a 58 09 | 74 68 65 20 73 63 72 65 | of .X.|the scre|
|00001210| 65 6e 20 69 73 20 75 73 | 65 64 2e 20 20 0a 58 0a |en is us|ed. .X.|
|00001220| 58 09 73 75 62 77 69 6e | 28 29 20 63 72 65 61 74 |X.subwin|() creat|
|00001230| 65 73 20 61 20 73 75 62 | 2d 77 69 6e 64 6f 77 20 |es a sub|-window |
|00001240| 69 6e 20 74 68 65 20 27 | 6f 72 69 67 27 20 77 69 |in the '|orig' wi|
|00001250| 6e 64 6f 77 2c 20 77 69 | 74 68 20 20 0a 58 09 73 |ndow, wi|th .X.s|
|00001260| 69 7a 65 20 6e 75 6d 5f | 6c 69 6e 65 73 20 2a 20 |ize num_|lines * |
|00001270| 6e 75 6d 5f 63 6f 6c 75 | 6d 6e 73 2c 20 61 6e 64 |num_colu|mns, and|
|00001280| 20 77 69 74 68 20 6f 72 | 69 67 69 6e 20 62 65 67 | with or|igin beg|
|00001290| 78 2c 20 62 65 67 79 20 | 20 0a 58 09 72 65 6c 61 |x, begy | .X.rela|
|000012a0| 74 69 76 65 20 74 6f 20 | 74 68 65 20 53 43 52 45 |tive to |the SCRE|
|000012b0| 45 4e 2e 20 53 70 65 63 | 69 61 6c 20 63 61 73 65 |EN. Spec|ial case|
|000012c0| 3a 20 69 66 20 6e 75 6d | 5f 6c 69 6e 65 73 20 61 |: if num|_lines a|
|000012d0| 6e 64 2f 6f 72 20 20 0a | 58 09 6e 75 6d 5f 63 6f |nd/or .|X.num_co|
|000012e0| 6c 75 6d 6e 73 20 69 73 | 20 30 2c 20 74 68 65 20 |lumns is| 0, the |
|000012f0| 72 65 6d 61 69 6e 64 65 | 72 20 6f 66 20 74 68 65 |remainde|r of the|
|00001300| 20 6f 72 69 67 69 6e 61 | 6c 20 77 69 6e 64 6f 77 | origina|l window|
|00001310| 20 69 73 20 20 0a 58 09 | 75 73 65 64 2e 20 54 68 | is .X.|used. Th|
|00001320| 65 20 73 75 62 77 69 6e | 64 6f 77 20 75 73 65 73 |e subwin|dow uses|
|00001330| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 77 69 | the ori|ginal wi|
|00001340| 6e 64 6f 77 27 73 20 6c | 69 6e 65 20 62 75 66 66 |ndow's l|ine buff|
|00001350| 65 72 73 20 20 0a 58 09 | 74 6f 20 73 74 6f 72 65 |ers .X.|to store|
|00001360| 20 69 74 27 73 20 6f 77 | 6e 20 6c 69 6e 65 73 2e | it's ow|n lines.|
|00001370| 20 20 0a 58 0a 58 45 58 | 41 4d 50 4c 45 53 0a 58 | .X.XEX|AMPLES.X|
|00001380| 0a 58 53 45 45 20 41 4c | 53 4f 0a 58 09 6d 61 6c |.XSEE AL|SO.X.mal|
|00001390| 6c 6f 63 28 29 3b 20 73 | 69 7a 65 6f 66 28 29 3b |loc(); s|izeof();|
|000013a0| 20 63 61 6c 6c 6f 63 28 | 29 3b 20 66 72 65 65 28 | calloc(|); free(|
|000013b0| 29 3b 20 20 0a 58 0a 58 | 42 55 47 53 0a 53 48 41 |); .X.X|BUGS.SHA|
|000013c0| 52 5f 45 4f 46 0a 69 66 | 20 74 65 73 74 20 31 31 |R_EOF.if| test 11|
|000013d0| 37 39 20 2d 6e 65 20 22 | 60 77 63 20 2d 63 20 3c |79 -ne "|`wc -c <|
|000013e0| 20 27 6d 61 6b 65 6e 65 | 77 2e 6d 27 60 22 0a 74 | 'makene|w.m'`".t|
|000013f0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00001400| 65 72 72 6f 72 20 74 72 | 61 6e 73 6d 69 74 74 69 |error tr|ansmitti|
|00001410| 6e 67 20 22 27 6d 61 6b | 65 6e 65 77 2e 6d 27 22 |ng "'mak|enew.m'"|
|00001420| 20 27 28 73 68 6f 75 6c | 64 20 68 61 76 65 20 62 | '(shoul|d have b|
|00001430| 65 65 6e 20 31 31 37 39 | 20 63 68 61 72 61 63 74 |een 1179| charact|
|00001440| 65 72 73 29 27 0a 66 69 | 0a 66 69 20 23 20 65 6e |ers)'.fi|.fi # en|
|00001450| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00001460| 20 63 68 65 63 6b 0a 65 | 63 68 6f 20 73 68 61 72 | check.e|cho shar|
|00001470| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 22 27 6d |: extrac|ting "'m|
|00001480| 6f 76 65 2e 6d 27 22 20 | 27 28 33 33 35 20 63 68 |ove.m'" |'(335 ch|
|00001490| 61 72 61 63 74 65 72 73 | 29 27 0a 69 66 20 74 65 |aracters|)'.if te|
|000014a0| 73 74 20 2d 66 20 27 6d | 6f 76 65 2e 6d 27 0a 74 |st -f 'm|ove.m'.t|
|000014b0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|000014c0| 77 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |will not| over-wr|
|000014d0| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|000014e0| 65 20 22 27 6d 6f 76 65 | 2e 6d 27 22 0a 65 6c 73 |e "'move|.m'".els|
|000014f0| 65 0a 73 65 64 20 27 73 | 2f 5e 58 2f 2f 27 20 3c |e.sed 's|/^X//' <|
|00001500| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 6d |< \SHAR_|EOF > 'm|
|00001510| 6f 76 65 2e 6d 27 0a 58 | 4e 41 4d 45 0a 58 09 77 |ove.m'.X|NAME.X.w|
|00001520| 6d 6f 76 65 28 29 20 6d | 6f 76 65 28 29 20 2d 20 |move() m|ove() - |
|00001530| 6d 6f 76 65 20 74 68 65 | 20 63 75 72 73 6f 72 0a |move the| cursor.|
|00001540| 58 0a 58 53 59 4e 4f 50 | 53 49 53 0a 58 09 23 69 |X.XSYNOP|SIS.X.#i|
|00001550| 6e 63 6c 75 64 65 20 3c | 63 75 72 73 65 73 2e 68 |nclude <|curses.h|
|00001560| 3e 0a 58 09 23 69 6e 63 | 6c 75 64 65 20 3c 63 75 |>.X.#inc|lude <cu|
|00001570| 72 73 70 72 69 76 2e 68 | 3e 0a 58 0a 58 09 69 6e |rspriv.h|>.X.X.in|
|00001580| 74 20 77 6d 6f 76 65 28 | 77 69 6e 2c 79 2c 78 29 |t wmove(|win,y,x)|
|00001590| 0a 58 09 57 49 4e 44 4f | 57 20 2a 77 69 6e 3b 0a |.X.WINDO|W *win;.|
|000015a0| 58 09 69 6e 74 20 79 3b | 0a 58 09 69 6e 74 20 78 |X.int y;|.X.int x|
|000015b0| 3b 0a 58 0a 58 09 69 6e | 74 20 6d 6f 76 65 28 79 |;.X.X.in|t move(y|
|000015c0| 2c 78 29 0a 58 09 69 6e | 74 20 79 3b 0a 58 09 69 |,x).X.in|t y;.X.i|
|000015d0| 6e 74 20 78 3b 0a 58 0a | 58 44 45 53 43 52 49 50 |nt x;.X.|XDESCRIP|
|000015e0| 54 49 4f 4e 0a 58 09 77 | 6d 6f 76 65 28 29 20 6d |TION.X.w|move() m|
|000015f0| 6f 76 65 73 20 74 68 65 | 20 63 75 72 73 6f 72 20 |oves the| cursor |
|00001600| 69 6e 20 77 69 6e 64 6f | 77 20 27 77 69 6e 27 20 |in windo|w 'win' |
|00001610| 74 6f 20 70 6f 73 69 74 | 69 6f 6e 20 28 78 2c 79 |to posit|ion (x,y|
|00001620| 29 2e 20 20 0a 58 0a 58 | 09 6d 6f 76 65 28 29 20 |). .X.X|.move() |
|00001630| 6d 6f 76 65 73 20 74 68 | 65 20 63 75 72 73 6f 72 |moves th|e cursor|
|00001640| 20 69 6e 20 73 74 64 73 | 63 72 20 74 6f 20 70 6f | in stds|cr to po|
|00001650| 73 69 74 69 6f 6e 20 28 | 78 2c 79 29 2e 20 20 0a |sition (|x,y). .|
|00001660| 58 0a 58 45 58 41 4d 50 | 4c 45 53 0a 58 0a 58 53 |X.XEXAMP|LES.X.XS|
|00001670| 45 45 20 41 4c 53 4f 0a | 58 0a 58 42 55 47 53 0a |EE ALSO.|X.XBUGS.|
|00001680| 53 48 41 52 5f 45 4f 46 | 0a 69 66 20 74 65 73 74 |SHAR_EOF|.if test|
|00001690| 20 33 33 35 20 2d 6e 65 | 20 22 60 77 63 20 2d 63 | 335 -ne| "`wc -c|
|000016a0| 20 3c 20 27 6d 6f 76 65 | 2e 6d 27 60 22 0a 74 68 | < 'move|.m'`".th|
|000016b0| 65 6e 0a 09 65 63 68 6f | 20 73 68 61 72 3a 20 65 |en..echo| shar: e|
|000016c0| 72 72 6f 72 20 74 72 61 | 6e 73 6d 69 74 74 69 6e |rror tra|nsmittin|
|000016d0| 67 20 22 27 6d 6f 76 65 | 2e 6d 27 22 20 27 28 73 |g "'move|.m'" '(s|
|000016e0| 68 6f 75 6c 64 20 68 61 | 76 65 20 62 65 65 6e 20 |hould ha|ve been |
|000016f0| 33 33 35 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |335 char|acters)'|
|00001700| 0a 66 69 0a 66 69 20 23 | 20 65 6e 64 20 6f 66 20 |.fi.fi #| end of |
|00001710| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|00001720| 6b 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 65 78 74 |k.echo s|har: ext|
|00001730| 72 61 63 74 69 6e 67 20 | 22 27 6d 76 63 75 72 2e |racting |"'mvcur.|
|00001740| 6d 27 22 20 27 28 32 39 | 39 20 63 68 61 72 61 63 |m'" '(29|9 charac|
|00001750| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|00001760| 66 20 27 6d 76 63 75 72 | 2e 6d 27 0a 74 68 65 6e |f 'mvcur|.m'.then|
|00001770| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|00001780| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00001790| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|000017a0| 27 6d 76 63 75 72 2e 6d | 27 22 0a 65 6c 73 65 0a |'mvcur.m|'".else.|
|000017b0| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3c 3c 20 |sed 's/^|X//' << |
|000017c0| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 6d 76 63 |\SHAR_EO|F > 'mvc|
|000017d0| 75 72 2e 6d 27 0a 58 4e | 41 4d 45 0a 58 09 6d 76 |ur.m'.XN|AME.X.mv|
|000017e0| 63 75 72 28 29 20 2d 20 | 6d 6f 76 65 20 74 68 65 |cur() - |move the|
|000017f0| 20 64 69 73 70 6c 61 79 | 20 63 75 72 73 6f 72 0a | display| cursor.|
|00001800| 58 0a 58 53 59 4e 4f 50 | 53 49 53 0a 58 09 23 69 |X.XSYNOP|SIS.X.#i|
|00001810| 6e 63 6c 75 64 65 20 3c | 63 75 72 73 65 73 2e 68 |nclude <|curses.h|
|00001820| 3e 0a 58 09 23 69 6e 63 | 6c 75 64 65 20 3c 63 75 |>.X.#inc|lude <cu|
|00001830| 72 73 70 72 69 76 2e 68 | 3e 0a 58 0a 58 09 69 6e |rspriv.h|>.X.X.in|
|00001840| 74 20 6d 76 63 75 72 28 | 6f 6c 64 79 2c 6f 6c 64 |t mvcur(|oldy,old|
|00001850| 78 2c 6e 65 77 79 2c 6e | 65 77 78 29 0a 58 09 69 |x,newy,n|ewx).X.i|
|00001860| 6e 74 20 6f 6c 64 79 3b | 0a 58 09 69 6e 74 20 6f |nt oldy;|.X.int o|
|00001870| 6c 64 78 3b 0a 58 09 69 | 6e 74 20 6e 65 77 79 3b |ldx;.X.i|nt newy;|
|00001880| 0a 58 09 69 6e 74 20 6e | 65 77 78 3b 0a 58 0a 58 |.X.int n|ewx;.X.X|
|00001890| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 58 09 6d 76 |DESCRIPT|ION.X.mv|
|000018a0| 63 75 72 28 6f 6c 64 79 | 2c 6f 6c 64 78 2c 6e 65 |cur(oldy|,oldx,ne|
|000018b0| 77 79 2c 6e 65 77 78 29 | 20 6d 6f 76 65 73 20 74 |wy,newx)| moves t|
|000018c0| 68 65 20 64 69 73 70 6c | 61 79 20 63 75 72 73 6f |he displ|ay curso|
|000018d0| 72 20 74 6f 20 3c 6e 65 | 77 79 2c 6e 65 77 78 3e |r to <ne|wy,newx>|
|000018e0| 20 20 0a 58 0a 58 45 58 | 41 4d 50 4c 45 53 0a 58 | .X.XEX|AMPLES.X|
|000018f0| 0a 58 53 45 45 20 41 4c | 53 4f 0a 58 09 5f 63 75 |.XSEE AL|SO.X._cu|
|00001900| 72 73 65 73 63 75 72 73 | 6f 72 28 29 20 20 0a 58 |rsescurs|or() .X|
|00001910| 0a 58 42 55 47 53 0a 53 | 48 41 52 5f 45 4f 46 0a |.XBUGS.S|HAR_EOF.|
|00001920| 69 66 20 74 65 73 74 20 | 32 39 39 20 2d 6e 65 20 |if test |299 -ne |
|00001930| 22 60 77 63 20 2d 63 20 | 3c 20 27 6d 76 63 75 72 |"`wc -c |< 'mvcur|
|00001940| 2e 6d 27 60 22 0a 74 68 | 65 6e 0a 09 65 63 68 6f |.m'`".th|en..echo|
|00001950| 20 73 68 61 72 3a 20 65 | 72 72 6f 72 20 74 72 61 | shar: e|rror tra|
|00001960| 6e 73 6d 69 74 74 69 6e | 67 20 22 27 6d 76 63 75 |nsmittin|g "'mvcu|
|00001970| 72 2e 6d 27 22 20 27 28 | 73 68 6f 75 6c 64 20 68 |r.m'" '(|should h|
|00001980| 61 76 65 20 62 65 65 6e | 20 32 39 39 20 63 68 61 |ave been| 299 cha|
|00001990| 72 61 63 74 65 72 73 29 | 27 0a 66 69 0a 66 69 20 |racters)|'.fi.fi |
|000019a0| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|000019b0| 74 69 6e 67 20 63 68 65 | 63 6b 0a 65 63 68 6f 20 |ting che|ck.echo |
|000019c0| 73 68 61 72 3a 20 65 78 | 74 72 61 63 74 69 6e 67 |shar: ex|tracting|
|000019d0| 20 22 27 6d 76 67 65 74 | 63 68 2e 6d 27 22 20 27 | "'mvget|ch.m'" '|
|000019e0| 28 32 32 32 33 20 63 68 | 61 72 61 63 74 65 72 73 |(2223 ch|aracters|
|000019f0| 29 27 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 6d |)'.if te|st -f 'm|
|00001a00| 76 67 65 74 63 68 2e 6d | 27 0a 74 68 65 6e 0a 09 |vgetch.m|'.then..|
|00001a10| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00001a20| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00001a30| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 6d |xisting |file "'m|
|00001a40| 76 67 65 74 63 68 2e 6d | 27 22 0a 65 6c 73 65 0a |vgetch.m|'".else.|
|00001a50| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3c 3c 20 |sed 's/^|X//' << |
|00001a60| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 6d 76 67 |\SHAR_EO|F > 'mvg|
|00001a70| 65 74 63 68 2e 6d 27 0a | 58 4e 41 4d 45 0a 58 09 |etch.m'.|XNAME.X.|
|00001a80| 67 65 74 63 68 28 29 20 | 2d 20 2a 2a 2a 73 61 6d |getch() |- ***sam|
|00001a90| 65 20 61 73 20 77 67 65 | 74 63 68 28 29 2a 2a 2a |e as wge|tch()***|
|00001aa0| 20 73 65 65 20 63 75 72 | 73 65 73 2e 68 0a 58 09 | see cur|ses.h.X.|
|00001ab0| 77 67 65 74 63 68 28 29 | 20 66 6c 75 73 68 69 6e |wgetch()| flushin|
|00001ac0| 70 28 29 20 77 75 6e 67 | 65 74 63 68 28 29 20 6d |p() wung|etch() m|
|00001ad0| 76 67 65 74 63 68 28 29 | 20 6d 76 77 67 65 74 63 |vgetch()| mvwgetc|
|00001ae0| 68 28 29 20 72 61 77 67 | 65 74 63 68 28 29 20 0a |h() rawg|etch() .|
|00001af0| 58 09 73 79 73 67 65 74 | 63 68 28 29 20 76 61 6c |X.sysget|ch() val|
|00001b00| 69 64 63 68 61 72 28 29 | 20 5f 63 75 72 73 65 73 |idchar()| _curses|
|00001b10| 70 65 6e 64 63 68 28 29 | 20 2d 20 6d 61 6e 69 70 |pendch()| - manip|
|00001b20| 75 6c 61 74 65 20 69 6e | 70 75 74 20 63 68 61 72 |ulate in|put char|
|00001b30| 61 63 74 65 72 73 0a 58 | 0a 58 53 59 4e 4f 50 53 |acters.X|.XSYNOPS|
|00001b40| 49 53 0a 58 09 23 69 6e | 63 6c 75 64 65 20 3c 63 |IS.X.#in|clude <c|
|00001b50| 75 72 73 65 73 2e 68 3e | 0a 58 09 23 69 6e 63 6c |urses.h>|.X.#incl|
|00001b60| 75 64 65 20 3c 63 75 72 | 73 70 72 69 76 2e 68 3e |ude <cur|spriv.h>|
|00001b70| 0a 58 0a 58 09 69 6e 74 | 20 77 67 65 74 63 68 28 |.X.X.int| wgetch(|
|00001b80| 77 69 6e 29 0a 58 09 57 | 49 4e 44 4f 57 20 2a 77 |win).X.W|INDOW *w|
|00001b90| 69 6e 3b 0a 58 0a 58 09 | 76 6f 69 64 20 66 6c 75 |in;.X.X.|void flu|
|00001ba0| 73 68 69 6e 70 28 29 0a | 58 0a 58 09 69 6e 74 20 |shinp().|X.X.int |
|00001bb0| 77 75 6e 67 65 74 63 68 | 28 63 68 29 0a 58 09 69 |wungetch|(ch).X.i|
|00001bc0| 6e 74 20 63 68 3b 0a 58 | 0a 58 09 69 6e 74 20 6d |nt ch;.X|.X.int m|
|00001bd0| 76 67 65 74 63 68 28 79 | 2c 78 29 0a 58 09 69 6e |vgetch(y|,x).X.in|
|00001be0| 74 20 79 3b 0a 58 09 69 | 6e 74 20 78 3b 0a 58 0a |t y;.X.i|nt x;.X.|
|00001bf0| 58 09 69 6e 74 20 6d 76 | 77 67 65 74 63 68 28 77 |X.int mv|wgetch(w|
|00001c00| 69 6e 2c 79 2c 78 29 0a | 58 09 57 49 4e 44 4f 57 |in,y,x).|X.WINDOW|
|00001c10| 20 2a 77 69 6e 3b 0a 58 | 09 69 6e 74 20 79 3b 0a | *win;.X|.int y;.|
|00001c20| 58 09 69 6e 74 20 78 3b | 0a 58 0a 58 09 73 74 61 |X.int x;|.X.X.sta|
|00001c30| 74 69 63 20 69 6e 74 20 | 72 61 77 67 65 74 63 68 |tic int |rawgetch|
|00001c40| 28 29 0a 58 0a 58 09 73 | 74 61 74 69 63 20 69 6e |().X.X.s|tatic in|
|00001c50| 74 20 73 79 73 67 65 74 | 63 68 28 29 0a 58 0a 58 |t sysget|ch().X.X|
|00001c60| 09 73 74 61 74 69 63 20 | 69 6e 74 20 76 61 6c 69 |.static |int vali|
|00001c70| 64 63 68 61 72 28 63 29 | 0a 58 09 69 6e 74 20 63 |dchar(c)|.X.int c|
|00001c80| 3b 0a 58 0a 58 09 62 6f | 6f 6c 20 5f 63 75 72 73 |;.X.X.bo|ol _curs|
|00001c90| 65 73 70 65 6e 64 63 68 | 28 29 0a 58 0a 58 44 45 |espendch|().X.XDE|
|00001ca0| 53 43 52 49 50 54 49 4f | 4e 0a 58 09 77 67 65 74 |SCRIPTIO|N.X.wget|
|00001cb0| 63 68 28 77 69 6e 29 20 | 67 65 74 73 20 61 20 63 |ch(win) |gets a c|
|00001cc0| 68 61 72 61 63 74 65 72 | 20 66 72 6f 6d 20 74 68 |haracter| from th|
|00001cd0| 65 20 74 65 72 6d 69 6e | 61 6c 2c 20 69 6e 20 6e |e termin|al, in n|
|00001ce0| 6f 72 6d 61 6c 2c 20 20 | 0a 58 09 63 62 72 65 61 |ormal, |.X.cbrea|
|00001cf0| 6b 20 6f 72 20 72 61 77 | 20 6d 6f 64 65 2c 20 6f |k or raw| mode, o|
|00001d00| 70 74 69 6f 6e 61 6c 6c | 79 20 65 63 68 6f 69 6e |ptionall|y echoin|
|00001d10| 67 20 74 6f 20 77 69 6e | 64 6f 77 20 27 77 69 6e |g to win|dow 'win|
|00001d20| 27 2e 20 20 0a 58 0a 58 | 09 66 6c 75 73 68 69 6e |'. .X.X|.flushin|
|00001d30| 70 28 29 20 6b 69 6c 6c | 73 20 61 6e 79 20 70 65 |p() kill|s any pe|
|00001d40| 6e 64 69 6e 67 20 69 6e | 70 75 74 20 63 68 61 72 |nding in|put char|
|00001d50| 61 63 74 65 72 73 2e 20 | 20 0a 58 0a 58 09 77 75 |acters. | .X.X.wu|
|00001d60| 6e 67 65 74 63 68 28 29 | 20 70 75 73 68 65 73 20 |ngetch()| pushes |
|00001d70| 62 61 63 6b 20 69 74 27 | 73 20 61 72 67 75 6d 65 |back it'|s argume|
|00001d80| 6e 74 20 6f 6e 20 74 68 | 65 20 69 6e 70 75 74 20 |nt on th|e input |
|00001d90| 73 74 72 65 61 6d 2e 20 | 49 66 20 20 0a 58 09 4f |stream. |If .X.O|
|00001da0| 4b 2c 20 72 65 74 75 72 | 6e 73 20 31 2c 20 6f 74 |K, retur|ns 1, ot|
|00001db0| 68 65 72 77 69 73 65 20 | 72 65 74 75 72 6e 73 20 |herwise |returns |
|00001dc0| 30 2e 20 20 0a 58 0a 58 | 09 6d 76 67 65 74 63 68 |0. .X.X|.mvgetch|
|00001dd0| 28 29 20 66 69 72 73 74 | 20 6d 6f 76 65 73 20 74 |() first| moves t|
|00001de0| 68 65 20 73 74 64 73 63 | 72 20 63 75 72 73 6f 72 |he stdsc|r cursor|
|00001df0| 20 74 6f 20 61 20 6e 65 | 77 20 6c 6f 63 61 74 69 | to a ne|w locati|
|00001e00| 6f 6e 2c 20 20 0a 58 09 | 74 68 65 6e 20 64 6f 65 |on, .X.|then doe|
|00001e10| 73 20 61 20 77 67 65 74 | 63 68 28 29 20 6f 6e 20 |s a wget|ch() on |
|00001e20| 73 74 64 73 63 72 2e 20 | 20 0a 58 0a 58 09 6d 76 |stdscr. | .X.X.mv|
|00001e30| 77 67 65 74 63 68 28 29 | 20 66 69 72 73 74 20 6d |wgetch()| first m|
|00001e40| 6f 76 65 73 20 74 68 65 | 20 63 75 72 73 6f 72 20 |oves the| cursor |
|00001e50| 6f 66 20 77 69 6e 64 6f | 77 20 27 77 69 6e 27 20 |of windo|w 'win' |
|00001e60| 74 6f 20 61 20 6e 65 77 | 20 20 0a 58 09 6c 6f 63 |to a new| .X.loc|
|00001e70| 61 74 69 6f 6e 2c 20 74 | 68 65 6e 20 64 6f 65 73 |ation, t|hen does|
|00001e80| 20 61 20 77 67 65 74 63 | 68 28 29 20 69 6e 20 27 | a wgetc|h() in '|
|00001e90| 77 69 6e 27 2e 20 20 0a | 58 0a 58 09 72 61 77 67 |win'. .|X.X.rawg|
|00001ea0| 65 74 63 68 28 29 20 67 | 65 74 73 20 61 20 63 68 |etch() g|ets a ch|
|00001eb0| 61 72 61 63 74 65 72 20 | 77 69 74 68 6f 75 74 20 |aracter |without |
|00001ec0| 61 6e 79 20 69 6e 74 65 | 72 70 72 65 74 61 74 69 |any inte|rpretati|
|00001ed0| 6f 6e 20 61 74 20 20 0a | 58 09 61 6c 6c 20 61 6e |on at .|X.all an|
|00001ee0| 64 20 72 65 74 75 72 6e | 73 20 69 74 2e 20 49 66 |d return|s it. If|
|00001ef0| 20 6b 65 79 70 61 64 20 | 6d 6f 64 65 20 69 73 20 | keypad |mode is |
|00001f00| 61 63 74 69 76 65 20 66 | 6f 72 20 74 68 65 20 64 |active f|or the d|
|00001f10| 65 73 69 67 2d 20 20 0a | 58 09 6e 61 74 65 64 20 |esig- .|X.nated |
|00001f20| 77 69 6e 64 6f 77 2c 20 | 66 75 6e 63 74 69 6f 6e |window, |function|
|00001f30| 20 6b 65 79 20 74 72 61 | 6e 73 6c 61 74 69 6f 6e | key tra|nslation|
|00001f40| 20 77 69 6c 6c 20 62 65 | 20 70 65 72 66 6f 72 6d | will be| perform|
|00001f50| 65 64 2e 20 20 0a 58 09 | 4f 74 68 65 72 77 69 73 |ed. .X.|Otherwis|
|00001f60| 65 2c 20 66 75 6e 63 74 | 69 6f 6e 20 6b 65 79 73 |e, funct|ion keys|
|00001f70| 20 61 72 65 20 69 67 6e | 6f 72 65 64 2e 49 66 20 | are ign|ored.If |
|00001f80| 6e 6f 64 65 6c 61 79 20 | 6d 6f 64 65 20 69 73 20 |nodelay |mode is |
|00001f90| 20 0a 58 09 61 63 74 69 | 76 65 20 69 6e 20 74 68 | .X.acti|ve in th|
|00001fa0| 65 20 77 69 6e 64 6f 77 | 2c 20 74 68 65 6e 20 72 |e window|, then r|
|00001fb0| 61 77 67 65 74 63 68 28 | 29 20 72 65 74 75 72 6e |awgetch(|) return|
|00001fc0| 73 20 2d 31 20 69 66 20 | 6e 6f 20 63 68 61 2d 20 |s -1 if |no cha- |
|00001fd0| 20 0a 58 09 72 61 63 74 | 65 72 20 69 73 20 61 76 | .X.ract|er is av|
|00001fe0| 61 69 6c 61 62 6c 65 2e | 20 20 0a 58 0a 58 09 73 |ailable.| .X.X.s|
|00001ff0| 79 73 67 65 74 63 68 28 | 29 20 67 65 74 73 20 61 |ysgetch(|) gets a|
|00002000| 20 63 68 61 72 61 63 74 | 65 72 20 77 69 74 68 20 | charact|er with |
|00002010| 6e 6f 72 6d 61 6c 20 5e | 53 2c 20 5e 51 2c 20 5e |normal ^|S, ^Q, ^|
|00002020| 50 20 61 6e 64 20 5e 43 | 20 20 0a 58 09 69 6e 74 |P and ^C| .X.int|
|00002030| 65 72 70 72 65 74 61 74 | 69 6f 6e 20 61 6e 64 20 |erpretat|ion and |
|00002040| 72 65 74 75 72 6e 73 20 | 69 74 2e 20 49 66 20 6b |returns |it. If k|
|00002050| 65 79 70 61 64 20 6d 6f | 64 65 20 69 73 20 61 63 |eypad mo|de is ac|
|00002060| 74 69 76 65 20 66 6f 72 | 20 20 0a 58 09 74 68 65 |tive for| .X.the|
|00002070| 20 64 65 73 69 67 6e 61 | 74 65 64 20 77 69 6e 64 | designa|ted wind|
|00002080| 6f 77 2c 20 66 75 6e 63 | 74 69 6f 6e 20 6b 65 79 |ow, func|tion key|
|00002090| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 20 77 69 6c | transla|tion wil|
|000020a0| 6c 20 62 65 20 70 65 72 | 2d 20 20 0a 58 09 66 6f |l be per|- .X.fo|
|000020b0| 72 6d 65 64 2e 20 4f 74 | 68 65 72 77 69 73 65 2c |rmed. Ot|herwise,|
|000020c0| 20 66 75 6e 63 74 69 6f | 6e 20 6b 65 79 73 20 61 | functio|n keys a|
|000020d0| 72 65 20 69 67 6e 6f 72 | 65 64 2e 20 49 66 20 6e |re ignor|ed. If n|
|000020e0| 6f 64 65 6c 61 79 20 20 | 0a 58 09 6d 6f 64 65 20 |odelay |.X.mode |
|000020f0| 69 73 20 61 63 74 69 76 | 65 20 69 6e 20 74 68 65 |is activ|e in the|
|00002100| 20 77 69 6e 64 6f 77 2c | 20 74 68 65 6e 20 73 79 | window,| then sy|
|00002110| 73 67 65 74 63 68 28 29 | 20 72 65 74 75 72 6e 73 |sgetch()| returns|
|00002120| 20 2d 31 20 69 66 20 20 | 0a 58 09 6e 6f 20 63 68 | -1 if |.X.no ch|
|00002130| 61 72 61 63 74 65 72 20 | 69 73 20 61 76 61 69 6c |aracter |is avail|
|00002140| 61 62 6c 65 2e 20 20 0a | 58 0a 58 09 76 61 6c 69 |able. .|X.X.vali|
|00002150| 64 63 68 61 72 28 63 29 | 20 63 68 65 63 6b 73 20 |dchar(c)| checks |
|00002160| 74 68 61 74 20 27 63 27 | 20 69 73 20 61 20 76 61 |that 'c'| is a va|
|00002170| 6c 69 64 20 63 68 61 72 | 61 63 74 65 72 2c 20 61 |lid char|acter, a|
|00002180| 6e 64 20 20 0a 58 09 69 | 66 20 73 6f 20 72 65 74 |nd .X.i|f so ret|
|00002190| 75 72 6e 73 20 69 74 2c | 20 77 69 74 68 20 66 75 |urns it,| with fu|
|000021a0| 6e 63 74 69 6f 6e 20 6b | 65 79 20 74 72 61 6e 73 |nction k|ey trans|
|000021b0| 6c 61 74 69 6f 6e 20 61 | 70 70 6c 69 65 64 20 69 |lation a|pplied i|
|000021c0| 66 20 20 0a 58 09 27 77 | 27 20 68 61 73 20 6b 65 |f .X.'w|' has ke|
|000021d0| 79 70 61 64 20 6d 6f 64 | 65 20 73 65 74 2e 20 49 |ypad mod|e set. I|
|000021e0| 66 20 63 68 61 72 20 69 | 73 20 69 6e 76 61 6c 69 |f char i|s invali|
|000021f0| 64 2c 20 72 65 74 75 72 | 6e 73 20 2d 31 2e 20 20 |d, retur|ns -1. |
|00002200| 0a 58 0a 58 09 5f 63 75 | 72 73 65 73 70 65 6e 64 |.X.X._cu|rsespend|
|00002210| 63 68 28 29 20 72 65 74 | 75 72 6e 73 20 31 20 69 |ch() ret|urns 1 i|
|00002220| 66 20 74 68 65 72 65 20 | 69 73 20 61 6e 79 20 63 |f there |is any c|
|00002230| 68 61 72 61 63 74 65 72 | 20 61 76 61 69 2d 20 20 |haracter| avai- |
|00002240| 0a 58 09 6c 61 62 6c 65 | 2c 20 61 6e 64 20 30 20 |.X.lable|, and 0 |
|00002250| 69 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 6e 65 |if there| is none|
|00002260| 2e 20 74 68 69 73 20 69 | 73 20 6e 6f 74 20 66 6f |. this i|s not fo|
|00002270| 72 20 70 72 6f 67 72 61 | 6d 6d 65 72 20 20 0a 58 |r progra|mmer .X|
|00002280| 09 75 73 61 67 65 2c 20 | 62 75 74 20 66 6f 72 20 |.usage, |but for |
|00002290| 74 68 65 20 75 70 64 61 | 74 65 77 20 72 6f 75 74 |the upda|tew rout|
|000022a0| 69 6e 65 73 2e 20 20 0a | 58 0a 58 45 58 41 4d 50 |ines. .|X.XEXAMP|
|000022b0| 4c 45 53 0a 58 0a 58 53 | 45 45 20 41 4c 53 4f 0a |LES.X.XS|EE ALSO.|
|000022c0| 58 09 72 61 77 67 65 74 | 63 68 28 29 3b 20 5f 63 |X.rawget|ch(); _c|
|000022d0| 75 72 73 65 73 67 63 62 | 28 29 3b 20 5f 63 75 72 |ursesgcb|(); _cur|
|000022e0| 73 65 73 73 63 62 28 29 | 3b 20 73 79 73 67 65 74 |sesscb()|; sysget|
|000022f0| 63 68 28 29 3b 20 5f 63 | 75 72 73 65 73 73 63 62 |ch(); _c|ursesscb|
|00002300| 28 29 3b 0a 58 09 77 61 | 64 64 63 68 28 29 3b 20 |();.X.wa|ddch(); |
|00002310| 77 72 65 66 72 65 73 68 | 28 29 3b 20 5f 63 75 72 |wrefresh|(); _cur|
|00002320| 73 65 73 6b 65 79 28 29 | 3b 20 6b 62 68 69 74 28 |seskey()|; kbhit(|
|00002330| 29 3b 20 67 65 74 63 68 | 28 29 3b 20 77 6d 6f 76 |); getch|(); wmov|
|00002340| 65 28 29 3b 0a 58 09 77 | 67 65 74 63 68 28 29 3b |e();.X.w|getch();|
|00002350| 20 5f 63 75 72 73 65 73 | 6b 65 79 74 73 74 28 29 | _curses|keytst()|
|00002360| 3b 20 76 61 6c 69 64 63 | 68 61 72 28 29 3b 0a 58 |; validc|har();.X|
|00002370| 0a 58 42 55 47 53 0a 53 | 48 41 52 5f 45 4f 46 0a |.XBUGS.S|HAR_EOF.|
|00002380| 69 66 20 74 65 73 74 20 | 32 32 32 33 20 2d 6e 65 |if test |2223 -ne|
|00002390| 20 22 60 77 63 20 2d 63 | 20 3c 20 27 6d 76 67 65 | "`wc -c| < 'mvge|
|000023a0| 74 63 68 2e 6d 27 60 22 | 0a 74 68 65 6e 0a 09 65 |tch.m'`"|.then..e|
|000023b0| 63 68 6f 20 73 68 61 72 | 3a 20 65 72 72 6f 72 20 |cho shar|: error |
|000023c0| 74 72 61 6e 73 6d 69 74 | 74 69 6e 67 20 22 27 6d |transmit|ting "'m|
|000023d0| 76 67 65 74 63 68 2e 6d | 27 22 20 27 28 73 68 6f |vgetch.m|'" '(sho|
|000023e0| 75 6c 64 20 68 61 76 65 | 20 62 65 65 6e 20 32 32 |uld have| been 22|
|000023f0| 32 33 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |23 chara|cters)'.|
|00002400| 66 69 0a 66 69 20 23 20 | 65 6e 64 20 6f 66 20 6f |fi.fi # |end of o|
|00002410| 76 65 72 77 72 69 74 69 | 6e 67 20 63 68 65 63 6b |verwriti|ng check|
|00002420| 0a 65 63 68 6f 20 73 68 | 61 72 3a 20 65 78 74 72 |.echo sh|ar: extr|
|00002430| 61 63 74 69 6e 67 20 22 | 27 6d 76 70 72 69 6e 74 |acting "|'mvprint|
|00002440| 77 2e 6d 27 22 20 27 28 | 32 32 37 35 20 63 68 61 |w.m'" '(|2275 cha|
|00002450| 72 61 63 74 65 72 73 29 | 27 0a 69 66 20 74 65 73 |racters)|'.if tes|
|00002460| 74 20 2d 66 20 27 6d 76 | 70 72 69 6e 74 77 2e 6d |t -f 'mv|printw.m|
|00002470| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00002480| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00002490| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|000024a0| 66 69 6c 65 20 22 27 6d | 76 70 72 69 6e 74 77 2e |file "'m|vprintw.|
|000024b0| 6d 27 22 0a 65 6c 73 65 | 0a 73 65 64 20 27 73 2f |m'".else|.sed 's/|
|000024c0| 5e 58 2f 2f 27 20 3c 3c | 20 5c 53 48 41 52 5f 45 |^X//' <<| \SHAR_E|
|000024d0| 4f 46 20 3e 20 27 6d 76 | 70 72 69 6e 74 77 2e 6d |OF > 'mv|printw.m|
|000024e0| 27 0a 58 4e 41 4d 45 0a | 58 09 77 70 72 69 6e 74 |'.XNAME.|X.wprint|
|000024f0| 77 28 29 20 70 72 69 6e | 74 77 28 29 20 6d 76 70 |w() prin|tw() mvp|
|00002500| 72 69 6e 74 77 28 29 20 | 6d 76 77 70 72 69 6e 74 |rintw() |mvwprint|
|00002510| 77 28 29 20 2d 20 73 69 | 6d 75 6c 61 74 65 20 74 |w() - si|mulate t|
|00002520| 68 65 20 70 72 69 6e 74 | 66 20 66 75 6e 63 74 69 |he print|f functi|
|00002530| 6f 6e 0a 58 09 77 73 63 | 61 6e 77 28 29 20 73 63 |on.X.wsc|anw() sc|
|00002540| 61 6e 77 28 29 20 6d 76 | 73 63 61 6e 77 28 29 20 |anw() mv|scanw() |
|00002550| 6d 76 77 73 63 61 6e 77 | 28 29 20 2d 20 73 69 6d |mvwscanw|() - sim|
|00002560| 75 6c 61 74 65 20 74 68 | 65 20 73 63 61 6e 66 20 |ulate th|e scanf |
|00002570| 66 75 6e 63 74 69 6f 6e | 0a 58 09 70 62 6c 65 6e |function|.X.pblen|
|00002580| 28 29 20 2d 20 72 65 74 | 75 72 6e 20 6c 65 6e 67 |() - ret|urn leng|
|00002590| 74 68 20 6f 66 20 73 74 | 72 69 6e 67 0a 58 0a 58 |th of st|ring.X.X|
|000025a0| 53 59 4e 4f 50 53 49 53 | 0a 58 09 23 69 6e 63 6c |SYNOPSIS|.X.#incl|
|000025b0| 75 64 65 20 3c 63 75 72 | 73 65 73 2e 68 3e 0a 58 |ude <cur|ses.h>.X|
|000025c0| 09 23 69 6e 63 6c 75 64 | 65 20 3c 63 75 72 73 70 |.#includ|e <cursp|
|000025d0| 72 69 76 2e 68 3e 0a 58 | 0a 58 09 69 6e 74 20 77 |riv.h>.X|.X.int w|
|000025e0| 70 72 69 6e 74 77 28 77 | 69 6e 2c 66 6d 74 2c 41 |printw(w|in,fmt,A|
|000025f0| 31 2c 41 32 2c 41 33 2c | 41 34 2c 41 35 29 0a 58 |1,A2,A3,|A4,A5).X|
|00002600| 09 57 49 4e 44 4f 57 20 | 2a 77 69 6e 3b 0a 58 09 |.WINDOW |*win;.X.|
|00002610| 63 68 61 72 20 2a 66 6d | 74 3b 0a 58 09 64 6f 75 |char *fm|t;.X.dou|
|00002620| 62 6c 65 20 41 31 2c 41 | 32 2c 41 33 2c 41 34 2c |ble A1,A|2,A3,A4,|
|00002630| 41 35 3b 0a 58 0a 58 09 | 69 6e 74 20 70 72 69 6e |A5;.X.X.|int prin|
|00002640| 74 77 28 66 6d 74 2c 41 | 31 2c 41 32 2c 41 33 2c |tw(fmt,A|1,A2,A3,|
|00002650| 41 34 2c 41 35 29 0a 58 | 09 63 68 61 72 20 2a 66 |A4,A5).X|.char *f|
|00002660| 6d 74 3b 0a 58 09 64 6f | 75 62 6c 65 20 41 31 2c |mt;.X.do|uble A1,|
|00002670| 41 32 2c 41 33 2c 41 34 | 2c 41 35 3b 0a 58 0a 58 |A2,A3,A4|,A5;.X.X|
|00002680| 09 69 6e 74 20 6d 76 70 | 72 69 6e 74 77 28 79 2c |.int mvp|rintw(y,|
|00002690| 78 2c 66 6d 74 2c 41 31 | 2c 41 32 2c 41 33 2c 41 |x,fmt,A1|,A2,A3,A|
|000026a0| 34 2c 41 35 29 0a 58 09 | 69 6e 74 20 79 3b 0a 58 |4,A5).X.|int y;.X|
|000026b0| 09 69 6e 74 20 78 3b 0a | 58 09 63 68 61 72 20 2a |.int x;.|X.char *|
|000026c0| 66 6d 74 3b 0a 58 09 64 | 6f 75 62 6c 65 20 41 31 |fmt;.X.d|ouble A1|
|000026d0| 2c 41 32 2c 41 33 2c 41 | 34 2c 41 35 3b 0a 58 0a |,A2,A3,A|4,A5;.X.|
|000026e0| 58 09 69 6e 74 20 6d 76 | 77 70 72 69 6e 74 77 28 |X.int mv|wprintw(|
|000026f0| 77 69 6e 2c 79 2c 78 2c | 66 6d 74 2c 41 31 2c 41 |win,y,x,|fmt,A1,A|
|00002700| 32 2c 41 33 2c 41 34 2c | 41 35 29 0a 58 09 57 49 |2,A3,A4,|A5).X.WI|
|00002710| 4e 44 4f 57 20 2a 77 69 | 6e 3b 0a 58 09 69 6e 74 |NDOW *wi|n;.X.int|
|00002720| 20 79 3b 0a 58 09 69 6e | 74 20 78 3b 0a 58 09 63 | y;.X.in|t x;.X.c|
|00002730| 68 61 72 20 2a 66 6d 74 | 3b 0a 58 09 64 6f 75 62 |har *fmt|;.X.doub|
|00002740| 6c 65 20 41 31 2c 41 32 | 2c 41 33 2c 41 34 2c 41 |le A1,A2|,A3,A4,A|
|00002750| 35 3b 0a 58 0a 58 09 69 | 6e 74 20 77 73 63 61 6e |5;.X.X.i|nt wscan|
|00002760| 77 28 77 69 6e 2c 66 6d | 74 2c 41 31 2c 41 32 2c |w(win,fm|t,A1,A2,|
|00002770| 41 33 2c 41 34 2c 41 35 | 29 0a 58 09 57 49 4e 44 |A3,A4,A5|).X.WIND|
|00002780| 4f 57 20 2a 77 69 6e 3b | 0a 58 09 63 68 61 72 20 |OW *win;|.X.char |
|00002790| 2a 66 6d 74 3b 0a 58 09 | 64 6f 75 62 6c 65 20 41 |*fmt;.X.|double A|
|000027a0| 31 2c 41 32 2c 41 33 2c | 41 34 2c 41 35 3b 20 2f |1,A2,A3,|A4,A5; /|
|000027b0| 2a 20 72 65 61 6c 6c 79 | 20 70 6f 69 6e 74 65 72 |* really| pointer|
|000027c0| 73 20 2a 2f 0a 58 0a 58 | 09 69 6e 74 20 73 63 61 |s */.X.X|.int sca|
|000027d0| 6e 77 28 66 6d 74 2c 41 | 31 2c 41 32 2c 41 33 2c |nw(fmt,A|1,A2,A3,|
|000027e0| 41 34 2c 41 35 29 0a 58 | 09 63 68 61 72 20 2a 66 |A4,A5).X|.char *f|
|000027f0| 6d 74 3b 0a 58 09 64 6f | 75 62 6c 65 20 41 31 2c |mt;.X.do|uble A1,|
|00002800| 41 32 2c 41 33 2c 41 34 | 2c 41 35 3b 20 2f 2a 20 |A2,A3,A4|,A5; /* |
|00002810| 72 65 61 6c 6c 79 20 70 | 6f 69 6e 74 65 72 73 20 |really p|ointers |
|00002820| 2a 2f 0a 58 0a 58 09 69 | 6e 74 20 6d 76 73 63 61 |*/.X.X.i|nt mvsca|
|00002830| 6e 77 28 79 2c 78 2c 66 | 6d 74 2c 41 31 2c 41 32 |nw(y,x,f|mt,A1,A2|
|00002840| 2c 41 33 2c 41 34 2c 41 | 35 29 0a 58 09 69 6e 74 |,A3,A4,A|5).X.int|
|00002850| 20 79 3b 0a 58 09 69 6e | 74 20 78 3b 0a 58 09 63 | y;.X.in|t x;.X.c|
|00002860| 68 61 72 20 2a 66 6d 74 | 3b 0a 58 09 64 6f 75 62 |har *fmt|;.X.doub|
|00002870| 6c 65 20 41 31 2c 41 32 | 2c 41 33 2c 41 34 2c 41 |le A1,A2|,A3,A4,A|
|00002880| 35 3b 20 2f 2a 20 72 65 | 61 6c 6c 79 20 70 6f 69 |5; /* re|ally poi|
|00002890| 6e 74 65 72 73 20 2a 2f | 0a 58 0a 58 09 69 6e 74 |nters */|.X.X.int|
|000028a0| 20 6d 76 77 73 63 61 6e | 77 28 77 69 6e 2c 79 2c | mvwscan|w(win,y,|
|000028b0| 78 2c 66 6d 74 2c 41 31 | 2c 41 32 2c 41 33 2c 41 |x,fmt,A1|,A2,A3,A|
|000028c0| 34 2c 41 35 29 0a 58 09 | 57 49 4e 44 4f 57 20 2a |4,A5).X.|WINDOW *|
|000028d0| 77 69 6e 3b 0a 58 09 69 | 6e 74 20 79 3b 0a 58 09 |win;.X.i|nt y;.X.|
|000028e0| 69 6e 74 20 78 3b 0a 58 | 09 63 68 61 72 20 2a 66 |int x;.X|.char *f|
|000028f0| 6d 74 3b 0a 58 09 64 6f | 75 62 6c 65 20 41 31 2c |mt;.X.do|uble A1,|
|00002900| 41 32 2c 41 33 2c 41 34 | 2c 41 35 3b 20 2f 2a 20 |A2,A3,A4|,A5; /* |
|00002910| 72 65 61 6c 6c 79 20 70 | 6f 69 6e 74 65 72 73 20 |really p|ointers |
|00002920| 2a 2f 0a 58 0a 58 09 73 | 74 61 74 69 63 20 69 6e |*/.X.X.s|tatic in|
|00002930| 74 20 70 62 6c 65 6e 28 | 29 0a 58 0a 58 44 45 53 |t pblen(|).X.XDES|
|00002940| 43 52 49 50 54 49 4f 4e | 0a 58 09 77 70 72 69 6e |CRIPTION|.X.wprin|
|00002950| 74 77 28 29 20 64 6f 65 | 73 20 61 20 70 72 69 6e |tw() doe|s a prin|
|00002960| 74 66 28 29 20 69 6e 20 | 77 69 6e 64 6f 77 20 27 |tf() in |window '|
|00002970| 77 69 6e 27 2e 20 20 0a | 58 0a 58 09 70 72 69 6e |win'. .|X.X.prin|
|00002980| 74 77 28 29 20 64 6f 65 | 73 20 61 20 70 72 69 6e |tw() doe|s a prin|
|00002990| 74 66 28 29 20 69 6e 20 | 73 74 64 73 63 72 2e 20 |tf() in |stdscr. |
|000029a0| 20 0a 58 0a 58 09 6d 76 | 70 72 69 6e 74 77 28 29 | .X.X.mv|printw()|
|000029b0| 20 6d 6f 76 65 73 20 74 | 68 65 20 73 74 64 73 63 | moves t|he stdsc|
|000029c0| 72 20 63 75 72 73 6f 72 | 20 74 6f 20 61 20 6e 65 |r cursor| to a ne|
|000029d0| 77 20 70 6f 73 69 2d 20 | 20 0a 58 09 74 69 6f 6e |w posi- | .X.tion|
|000029e0| 2c 20 74 68 65 6e 20 64 | 6f 65 73 20 61 20 70 72 |, then d|oes a pr|
|000029f0| 69 6e 74 66 28 29 20 69 | 6e 20 73 74 64 73 63 72 |intf() i|n stdscr|
|00002a00| 2e 20 20 0a 58 0a 58 09 | 6d 76 77 70 72 69 6e 74 |. .X.X.|mvwprint|
|00002a10| 77 28 29 20 6d 6f 76 65 | 73 20 74 68 65 20 77 69 |w() move|s the wi|
|00002a20| 6e 64 6f 77 20 27 77 69 | 6e 27 73 20 63 75 72 73 |ndow 'wi|n's curs|
|00002a30| 6f 72 20 74 6f 20 20 0a | 58 09 61 20 6e 65 77 20 |or to .|X.a new |
|00002a40| 70 6f 73 69 74 69 6f 6e | 2c 20 74 68 65 6e 20 64 |position|, then d|
|00002a50| 6f 65 73 20 61 20 70 72 | 69 6e 74 66 28 29 20 69 |oes a pr|intf() i|
|00002a60| 6e 20 77 69 6e 64 6f 77 | 20 27 77 69 6e 27 2e 20 |n window| 'win'. |
|00002a70| 20 0a 58 0a 58 09 77 73 | 63 61 6e 77 28 29 20 67 | .X.X.ws|canw() g|
|00002a80| 65 74 73 20 61 20 73 74 | 72 69 6e 67 20 76 69 61 |ets a st|ring via|
|00002a90| 20 77 69 6e 64 6f 77 20 | 27 77 69 6e 27 2c 20 74 | window |'win', t|
|00002aa0| 68 65 6e 20 20 0a 58 09 | 73 63 61 6e 73 20 74 68 |hen .X.|scans th|
|00002ab0| 65 20 73 74 72 69 6e 67 | 20 75 73 69 6e 67 20 66 |e string| using f|
|00002ac0| 6f 72 6d 61 74 20 27 66 | 6d 74 27 20 74 6f 20 65 |ormat 'f|mt' to e|
|00002ad0| 78 74 72 61 63 74 20 74 | 68 65 20 76 61 6c 75 65 |xtract t|he value|
|00002ae0| 73 20 20 0a 58 09 61 6e | 64 20 70 75 74 20 74 68 |s .X.an|d put th|
|00002af0| 65 6d 20 69 6e 20 74 68 | 65 20 76 61 72 69 61 62 |em in th|e variab|
|00002b00| 6c 65 73 20 70 6f 69 6e | 74 65 64 20 74 6f 20 74 |les poin|ted to t|
|00002b10| 68 65 20 61 72 67 75 6d | 65 6e 74 73 2e 20 20 0a |he argum|ents. .|
|00002b20| 58 0a 58 09 73 63 61 6e | 77 28 29 20 67 65 74 73 |X.X.scan|w() gets|
|00002b30| 20 61 20 73 74 72 69 6e | 67 20 76 69 61 20 73 74 | a strin|g via st|
|00002b40| 64 73 63 72 2c 20 74 68 | 65 6e 20 73 63 61 6e 73 |dscr, th|en scans|
|00002b50| 20 74 68 65 20 20 0a 58 | 09 73 74 72 69 6e 67 20 | the .X|.string |
|00002b60| 75 73 69 6e 67 20 66 6f | 72 6d 61 74 20 27 66 6d |using fo|rmat 'fm|
|00002b70| 74 27 20 74 6f 20 65 78 | 74 72 61 63 74 20 74 68 |t' to ex|tract th|
|00002b80| 65 20 76 61 6c 75 65 73 | 20 61 6e 64 20 70 75 74 |e values| and put|
|00002b90| 20 74 68 65 6d 20 20 0a | 58 09 69 6e 20 74 68 65 | them .|X.in the|
|00002ba0| 20 76 61 72 69 61 62 6c | 65 73 20 70 6f 69 6e 74 | variabl|es point|
|00002bb0| 65 64 20 74 6f 20 74 68 | 65 20 61 72 67 75 6d 65 |ed to th|e argume|
|00002bc0| 6e 74 73 2e 20 20 0a 58 | 0a 58 09 6d 76 73 63 61 |nts. .X|.X.mvsca|
|00002bd0| 6e 77 28 29 20 6d 6f 76 | 65 73 20 73 74 64 73 63 |nw() mov|es stdsc|
|00002be0| 72 27 73 20 63 75 72 73 | 6f 72 20 74 6f 20 61 20 |r's curs|or to a |
|00002bf0| 6e 65 77 20 70 6f 73 69 | 2d 20 20 0a 58 09 74 69 |new posi|- .X.ti|
|00002c00| 6f 6e 2c 20 74 68 65 6e | 20 67 65 74 73 20 61 20 |on, then| gets a |
|00002c10| 73 74 72 69 6e 67 20 76 | 69 61 20 73 74 64 73 63 |string v|ia stdsc|
|00002c20| 72 20 61 6e 64 20 73 63 | 61 6e 73 20 74 68 65 20 |r and sc|ans the |
|00002c30| 73 74 72 69 6e 67 20 20 | 0a 58 09 75 73 69 6e 67 |string |.X.using|
|00002c40| 20 66 6f 72 6d 61 74 20 | 27 66 6d 74 27 20 74 6f | format |'fmt' to|
|00002c50| 20 65 78 74 72 61 63 74 | 20 74 68 65 20 76 61 6c | extract| the val|
|00002c60| 75 65 73 20 61 6e 64 20 | 70 75 74 20 74 68 65 6d |ues and |put them|
|00002c70| 20 69 6e 20 74 68 65 20 | 20 0a 58 09 76 61 72 69 | in the | .X.vari|
|00002c80| 61 62 6c 65 73 20 70 6f | 69 6e 74 65 64 20 74 6f |ables po|inted to|
|00002c90| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 73 2e 20 | the arg|uments. |
|00002ca0| 20 0a 58 0a 58 09 6d 76 | 77 73 63 61 6e 77 28 29 | .X.X.mv|wscanw()|
|00002cb0| 20 6d 6f 76 65 73 20 77 | 69 6e 64 6f 77 20 27 77 | moves w|indow 'w|
|00002cc0| 69 6e 27 73 20 63 75 72 | 73 6f 72 20 74 6f 20 61 |in's cur|sor to a|
|00002cd0| 20 20 0a 58 09 6e 65 77 | 20 70 6f 73 69 74 69 6f | .X.new| positio|
|00002ce0| 6e 2c 20 74 68 65 6e 20 | 67 65 74 73 20 61 20 73 |n, then |gets a s|
|00002cf0| 74 72 69 6e 67 20 76 69 | 61 20 27 77 69 6e 27 20 |tring vi|a 'win' |
|00002d00| 61 6e 64 20 73 63 61 6e | 73 20 74 68 65 20 20 0a |and scan|s the .|
|00002d10| 58 09 73 74 72 69 6e 67 | 20 75 73 69 6e 67 20 66 |X.string| using f|
|00002d20| 6f 72 6d 61 74 20 27 66 | 6d 74 27 20 74 6f 20 65 |ormat 'f|mt' to e|
|00002d30| 78 74 72 61 63 74 20 74 | 68 65 20 76 61 6c 75 65 |xtract t|he value|
|00002d40| 73 20 61 6e 64 20 70 75 | 74 20 74 68 65 6d 20 20 |s and pu|t them |
|00002d50| 0a 58 09 69 6e 20 74 68 | 65 20 76 61 72 69 61 62 |.X.in th|e variab|
|00002d60| 6c 65 73 20 70 6f 69 6e | 74 65 64 20 74 6f 20 74 |les poin|ted to t|
|00002d70| 68 65 20 61 72 67 75 6d | 65 6e 74 73 2e 20 20 0a |he argum|ents. .|
|00002d80| 58 0a 58 09 70 62 6c 65 | 6e 28 29 20 72 65 74 75 |X.X.pble|n() retu|
|00002d90| 72 6e 73 20 74 68 65 20 | 6c 65 6e 67 74 68 20 6f |rns the |length o|
|00002da0| 66 20 74 68 65 20 73 74 | 72 69 6e 67 20 69 6e 20 |f the st|ring in |
|00002db0| 70 72 69 6e 74 73 63 61 | 6e 62 75 66 2e 20 20 0a |printsca|nbuf. .|
|00002dc0| 58 0a 58 45 58 41 4d 50 | 4c 45 53 0a 58 0a 58 53 |X.XEXAMP|LES.X.XS|
|00002dd0| 45 45 20 41 4c 53 4f 0a | 58 09 73 70 72 69 6e 74 |EE ALSO.|X.sprint|
|00002de0| 66 28 29 3b 20 77 61 64 | 64 73 74 72 28 29 3b 20 |f(); wad|dstr(); |
|00002df0| 77 6d 6f 76 65 28 29 3b | 20 77 72 65 66 72 65 73 |wmove();| wrefres|
|00002e00| 68 28 29 3b 20 77 67 65 | 74 73 74 72 28 29 3b 20 |h(); wge|tstr(); |
|00002e10| 73 73 63 61 6e 66 28 29 | 0a 58 0a 58 42 55 47 53 |sscanf()|.X.XBUGS|
|00002e20| 0a 53 48 41 52 5f 45 4f | 46 0a 69 66 20 74 65 73 |.SHAR_EO|F.if tes|
|00002e30| 74 20 32 32 37 35 20 2d | 6e 65 20 22 60 77 63 20 |t 2275 -|ne "`wc |
|00002e40| 2d 63 20 3c 20 27 6d 76 | 70 72 69 6e 74 77 2e 6d |-c < 'mv|printw.m|
|00002e50| 27 60 22 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |'`".then|..echo s|
|00002e60| 68 61 72 3a 20 65 72 72 | 6f 72 20 74 72 61 6e 73 |har: err|or trans|
|00002e70| 6d 69 74 74 69 6e 67 20 | 22 27 6d 76 70 72 69 6e |mitting |"'mvprin|
|00002e80| 74 77 2e 6d 27 22 20 27 | 28 73 68 6f 75 6c 64 20 |tw.m'" '|(should |
|00002e90| 68 61 76 65 20 62 65 65 | 6e 20 32 32 37 35 20 63 |have bee|n 2275 c|
|00002ea0| 68 61 72 61 63 74 65 72 | 73 29 27 0a 66 69 0a 66 |haracter|s)'.fi.f|
|00002eb0| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00002ec0| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 65 63 68 |riting c|heck.ech|
|00002ed0| 6f 20 73 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 |o shar: |extracti|
|00002ee0| 6e 67 20 22 27 6d 76 77 | 67 65 74 63 68 2e 6d 27 |ng "'mvw|getch.m'|
|00002ef0| 22 20 27 28 32 32 32 33 | 20 63 68 61 72 61 63 74 |" '(2223| charact|
|00002f00| 65 72 73 29 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |ers)'.if| test -f|
|00002f10| 20 27 6d 76 77 67 65 74 | 63 68 2e 6d 27 0a 74 68 | 'mvwget|ch.m'.th|
|00002f20| 65 6e 0a 09 65 63 68 6f | 20 73 68 61 72 3a 20 77 |en..echo| shar: w|
|00002f30| 69 6c 6c 20 6e 6f 74 20 | 6f 76 65 72 2d 77 72 69 |ill not |over-wri|
|00002f40| 74 65 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |te exist|ing file|
|00002f50| 20 22 27 6d 76 77 67 65 | 74 63 68 2e 6d 27 22 0a | "'mvwge|tch.m'".|
|00002f60| 65 6c 73 65 0a 73 65 64 | 20 27 73 2f 5e 58 2f 2f |else.sed| 's/^X//|
|00002f70| 27 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |' << \SH|AR_EOF >|
|00002f80| 20 27 6d 76 77 67 65 74 | 63 68 2e 6d 27 0a 58 4e | 'mvwget|ch.m'.XN|
|00002f90| 41 4d 45 0a 58 09 67 65 | 74 63 68 28 29 20 2d 20 |AME.X.ge|tch() - |
|00002fa0| 2a 2a 2a 73 61 6d 65 20 | 61 73 20 77 67 65 74 63 |***same |as wgetc|
|00002fb0| 68 28 29 2a 2a 2a 20 73 | 65 65 20 63 75 72 73 65 |h()*** s|ee curse|
|00002fc0| 73 2e 68 0a 58 09 77 67 | 65 74 63 68 28 29 20 66 |s.h.X.wg|etch() f|
|00002fd0| 6c 75 73 68 69 6e 70 28 | 29 20 77 75 6e 67 65 74 |lushinp(|) wunget|
|00002fe0| 63 68 28 29 20 6d 76 67 | 65 74 63 68 28 29 20 6d |ch() mvg|etch() m|
|00002ff0| 76 77 67 65 74 63 68 28 | 29 20 72 61 77 67 65 74 |vwgetch(|) rawget|
|00003000| 63 68 28 29 20 0a 58 09 | 73 79 73 67 65 74 63 68 |ch() .X.|sysgetch|
|00003010| 28 29 20 76 61 6c 69 64 | 63 68 61 72 28 29 20 5f |() valid|char() _|
|00003020| 63 75 72 73 65 73 70 65 | 6e 64 63 68 28 29 20 2d |cursespe|ndch() -|
|00003030| 20 6d 61 6e 69 70 75 6c | 61 74 65 20 69 6e 70 75 | manipul|ate inpu|
|00003040| 74 20 63 68 61 72 61 63 | 74 65 72 73 0a 58 0a 58 |t charac|ters.X.X|
|00003050| 53 59 4e 4f 50 53 49 53 | 0a 58 09 23 69 6e 63 6c |SYNOPSIS|.X.#incl|
|00003060| 75 64 65 20 3c 63 75 72 | 73 65 73 2e 68 3e 0a 58 |ude <cur|ses.h>.X|
|00003070| 09 23 69 6e 63 6c 75 64 | 65 20 3c 63 75 72 73 70 |.#includ|e <cursp|
|00003080| 72 69 76 2e 68 3e 0a 58 | 0a 58 09 69 6e 74 20 77 |riv.h>.X|.X.int w|
|00003090| 67 65 74 63 68 28 77 69 | 6e 29 0a 58 09 57 49 4e |getch(wi|n).X.WIN|
|000030a0| 44 4f 57 20 2a 77 69 6e | 3b 0a 58 0a 58 09 76 6f |DOW *win|;.X.X.vo|
|000030b0| 69 64 20 66 6c 75 73 68 | 69 6e 70 28 29 0a 58 0a |id flush|inp().X.|
|000030c0| 58 09 69 6e 74 20 77 75 | 6e 67 65 74 63 68 28 63 |X.int wu|ngetch(c|
|000030d0| 68 29 0a 58 09 69 6e 74 | 20 63 68 3b 0a 58 0a 58 |h).X.int| ch;.X.X|
|000030e0| 09 69 6e 74 20 6d 76 67 | 65 74 63 68 28 79 2c 78 |.int mvg|etch(y,x|
|000030f0| 29 0a 58 09 69 6e 74 20 | 79 3b 0a 58 09 69 6e 74 |).X.int |y;.X.int|
|00003100| 20 78 3b 0a 58 0a 58 09 | 69 6e 74 20 6d 76 77 67 | x;.X.X.|int mvwg|
|00003110| 65 74 63 68 28 77 69 6e | 2c 79 2c 78 29 0a 58 09 |etch(win|,y,x).X.|
|00003120| 57 49 4e 44 4f 57 20 2a | 77 69 6e 3b 0a 58 09 69 |WINDOW *|win;.X.i|
|00003130| 6e 74 20 79 3b 0a 58 09 | 69 6e 74 20 78 3b 0a 58 |nt y;.X.|int x;.X|
|00003140| 0a 58 09 73 74 61 74 69 | 63 20 69 6e 74 20 72 61 |.X.stati|c int ra|
|00003150| 77 67 65 74 63 68 28 29 | 0a 58 0a 58 09 73 74 61 |wgetch()|.X.X.sta|
|00003160| 74 69 63 20 69 6e 74 20 | 73 79 73 67 65 74 63 68 |tic int |sysgetch|
|00003170| 28 29 0a 58 0a 58 09 73 | 74 61 74 69 63 20 69 6e |().X.X.s|tatic in|
|00003180| 74 20 76 61 6c 69 64 63 | 68 61 72 28 63 29 0a 58 |t validc|har(c).X|
|00003190| 09 69 6e 74 20 63 3b 0a | 58 0a 58 09 62 6f 6f 6c |.int c;.|X.X.bool|
|000031a0| 20 5f 63 75 72 73 65 73 | 70 65 6e 64 63 68 28 29 | _curses|pendch()|
|000031b0| 0a 58 0a 58 44 45 53 43 | 52 49 50 54 49 4f 4e 0a |.X.XDESC|RIPTION.|
|000031c0| 58 09 77 67 65 74 63 68 | 28 77 69 6e 29 20 67 65 |X.wgetch|(win) ge|
|000031d0| 74 73 20 61 20 63 68 61 | 72 61 63 74 65 72 20 66 |ts a cha|racter f|
|000031e0| 72 6f 6d 20 74 68 65 20 | 74 65 72 6d 69 6e 61 6c |rom the |terminal|
|000031f0| 2c 20 69 6e 20 6e 6f 72 | 6d 61 6c 2c 20 20 0a 58 |, in nor|mal, .X|
|00003200| 09 63 62 72 65 61 6b 20 | 6f 72 20 72 61 77 20 6d |.cbreak |or raw m|
|00003210| 6f 64 65 2c 20 6f 70 74 | 69 6f 6e 61 6c 6c 79 20 |ode, opt|ionally |
|00003220| 65 63 68 6f 69 6e 67 20 | 74 6f 20 77 69 6e 64 6f |echoing |to windo|
|00003230| 77 20 27 77 69 6e 27 2e | 20 20 0a 58 0a 58 09 66 |w 'win'.| .X.X.f|
|00003240| 6c 75 73 68 69 6e 70 28 | 29 20 6b 69 6c 6c 73 20 |lushinp(|) kills |
|00003250| 61 6e 79 20 70 65 6e 64 | 69 6e 67 20 69 6e 70 75 |any pend|ing inpu|
|00003260| 74 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 20 0a |t charac|ters. .|
|00003270| 58 0a 58 09 77 75 6e 67 | 65 74 63 68 28 29 20 70 |X.X.wung|etch() p|
|00003280| 75 73 68 65 73 20 62 61 | 63 6b 20 69 74 27 73 20 |ushes ba|ck it's |
|00003290| 61 72 67 75 6d 65 6e 74 | 20 6f 6e 20 74 68 65 20 |argument| on the |
|000032a0| 69 6e 70 75 74 20 73 74 | 72 65 61 6d 2e 20 49 66 |input st|ream. If|
|000032b0| 20 20 0a 58 09 4f 4b 2c | 20 72 65 74 75 72 6e 73 | .X.OK,| returns|
|000032c0| 20 31 2c 20 6f 74 68 65 | 72 77 69 73 65 20 72 65 | 1, othe|rwise re|
|000032d0| 74 75 72 6e 73 20 30 2e | 20 20 0a 58 0a 58 09 6d |turns 0.| .X.X.m|
|000032e0| 76 67 65 74 63 68 28 29 | 20 66 69 72 73 74 20 6d |vgetch()| first m|
|000032f0| 6f 76 65 73 20 74 68 65 | 20 73 74 64 73 63 72 20 |oves the| stdscr |
|00003300| 63 75 72 73 6f 72 20 74 | 6f 20 61 20 6e 65 77 20 |cursor t|o a new |
|00003310| 6c 6f 63 61 74 69 6f 6e | 2c 20 20 0a 58 09 74 68 |location|, .X.th|
|00003320| 65 6e 20 64 6f 65 73 20 | 61 20 77 67 65 74 63 68 |en does |a wgetch|
|00003330| 28 29 20 6f 6e 20 73 74 | 64 73 63 72 2e 20 20 0a |() on st|dscr. .|
|00003340| 58 0a 58 09 6d 76 77 67 | 65 74 63 68 28 29 20 66 |X.X.mvwg|etch() f|
|00003350| 69 72 73 74 20 6d 6f 76 | 65 73 20 74 68 65 20 63 |irst mov|es the c|
|00003360| 75 72 73 6f 72 20 6f 66 | 20 77 69 6e 64 6f 77 20 |ursor of| window |
|00003370| 27 77 69 6e 27 20 74 6f | 20 61 20 6e 65 77 20 20 |'win' to| a new |
|00003380| 0a 58 09 6c 6f 63 61 74 | 69 6f 6e 2c 20 74 68 65 |.X.locat|ion, the|
|00003390| 6e 20 64 6f 65 73 20 61 | 20 77 67 65 74 63 68 28 |n does a| wgetch(|
|000033a0| 29 20 69 6e 20 27 77 69 | 6e 27 2e 20 20 0a 58 0a |) in 'wi|n'. .X.|
|000033b0| 58 09 72 61 77 67 65 74 | 63 68 28 29 20 67 65 74 |X.rawget|ch() get|
|000033c0| 73 20 61 20 63 68 61 72 | 61 63 74 65 72 20 77 69 |s a char|acter wi|
|000033d0| 74 68 6f 75 74 20 61 6e | 79 20 69 6e 74 65 72 70 |thout an|y interp|
|000033e0| 72 65 74 61 74 69 6f 6e | 20 61 74 20 20 0a 58 09 |retation| at .X.|
|000033f0| 61 6c 6c 20 61 6e 64 20 | 72 65 74 75 72 6e 73 20 |all and |returns |
|00003400| 69 74 2e 20 49 66 20 6b | 65 79 70 61 64 20 6d 6f |it. If k|eypad mo|
|00003410| 64 65 20 69 73 20 61 63 | 74 69 76 65 20 66 6f 72 |de is ac|tive for|
|00003420| 20 74 68 65 20 64 65 73 | 69 67 2d 20 20 0a 58 09 | the des|ig- .X.|
|00003430| 6e 61 74 65 64 20 77 69 | 6e 64 6f 77 2c 20 66 75 |nated wi|ndow, fu|
|00003440| 6e 63 74 69 6f 6e 20 6b | 65 79 20 74 72 61 6e 73 |nction k|ey trans|
|00003450| 6c 61 74 69 6f 6e 20 77 | 69 6c 6c 20 62 65 20 70 |lation w|ill be p|
|00003460| 65 72 66 6f 72 6d 65 64 | 2e 20 20 0a 58 09 4f 74 |erformed|. .X.Ot|
|00003470| 68 65 72 77 69 73 65 2c | 20 66 75 6e 63 74 69 6f |herwise,| functio|
|00003480| 6e 20 6b 65 79 73 20 61 | 72 65 20 69 67 6e 6f 72 |n keys a|re ignor|
|00003490| 65 64 2e 49 66 20 6e 6f | 64 65 6c 61 79 20 6d 6f |ed.If no|delay mo|
|000034a0| 64 65 20 69 73 20 20 0a | 58 09 61 63 74 69 76 65 |de is .|X.active|
|000034b0| 20 69 6e 20 74 68 65 20 | 77 69 6e 64 6f 77 2c 20 | in the |window, |
|000034c0| 74 68 65 6e 20 72 61 77 | 67 65 74 63 68 28 29 20 |then raw|getch() |
|000034d0| 72 65 74 75 72 6e 73 20 | 2d 31 20 69 66 20 6e 6f |returns |-1 if no|
|000034e0| 20 63 68 61 2d 20 20 0a | 58 09 72 61 63 74 65 72 | cha- .|X.racter|
|000034f0| 20 69 73 20 61 76 61 69 | 6c 61 62 6c 65 2e 20 20 | is avai|lable. |
|00003500| 0a 58 0a 58 09 73 79 73 | 67 65 74 63 68 28 29 20 |.X.X.sys|getch() |
|00003510| 67 65 74 73 20 61 20 63 | 68 61 72 61 63 74 65 72 |gets a c|haracter|
|00003520| 20 77 69 74 68 20 6e 6f | 72 6d 61 6c 20 5e 53 2c | with no|rmal ^S,|
|00003530| 20 5e 51 2c 20 5e 50 20 | 61 6e 64 20 5e 43 20 20 | ^Q, ^P |and ^C |
|00003540| 0a 58 09 69 6e 74 65 72 | 70 72 65 74 61 74 69 6f |.X.inter|pretatio|
|00003550| 6e 20 61 6e 64 20 72 65 | 74 75 72 6e 73 20 69 74 |n and re|turns it|
|00003560| 2e 20 49 66 20 6b 65 79 | 70 61 64 20 6d 6f 64 65 |. If key|pad mode|
|00003570| 20 69 73 20 61 63 74 69 | 76 65 20 66 6f 72 20 20 | is acti|ve for |
|00003580| 0a 58 09 74 68 65 20 64 | 65 73 69 67 6e 61 74 65 |.X.the d|esignate|
|00003590| 64 20 77 69 6e 64 6f 77 | 2c 20 66 75 6e 63 74 69 |d window|, functi|
|000035a0| 6f 6e 20 6b 65 79 20 74 | 72 61 6e 73 6c 61 74 69 |on key t|ranslati|
|000035b0| 6f 6e 20 77 69 6c 6c 20 | 62 65 20 70 65 72 2d 20 |on will |be per- |
|000035c0| 20 0a 58 09 66 6f 72 6d | 65 64 2e 20 4f 74 68 65 | .X.form|ed. Othe|
|000035d0| 72 77 69 73 65 2c 20 66 | 75 6e 63 74 69 6f 6e 20 |rwise, f|unction |
|000035e0| 6b 65 79 73 20 61 72 65 | 20 69 67 6e 6f 72 65 64 |keys are| ignored|
|000035f0| 2e 20 49 66 20 6e 6f 64 | 65 6c 61 79 20 20 0a 58 |. If nod|elay .X|
|00003600| 09 6d 6f 64 65 20 69 73 | 20 61 63 74 69 76 65 20 |.mode is| active |
|00003610| 69 6e 20 74 68 65 20 77 | 69 6e 64 6f 77 2c 20 74 |in the w|indow, t|
|00003620| 68 65 6e 20 73 79 73 67 | 65 74 63 68 28 29 20 72 |hen sysg|etch() r|
|00003630| 65 74 75 72 6e 73 20 2d | 31 20 69 66 20 20 0a 58 |eturns -|1 if .X|
|00003640| 09 6e 6f 20 63 68 61 72 | 61 63 74 65 72 20 69 73 |.no char|acter is|
|00003650| 20 61 76 61 69 6c 61 62 | 6c 65 2e 20 20 0a 58 0a | availab|le. .X.|
|00003660| 58 09 76 61 6c 69 64 63 | 68 61 72 28 63 29 20 63 |X.validc|har(c) c|
|00003670| 68 65 63 6b 73 20 74 68 | 61 74 20 27 63 27 20 69 |hecks th|at 'c' i|
|00003680| 73 20 61 20 76 61 6c 69 | 64 20 63 68 61 72 61 63 |s a vali|d charac|
|00003690| 74 65 72 2c 20 61 6e 64 | 20 20 0a 58 09 69 66 20 |ter, and| .X.if |
|000036a0| 73 6f 20 72 65 74 75 72 | 6e 73 20 69 74 2c 20 77 |so retur|ns it, w|
|000036b0| 69 74 68 20 66 75 6e 63 | 74 69 6f 6e 20 6b 65 79 |ith func|tion key|
|000036c0| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 20 61 70 70 | transla|tion app|
|000036d0| 6c 69 65 64 20 69 66 20 | 20 0a 58 09 27 77 27 20 |lied if | .X.'w' |
|000036e0| 68 61 73 20 6b 65 79 70 | 61 64 20 6d 6f 64 65 20 |has keyp|ad mode |
|000036f0| 73 65 74 2e 20 49 66 20 | 63 68 61 72 20 69 73 20 |set. If |char is |
|00003700| 69 6e 76 61 6c 69 64 2c | 20 72 65 74 75 72 6e 73 |invalid,| returns|
|00003710| 20 2d 31 2e 20 20 0a 58 | 0a 58 09 5f 63 75 72 73 | -1. .X|.X._curs|
|00003720| 65 73 70 65 6e 64 63 68 | 28 29 20 72 65 74 75 72 |espendch|() retur|
|00003730| 6e 73 20 31 20 69 66 20 | 74 68 65 72 65 20 69 73 |ns 1 if |there is|
|00003740| 20 61 6e 79 20 63 68 61 | 72 61 63 74 65 72 20 61 | any cha|racter a|
|00003750| 76 61 69 2d 20 20 0a 58 | 09 6c 61 62 6c 65 2c 20 |vai- .X|.lable, |
|00003760| 61 6e 64 20 30 20 69 66 | 20 74 68 65 72 65 20 69 |and 0 if| there i|
|00003770| 73 20 6e 6f 6e 65 2e 20 | 74 68 69 73 20 69 73 20 |s none. |this is |
|00003780| 6e 6f 74 20 66 6f 72 20 | 70 72 6f 67 72 61 6d 6d |not for |programm|
|00003790| 65 72 20 20 0a 58 09 75 | 73 61 67 65 2c 20 62 75 |er .X.u|sage, bu|
|000037a0| 74 20 66 6f 72 20 74 68 | 65 20 75 70 64 61 74 65 |t for th|e update|
|000037b0| 77 20 72 6f 75 74 69 6e | 65 73 2e 20 20 0a 58 0a |w routin|es. .X.|
|000037c0| 58 45 58 41 4d 50 4c 45 | 53 0a 58 0a 58 53 45 45 |XEXAMPLE|S.X.XSEE|
|000037d0| 20 41 4c 53 4f 0a 58 09 | 72 61 77 67 65 74 63 68 | ALSO.X.|rawgetch|
|000037e0| 28 29 3b 20 5f 63 75 72 | 73 65 73 67 63 62 28 29 |(); _cur|sesgcb()|
|000037f0| 3b 20 5f 63 75 72 73 65 | 73 73 63 62 28 29 3b 20 |; _curse|sscb(); |
|00003800| 73 79 73 67 65 74 63 68 | 28 29 3b 20 5f 63 75 72 |sysgetch|(); _cur|
|00003810| 73 65 73 73 63 62 28 29 | 3b 0a 58 09 77 61 64 64 |sesscb()|;.X.wadd|
|00003820| 63 68 28 29 3b 20 77 72 | 65 66 72 65 73 68 28 29 |ch(); wr|efresh()|
|00003830| 3b 20 5f 63 75 72 73 65 | 73 6b 65 79 28 29 3b 20 |; _curse|skey(); |
|00003840| 6b 62 68 69 74 28 29 3b | 20 67 65 74 63 68 28 29 |kbhit();| getch()|
|00003850| 3b 20 77 6d 6f 76 65 28 | 29 3b 0a 58 09 77 67 65 |; wmove(|);.X.wge|
|00003860| 74 63 68 28 29 3b 20 5f | 63 75 72 73 65 73 6b 65 |tch(); _|curseske|
|00003870| 79 74 73 74 28 29 3b 20 | 76 61 6c 69 64 63 68 61 |ytst(); |validcha|
|00003880| 72 28 29 3b 0a 58 0a 58 | 42 55 47 53 0a 53 48 41 |r();.X.X|BUGS.SHA|
|00003890| 52 5f 45 4f 46 0a 69 66 | 20 74 65 73 74 20 32 32 |R_EOF.if| test 22|
|000038a0| 32 33 20 2d 6e 65 20 22 | 60 77 63 20 2d 63 20 3c |23 -ne "|`wc -c <|
|000038b0| 20 27 6d 76 77 67 65 74 | 63 68 2e 6d 27 60 22 0a | 'mvwget|ch.m'`".|
|000038c0| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|000038d0| 20 65 72 72 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 | error t|ransmitt|
|000038e0| 69 6e 67 20 22 27 6d 76 | 77 67 65 74 63 68 2e 6d |ing "'mv|wgetch.m|
|000038f0| 27 22 20 27 28 73 68 6f | 75 6c 64 20 68 61 76 65 |'" '(sho|uld have|
|00003900| 20 62 65 65 6e 20 32 32 | 32 33 20 63 68 61 72 61 | been 22|23 chara|
|00003910| 63 74 65 72 73 29 27 0a | 66 69 0a 66 69 20 23 20 |cters)'.|fi.fi # |
|00003920| 65 6e 64 20 6f 66 20 6f | 76 65 72 77 72 69 74 69 |end of o|verwriti|
|00003930| 6e 67 20 63 68 65 63 6b | 0a 65 63 68 6f 20 73 68 |ng check|.echo sh|
|00003940| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 22 |ar: extr|acting "|
|00003950| 27 6d 76 77 69 6e 2e 6d | 27 22 20 27 28 33 30 35 |'mvwin.m|'" '(305|
|00003960| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00003970| 20 74 65 73 74 20 2d 66 | 20 27 6d 76 77 69 6e 2e | test -f| 'mvwin.|
|00003980| 6d 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |m'.then.|.echo sh|
|00003990| 61 72 3a 20 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: will| not ove|
|000039a0| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|000039b0| 20 66 69 6c 65 20 22 27 | 6d 76 77 69 6e 2e 6d 27 | file "'|mvwin.m'|
|000039c0| 22 0a 65 6c 73 65 0a 73 | 65 64 20 27 73 2f 5e 58 |".else.s|ed 's/^X|
|000039d0| 2f 2f 27 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |//' << \|SHAR_EOF|
|000039e0| 20 3e 20 27 6d 76 77 69 | 6e 2e 6d 27 0a 58 4e 41 | > 'mvwi|n.m'.XNA|
|000039f0| 4d 45 0a 58 09 6d 76 77 | 69 6e 28 29 20 2d 20 6d |ME.X.mvw|in() - m|
|00003a00| 6f 76 65 20 77 69 6e 64 | 6f 77 20 74 6f 20 61 6e |ove wind|ow to an|
|00003a10| 6f 74 68 65 72 20 70 6f | 73 69 74 69 6f 6e 20 6f |other po|sition o|
|00003a20| 6e 20 74 68 65 20 73 63 | 72 65 65 6e 2e 20 20 0a |n the sc|reen. .|
|00003a30| 58 0a 58 53 59 4e 4f 50 | 53 49 53 0a 58 09 23 69 |X.XSYNOP|SIS.X.#i|
|00003a40| 6e 63 6c 75 64 65 20 3c | 63 75 72 73 65 73 2e 68 |nclude <|curses.h|
|00003a50| 3e 0a 58 09 23 69 6e 63 | 6c 75 64 65 20 3c 63 75 |>.X.#inc|lude <cu|
|00003a60| 72 73 70 72 69 76 2e 68 | 3e 0a 58 0a 58 09 69 6e |rspriv.h|>.X.X.in|
|00003a70| 74 20 6d 76 77 69 6e 28 | 77 69 6e 2c 20 62 65 67 |t mvwin(|win, beg|
|00003a80| 79 2c 20 62 65 67 78 29 | 0a 58 09 57 49 4e 44 4f |y, begx)|.X.WINDO|
|00003a90| 57 20 2a 77 69 6e 3b 0a | 58 09 69 6e 74 20 62 65 |W *win;.|X.int be|
|00003aa0| 67 79 2c 20 62 65 67 78 | 3b 0a 58 0a 58 44 45 53 |gy, begx|;.X.XDES|
|00003ab0| 43 52 49 50 54 49 4f 4e | 0a 58 09 6d 76 77 69 6e |CRIPTION|.X.mvwin|
|00003ac0| 28 29 20 6d 6f 76 65 73 | 20 77 69 6e 64 6f 77 20 |() moves| window |
|00003ad0| 27 77 69 6e 27 20 74 6f | 20 70 6f 73 69 74 69 6f |'win' to| positio|
|00003ae0| 6e 20 28 62 65 67 78 2c | 20 62 65 67 79 29 20 6f |n (begx,| begy) o|
|00003af0| 6e 20 74 68 65 20 20 0a | 58 09 73 63 72 65 65 6e |n the .|X.screen|
|00003b00| 2e 20 20 0a 58 0a 58 45 | 58 41 4d 50 4c 45 53 0a |. .X.XE|XAMPLES.|
|00003b10| 58 0a 58 53 45 45 20 41 | 4c 53 4f 0a 58 09 74 6f |X.XSEE A|LSO.X.to|
|00003b20| 75 63 68 77 69 6e 28 29 | 20 20 0a 58 0a 58 42 55 |uchwin()| .X.XBU|
|00003b30| 47 53 0a 53 48 41 52 5f | 45 4f 46 0a 69 66 20 74 |GS.SHAR_|EOF.if t|
|00003b40| 65 73 74 20 33 30 35 20 | 2d 6e 65 20 22 60 77 63 |est 305 |-ne "`wc|
|00003b50| 20 2d 63 20 3c 20 27 6d | 76 77 69 6e 2e 6d 27 60 | -c < 'm|vwin.m'`|
|00003b60| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|00003b70| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|00003b80| 74 74 69 6e 67 20 22 27 | 6d 76 77 69 6e 2e 6d 27 |tting "'|mvwin.m'|
|00003b90| 22 20 27 28 73 68 6f 75 | 6c 64 20 68 61 76 65 20 |" '(shou|ld have |
|00003ba0| 62 65 65 6e 20 33 30 35 | 20 63 68 61 72 61 63 74 |been 305| charact|
|00003bb0| 65 72 73 29 27 0a 66 69 | 0a 66 69 20 23 20 65 6e |ers)'.fi|.fi # en|
|00003bc0| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00003bd0| 20 63 68 65 63 6b 0a 65 | 63 68 6f 20 73 68 61 72 | check.e|cho shar|
|00003be0| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 22 27 6f |: extrac|ting "'o|
|00003bf0| 76 65 72 6c 61 79 2e 6d | 27 22 20 27 28 35 35 39 |verlay.m|'" '(559|
|00003c00| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00003c10| 20 74 65 73 74 20 2d 66 | 20 27 6f 76 65 72 6c 61 | test -f| 'overla|
|00003c20| 79 2e 6d 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |y.m'.the|n..echo |
|00003c30| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00003c40| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|00003c50| 6e 67 20 66 69 6c 65 20 | 22 27 6f 76 65 72 6c 61 |ng file |"'overla|
|00003c60| 79 2e 6d 27 22 0a 65 6c | 73 65 0a 73 65 64 20 27 |y.m'".el|se.sed '|
|00003c70| 73 2f 5e 58 2f 2f 27 20 | 3c 3c 20 5c 53 48 41 52 |s/^X//' |<< \SHAR|
|00003c80| 5f 45 4f 46 20 3e 20 27 | 6f 76 65 72 6c 61 79 2e |_EOF > '|overlay.|
|00003c90| 6d 27 0a 58 4e 41 4d 45 | 0a 58 09 6f 76 65 72 6c |m'.XNAME|.X.overl|
|00003ca0| 61 79 28 29 20 6f 76 65 | 72 77 72 69 74 65 28 29 |ay() ove|rwrite()|
|00003cb0| 20 2d 20 6f 76 65 72 77 | 72 69 74 65 73 20 6f 6c | - overw|rites ol|
|00003cc0| 64 20 77 69 6e 64 6f 77 | 20 77 69 74 68 20 6e 65 |d window| with ne|
|00003cd0| 77 20 77 69 6e 64 6f 77 | 0a 58 0a 58 53 59 4e 4f |w window|.X.XSYNO|
|00003ce0| 50 53 49 53 0a 58 09 23 | 69 6e 63 6c 75 64 65 20 |PSIS.X.#|include |
|00003cf0| 3c 63 75 72 73 65 73 2e | 68 3e 0a 58 09 23 69 6e |<curses.|h>.X.#in|
|00003d00| 63 6c 75 64 65 20 3c 63 | 75 72 73 70 72 69 76 2e |clude <c|urspriv.|
|00003d10| 68 3e 0a 58 0a 58 09 76 | 6f 69 64 20 6f 76 65 72 |h>.X.X.v|oid over|
|00003d20| 6c 61 79 28 77 69 6e 31 | 2c 20 77 69 6e 32 29 0a |lay(win1|, win2).|
|00003d30| 58 09 57 49 4e 44 4f 57 | 20 2a 77 69 6e 31 2c 20 |X.WINDOW| *win1, |
|00003d40| 2a 77 69 6e 32 3b 0a 58 | 0a 58 09 76 6f 69 64 20 |*win2;.X|.X.void |
|00003d50| 6f 76 65 72 77 72 69 74 | 65 28 77 69 6e 31 2c 20 |overwrit|e(win1, |
|00003d60| 77 69 6e 32 29 0a 58 09 | 57 49 4e 44 4f 57 20 2a |win2).X.|WINDOW *|
|00003d70| 77 69 6e 31 2c 20 2a 77 | 69 6e 32 3b 0a 58 0a 58 |win1, *w|in2;.X.X|
|00003d80| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 58 09 6f 76 |DESCRIPT|ION.X.ov|
|00003d90| 65 72 6c 61 79 28 29 20 | 6f 76 65 72 77 72 69 74 |erlay() |overwrit|
|00003da0| 65 73 20 27 77 69 6e 31 | 27 20 75 70 6f 6e 20 27 |es 'win1|' upon '|
|00003db0| 77 69 6e 32 27 2c 20 77 | 69 74 68 20 6f 72 69 67 |win2', w|ith orig|
|00003dc0| 69 6e 73 20 61 6c 69 67 | 2d 20 20 0a 58 09 6e 65 |ins alig|- .X.ne|
|00003dd0| 64 2e 20 4f 76 65 72 6c | 61 79 20 69 73 20 74 72 |d. Overl|ay is tr|
|00003de0| 61 6e 73 70 61 72 65 6e | 74 3b 20 62 6c 61 6e 6b |ansparen|t; blank|
|00003df0| 73 20 66 72 6f 6d 20 27 | 77 69 6e 31 27 20 61 72 |s from '|win1' ar|
|00003e00| 65 20 6e 6f 74 20 20 0a | 58 09 63 6f 70 69 65 64 |e not .|X.copied|
|00003e10| 20 74 6f 20 27 77 69 6e | 32 27 2e 20 20 0a 58 0a | to 'win|2'. .X.|
|00003e20| 58 09 6f 76 65 72 77 72 | 69 74 65 28 29 20 6f 76 |X.overwr|ite() ov|
|00003e30| 65 72 77 72 69 74 65 73 | 20 27 77 69 6e 31 27 20 |erwrites| 'win1' |
|00003e40| 75 70 6f 6e 20 27 77 69 | 6e 32 27 2c 20 77 69 74 |upon 'wi|n2', wit|
|00003e50| 68 20 6f 72 69 67 69 6e | 73 20 20 0a 58 09 61 6c |h origin|s .X.al|
|00003e60| 69 67 6e 65 64 2e 20 4f | 76 65 72 77 72 69 74 65 |igned. O|verwrite|
|00003e70| 20 69 73 20 6e 6f 6e 2d | 74 72 61 6e 73 70 61 72 | is non-|transpar|
|00003e80| 65 6e 74 3b 20 62 6c 61 | 6e 6b 73 20 66 72 6f 6d |ent; bla|nks from|
|00003e90| 20 27 77 69 6e 31 27 20 | 20 0a 58 09 61 72 65 20 | 'win1' | .X.are |
|00003ea0| 63 6f 70 69 65 64 20 74 | 6f 20 27 77 69 6e 32 27 |copied t|o 'win2'|
|00003eb0| 2e 20 20 0a 58 0a 58 45 | 58 41 4d 50 4c 45 53 0a |. .X.XE|XAMPLES.|
|00003ec0| 58 0a 58 53 45 45 20 41 | 4c 53 4f 0a 58 09 6d 69 |X.XSEE A|LSO.X.mi|
|00003ed0| 6e 28 29 20 20 0a 58 0a | 58 42 55 47 53 0a 53 48 |n() .X.|XBUGS.SH|
|00003ee0| 41 52 5f 45 4f 46 0a 69 | 66 20 74 65 73 74 20 35 |AR_EOF.i|f test 5|
|00003ef0| 35 39 20 2d 6e 65 20 22 | 60 77 63 20 2d 63 20 3c |59 -ne "|`wc -c <|
|00003f00| 20 27 6f 76 65 72 6c 61 | 79 2e 6d 27 60 22 0a 74 | 'overla|y.m'`".t|
|00003f10| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00003f20| 65 72 72 6f 72 20 74 72 | 61 6e 73 6d 69 74 74 69 |error tr|ansmitti|
|00003f30| 6e 67 20 22 27 6f 76 65 | 72 6c 61 79 2e 6d 27 22 |ng "'ove|rlay.m'"|
|00003f40| 20 27 28 73 68 6f 75 6c | 64 20 68 61 76 65 20 62 | '(shoul|d have b|
|00003f50| 65 65 6e 20 35 35 39 20 | 63 68 61 72 61 63 74 65 |een 559 |characte|
|00003f60| 72 73 29 27 0a 66 69 0a | 66 69 20 23 20 65 6e 64 |rs)'.fi.|fi # end|
|00003f70| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00003f80| 63 68 65 63 6b 0a 65 63 | 68 6f 20 73 68 61 72 3a |check.ec|ho shar:|
|00003f90| 20 65 78 74 72 61 63 74 | 69 6e 67 20 22 27 72 61 | extract|ing "'ra|
|00003fa0| 77 67 65 74 63 68 2e 6d | 27 22 20 27 28 32 32 32 |wgetch.m|'" '(222|
|00003fb0| 33 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |3 charac|ters)'.i|
|00003fc0| 66 20 74 65 73 74 20 2d | 66 20 27 72 61 77 67 65 |f test -|f 'rawge|
|00003fd0| 74 63 68 2e 6d 27 0a 74 | 68 65 6e 0a 09 65 63 68 |tch.m'.t|hen..ech|
|00003fe0| 6f 20 73 68 61 72 3a 20 | 77 69 6c 6c 20 6e 6f 74 |o shar: |will not|
|00003ff0| 20 6f 76 65 72 2d 77 72 | 69 74 65 20 65 78 69 73 | over-wr|ite exis|
|00004000| 74 69 6e 67 20 66 69 6c | 65 20 22 27 72 61 77 67 |ting fil|e "'rawg|
|00004010| 65 74 63 68 2e 6d 27 22 | 0a 65 6c 73 65 0a 73 65 |etch.m'"|.else.se|
|00004020| 64 20 27 73 2f 5e 58 2f | 2f 27 20 3c 3c 20 5c 53 |d 's/^X/|/' << \S|
|00004030| 48 41 52 5f 45 4f 46 20 | 3e 20 27 72 61 77 67 65 |HAR_EOF |> 'rawge|
|00004040| 74 63 68 2e 6d 27 0a 58 | 4e 41 4d 45 0a 58 09 67 |tch.m'.X|NAME.X.g|
|00004050| 65 74 63 68 28 29 20 2d | 20 2a 2a 2a 73 61 6d 65 |etch() -| ***same|
|00004060| 20 61 73 20 77 67 65 74 | 63 68 28 29 2a 2a 2a 20 | as wget|ch()*** |
|00004070| 73 65 65 20 63 75 72 73 | 65 73 2e 68 0a 58 09 77 |see curs|es.h.X.w|
|00004080| 67 65 74 63 68 28 29 20 | 66 6c 75 73 68 69 6e 70 |getch() |flushinp|
|00004090| 28 29 20 77 75 6e 67 65 | 74 63 68 28 29 20 6d 76 |() wunge|tch() mv|
|000040a0| 67 65 74 63 68 28 29 20 | 6d 76 77 67 65 74 63 68 |getch() |mvwgetch|
|000040b0| 28 29 20 72 61 77 67 65 | 74 63 68 28 29 20 0a 58 |() rawge|tch() .X|
|000040c0| 09 73 79 73 67 65 74 63 | 68 28 29 20 76 61 6c 69 |.sysgetc|h() vali|
|000040d0| 64 63 68 61 72 28 29 20 | 5f 63 75 72 73 65 73 70 |dchar() |_cursesp|
|000040e0| 65 6e 64 63 68 28 29 20 | 2d 20 6d 61 6e 69 70 75 |endch() |- manipu|
|000040f0| 6c 61 74 65 20 69 6e 70 | 75 74 20 63 68 61 72 61 |late inp|ut chara|
|00004100| 63 74 65 72 73 0a 58 0a | 58 53 59 4e 4f 50 53 49 |cters.X.|XSYNOPSI|
|00004110| 53 0a 58 09 23 69 6e 63 | 6c 75 64 65 20 3c 63 75 |S.X.#inc|lude <cu|
|00004120| 72 73 65 73 2e 68 3e 0a | 58 09 23 69 6e 63 6c 75 |rses.h>.|X.#inclu|
|00004130| 64 65 20 3c 63 75 72 73 | 70 72 69 76 2e 68 3e 0a |de <curs|priv.h>.|
|00004140| 58 0a 58 09 69 6e 74 20 | 77 67 65 74 63 68 28 77 |X.X.int |wgetch(w|
|00004150| 69 6e 29 0a 58 09 57 49 | 4e 44 4f 57 20 2a 77 69 |in).X.WI|NDOW *wi|
|00004160| 6e 3b 0a 58 0a 58 09 76 | 6f 69 64 20 66 6c 75 73 |n;.X.X.v|oid flus|
|00004170| 68 69 6e 70 28 29 0a 58 | 0a 58 09 69 6e 74 20 77 |hinp().X|.X.int w|
|00004180| 75 6e 67 65 74 63 68 28 | 63 68 29 0a 58 09 69 6e |ungetch(|ch).X.in|
|00004190| 74 20 63 68 3b 0a 58 0a | 58 09 69 6e 74 20 6d 76 |t ch;.X.|X.int mv|
|000041a0| 67 65 74 63 68 28 79 2c | 78 29 0a 58 09 69 6e 74 |getch(y,|x).X.int|
|000041b0| 20 79 3b 0a 58 09 69 6e | 74 20 78 3b 0a 58 0a 58 | y;.X.in|t x;.X.X|
|000041c0| 09 69 6e 74 20 6d 76 77 | 67 65 74 63 68 28 77 69 |.int mvw|getch(wi|
|000041d0| 6e 2c 79 2c 78 29 0a 58 | 09 57 49 4e 44 4f 57 20 |n,y,x).X|.WINDOW |
|000041e0| 2a 77 69 6e 3b 0a 58 09 | 69 6e 74 20 79 3b 0a 58 |*win;.X.|int y;.X|
|000041f0| 09 69 6e 74 20 78 3b 0a | 58 0a 58 09 73 74 61 74 |.int x;.|X.X.stat|
|00004200| 69 63 20 69 6e 74 20 72 | 61 77 67 65 74 63 68 28 |ic int r|awgetch(|
|00004210| 29 0a 58 0a 58 09 73 74 | 61 74 69 63 20 69 6e 74 |).X.X.st|atic int|
|00004220| 20 73 79 73 67 65 74 63 | 68 28 29 0a 58 0a 58 09 | sysgetc|h().X.X.|
|00004230| 73 74 61 74 69 63 20 69 | 6e 74 20 76 61 6c 69 64 |static i|nt valid|
|00004240| 63 68 61 72 28 63 29 0a | 58 09 69 6e 74 20 63 3b |char(c).|X.int c;|
|00004250| 0a 58 0a 58 09 62 6f 6f | 6c 20 5f 63 75 72 73 65 |.X.X.boo|l _curse|
|00004260| 73 70 65 6e 64 63 68 28 | 29 0a 58 0a 58 44 45 53 |spendch(|).X.XDES|
|00004270| 43 52 49 50 54 49 4f 4e | 0a 58 09 77 67 65 74 63 |CRIPTION|.X.wgetc|
|00004280| 68 28 77 69 6e 29 20 67 | 65 74 73 20 61 20 63 68 |h(win) g|ets a ch|
|00004290| 61 72 61 63 74 65 72 20 | 66 72 6f 6d 20 74 68 65 |aracter |from the|
|000042a0| 20 74 65 72 6d 69 6e 61 | 6c 2c 20 69 6e 20 6e 6f | termina|l, in no|
|000042b0| 72 6d 61 6c 2c 20 20 0a | 58 09 63 62 72 65 61 6b |rmal, .|X.cbreak|
|000042c0| 20 6f 72 20 72 61 77 20 | 6d 6f 64 65 2c 20 6f 70 | or raw |mode, op|
|000042d0| 74 69 6f 6e 61 6c 6c 79 | 20 65 63 68 6f 69 6e 67 |tionally| echoing|
|000042e0| 20 74 6f 20 77 69 6e 64 | 6f 77 20 27 77 69 6e 27 | to wind|ow 'win'|
|000042f0| 2e 20 20 0a 58 0a 58 09 | 66 6c 75 73 68 69 6e 70 |. .X.X.|flushinp|
|00004300| 28 29 20 6b 69 6c 6c 73 | 20 61 6e 79 20 70 65 6e |() kills| any pen|
|00004310| 64 69 6e 67 20 69 6e 70 | 75 74 20 63 68 61 72 61 |ding inp|ut chara|
|00004320| 63 74 65 72 73 2e 20 20 | 0a 58 0a 58 09 77 75 6e |cters. |.X.X.wun|
|00004330| 67 65 74 63 68 28 29 20 | 70 75 73 68 65 73 20 62 |getch() |pushes b|
|00004340| 61 63 6b 20 69 74 27 73 | 20 61 72 67 75 6d 65 6e |ack it's| argumen|
|00004350| 74 20 6f 6e 20 74 68 65 | 20 69 6e 70 75 74 20 73 |t on the| input s|
|00004360| 74 72 65 61 6d 2e 20 49 | 66 20 20 0a 58 09 4f 4b |tream. I|f .X.OK|
|00004370| 2c 20 72 65 74 75 72 6e | 73 20 31 2c 20 6f 74 68 |, return|s 1, oth|
|00004380| 65 72 77 69 73 65 20 72 | 65 74 75 72 6e 73 20 30 |erwise r|eturns 0|
|00004390| 2e 20 20 0a 58 0a 58 09 | 6d 76 67 65 74 63 68 28 |. .X.X.|mvgetch(|
|000043a0| 29 20 66 69 72 73 74 20 | 6d 6f 76 65 73 20 74 68 |) first |moves th|
|000043b0| 65 20 73 74 64 73 63 72 | 20 63 75 72 73 6f 72 20 |e stdscr| cursor |
|000043c0| 74 6f 20 61 20 6e 65 77 | 20 6c 6f 63 61 74 69 6f |to a new| locatio|
|000043d0| 6e 2c 20 20 0a 58 09 74 | 68 65 6e 20 64 6f 65 73 |n, .X.t|hen does|
|000043e0| 20 61 20 77 67 65 74 63 | 68 28 29 20 6f 6e 20 73 | a wgetc|h() on s|
|000043f0| 74 64 73 63 72 2e 20 20 | 0a 58 0a 58 09 6d 76 77 |tdscr. |.X.X.mvw|
|00004400| 67 65 74 63 68 28 29 20 | 66 69 72 73 74 20 6d 6f |getch() |first mo|
|00004410| 76 65 73 20 74 68 65 20 | 63 75 72 73 6f 72 20 6f |ves the |cursor o|
|00004420| 66 20 77 69 6e 64 6f 77 | 20 27 77 69 6e 27 20 74 |f window| 'win' t|
|00004430| 6f 20 61 20 6e 65 77 20 | 20 0a 58 09 6c 6f 63 61 |o a new | .X.loca|
|00004440| 74 69 6f 6e 2c 20 74 68 | 65 6e 20 64 6f 65 73 20 |tion, th|en does |
|00004450| 61 20 77 67 65 74 63 68 | 28 29 20 69 6e 20 27 77 |a wgetch|() in 'w|
|00004460| 69 6e 27 2e 20 20 0a 58 | 0a 58 09 72 61 77 67 65 |in'. .X|.X.rawge|
|00004470| 74 63 68 28 29 20 67 65 | 74 73 20 61 20 63 68 61 |tch() ge|ts a cha|
|00004480| 72 61 63 74 65 72 20 77 | 69 74 68 6f 75 74 20 61 |racter w|ithout a|
|00004490| 6e 79 20 69 6e 74 65 72 | 70 72 65 74 61 74 69 6f |ny inter|pretatio|
|000044a0| 6e 20 61 74 20 20 0a 58 | 09 61 6c 6c 20 61 6e 64 |n at .X|.all and|
|000044b0| 20 72 65 74 75 72 6e 73 | 20 69 74 2e 20 49 66 20 | returns| it. If |
|000044c0| 6b 65 79 70 61 64 20 6d | 6f 64 65 20 69 73 20 61 |keypad m|ode is a|
|000044d0| 63 74 69 76 65 20 66 6f | 72 20 74 68 65 20 64 65 |ctive fo|r the de|
|000044e0| 73 69 67 2d 20 20 0a 58 | 09 6e 61 74 65 64 20 77 |sig- .X|.nated w|
|000044f0| 69 6e 64 6f 77 2c 20 66 | 75 6e 63 74 69 6f 6e 20 |indow, f|unction |
|00004500| 6b 65 79 20 74 72 61 6e | 73 6c 61 74 69 6f 6e 20 |key tran|slation |
|00004510| 77 69 6c 6c 20 62 65 20 | 70 65 72 66 6f 72 6d 65 |will be |performe|
|00004520| 64 2e 20 20 0a 58 09 4f | 74 68 65 72 77 69 73 65 |d. .X.O|therwise|
|00004530| 2c 20 66 75 6e 63 74 69 | 6f 6e 20 6b 65 79 73 20 |, functi|on keys |
|00004540| 61 72 65 20 69 67 6e 6f | 72 65 64 2e 49 66 20 6e |are igno|red.If n|
|00004550| 6f 64 65 6c 61 79 20 6d | 6f 64 65 20 69 73 20 20 |odelay m|ode is |
|00004560| 0a 58 09 61 63 74 69 76 | 65 20 69 6e 20 74 68 65 |.X.activ|e in the|
|00004570| 20 77 69 6e 64 6f 77 2c | 20 74 68 65 6e 20 72 61 | window,| then ra|
|00004580| 77 67 65 74 63 68 28 29 | 20 72 65 74 75 72 6e 73 |wgetch()| returns|
|00004590| 20 2d 31 20 69 66 20 6e | 6f 20 63 68 61 2d 20 20 | -1 if n|o cha- |
|000045a0| 0a 58 09 72 61 63 74 65 | 72 20 69 73 20 61 76 61 |.X.racte|r is ava|
|000045b0| 69 6c 61 62 6c 65 2e 20 | 20 0a 58 0a 58 09 73 79 |ilable. | .X.X.sy|
|000045c0| 73 67 65 74 63 68 28 29 | 20 67 65 74 73 20 61 20 |sgetch()| gets a |
|000045d0| 63 68 61 72 61 63 74 65 | 72 20 77 69 74 68 20 6e |characte|r with n|
|000045e0| 6f 72 6d 61 6c 20 5e 53 | 2c 20 5e 51 2c 20 5e 50 |ormal ^S|, ^Q, ^P|
|000045f0| 20 61 6e 64 20 5e 43 20 | 20 0a 58 09 69 6e 74 65 | and ^C | .X.inte|
|00004600| 72 70 72 65 74 61 74 69 | 6f 6e 20 61 6e 64 20 72 |rpretati|on and r|
|00004610| 65 74 75 72 6e 73 20 69 | 74 2e 20 49 66 20 6b 65 |eturns i|t. If ke|
|00004620| 79 70 61 64 20 6d 6f 64 | 65 20 69 73 20 61 63 74 |ypad mod|e is act|
|00004630| 69 76 65 20 66 6f 72 20 | 20 0a 58 09 74 68 65 20 |ive for | .X.the |
|00004640| 64 65 73 69 67 6e 61 74 | 65 64 20 77 69 6e 64 6f |designat|ed windo|
|00004650| 77 2c 20 66 75 6e 63 74 | 69 6f 6e 20 6b 65 79 20 |w, funct|ion key |
|00004660| 74 72 61 6e 73 6c 61 74 | 69 6f 6e 20 77 69 6c 6c |translat|ion will|
|00004670| 20 62 65 20 70 65 72 2d | 20 20 0a 58 09 66 6f 72 | be per-| .X.for|
|00004680| 6d 65 64 2e 20 4f 74 68 | 65 72 77 69 73 65 2c 20 |med. Oth|erwise, |
|00004690| 66 75 6e 63 74 69 6f 6e | 20 6b 65 79 73 20 61 72 |function| keys ar|
|000046a0| 65 20 69 67 6e 6f 72 65 | 64 2e 20 49 66 20 6e 6f |e ignore|d. If no|
|000046b0| 64 65 6c 61 79 20 20 0a | 58 09 6d 6f 64 65 20 69 |delay .|X.mode i|
|000046c0| 73 20 61 63 74 69 76 65 | 20 69 6e 20 74 68 65 20 |s active| in the |
|000046d0| 77 69 6e 64 6f 77 2c 20 | 74 68 65 6e 20 73 79 73 |window, |then sys|
|000046e0| 67 65 74 63 68 28 29 20 | 72 65 74 75 72 6e 73 20 |getch() |returns |
|000046f0| 2d 31 20 69 66 20 20 0a | 58 09 6e 6f 20 63 68 61 |-1 if .|X.no cha|
|00004700| 72 61 63 74 65 72 20 69 | 73 20 61 76 61 69 6c 61 |racter i|s availa|
|00004710| 62 6c 65 2e 20 20 0a 58 | 0a 58 09 76 61 6c 69 64 |ble. .X|.X.valid|
|00004720| 63 68 61 72 28 63 29 20 | 63 68 65 63 6b 73 20 74 |char(c) |checks t|
|00004730| 68 61 74 20 27 63 27 20 | 69 73 20 61 20 76 61 6c |hat 'c' |is a val|
|00004740| 69 64 20 63 68 61 72 61 | 63 74 65 72 2c 20 61 6e |id chara|cter, an|
|00004750| 64 20 20 0a 58 09 69 66 | 20 73 6f 20 72 65 74 75 |d .X.if| so retu|
|00004760| 72 6e 73 20 69 74 2c 20 | 77 69 74 68 20 66 75 6e |rns it, |with fun|
|00004770| 63 74 69 6f 6e 20 6b 65 | 79 20 74 72 61 6e 73 6c |ction ke|y transl|
|00004780| 61 74 69 6f 6e 20 61 70 | 70 6c 69 65 64 20 69 66 |ation ap|plied if|
|00004790| 20 20 0a 58 09 27 77 27 | 20 68 61 73 20 6b 65 79 | .X.'w'| has key|
|000047a0| 70 61 64 20 6d 6f 64 65 | 20 73 65 74 2e 20 49 66 |pad mode| set. If|
|000047b0| 20 63 68 61 72 20 69 73 | 20 69 6e 76 61 6c 69 64 | char is| invalid|
|000047c0| 2c 20 72 65 74 75 72 6e | 73 20 2d 31 2e 20 20 0a |, return|s -1. .|
|000047d0| 58 0a 58 09 5f 63 75 72 | 73 65 73 70 65 6e 64 63 |X.X._cur|sespendc|
|000047e0| 68 28 29 20 72 65 74 75 | 72 6e 73 20 31 20 69 66 |h() retu|rns 1 if|
|000047f0| 20 74 68 65 72 65 20 69 | 73 20 61 6e 79 20 63 68 | there i|s any ch|
|00004800| 61 72 61 63 74 65 72 20 | 61 76 61 69 2d 20 20 0a |aracter |avai- .|
|00004810| 58 09 6c 61 62 6c 65 2c | 20 61 6e 64 20 30 20 69 |X.lable,| and 0 i|
|00004820| 66 20 74 68 65 72 65 20 | 69 73 20 6e 6f 6e 65 2e |f there |is none.|
|00004830| 20 74 68 69 73 20 69 73 | 20 6e 6f 74 20 66 6f 72 | this is| not for|
|00004840| 20 70 72 6f 67 72 61 6d | 6d 65 72 20 20 0a 58 09 | program|mer .X.|
|00004850| 75 73 61 67 65 2c 20 62 | 75 74 20 66 6f 72 20 74 |usage, b|ut for t|
|00004860| 68 65 20 75 70 64 61 74 | 65 77 20 72 6f 75 74 69 |he updat|ew routi|
|00004870| 6e 65 73 2e 20 20 0a 58 | 0a 58 45 58 41 4d 50 4c |nes. .X|.XEXAMPL|
|00004880| 45 53 0a 58 0a 58 53 45 | 45 20 41 4c 53 4f 0a 58 |ES.X.XSE|E ALSO.X|
|00004890| 09 72 61 77 67 65 74 63 | 68 28 29 3b 20 5f 63 75 |.rawgetc|h(); _cu|
|000048a0| 72 73 65 73 67 63 62 28 | 29 3b 20 5f 63 75 72 73 |rsesgcb(|); _curs|
|000048b0| 65 73 73 63 62 28 29 3b | 20 73 79 73 67 65 74 63 |esscb();| sysgetc|
|000048c0| 68 28 29 3b 20 5f 63 75 | 72 73 65 73 73 63 62 28 |h(); _cu|rsesscb(|
|000048d0| 29 3b 0a 58 09 77 61 64 | 64 63 68 28 29 3b 20 77 |);.X.wad|dch(); w|
|000048e0| 72 65 66 72 65 73 68 28 | 29 3b 20 5f 63 75 72 73 |refresh(|); _curs|
|000048f0| 65 73 6b 65 79 28 29 3b | 20 6b 62 68 69 74 28 29 |eskey();| kbhit()|
|00004900| 3b 20 67 65 74 63 68 28 | 29 3b 20 77 6d 6f 76 65 |; getch(|); wmove|
|00004910| 28 29 3b 0a 58 09 77 67 | 65 74 63 68 28 29 3b 20 |();.X.wg|etch(); |
|00004920| 5f 63 75 72 73 65 73 6b | 65 79 74 73 74 28 29 3b |_cursesk|eytst();|
|00004930| 20 76 61 6c 69 64 63 68 | 61 72 28 29 3b 0a 58 0a | validch|ar();.X.|
|00004940| 58 42 55 47 53 0a 53 48 | 41 52 5f 45 4f 46 0a 69 |XBUGS.SH|AR_EOF.i|
|00004950| 66 20 74 65 73 74 20 32 | 32 32 33 20 2d 6e 65 20 |f test 2|223 -ne |
|00004960| 22 60 77 63 20 2d 63 20 | 3c 20 27 72 61 77 67 65 |"`wc -c |< 'rawge|
|00004970| 74 63 68 2e 6d 27 60 22 | 0a 74 68 65 6e 0a 09 65 |tch.m'`"|.then..e|
|00004980| 63 68 6f 20 73 68 61 72 | 3a 20 65 72 72 6f 72 20 |cho shar|: error |
|00004990| 74 72 61 6e 73 6d 69 74 | 74 69 6e 67 20 22 27 72 |transmit|ting "'r|
|000049a0| 61 77 67 65 74 63 68 2e | 6d 27 22 20 27 28 73 68 |awgetch.|m'" '(sh|
|000049b0| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 32 |ould hav|e been 2|
|000049c0| 32 32 33 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |223 char|acters)'|
|000049d0| 0a 66 69 0a 66 69 20 23 | 20 65 6e 64 20 6f 66 20 |.fi.fi #| end of |
|000049e0| 6f 76 65 72 77 72 69 74 | 69 6e 67 20 63 68 65 63 |overwrit|ing chec|
|000049f0| 6b 0a 65 63 68 6f 20 73 | 68 61 72 3a 20 65 78 74 |k.echo s|har: ext|
|00004a00| 72 61 63 74 69 6e 67 20 | 22 27 73 63 72 6f 6c 6c |racting |"'scroll|
|00004a10| 2e 6d 27 22 20 27 28 33 | 32 34 20 63 68 61 72 61 |.m'" '(3|24 chara|
|00004a20| 63 74 65 72 73 29 27 0a | 69 66 20 74 65 73 74 20 |cters)'.|if test |
|00004a30| 2d 66 20 27 73 63 72 6f | 6c 6c 2e 6d 27 0a 74 68 |-f 'scro|ll.m'.th|
|00004a40| 65 6e 0a 09 65 63 68 6f | 20 73 68 61 72 3a 20 77 |en..echo| shar: w|
|00004a50| 69 6c 6c 20 6e 6f 74 20 | 6f 76 65 72 2d 77 72 69 |ill not |over-wri|
|00004a60| 74 65 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |te exist|ing file|
|00004a70| 20 22 27 73 63 72 6f 6c | 6c 2e 6d 27 22 0a 65 6c | "'scrol|l.m'".el|
|00004a80| 73 65 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |se.sed '|s/^X//' |
|00004a90| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00004aa0| 73 63 72 6f 6c 6c 2e 6d | 27 0a 58 4e 41 4d 45 0a |scroll.m|'.XNAME.|
|00004ab0| 58 09 73 63 72 6f 6c 6c | 28 29 20 2d 20 73 63 72 |X.scroll|() - scr|
|00004ac0| 6f 6c 6c 20 74 68 65 20 | 73 63 72 6f 6c 6c 69 6e |oll the |scrollin|
|00004ad0| 67 20 72 65 67 69 6f 6e | 20 6f 66 20 77 69 6e 64 |g region| of wind|
|00004ae0| 6f 77 2e 0a 58 0a 58 53 | 59 4e 4f 50 53 49 53 0a |ow..X.XS|YNOPSIS.|
|00004af0| 58 09 23 69 6e 63 6c 75 | 64 65 20 3c 63 75 72 73 |X.#inclu|de <curs|
|00004b00| 65 73 2e 68 3e 0a 58 09 | 23 69 6e 63 6c 75 64 65 |es.h>.X.|#include|
|00004b10| 20 3c 63 75 72 73 70 72 | 69 76 2e 68 3e 0a 58 0a | <curspr|iv.h>.X.|
|00004b20| 58 09 76 6f 69 64 20 73 | 63 72 6f 6c 6c 28 77 69 |X.void s|croll(wi|
|00004b30| 6e 29 0a 58 09 57 49 4e | 44 4f 57 20 2a 77 69 6e |n).X.WIN|DOW *win|
|00004b40| 3b 0a 58 0a 58 44 45 53 | 43 52 49 50 54 49 4f 4e |;.X.XDES|CRIPTION|
|00004b50| 0a 58 09 73 63 72 6f 6c | 6c 28 29 20 73 63 72 6f |.X.scrol|l() scro|
|00004b60| 6c 6c 73 20 74 68 65 20 | 73 63 72 6f 6c 6c 69 6e |lls the |scrollin|
|00004b70| 67 20 72 65 67 69 6f 6e | 20 6f 66 20 27 77 69 6e |g region| of 'win|
|00004b80| 27 2c 20 62 75 74 20 6f | 6e 6c 79 20 69 66 20 20 |', but o|nly if |
|00004b90| 0a 58 09 73 63 72 6f 6c | 6c 69 6e 67 20 69 73 20 |.X.scrol|ling is |
|00004ba0| 61 6c 6c 6f 77 65 64 20 | 61 6e 64 20 69 66 20 74 |allowed |and if t|
|00004bb0| 68 65 20 63 75 72 73 6f | 72 20 69 73 20 69 6e 73 |he curso|r is ins|
|00004bc0| 69 64 65 20 74 68 65 20 | 73 63 72 6f 6c 2d 20 20 |ide the |scrol- |
|00004bd0| 0a 58 09 6c 69 6e 67 20 | 72 65 67 69 6f 6e 2e 20 |.X.ling |region. |
|00004be0| 20 0a 58 0a 58 45 58 41 | 4d 50 4c 45 53 0a 58 0a | .X.XEXA|MPLES.X.|
|00004bf0| 58 53 45 45 20 41 4c 53 | 4f 0a 58 0a 58 42 55 47 |XSEE ALS|O.X.XBUG|
|00004c00| 53 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |S.SHAR_E|OF.if te|
|00004c10| 73 74 20 33 32 34 20 2d | 6e 65 20 22 60 77 63 20 |st 324 -|ne "`wc |
|00004c20| 2d 63 20 3c 20 27 73 63 | 72 6f 6c 6c 2e 6d 27 60 |-c < 'sc|roll.m'`|
|00004c30| 22 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |".then..|echo sha|
|00004c40| 72 3a 20 65 72 72 6f 72 | 20 74 72 61 6e 73 6d 69 |r: error| transmi|
|00004c50| 74 74 69 6e 67 20 22 27 | 73 63 72 6f 6c 6c 2e 6d |tting "'|scroll.m|
|00004c60| 27 22 20 27 28 73 68 6f | 75 6c 64 20 68 61 76 65 |'" '(sho|uld have|
|00004c70| 20 62 65 65 6e 20 33 32 | 34 20 63 68 61 72 61 63 | been 32|4 charac|
|00004c80| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 20 23 20 65 |ters)'.f|i.fi # e|
|00004c90| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|00004ca0| 67 20 63 68 65 63 6b 0a | 65 63 68 6f 20 73 68 61 |g check.|echo sha|
|00004cb0| 72 3a 20 65 78 74 72 61 | 63 74 69 6e 67 20 22 27 |r: extra|cting "'|
|00004cc0| 73 65 74 73 63 72 72 65 | 67 2e 6d 27 22 20 27 28 |setscrre|g.m'" '(|
|00004cd0| 34 39 35 20 63 68 61 72 | 61 63 74 65 72 73 29 27 |495 char|acters)'|
|00004ce0| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 73 65 74 |.if test| -f 'set|
|00004cf0| 73 63 72 72 65 67 2e 6d | 27 0a 74 68 65 6e 0a 09 |scrreg.m|'.then..|
|00004d00| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00004d10| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00004d20| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 73 |xisting |file "'s|
|00004d30| 65 74 73 63 72 72 65 67 | 2e 6d 27 22 0a 65 6c 73 |etscrreg|.m'".els|
|00004d40| 65 0a 73 65 64 20 27 73 | 2f 5e 58 2f 2f 27 20 3c |e.sed 's|/^X//' <|
|00004d50| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 73 |< \SHAR_|EOF > 's|
|00004d60| 65 74 73 63 72 72 65 67 | 2e 6d 27 0a 58 4e 41 4d |etscrreg|.m'.XNAM|
|00004d70| 45 0a 58 09 77 73 65 74 | 73 63 72 72 65 67 28 29 |E.X.wset|scrreg()|
|00004d80| 20 73 65 74 73 63 72 72 | 65 67 28 29 20 2d 20 73 | setscrr|eg() - s|
|00004d90| 65 74 20 73 63 72 6f 6c | 6c 69 6e 67 20 72 65 67 |et scrol|ling reg|
|00004da0| 69 6f 6e 20 6f 66 20 77 | 69 6e 64 6f 77 0a 58 0a |ion of w|indow.X.|
|00004db0| 58 53 59 4e 4f 50 53 49 | 53 0a 58 09 23 69 6e 63 |XSYNOPSI|S.X.#inc|
|00004dc0| 6c 75 64 65 20 3c 63 75 | 72 73 65 73 2e 68 3e 0a |lude <cu|rses.h>.|
|00004dd0| 58 09 23 69 6e 63 6c 75 | 64 65 20 3c 63 75 72 73 |X.#inclu|de <curs|
|00004de0| 70 72 69 76 2e 68 3e 0a | 58 0a 58 09 69 6e 74 20 |priv.h>.|X.X.int |
|00004df0| 77 73 65 74 73 63 72 72 | 65 67 28 77 69 6e 2c 20 |wsetscrr|eg(win, |
|00004e00| 74 6f 70 2c 20 62 6f 74 | 74 6f 6d 29 0a 58 09 57 |top, bot|tom).X.W|
|00004e10| 49 4e 44 4f 57 20 2a 77 | 69 6e 3b 0a 58 09 69 6e |INDOW *w|in;.X.in|
|00004e20| 74 20 74 6f 70 3b 0a 58 | 09 69 6e 74 20 62 6f 74 |t top;.X|.int bot|
|00004e30| 74 6f 6d 3b 0a 58 0a 58 | 09 69 6e 74 20 73 65 74 |tom;.X.X|.int set|
|00004e40| 73 63 72 72 65 67 28 74 | 6f 70 2c 20 62 6f 74 74 |scrreg(t|op, bott|
|00004e50| 6f 6d 29 0a 58 09 69 6e | 74 20 74 6f 70 3b 0a 58 |om).X.in|t top;.X|
|00004e60| 09 69 6e 74 20 62 6f 74 | 74 6f 6d 3b 0a 58 0a 58 |.int bot|tom;.X.X|
|00004e70| 44 45 53 43 52 49 50 54 | 49 4f 4e 0a 58 09 77 73 |DESCRIPT|ION.X.ws|
|00004e80| 65 74 73 63 72 72 65 67 | 28 29 20 73 65 74 20 74 |etscrreg|() set t|
|00004e90| 68 65 20 73 63 72 6f 6c | 6c 69 6e 67 20 72 65 67 |he scrol|ling reg|
|00004ea0| 69 6f 6e 20 6f 66 20 77 | 69 6e 64 6f 77 20 27 77 |ion of w|indow 'w|
|00004eb0| 69 6e 27 20 74 6f 20 69 | 6e 2d 20 20 0a 58 09 63 |in' to i|n- .X.c|
|00004ec0| 6c 75 64 65 20 61 6c 6c | 20 6c 69 6e 65 73 20 62 |lude all| lines b|
|00004ed0| 65 74 77 65 65 6e 20 27 | 74 6f 70 27 20 61 6e 64 |etween '|top' and|
|00004ee0| 20 27 62 6f 74 74 6f 6d | 27 2e 20 20 0a 58 0a 58 | 'bottom|'. .X.X|
|00004ef0| 09 73 65 74 73 63 72 72 | 65 67 28 29 20 73 65 74 |.setscrr|eg() set|
|00004f00| 20 74 68 65 20 73 63 72 | 6f 6c 6c 69 6e 67 20 72 | the scr|olling r|
|00004f10| 65 67 69 6f 6e 20 6f 66 | 20 73 74 64 73 63 72 20 |egion of| stdscr |
|00004f20| 74 6f 20 69 6e 63 6c 75 | 64 65 20 20 0a 58 09 61 |to inclu|de .X.a|
|00004f30| 6c 6c 20 6c 69 6e 65 73 | 20 62 65 74 77 65 65 6e |ll lines| between|
|00004f40| 20 27 74 6f 70 27 20 61 | 6e 64 20 27 62 6f 74 74 | 'top' a|nd 'bott|
|00004f50| 6f 6d 27 2e 20 20 0a 58 | 0a 58 45 58 41 4d 50 4c |om'. .X|.XEXAMPL|
|00004f60| 45 53 0a 58 0a 58 53 45 | 45 20 41 4c 53 4f 0a 58 |ES.X.XSE|E ALSO.X|
|00004f70| 0a 58 42 55 47 53 0a 53 | 48 41 52 5f 45 4f 46 0a |.XBUGS.S|HAR_EOF.|
|00004f80| 69 66 20 74 65 73 74 20 | 34 39 35 20 2d 6e 65 20 |if test |495 -ne |
|00004f90| 22 60 77 63 20 2d 63 20 | 3c 20 27 73 65 74 73 63 |"`wc -c |< 'setsc|
|00004fa0| 72 72 65 67 2e 6d 27 60 | 22 0a 74 68 65 6e 0a 09 |rreg.m'`|".then..|
|00004fb0| 65 63 68 6f 20 73 68 61 | 72 3a 20 65 72 72 6f 72 |echo sha|r: error|
|00004fc0| 20 74 72 61 6e 73 6d 69 | 74 74 69 6e 67 20 22 27 | transmi|tting "'|
|00004fd0| 73 65 74 73 63 72 72 65 | 67 2e 6d 27 22 20 27 28 |setscrre|g.m'" '(|
|00004fe0| 73 68 6f 75 6c 64 20 68 | 61 76 65 20 62 65 65 6e |should h|ave been|
|00004ff0| 20 34 39 35 20 63 68 61 | 72 61 63 74 65 72 73 29 | 495 cha|racters)|
|00005000| 27 0a 66 69 0a 66 69 20 | 23 20 65 6e 64 20 6f 66 |'.fi.fi |# end of|
|00005010| 20 6f 76 65 72 77 72 69 | 74 69 6e 67 20 63 68 65 | overwri|ting che|
|00005020| 63 6b 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 65 78 |ck.echo |shar: ex|
|00005030| 74 72 61 63 74 69 6e 67 | 20 22 27 73 79 73 67 65 |tracting| "'sysge|
|00005040| 74 63 68 2e 6d 27 22 20 | 27 28 32 32 32 33 20 63 |tch.m'" |'(2223 c|
|00005050| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|00005060| 65 73 74 20 2d 66 20 27 | 73 79 73 67 65 74 63 68 |est -f '|sysgetch|
|00005070| 2e 6d 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |.m'.then|..echo s|
|00005080| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|00005090| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|000050a0| 67 20 66 69 6c 65 20 22 | 27 73 79 73 67 65 74 63 |g file "|'sysgetc|
|000050b0| 68 2e 6d 27 22 0a 65 6c | 73 65 0a 73 65 64 20 27 |h.m'".el|se.sed '|
|000050c0| 73 2f 5e 58 2f 2f 27 20 | 3c 3c 20 5c 53 48 41 52 |s/^X//' |<< \SHAR|
|000050d0| 5f 45 4f 46 20 3e 20 27 | 73 79 73 67 65 74 63 68 |_EOF > '|sysgetch|
|000050e0| 2e 6d 27 0a 58 4e 41 4d | 45 0a 58 09 67 65 74 63 |.m'.XNAM|E.X.getc|
|000050f0| 68 28 29 20 2d 20 2a 2a | 2a 73 61 6d 65 20 61 73 |h() - **|*same as|
|00005100| 20 77 67 65 74 63 68 28 | 29 2a 2a 2a 20 73 65 65 | wgetch(|)*** see|
|00005110| 20 63 75 72 73 65 73 2e | 68 0a 58 09 77 67 65 74 | curses.|h.X.wget|
|00005120| 63 68 28 29 20 66 6c 75 | 73 68 69 6e 70 28 29 20 |ch() flu|shinp() |
|00005130| 77 75 6e 67 65 74 63 68 | 28 29 20 6d 76 67 65 74 |wungetch|() mvget|
|00005140| 63 68 28 29 20 6d 76 77 | 67 65 74 63 68 28 29 20 |ch() mvw|getch() |
|00005150| 72 61 77 67 65 74 63 68 | 28 29 20 0a 58 09 73 79 |rawgetch|() .X.sy|
|00005160| 73 67 65 74 63 68 28 29 | 20 76 61 6c 69 64 63 68 |sgetch()| validch|
|00005170| 61 72 28 29 20 5f 63 75 | 72 73 65 73 70 65 6e 64 |ar() _cu|rsespend|
|00005180| 63 68 28 29 20 2d 20 6d | 61 6e 69 70 75 6c 61 74 |ch() - m|anipulat|
|00005190| 65 20 69 6e 70 75 74 20 | 63 68 61 72 61 63 74 65 |e input |characte|
|000051a0| 72 73 0a 58 0a 58 53 59 | 4e 4f 50 53 49 53 0a 58 |rs.X.XSY|NOPSIS.X|
|000051b0| 09 23 69 6e 63 6c 75 64 | 65 20 3c 63 75 72 73 65 |.#includ|e <curse|
|000051c0| 73 2e 68 3e 0a 58 09 23 | 69 6e 63 6c 75 64 65 20 |s.h>.X.#|include |
|000051d0| 3c 63 75 72 73 70 72 69 | 76 2e 68 3e 0a 58 0a 58 |<curspri|v.h>.X.X|
|000051e0| 09 69 6e 74 20 77 67 65 | 74 63 68 28 77 69 6e 29 |.int wge|tch(win)|
|000051f0| 0a 58 09 57 49 4e 44 4f | 57 20 2a 77 69 6e 3b 0a |.X.WINDO|W *win;.|
|00005200| 58 0a 58 09 76 6f 69 64 | 20 66 6c 75 73 68 69 6e |X.X.void| flushin|
|00005210| 70 28 29 0a 58 0a 58 09 | 69 6e 74 20 77 75 6e 67 |p().X.X.|int wung|
|00005220| 65 74 63 68 28 63 68 29 | 0a 58 09 69 6e 74 20 63 |etch(ch)|.X.int c|
|00005230| 68 3b 0a 58 0a 58 09 69 | 6e 74 20 6d 76 67 65 74 |h;.X.X.i|nt mvget|
|00005240| 63 68 28 79 2c 78 29 0a | 58 09 69 6e 74 20 79 3b |ch(y,x).|X.int y;|
|00005250| 0a 58 09 69 6e 74 20 78 | 3b 0a 58 0a 58 09 69 6e |.X.int x|;.X.X.in|
|00005260| 74 20 6d 76 77 67 65 74 | 63 68 28 77 69 6e 2c 79 |t mvwget|ch(win,y|
|00005270| 2c 78 29 0a 58 09 57 49 | 4e 44 4f 57 20 2a 77 69 |,x).X.WI|NDOW *wi|
|00005280| 6e 3b 0a 58 09 69 6e 74 | 20 79 3b 0a 58 09 69 6e |n;.X.int| y;.X.in|
|00005290| 74 20 78 3b 0a 58 0a 58 | 09 73 74 61 74 69 63 20 |t x;.X.X|.static |
|000052a0| 69 6e 74 20 72 61 77 67 | 65 74 63 68 28 29 0a 58 |int rawg|etch().X|
|000052b0| 0a 58 09 73 74 61 74 69 | 63 20 69 6e 74 20 73 79 |.X.stati|c int sy|
|000052c0| 73 67 65 74 63 68 28 29 | 0a 58 0a 58 09 73 74 61 |sgetch()|.X.X.sta|
|000052d0| 74 69 63 20 69 6e 74 20 | 76 61 6c 69 64 63 68 61 |tic int |validcha|
|000052e0| 72 28 63 29 0a 58 09 69 | 6e 74 20 63 3b 0a 58 0a |r(c).X.i|nt c;.X.|
|000052f0| 58 09 62 6f 6f 6c 20 5f | 63 75 72 73 65 73 70 65 |X.bool _|cursespe|
|00005300| 6e 64 63 68 28 29 0a 58 | 0a 58 44 45 53 43 52 49 |ndch().X|.XDESCRI|
|00005310| 50 54 49 4f 4e 0a 58 09 | 77 67 65 74 63 68 28 77 |PTION.X.|wgetch(w|
|00005320| 69 6e 29 20 67 65 74 73 | 20 61 20 63 68 61 72 61 |in) gets| a chara|
|00005330| 63 74 65 72 20 66 72 6f | 6d 20 74 68 65 20 74 65 |cter fro|m the te|
|00005340| 72 6d 69 6e 61 6c 2c 20 | 69 6e 20 6e 6f 72 6d 61 |rminal, |in norma|
|00005350| 6c 2c 20 20 0a 58 09 63 | 62 72 65 61 6b 20 6f 72 |l, .X.c|break or|
|00005360| 20 72 61 77 20 6d 6f 64 | 65 2c 20 6f 70 74 69 6f | raw mod|e, optio|
|00005370| 6e 61 6c 6c 79 20 65 63 | 68 6f 69 6e 67 20 74 6f |nally ec|hoing to|
|00005380| 20 77 69 6e 64 6f 77 20 | 27 77 69 6e 27 2e 20 20 | window |'win'. |
|00005390| 0a 58 0a 58 09 66 6c 75 | 73 68 69 6e 70 28 29 20 |.X.X.flu|shinp() |
|000053a0| 6b 69 6c 6c 73 20 61 6e | 79 20 70 65 6e 64 69 6e |kills an|y pendin|
|000053b0| 67 20 69 6e 70 75 74 20 | 63 68 61 72 61 63 74 65 |g input |characte|
|000053c0| 72 73 2e 20 20 0a 58 0a | 58 09 77 75 6e 67 65 74 |rs. .X.|X.wunget|
|000053d0| 63 68 28 29 20 70 75 73 | 68 65 73 20 62 61 63 6b |ch() pus|hes back|
|000053e0| 20 69 74 27 73 20 61 72 | 67 75 6d 65 6e 74 20 6f | it's ar|gument o|
|000053f0| 6e 20 74 68 65 20 69 6e | 70 75 74 20 73 74 72 65 |n the in|put stre|
|00005400| 61 6d 2e 20 49 66 20 20 | 0a 58 09 4f 4b 2c 20 72 |am. If |.X.OK, r|
|00005410| 65 74 75 72 6e 73 20 31 | 2c 20 6f 74 68 65 72 77 |eturns 1|, otherw|
|00005420| 69 73 65 20 72 65 74 75 | 72 6e 73 20 30 2e 20 20 |ise retu|rns 0. |
|00005430| 0a 58 0a 58 09 6d 76 67 | 65 74 63 68 28 29 20 66 |.X.X.mvg|etch() f|
|00005440| 69 72 73 74 20 6d 6f 76 | 65 73 20 74 68 65 20 73 |irst mov|es the s|
|00005450| 74 64 73 63 72 20 63 75 | 72 73 6f 72 20 74 6f 20 |tdscr cu|rsor to |
|00005460| 61 20 6e 65 77 20 6c 6f | 63 61 74 69 6f 6e 2c 20 |a new lo|cation, |
|00005470| 20 0a 58 09 74 68 65 6e | 20 64 6f 65 73 20 61 20 | .X.then| does a |
|00005480| 77 67 65 74 63 68 28 29 | 20 6f 6e 20 73 74 64 73 |wgetch()| on stds|
|00005490| 63 72 2e 20 20 0a 58 0a | 58 09 6d 76 77 67 65 74 |cr. .X.|X.mvwget|
|000054a0| 63 68 28 29 20 66 69 72 | 73 74 20 6d 6f 76 65 73 |ch() fir|st moves|
|000054b0| 20 74 68 65 20 63 75 72 | 73 6f 72 20 6f 66 20 77 | the cur|sor of w|
|000054c0| 69 6e 64 6f 77 20 27 77 | 69 6e 27 20 74 6f 20 61 |indow 'w|in' to a|
|000054d0| 20 6e 65 77 20 20 0a 58 | 09 6c 6f 63 61 74 69 6f | new .X|.locatio|
|000054e0| 6e 2c 20 74 68 65 6e 20 | 64 6f 65 73 20 61 20 77 |n, then |does a w|
|000054f0| 67 65 74 63 68 28 29 20 | 69 6e 20 27 77 69 6e 27 |getch() |in 'win'|
|00005500| 2e 20 20 0a 58 0a 58 09 | 72 61 77 67 65 74 63 68 |. .X.X.|rawgetch|
|00005510| 28 29 20 67 65 74 73 20 | 61 20 63 68 61 72 61 63 |() gets |a charac|
|00005520| 74 65 72 20 77 69 74 68 | 6f 75 74 20 61 6e 79 20 |ter with|out any |
|00005530| 69 6e 74 65 72 70 72 65 | 74 61 74 69 6f 6e 20 61 |interpre|tation a|
|00005540| 74 20 20 0a 58 09 61 6c | 6c 20 61 6e 64 20 72 65 |t .X.al|l and re|
|00005550| 74 75 72 6e 73 20 69 74 | 2e 20 49 66 20 6b 65 79 |turns it|. If key|
|00005560| 70 61 64 20 6d 6f 64 65 | 20 69 73 20 61 63 74 69 |pad mode| is acti|
|00005570| 76 65 20 66 6f 72 20 74 | 68 65 20 64 65 73 69 67 |ve for t|he desig|
|00005580| 2d 20 20 0a 58 09 6e 61 | 74 65 64 20 77 69 6e 64 |- .X.na|ted wind|
|00005590| 6f 77 2c 20 66 75 6e 63 | 74 69 6f 6e 20 6b 65 79 |ow, func|tion key|
|000055a0| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 20 77 69 6c | transla|tion wil|
|000055b0| 6c 20 62 65 20 70 65 72 | 66 6f 72 6d 65 64 2e 20 |l be per|formed. |
|000055c0| 20 0a 58 09 4f 74 68 65 | 72 77 69 73 65 2c 20 66 | .X.Othe|rwise, f|
|000055d0| 75 6e 63 74 69 6f 6e 20 | 6b 65 79 73 20 61 72 65 |unction |keys are|
|000055e0| 20 69 67 6e 6f 72 65 64 | 2e 49 66 20 6e 6f 64 65 | ignored|.If node|
|000055f0| 6c 61 79 20 6d 6f 64 65 | 20 69 73 20 20 0a 58 09 |lay mode| is .X.|
|00005600| 61 63 74 69 76 65 20 69 | 6e 20 74 68 65 20 77 69 |active i|n the wi|
|00005610| 6e 64 6f 77 2c 20 74 68 | 65 6e 20 72 61 77 67 65 |ndow, th|en rawge|
|00005620| 74 63 68 28 29 20 72 65 | 74 75 72 6e 73 20 2d 31 |tch() re|turns -1|
|00005630| 20 69 66 20 6e 6f 20 63 | 68 61 2d 20 20 0a 58 09 | if no c|ha- .X.|
|00005640| 72 61 63 74 65 72 20 69 | 73 20 61 76 61 69 6c 61 |racter i|s availa|
|00005650| 62 6c 65 2e 20 20 0a 58 | 0a 58 09 73 79 73 67 65 |ble. .X|.X.sysge|
|00005660| 74 63 68 28 29 20 67 65 | 74 73 20 61 20 63 68 61 |tch() ge|ts a cha|
|00005670| 72 61 63 74 65 72 20 77 | 69 74 68 20 6e 6f 72 6d |racter w|ith norm|
|00005680| 61 6c 20 5e 53 2c 20 5e | 51 2c 20 5e 50 20 61 6e |al ^S, ^|Q, ^P an|
|00005690| 64 20 5e 43 20 20 0a 58 | 09 69 6e 74 65 72 70 72 |d ^C .X|.interpr|
|000056a0| 65 74 61 74 69 6f 6e 20 | 61 6e 64 20 72 65 74 75 |etation |and retu|
|000056b0| 72 6e 73 20 69 74 2e 20 | 49 66 20 6b 65 79 70 61 |rns it. |If keypa|
|000056c0| 64 20 6d 6f 64 65 20 69 | 73 20 61 63 74 69 76 65 |d mode i|s active|
|000056d0| 20 66 6f 72 20 20 0a 58 | 09 74 68 65 20 64 65 73 | for .X|.the des|
|000056e0| 69 67 6e 61 74 65 64 20 | 77 69 6e 64 6f 77 2c 20 |ignated |window, |
|000056f0| 66 75 6e 63 74 69 6f 6e | 20 6b 65 79 20 74 72 61 |function| key tra|
|00005700| 6e 73 6c 61 74 69 6f 6e | 20 77 69 6c 6c 20 62 65 |nslation| will be|
|00005710| 20 70 65 72 2d 20 20 0a | 58 09 66 6f 72 6d 65 64 | per- .|X.formed|
|00005720| 2e 20 4f 74 68 65 72 77 | 69 73 65 2c 20 66 75 6e |. Otherw|ise, fun|
|00005730| 63 74 69 6f 6e 20 6b 65 | 79 73 20 61 72 65 20 69 |ction ke|ys are i|
|00005740| 67 6e 6f 72 65 64 2e 20 | 49 66 20 6e 6f 64 65 6c |gnored. |If nodel|
|00005750| 61 79 20 20 0a 58 09 6d | 6f 64 65 20 69 73 20 61 |ay .X.m|ode is a|
|00005760| 63 74 69 76 65 20 69 6e | 20 74 68 65 20 77 69 6e |ctive in| the win|
|00005770| 64 6f 77 2c 20 74 68 65 | 6e 20 73 79 73 67 65 74 |dow, the|n sysget|
|00005780| 63 68 28 29 20 72 65 74 | 75 72 6e 73 20 2d 31 20 |ch() ret|urns -1 |
|00005790| 69 66 20 20 0a 58 09 6e | 6f 20 63 68 61 72 61 63 |if .X.n|o charac|
|000057a0| 74 65 72 20 69 73 20 61 | 76 61 69 6c 61 62 6c 65 |ter is a|vailable|
|000057b0| 2e 20 20 0a 58 0a 58 09 | 76 61 6c 69 64 63 68 61 |. .X.X.|validcha|
|000057c0| 72 28 63 29 20 63 68 65 | 63 6b 73 20 74 68 61 74 |r(c) che|cks that|
|000057d0| 20 27 63 27 20 69 73 20 | 61 20 76 61 6c 69 64 20 | 'c' is |a valid |
|000057e0| 63 68 61 72 61 63 74 65 | 72 2c 20 61 6e 64 20 20 |characte|r, and |
|000057f0| 0a 58 09 69 66 20 73 6f | 20 72 65 74 75 72 6e 73 |.X.if so| returns|
|00005800| 20 69 74 2c 20 77 69 74 | 68 20 66 75 6e 63 74 69 | it, wit|h functi|
|00005810| 6f 6e 20 6b 65 79 20 74 | 72 61 6e 73 6c 61 74 69 |on key t|ranslati|
|00005820| 6f 6e 20 61 70 70 6c 69 | 65 64 20 69 66 20 20 0a |on appli|ed if .|
|00005830| 58 09 27 77 27 20 68 61 | 73 20 6b 65 79 70 61 64 |X.'w' ha|s keypad|
|00005840| 20 6d 6f 64 65 20 73 65 | 74 2e 20 49 66 20 63 68 | mode se|t. If ch|
|00005850| 61 72 20 69 73 20 69 6e | 76 61 6c 69 64 2c 20 72 |ar is in|valid, r|
|00005860| 65 74 75 72 6e 73 20 2d | 31 2e 20 20 0a 58 0a 58 |eturns -|1. .X.X|
|00005870| 09 5f 63 75 72 73 65 73 | 70 65 6e 64 63 68 28 29 |._curses|pendch()|
|00005880| 20 72 65 74 75 72 6e 73 | 20 31 20 69 66 20 74 68 | returns| 1 if th|
|00005890| 65 72 65 20 69 73 20 61 | 6e 79 20 63 68 61 72 61 |ere is a|ny chara|
|000058a0| 63 74 65 72 20 61 76 61 | 69 2d 20 20 0a 58 09 6c |cter ava|i- .X.l|
|000058b0| 61 62 6c 65 2c 20 61 6e | 64 20 30 20 69 66 20 74 |able, an|d 0 if t|
|000058c0| 68 65 72 65 20 69 73 20 | 6e 6f 6e 65 2e 20 74 68 |here is |none. th|
|000058d0| 69 73 20 69 73 20 6e 6f | 74 20 66 6f 72 20 70 72 |is is no|t for pr|
|000058e0| 6f 67 72 61 6d 6d 65 72 | 20 20 0a 58 09 75 73 61 |ogrammer| .X.usa|
|000058f0| 67 65 2c 20 62 75 74 20 | 66 6f 72 20 74 68 65 20 |ge, but |for the |
|00005900| 75 70 64 61 74 65 77 20 | 72 6f 75 74 69 6e 65 73 |updatew |routines|
|00005910| 2e 20 20 0a 58 0a 58 45 | 58 41 4d 50 4c 45 53 0a |. .X.XE|XAMPLES.|
|00005920| 58 0a 58 53 45 45 20 41 | 4c 53 4f 0a 58 09 72 61 |X.XSEE A|LSO.X.ra|
|00005930| 77 67 65 74 63 68 28 29 | 3b 20 5f 63 75 72 73 65 |wgetch()|; _curse|
|00005940| 73 67 63 62 28 29 3b 20 | 5f 63 75 72 73 65 73 73 |sgcb(); |_cursess|
|00005950| 63 62 28 29 3b 20 73 79 | 73 67 65 74 63 68 28 29 |cb(); sy|sgetch()|
|00005960| 3b 20 5f 63 75 72 73 65 | 73 73 63 62 28 29 3b 0a |; _curse|sscb();.|
|00005970| 58 09 77 61 64 64 63 68 | 28 29 3b 20 77 72 65 66 |X.waddch|(); wref|
|00005980| 72 65 73 68 28 29 3b 20 | 5f 63 75 72 73 65 73 6b |resh(); |_cursesk|
|00005990| 65 79 28 29 3b 20 6b 62 | 68 69 74 28 29 3b 20 67 |ey(); kb|hit(); g|
|000059a0| 65 74 63 68 28 29 3b 20 | 77 6d 6f 76 65 28 29 3b |etch(); |wmove();|
|000059b0| 0a 58 09 77 67 65 74 63 | 68 28 29 3b 20 5f 63 75 |.X.wgetc|h(); _cu|
|000059c0| 72 73 65 73 6b 65 79 74 | 73 74 28 29 3b 20 76 61 |rseskeyt|st(); va|
|000059d0| 6c 69 64 63 68 61 72 28 | 29 3b 0a 58 0a 58 42 55 |lidchar(|);.X.XBU|
|000059e0| 47 53 0a 53 48 41 52 5f | 45 4f 46 0a 69 66 20 74 |GS.SHAR_|EOF.if t|
|000059f0| 65 73 74 20 32 32 32 33 | 20 2d 6e 65 20 22 60 77 |est 2223| -ne "`w|
|00005a00| 63 20 2d 63 20 3c 20 27 | 73 79 73 67 65 74 63 68 |c -c < '|sysgetch|
|00005a10| 2e 6d 27 60 22 0a 74 68 | 65 6e 0a 09 65 63 68 6f |.m'`".th|en..echo|
|00005a20| 20 73 68 61 72 3a 20 65 | 72 72 6f 72 20 74 72 61 | shar: e|rror tra|
|00005a30| 6e 73 6d 69 74 74 69 6e | 67 20 22 27 73 79 73 67 |nsmittin|g "'sysg|
|00005a40| 65 74 63 68 2e 6d 27 22 | 20 27 28 73 68 6f 75 6c |etch.m'"| '(shoul|
|00005a50| 64 20 68 61 76 65 20 62 | 65 65 6e 20 32 32 32 33 |d have b|een 2223|
|00005a60| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 66 69 | charact|ers)'.fi|
|00005a70| 0a 66 69 20 23 20 65 6e | 64 20 6f 66 20 6f 76 65 |.fi # en|d of ove|
|00005a80| 72 77 72 69 74 69 6e 67 | 20 63 68 65 63 6b 0a 65 |rwriting| check.e|
|00005a90| 63 68 6f 20 73 68 61 72 | 3a 20 65 78 74 72 61 63 |cho shar|: extrac|
|00005aa0| 74 69 6e 67 20 22 27 74 | 61 62 73 69 7a 65 2e 6d |ting "'t|absize.m|
|00005ab0| 27 22 20 27 28 34 32 39 | 20 63 68 61 72 61 63 74 |'" '(429| charact|
|00005ac0| 65 72 73 29 27 0a 69 66 | 20 74 65 73 74 20 2d 66 |ers)'.if| test -f|
|00005ad0| 20 27 74 61 62 73 69 7a | 65 2e 6d 27 0a 74 68 65 | 'tabsiz|e.m'.the|
|00005ae0| 6e 0a 09 65 63 68 6f 20 | 73 68 61 72 3a 20 77 69 |n..echo |shar: wi|
|00005af0| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00005b00| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00005b10| 22 27 74 61 62 73 69 7a | 65 2e 6d 27 22 0a 65 6c |"'tabsiz|e.m'".el|
|00005b20| 73 65 0a 73 65 64 20 27 | 73 2f 5e 58 2f 2f 27 20 |se.sed '|s/^X//' |
|00005b30| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|00005b40| 74 61 62 73 69 7a 65 2e | 6d 27 0a 58 4e 41 4d 45 |tabsize.|m'.XNAME|
|00005b50| 0a 58 09 77 74 61 62 73 | 69 7a 65 28 29 20 74 61 |.X.wtabs|ize() ta|
|00005b60| 62 73 69 7a 65 28 74 73 | 29 20 2d 20 73 65 74 20 |bsize(ts|) - set |
|00005b70| 74 68 65 20 74 61 62 73 | 69 7a 65 20 61 6e 64 20 |the tabs|ize and |
|00005b80| 72 65 74 75 72 6e 20 74 | 68 65 20 6f 72 69 67 69 |return t|he origi|
|00005b90| 6e 61 6c 20 76 61 6c 75 | 65 20 20 0a 58 0a 58 53 |nal valu|e .X.XS|
|00005ba0| 59 4e 4f 50 53 49 53 0a | 58 09 23 69 6e 63 6c 75 |YNOPSIS.|X.#inclu|
|00005bb0| 64 65 20 3c 63 75 72 73 | 65 73 2e 68 3e 0a 58 09 |de <curs|es.h>.X.|
|00005bc0| 23 69 6e 63 6c 75 64 65 | 20 3c 63 75 72 73 70 72 |#include| <curspr|
|00005bd0| 69 76 2e 68 3e 0a 58 0a | 58 09 69 6e 74 20 77 74 |iv.h>.X.|X.int wt|
|00005be0| 61 62 73 69 7a 65 28 77 | 69 6e 2c 74 73 29 0a 58 |absize(w|in,ts).X|
|00005bf0| 09 57 49 4e 44 4f 57 20 | 2a 77 69 6e 3b 0a 58 09 |.WINDOW |*win;.X.|
|00005c00| 69 6e 74 20 74 73 3b 0a | 58 0a 58 09 69 6e 74 20 |int ts;.|X.X.int |
|00005c10| 74 61 62 73 69 7a 65 28 | 74 73 29 0a 58 09 69 6e |tabsize(|ts).X.in|
|00005c20| 74 20 74 73 3b 0a 58 0a | 58 44 45 53 43 52 49 50 |t ts;.X.|XDESCRIP|
|00005c30| 54 49 4f 4e 0a 58 09 77 | 74 61 62 73 69 7a 65 28 |TION.X.w|tabsize(|
|00005c40| 77 69 6e 2c 74 73 29 20 | 73 65 74 73 20 74 68 65 |win,ts) |sets the|
|00005c50| 20 74 61 62 73 69 7a 65 | 20 6f 66 20 77 69 6e 64 | tabsize| of wind|
|00005c60| 6f 77 20 27 77 69 6e 27 | 20 74 6f 20 27 74 73 27 |ow 'win'| to 'ts'|
|00005c70| 2c 20 20 0a 58 09 61 6e | 64 20 72 65 74 75 72 6e |, .X.an|d return|
|00005c80| 73 20 74 68 65 20 6f 72 | 69 67 69 6e 61 6c 20 76 |s the or|iginal v|
|00005c90| 61 6c 75 65 2e 20 20 0a | 58 0a 58 09 74 61 62 73 |alue. .|X.X.tabs|
|00005ca0| 69 7a 65 28 74 73 29 20 | 73 65 74 73 20 74 68 65 |ize(ts) |sets the|
|00005cb0| 20 74 61 62 73 69 7a 65 | 20 6f 66 20 73 74 64 73 | tabsize| of stds|
|00005cc0| 63 72 20 74 6f 20 27 74 | 73 27 2c 20 61 6e 64 20 |cr to 't|s', and |
|00005cd0| 72 65 74 75 72 6e 73 20 | 20 0a 58 09 74 68 65 20 |returns | .X.the |
|00005ce0| 6f 72 69 67 69 6e 61 6c | 20 76 61 6c 75 65 2e 20 |original| value. |
|00005cf0| 20 0a 58 0a 58 45 58 41 | 4d 50 4c 45 53 0a 58 0a | .X.XEXA|MPLES.X.|
|00005d00| 58 53 45 45 20 41 4c 53 | 4f 0a 58 0a 58 42 55 47 |XSEE ALS|O.X.XBUG|
|00005d10| 53 0a 53 48 41 52 5f 45 | 4f 46 0a 69 66 20 74 65 |S.SHAR_E|OF.if te|
|00005d20| 73 74 20 34 32 39 20 2d | 6e 65 20 22 60 77 63 20 |st 429 -|ne "`wc |
|00005d30| 2d 63 20 3c 20 27 74 61 | 62 73 69 7a 65 2e 6d 27 |-c < 'ta|bsize.m'|
|00005d40| 60 22 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |`".then.|.echo sh|
|00005d50| 61 72 3a 20 65 72 72 6f | 72 20 74 72 61 6e 73 6d |ar: erro|r transm|
|00005d60| 69 74 74 69 6e 67 20 22 | 27 74 61 62 73 69 7a 65 |itting "|'tabsize|
|00005d70| 2e 6d 27 22 20 27 28 73 | 68 6f 75 6c 64 20 68 61 |.m'" '(s|hould ha|
|00005d80| 76 65 20 62 65 65 6e 20 | 34 32 39 20 63 68 61 72 |ve been |429 char|
|00005d90| 61 63 74 65 72 73 29 27 | 0a 66 69 0a 66 69 20 23 |acters)'|.fi.fi #|
|00005da0| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|00005db0| 69 6e 67 20 63 68 65 63 | 6b 0a 65 63 68 6f 20 73 |ing chec|k.echo s|
|00005dc0| 68 61 72 3a 20 65 78 74 | 72 61 63 74 69 6e 67 20 |har: ext|racting |
|00005dd0| 22 27 74 6f 75 63 68 77 | 69 6e 2e 6d 27 22 20 27 |"'touchw|in.m'" '|
|00005de0| 28 32 39 35 20 63 68 61 | 72 61 63 74 65 72 73 29 |(295 cha|racters)|
|00005df0| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 74 6f |'.if tes|t -f 'to|
|00005e00| 75 63 68 77 69 6e 2e 6d | 27 0a 74 68 65 6e 0a 09 |uchwin.m|'.then..|
|00005e10| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|00005e20| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|00005e30| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 74 |xisting |file "'t|
|00005e40| 6f 75 63 68 77 69 6e 2e | 6d 27 22 0a 65 6c 73 65 |ouchwin.|m'".else|
|00005e50| 0a 73 65 64 20 27 73 2f | 5e 58 2f 2f 27 20 3c 3c |.sed 's/|^X//' <<|
|00005e60| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 74 6f | \SHAR_E|OF > 'to|
|00005e70| 75 63 68 77 69 6e 2e 6d | 27 0a 58 4e 41 4d 45 0a |uchwin.m|'.XNAME.|
|00005e80| 58 09 74 6f 75 63 68 77 | 69 6e 28 29 20 2d 20 6d |X.touchw|in() - m|
|00005e90| 61 72 6b 20 61 6c 6c 20 | 6c 69 6e 65 73 20 6f 66 |ark all |lines of|
|00005ea0| 20 77 69 6e 64 6f 77 20 | 61 73 20 63 68 61 6e 67 | window |as chang|
|00005eb0| 65 64 2e 0a 58 0a 58 53 | 59 4e 4f 50 53 49 53 0a |ed..X.XS|YNOPSIS.|
|00005ec0| 58 09 23 69 6e 63 6c 75 | 64 65 20 3c 63 75 72 73 |X.#inclu|de <curs|
|00005ed0| 65 73 2e 68 3e 0a 58 09 | 23 69 6e 63 6c 75 64 65 |es.h>.X.|#include|
|00005ee0| 20 3c 63 75 72 73 70 72 | 69 76 2e 68 3e 0a 58 0a | <curspr|iv.h>.X.|
|00005ef0| 58 09 76 6f 69 64 20 74 | 6f 75 63 68 77 69 6e 28 |X.void t|ouchwin(|
|00005f00| 77 69 6e 29 0a 58 09 57 | 49 4e 44 4f 57 20 2a 77 |win).X.W|INDOW *w|
|00005f10| 69 6e 3b 0a 58 0a 58 44 | 45 53 43 52 49 50 54 49 |in;.X.XD|ESCRIPTI|
|00005f20| 4f 4e 0a 58 09 74 6f 75 | 63 68 77 69 6e 28 29 20 |ON.X.tou|chwin() |
|00005f30| 6d 61 72 6b 73 20 61 6c | 6c 20 6c 69 6e 65 73 20 |marks al|l lines |
|00005f40| 6f 66 20 77 69 6e 64 6f | 77 20 27 77 69 6e 27 20 |of windo|w 'win' |
|00005f50| 61 73 20 63 68 61 6e 67 | 65 64 2c 20 66 72 6f 6d |as chang|ed, from|
|00005f60| 20 20 0a 58 09 74 68 65 | 20 66 69 72 73 74 20 74 | .X.the| first t|
|00005f70| 6f 20 74 68 65 20 6c 61 | 73 74 20 63 68 61 72 61 |o the la|st chara|
|00005f80| 63 74 65 72 20 6f 6e 20 | 74 68 65 20 6c 69 6e 65 |cter on |the line|
|00005f90| 2e 20 20 0a 58 0a 58 45 | 58 41 4d 50 4c 45 53 0a |. .X.XE|XAMPLES.|
|00005fa0| 58 0a 58 53 45 45 20 41 | 4c 53 4f 0a 58 0a 58 42 |X.XSEE A|LSO.X.XB|
|00005fb0| 55 47 53 0a 53 48 41 52 | 5f 45 4f 46 0a 69 66 20 |UGS.SHAR|_EOF.if |
|00005fc0| 74 65 73 74 20 32 39 35 | 20 2d 6e 65 20 22 60 77 |test 295| -ne "`w|
|00005fd0| 63 20 2d 63 20 3c 20 27 | 74 6f 75 63 68 77 69 6e |c -c < '|touchwin|
|00005fe0| 2e 6d 27 60 22 0a 74 68 | 65 6e 0a 09 65 63 68 6f |.m'`".th|en..echo|
|00005ff0| 20 73 68 61 72 3a 20 65 | 72 72 6f 72 20 74 72 61 | shar: e|rror tra|
|00006000| 6e 73 6d 69 74 74 69 6e | 67 20 22 27 74 6f 75 63 |nsmittin|g "'touc|
|00006010| 68 77 69 6e 2e 6d 27 22 | 20 27 28 73 68 6f 75 6c |hwin.m'"| '(shoul|
|00006020| 64 20 68 61 76 65 20 62 | 65 65 6e 20 32 39 35 20 |d have b|een 295 |
|00006030| 63 68 61 72 61 63 74 65 | 72 73 29 27 0a 66 69 0a |characte|rs)'.fi.|
|00006040| 66 69 20 23 20 65 6e 64 | 20 6f 66 20 6f 76 65 72 |fi # end| of over|
|00006050| 77 72 69 74 69 6e 67 20 | 63 68 65 63 6b 0a 65 63 |writing |check.ec|
|00006060| 68 6f 20 73 68 61 72 3a | 20 65 78 74 72 61 63 74 |ho shar:| extract|
|00006070| 69 6e 67 20 22 27 75 6e | 63 74 72 6c 2e 6d 27 22 |ing "'un|ctrl.m'"|
|00006080| 20 27 28 32 36 32 20 63 | 68 61 72 61 63 74 65 72 | '(262 c|haracter|
|00006090| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|000060a0| 75 6e 63 74 72 6c 2e 6d | 27 0a 74 68 65 6e 0a 09 |unctrl.m|'.then..|
|000060b0| 65 63 68 6f 20 73 68 61 | 72 3a 20 77 69 6c 6c 20 |echo sha|r: will |
|000060c0| 6e 6f 74 20 6f 76 65 72 | 2d 77 72 69 74 65 20 65 |not over|-write e|
|000060d0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 22 27 75 |xisting |file "'u|
|000060e0| 6e 63 74 72 6c 2e 6d 27 | 22 0a 65 6c 73 65 0a 73 |nctrl.m'|".else.s|
|000060f0| 65 64 20 27 73 2f 5e 58 | 2f 2f 27 20 3c 3c 20 5c |ed 's/^X|//' << \|
|00006100| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 75 6e 63 74 |SHAR_EOF| > 'unct|
|00006110| 72 6c 2e 6d 27 0a 58 4e | 41 4d 45 0a 58 09 75 6e |rl.m'.XN|AME.X.un|
|00006120| 63 74 72 6c 28 29 20 2d | 20 72 65 74 75 72 6e 20 |ctrl() -| return |
|00006130| 61 20 63 68 61 72 20 70 | 6f 69 6e 74 65 72 20 74 |a char p|ointer t|
|00006140| 6f 20 61 20 73 74 72 69 | 6e 67 0a 58 0a 58 53 59 |o a stri|ng.X.XSY|
|00006150| 4e 4f 50 53 49 53 0a 58 | 09 23 69 6e 63 6c 75 64 |NOPSIS.X|.#includ|
|00006160| 65 20 3c 63 75 72 73 65 | 73 2e 68 3e 0a 58 09 23 |e <curse|s.h>.X.#|
|00006170| 69 6e 63 6c 75 64 65 20 | 3c 63 75 72 73 70 72 69 |include |<curspri|
|00006180| 76 2e 68 3e 0a 58 0a 58 | 09 63 68 61 72 20 2a 75 |v.h>.X.X|.char *u|
|00006190| 6e 63 74 72 6c 28 63 29 | 0a 58 09 63 68 61 72 20 |nctrl(c)|.X.char |
|000061a0| 63 3b 0a 58 0a 58 44 45 | 53 43 52 49 50 54 49 4f |c;.X.XDE|SCRIPTIO|
|000061b0| 4e 0a 58 09 75 6e 63 74 | 72 6c 28 29 20 72 65 74 |N.X.unct|rl() ret|
|000061c0| 75 72 6e 73 20 61 20 63 | 68 61 72 20 70 6f 69 6e |urns a c|har poin|
|000061d0| 74 65 72 20 74 6f 20 61 | 20 73 74 72 69 6e 67 20 |ter to a| string |
|000061e0| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 74 6f |correspo|nding to|
|000061f0| 20 20 0a 58 09 61 72 67 | 75 6d 65 6e 74 20 63 68 | .X.arg|ument ch|
|00006200| 61 72 61 63 74 65 72 20 | 27 63 27 2e 20 20 0a 58 |aracter |'c'. .X|
|00006210| 0a 58 45 58 41 4d 50 4c | 45 53 0a 58 0a 58 53 45 |.XEXAMPL|ES.X.XSE|
|00006220| 45 20 41 4c 53 4f 0a 58 | 0a 58 42 55 47 53 0a 53 |E ALSO.X|.XBUGS.S|
|00006230| 48 41 52 5f 45 4f 46 0a | 69 66 20 74 65 73 74 20 |HAR_EOF.|if test |
|00006240| 32 36 32 20 2d 6e 65 20 | 22 60 77 63 20 2d 63 20 |262 -ne |"`wc -c |
|00006250| 3c 20 27 75 6e 63 74 72 | 6c 2e 6d 27 60 22 0a 74 |< 'unctr|l.m'`".t|
|00006260| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00006270| 65 72 72 6f 72 20 74 72 | 61 6e 73 6d 69 74 74 69 |error tr|ansmitti|
|00006280| 6e 67 20 22 27 75 6e 63 | 74 72 6c 2e 6d 27 22 20 |ng "'unc|trl.m'" |
|00006290| 27 28 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 |'(should| have be|
|000062a0| 65 6e 20 32 36 32 20 63 | 68 61 72 61 63 74 65 72 |en 262 c|haracter|
|000062b0| 73 29 27 0a 66 69 0a 66 | 69 20 23 20 65 6e 64 20 |s)'.fi.f|i # end |
|000062c0| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|000062d0| 68 65 63 6b 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |heck.ech|o shar: |
|000062e0| 65 78 74 72 61 63 74 69 | 6e 67 20 22 27 76 61 6c |extracti|ng "'val|
|000062f0| 69 64 63 68 61 72 2e 6d | 27 22 20 27 28 32 32 32 |idchar.m|'" '(222|
|00006300| 33 20 63 68 61 72 61 63 | 74 65 72 73 29 27 0a 69 |3 charac|ters)'.i|
|00006310| 66 20 74 65 73 74 20 2d | 66 20 27 76 61 6c 69 64 |f test -|f 'valid|
|00006320| 63 68 61 72 2e 6d 27 0a | 74 68 65 6e 0a 09 65 63 |char.m'.|then..ec|
|00006330| 68 6f 20 73 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |ho shar:| will no|
|00006340| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|00006350| 73 74 69 6e 67 20 66 69 | 6c 65 20 22 27 76 61 6c |sting fi|le "'val|
|00006360| 69 64 63 68 61 72 2e 6d | 27 22 0a 65 6c 73 65 0a |idchar.m|'".else.|
|00006370| 73 65 64 20 27 73 2f 5e | 58 2f 2f 27 20 3c 3c 20 |sed 's/^|X//' << |
|00006380| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 76 61 6c |\SHAR_EO|F > 'val|
|00006390| 69 64 63 68 61 72 2e 6d | 27 0a 58 4e 41 4d 45 0a |idchar.m|'.XNAME.|
|000063a0| 58 09 67 65 74 63 68 28 | 29 20 2d 20 2a 2a 2a 73 |X.getch(|) - ***s|
|000063b0| 61 6d 65 20 61 73 20 77 | 67 65 74 63 68 28 29 2a |ame as w|getch()*|
|000063c0| 2a 2a 20 73 65 65 20 63 | 75 72 73 65 73 2e 68 0a |** see c|urses.h.|
|000063d0| 58 09 77 67 65 74 63 68 | 28 29 20 66 6c 75 73 68 |X.wgetch|() flush|
|000063e0| 69 6e 70 28 29 20 77 75 | 6e 67 65 74 63 68 28 29 |inp() wu|ngetch()|
|000063f0| 20 6d 76 67 65 74 63 68 | 28 29 20 6d 76 77 67 65 | mvgetch|() mvwge|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.