home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / compsrcs / misc / volume04 / curseswd.gts < prev    next >
SHell self-extracting ARchive  |  1991-08-27  |  56.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: SHell self-extracting ARchive (archive/shar).

You can browse this item here: curseswd.gts

ConfidenceProgramDetectionMatch TypeSupport
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 C source text default
99% file C source, ASCII text, with very long lines (511) 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 application/mbox default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 20 64 65 63 | 77 72 6c 21 70 75 72 64 |From dec|wrl!purd|
|00000010| 75 65 21 6d 61 69 6c 72 | 75 73 21 6e 63 61 72 21 |ue!mailr|us!ncar!|
|00000020| 74 61 6e 6b 21 6e 69 63 | 2e 4d 52 2e 4e 45 54 21 |tank!nic|.MR.NET!|
|00000030| 68 61 6c 21 6e 63 6f 61 | 73 74 21 61 6c 6c 62 65 |hal!ncoa|st!allbe|
|00000040| 72 79 20 53 61 74 20 4f | 63 74 20 32 32 20 31 36 |ry Sat O|ct 22 16|
|00000050| 3a 35 31 3a 35 37 20 50 | 44 54 20 31 39 38 38 0a |:51:57 P|DT 1988.|
|00000060| 41 72 74 69 63 6c 65 20 | 36 37 33 20 6f 66 20 63 |Article |673 of c|
|00000070| 6f 6d 70 2e 73 6f 75 72 | 63 65 73 2e 6d 69 73 63 |omp.sour|ces.misc|
|00000080| 3a 0a 50 61 74 68 3a 20 | 67 72 61 6e 69 74 65 21 |:.Path: |granite!|
|00000090| 64 65 63 77 72 6c 21 70 | 75 72 64 75 65 21 6d 61 |decwrl!p|urdue!ma|
|000000a0| 69 6c 72 75 73 21 6e 63 | 61 72 21 74 61 6e 6b 21 |ilrus!nc|ar!tank!|
|000000b0| 6e 69 63 2e 4d 52 2e 4e | 45 54 21 68 61 6c 21 6e |nic.MR.N|ET!hal!n|
|000000c0| 63 6f 61 73 74 21 61 6c | 6c 62 65 72 79 0a 46 72 |coast!al|lbery.Fr|
|000000d0| 6f 6d 3a 20 72 61 63 40 | 67 65 63 2d 72 6c 2d 68 |om: rac@|gec-rl-h|
|000000e0| 72 63 2e 63 6f 2e 75 6b | 20 28 72 61 63 29 0a 4e |rc.co.uk| (rac).N|
|000000f0| 65 77 73 67 72 6f 75 70 | 73 3a 20 63 6f 6d 70 2e |ewsgroup|s: comp.|
|00000100| 73 6f 75 72 63 65 73 2e | 6d 69 73 63 0a 53 75 62 |sources.|misc.Sub|
|00000110| 6a 65 63 74 3a 20 76 30 | 34 69 31 33 31 3a 20 63 |ject: v0|4i131: c|
|00000120| 75 72 73 65 73 2d 62 61 | 73 65 64 20 77 69 64 67 |urses-ba|sed widg|
|00000130| 65 74 20 6c 69 62 72 61 | 72 79 20 61 6e 64 20 64 |et libra|ry and d|
|00000140| 65 6d 2e 0a 4b 65 79 77 | 6f 72 64 73 3a 20 63 75 |em..Keyw|ords: cu|
|00000150| 72 73 65 73 2c 20 77 69 | 64 67 65 74 2e 0a 4d 65 |rses, wi|dget..Me|
|00000160| 73 73 61 67 65 2d 49 44 | 3a 20 3c 35 33 37 40 68 |ssage-ID|: <537@h|
|00000170| 72 63 36 33 2e 63 6f 2e | 75 6b 3e 0a 44 61 74 65 |rc63.co.|uk>.Date|
|00000180| 3a 20 32 32 20 4f 63 74 | 20 38 38 20 30 31 3a 33 |: 22 Oct| 88 01:3|
|00000190| 31 3a 32 31 20 47 4d 54 | 0a 53 65 6e 64 65 72 3a |1:21 GMT|.Sender:|
|000001a0| 20 61 6c 6c 62 65 72 79 | 40 6e 63 6f 61 73 74 2e | allbery|@ncoast.|
|000001b0| 55 55 43 50 0a 52 65 70 | 6c 79 2d 54 6f 3a 20 72 |UUCP.Rep|ly-To: r|
|000001c0| 61 63 40 67 65 63 2d 72 | 6c 2d 68 72 63 2e 63 6f |ac@gec-r|l-hrc.co|
|000001d0| 2e 75 6b 20 28 72 61 63 | 29 0a 4f 72 67 61 6e 69 |.uk (rac|).Organi|
|000001e0| 7a 61 74 69 6f 6e 3a 20 | 47 45 43 20 48 69 72 73 |zation: |GEC Hirs|
|000001f0| 74 20 52 65 73 65 61 72 | 63 68 20 43 65 6e 74 72 |t Resear|ch Centr|
|00000200| 65 2c 20 57 65 6d 62 6c | 65 79 2c 20 45 6e 67 6c |e, Wembl|ey, Engl|
|00000210| 61 6e 64 2e 0a 4c 69 6e | 65 73 3a 20 32 31 32 39 |and..Lin|es: 2129|
|00000220| 0a 41 70 70 72 6f 76 65 | 64 3a 20 61 6c 6c 62 65 |.Approve|d: allbe|
|00000230| 72 79 40 6e 63 6f 61 73 | 74 2e 55 55 43 50 0a 0a |ry@ncoas|t.UUCP..|
|00000240| 50 6f 73 74 69 6e 67 2d | 6e 75 6d 62 65 72 3a 20 |Posting-|number: |
|00000250| 56 6f 6c 75 6d 65 20 34 | 2c 20 49 73 73 75 65 20 |Volume 4|, Issue |
|00000260| 31 33 31 0a 53 75 62 6d | 69 74 74 65 64 2d 62 79 |131.Subm|itted-by|
|00000270| 3a 20 22 72 61 63 22 20 | 3c 72 61 63 40 67 65 63 |: "rac" |<rac@gec|
|00000280| 2d 72 6c 2d 68 72 63 2e | 63 6f 2e 75 6b 3e 0a 41 |-rl-hrc.|co.uk>.A|
|00000290| 72 63 68 69 76 65 2d 6e | 61 6d 65 3a 20 63 75 72 |rchive-n|ame: cur|
|000002a0| 73 65 73 2d 77 69 64 67 | 65 74 73 0a 0a 2d 2d 2d |ses-widg|ets..---|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002c0| 2d 2d 2d 2d 2d 2d 2d 2d | 20 43 55 54 20 48 45 52 |--------| CUT HER|
|000002d0| 45 20 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |E ------|--------|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002f0| 0a 23 21 20 2f 62 69 6e | 2f 73 68 0a 23 20 54 68 |.#! /bin|/sh.# Th|
|00000300| 69 73 20 69 73 20 61 20 | 73 68 65 6c 6c 20 61 72 |is is a |shell ar|
|00000310| 63 68 69 76 65 2e 20 54 | 6f 20 65 78 74 72 61 63 |chive. T|o extrac|
|00000320| 74 20 74 68 65 20 66 69 | 6c 65 73 20 74 79 70 65 |t the fi|les type|
|00000330| 20 27 73 68 20 66 69 6c | 65 27 0a 23 20 54 68 69 | 'sh fil|e'.# Thi|
|00000340| 73 20 61 72 63 68 69 76 | 65 20 63 72 65 61 74 65 |s archiv|e create|
|00000350| 64 20 6f 6e 20 46 72 69 | 20 4f 63 74 20 31 34 20 |d on Fri| Oct 14 |
|00000360| 31 33 3a 32 38 3a 35 31 | 20 42 53 54 20 31 39 38 |13:28:51| BST 198|
|00000370| 38 0a 0a 65 78 70 6f 72 | 74 20 50 41 54 48 3b 20 |8..expor|t PATH; |
|00000380| 50 41 54 48 3d 2f 62 69 | 6e 3a 24 50 41 54 48 0a |PATH=/bi|n:$PATH.|
|00000390| 65 63 68 6f 20 27 53 68 | 61 72 3a 20 65 78 74 72 |echo 'Sh|ar: extr|
|000003a0| 61 63 74 69 6e 67 20 27 | 52 45 41 44 4d 45 27 20 |acting '|README' |
|000003b0| 28 20 31 39 37 34 20 63 | 68 61 72 61 63 74 65 72 |( 1974 c|haracter|
|000003c0| 73 29 27 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |s)'.if t|est -f '|
|000003d0| 52 45 41 44 4d 45 27 0a | 74 68 65 6e 0a 20 20 20 |README'.|then. |
|000003e0| 20 65 63 68 6f 20 22 53 | 68 61 72 3a 20 77 69 6c | echo "S|har: wil|
|000003f0| 6c 20 6e 6f 74 20 6f 76 | 65 72 77 72 69 74 65 20 |l not ov|erwrite |
|00000400| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 27 52 |existing| file 'R|
|00000410| 45 41 44 4d 45 27 22 0a | 65 6c 73 65 0a 20 20 20 |EADME'".|else. |
|00000420| 20 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f | cat << |\SHAR_EO|
|00000430| 46 20 3e 20 27 52 45 41 | 44 4d 45 27 0a 2f 2a 2a |F > 'REA|DME'./**|
|00000440| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000480| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0a 2f 2a 20 20 |********|***./* |
|00000490| 46 49 4c 45 3a 09 09 52 | 45 41 44 4d 45 0a 2f 2a |FILE:..R|EADME./*|
|000004a0| 20 20 44 41 54 45 3a 09 | 09 41 75 67 75 73 74 20 | DATE:.|.August |
|000004b0| 31 39 38 38 2e 0a 2f 2a | 20 20 41 55 54 48 4f 52 |1988../*| AUTHOR|
|000004c0| 3a 09 09 52 69 63 68 61 | 72 64 20 41 2e 20 43 75 |:..Richa|rd A. Cu|
|000004d0| 6c 73 68 61 77 2e 0a 2f | 2a 20 44 49 53 43 4c 41 |lshaw../|* DISCLA|
|000004e0| 49 4d 45 52 3a 09 09 54 | 68 69 73 20 66 69 6c 65 |IMER:..T|his file|
|000004f0| 20 69 73 20 64 65 65 6d | 65 64 20 74 6f 20 62 65 | is deem|ed to be|
|00000500| 20 70 75 62 6c 69 63 2d | 64 6f 6d 61 69 6e 2c 20 | public-|domain, |
|00000510| 6f 6e 20 74 68 65 20 73 | 69 6d 70 6c 65 0a 2f 2a |on the s|imple./*|
|00000520| 09 09 09 70 72 6f 76 69 | 73 6f 73 20 74 68 61 74 |...provi|sos that|
|00000530| 20 74 68 69 73 20 73 65 | 63 74 69 6f 6e 20 72 65 | this se|ction re|
|00000540| 6d 61 69 6e 73 20 69 6e | 20 74 68 69 73 20 66 69 |mains in| this fi|
|00000550| 6c 65 20 61 6e 64 0a 2f | 2a 09 09 09 74 68 61 74 |le and./|*...that|
|00000560| 20 63 6f 64 65 20 75 73 | 69 6e 67 20 69 74 20 64 | code us|ing it d|
|00000570| 6f 20 6e 6f 74 20 64 6f | 20 73 6f 20 66 6f 72 20 |o not do| so for |
|00000580| 6d 6f 6e 65 74 61 72 79 | 20 67 61 69 6e 2e 0a 2f |monetary| gain../|
|00000590| 2a 09 09 09 4e 65 69 74 | 68 65 72 20 74 68 65 20 |*...Neit|her the |
|000005a0| 61 75 74 68 6f 72 2c 20 | 6e 6f 72 20 74 68 65 20 |author, |nor the |
|000005b0| 61 75 74 68 6f 72 73 20 | 65 6d 70 6c 6f 79 65 65 |authors |employee|
|000005c0| 73 20 61 74 20 74 68 65 | 0a 2f 2a 09 09 09 74 69 |s at the|./*...ti|
|000005d0| 6d 65 20 6f 66 20 64 65 | 76 65 6c 6f 70 69 6e 67 |me of de|veloping|
|000005e0| 20 74 68 69 73 20 63 6f | 64 65 2c 20 61 63 63 65 | this co|de, acce|
|000005f0| 70 74 20 61 6e 79 20 6c | 69 61 62 69 6c 69 74 79 |pt any l|iability|
|00000600| 20 6f 72 0a 2f 2a 09 09 | 09 72 65 73 70 6f 6e 73 | or./*..|.respons|
|00000610| 69 62 69 6c 69 74 79 20 | 66 6f 72 20 74 68 65 20 |ibility |for the |
|00000620| 75 73 65 2c 20 61 62 75 | 73 65 20 6f 72 20 6d 69 |use, abu|se or mi|
|00000630| 73 75 73 65 20 6f 66 20 | 74 68 69 73 0a 2f 2a 09 |suse of |this./*.|
|00000640| 09 09 63 6f 64 65 2e 0a | 2f 2a 2a 2a 2a 2a 2a 2a |..code..|/*******|
|00000650| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000660| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000670| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000680| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000690| 2a 2a 2a 2a 2a 2a 2f 0a | 0a 09 57 69 64 67 65 74 |******/.|..Widget|
|000006a0| 6c 69 62 20 69 73 20 61 | 20 73 74 61 6e 64 61 72 |lib is a| standar|
|000006b0| 64 20 43 20 6c 69 62 72 | 61 72 79 20 77 68 69 63 |d C libr|ary whic|
|000006c0| 68 20 61 6c 6c 6f 77 73 | 20 74 68 65 20 75 73 65 |h allows| the use|
|000006d0| 72 20 74 6f 20 64 65 66 | 69 6e 65 0a 61 6e 64 20 |r to def|ine.and |
|000006e0| 69 6e 74 65 72 61 63 74 | 20 77 69 74 68 20 77 69 |interact| with wi|
|000006f0| 64 67 65 74 73 20 28 77 | 69 6e 64 6f 77 20 67 61 |dgets (w|indow ga|
|00000700| 64 67 65 74 29 2e 20 54 | 68 65 20 66 69 6c 65 73 |dget). T|he files|
|00000710| 20 70 72 6f 76 69 64 65 | 64 20 61 72 65 3a 0a 0a | provide|d are:..|
|00000720| 2d 72 77 2d 72 2d 2d 72 | 2d 2d 20 20 20 31 20 70 |-rw-r--r|-- 1 p|
|00000730| 6a 73 20 20 20 20 20 20 | 6e 65 74 20 20 20 20 20 |js |net |
|00000740| 20 20 20 20 31 39 36 30 | 20 4f 63 74 20 31 34 20 | 1960| Oct 14 |
|00000750| 31 33 3a 32 35 20 52 45 | 41 44 4d 45 0a 2d 72 77 |13:25 RE|ADME.-rw|
|00000760| 2d 72 2d 2d 72 2d 2d 20 | 20 20 31 20 70 6a 73 20 |-r--r-- | 1 pjs |
|00000770| 20 20 20 20 20 6e 65 74 | 20 20 20 20 20 20 20 20 | net| |
|00000780| 20 31 31 34 34 20 4f 63 | 74 20 31 34 20 31 33 3a | 1144 Oc|t 14 13:|
|00000790| 32 33 20 6d 61 6b 65 66 | 69 6c 65 0a 2d 72 77 2d |23 makef|ile.-rw-|
|000007a0| 72 2d 2d 72 2d 2d 20 20 | 20 31 20 70 6a 73 20 20 |r--r-- | 1 pjs |
|000007b0| 20 20 20 20 6e 65 74 20 | 20 20 20 20 20 20 20 20 | net | |
|000007c0| 32 37 35 32 20 4f 63 74 | 20 31 34 20 31 33 3a 31 |2752 Oct| 14 13:1|
|000007d0| 35 20 77 69 64 67 65 74 | 2e 68 0a 2d 72 77 2d 72 |5 widget|.h.-rw-r|
|000007e0| 2d 2d 72 2d 2d 20 20 20 | 31 20 70 6a 73 20 20 20 |--r-- |1 pjs |
|000007f0| 20 20 20 6e 65 74 20 20 | 20 20 20 20 20 20 31 30 | net | 10|
|00000800| 39 34 36 20 4f 63 74 20 | 31 34 20 31 32 3a 31 38 |946 Oct |14 12:18|
|00000810| 20 77 69 64 67 65 74 2e | 6d 73 0a 2d 72 77 2d 72 | widget.|ms.-rw-r|
|00000820| 2d 2d 72 2d 2d 20 20 20 | 31 20 70 6a 73 20 20 20 |--r-- |1 pjs |
|00000830| 20 20 20 6e 65 74 20 20 | 20 20 20 20 20 20 33 34 | net | 34|
|00000840| 38 31 37 20 4f 63 74 20 | 31 34 20 31 33 3a 31 35 |817 Oct |14 13:15|
|00000850| 20 77 69 64 67 65 74 6c | 69 62 2e 63 0a 2d 72 77 | widgetl|ib.c.-rw|
|00000860| 2d 72 2d 2d 72 2d 2d 20 | 20 20 31 20 70 6a 73 20 |-r--r-- | 1 pjs |
|00000870| 20 20 20 20 20 6e 65 74 | 20 20 20 20 20 20 20 20 | net| |
|00000880| 20 33 32 31 38 20 4f 63 | 74 20 31 34 20 31 33 3a | 3218 Oc|t 14 13:|
|00000890| 31 34 20 77 70 61 67 65 | 2e 63 0a 0a 31 29 20 77 |14 wpage|.c..1) w|
|000008a0| 69 64 67 65 74 6c 69 62 | 2e 63 20 20 20 20 20 20 |idgetlib|.c |
|000008b0| 20 28 74 68 65 20 61 63 | 74 75 61 6c 20 63 6f 64 | (the ac|tual cod|
|000008c0| 65 29 0a 32 29 20 77 69 | 64 67 65 74 2e 68 09 20 |e).2) wi|dget.h. |
|000008d0| 20 20 20 20 28 74 68 65 | 20 68 65 61 64 65 72 20 | (the| header |
|000008e0| 66 69 6c 65 20 77 68 69 | 63 68 20 69 73 20 6e 65 |file whi|ch is ne|
|000008f0| 65 64 65 64 20 69 6e 20 | 70 72 6f 67 72 61 6d 73 |eded in |programs|
|00000900| 20 69 6e 74 65 6e 64 69 | 6e 67 0a 09 09 20 20 20 | intendi|ng... |
|00000910| 20 20 20 74 6f 20 69 6e | 63 6f 72 70 6f 72 61 74 | to in|corporat|
|00000920| 65 20 74 68 65 20 6c 69 | 62 72 61 72 79 29 0a 33 |e the li|brary).3|
|00000930| 29 20 77 69 64 67 65 74 | 2e 6d 73 09 20 20 20 20 |) widget|.ms. |
|00000940| 20 28 61 6e 20 65 78 70 | 6c 61 6e 61 74 69 6f 6e | (an exp|lanation|
|00000950| 20 6f 66 20 74 68 65 20 | 6c 69 62 72 61 72 79 20 | of the |library |
|00000960| 61 6e 64 20 68 6f 77 20 | 74 6f 20 75 73 65 20 69 |and how |to use i|
|00000970| 74 29 0a 34 29 20 77 70 | 61 67 65 2e 63 09 20 20 |t).4) wp|age.c. |
|00000980| 20 20 20 28 61 20 6c 69 | 74 74 6c 65 20 65 78 61 | (a li|ttle exa|
|00000990| 6d 70 6c 65 20 6f 66 20 | 74 68 65 20 6c 69 62 72 |mple of |the libr|
|000009a0| 61 72 79 20 69 6e 20 75 | 73 65 29 0a 35 29 20 6d |ary in u|se).5) m|
|000009b0| 61 6b 65 66 69 6c 65 20 | 20 20 20 20 20 20 20 20 |akefile | |
|000009c0| 20 28 63 6f 6d 70 69 6c | 65 73 20 65 76 65 72 79 | (compil|es every|
|000009d0| 74 68 69 6e 67 20 74 6f | 67 65 74 68 65 72 29 0a |thing to|gether).|
|000009e0| 0a 43 6f 6d 70 69 6c 69 | 6e 67 20 74 68 69 6e 67 |.Compili|ng thing|
|000009f0| 73 0a 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |s.======|========|
|00000a00| 3d 3d 0a 0a 54 79 70 65 | 20 27 6d 61 6b 65 27 20 |==..Type| 'make' |
|00000a10| 77 69 74 68 69 6e 20 74 | 68 65 20 64 69 72 65 63 |within t|he direc|
|00000a20| 74 6f 72 79 20 77 68 69 | 63 68 20 63 6f 6e 74 61 |tory whi|ch conta|
|00000a30| 69 6e 73 20 74 68 65 20 | 66 69 6c 65 73 2e 0a 54 |ins the |files..T|
|00000a40| 68 69 73 20 63 72 65 61 | 74 65 73 20 61 20 6c 6f |his crea|tes a lo|
|00000a50| 63 61 6c 20 6c 69 62 72 | 61 72 79 20 77 69 74 68 |cal libr|ary with|
|00000a60| 69 6e 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 79 |in the d|irectory|
|00000a70| 2c 20 61 6e 64 20 63 72 | 65 61 74 65 73 20 74 68 |, and cr|eates th|
|00000a80| 65 20 0a 65 78 65 63 75 | 74 61 62 6c 65 20 27 77 |e .execu|table 'w|
|00000a90| 70 61 67 65 27 20 28 61 | 20 64 65 6d 6f 20 66 6f |page' (a| demo fo|
|00000aa0| 72 20 79 6f 75 20 74 6f | 20 70 6c 61 79 20 77 69 |r you to| play wi|
|00000ab0| 74 68 29 2e 0a 0a 46 6f | 72 20 67 65 6e 65 72 61 |th)...Fo|r genera|
|00000ac0| 6c 20 75 73 65 20 27 77 | 69 64 67 65 74 2e 68 27 |l use 'w|idget.h'|
|00000ad0| 20 6d 75 73 74 20 62 65 | 20 70 6c 61 63 65 64 20 | must be| placed |
|00000ae0| 69 6e 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |in the s|tandard |
|00000af0| 69 6e 63 6c 75 64 65 20 | 64 69 72 65 63 74 6f 72 |include |director|
|00000b00| 79 0a 61 6e 64 20 74 68 | 65 20 6c 69 62 72 61 72 |y.and th|e librar|
|00000b10| 79 20 27 77 69 64 67 65 | 74 6c 69 62 2e 61 27 20 |y 'widge|tlib.a' |
|00000b20| 6d 75 73 74 20 67 6f 20 | 69 6e 20 61 20 67 6c 6f |must go |in a glo|
|00000b30| 62 61 6c 6c 79 20 61 63 | 63 65 73 73 61 62 6c 65 |bally ac|cessable|
|00000b40| 20 70 6c 61 63 65 20 73 | 75 63 68 0a 61 73 20 2f | place s|uch.as /|
|00000b50| 75 73 72 2f 6c 69 62 2e | 0a 0a 50 72 69 6e 74 69 |usr/lib.|..Printi|
|00000b60| 6e 67 20 64 6f 63 0a 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ng doc.=|========|
|00000b70| 3d 3d 3d 0a 0a 27 77 69 | 64 67 65 74 2e 6d 73 27 |===..'wi|dget.ms'|
|00000b80| 20 77 61 73 20 63 72 65 | 61 74 65 64 20 75 73 69 | was cre|ated usi|
|00000b90| 6e 67 20 74 68 65 20 6d | 73 20 6d 61 63 72 6f 73 |ng the m|s macros|
|00000ba0| 20 61 6e 64 20 63 61 6e | 20 70 72 69 6e 74 65 64 | and can| printed|
|00000bb0| 20 75 73 69 6e 67 20 73 | 6f 6d 65 74 68 69 6e 67 | using s|omething|
|00000bc0| 20 6c 69 6b 65 0a 27 6e | 72 6f 66 66 20 2d 6d 73 | like.'n|roff -ms|
|00000bd0| 20 77 69 64 67 65 74 2e | 6d 73 27 0a 0a 0a 48 61 | widget.|ms'...Ha|
|00000be0| 76 65 20 66 75 6e 2e 20 | 52 69 63 68 61 72 64 20 |ve fun. |Richard |
|00000bf0| 43 2e 0a 53 48 41 52 5f | 45 4f 46 0a 69 66 20 74 |C..SHAR_|EOF.if t|
|00000c00| 65 73 74 20 31 39 37 34 | 20 2d 6e 65 20 60 77 63 |est 1974| -ne `wc|
|00000c10| 20 2d 63 20 3c 20 27 52 | 45 41 44 4d 45 27 60 0a | -c < 'R|EADME'`.|
|00000c20| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 27 53 |then. | echo 'S|
|00000c30| 68 61 72 3a 20 65 72 72 | 6f 72 20 74 72 61 6e 73 |har: err|or trans|
|00000c40| 6d 69 74 74 69 6e 67 20 | 27 52 45 41 44 4d 45 27 |mitting |'README'|
|00000c50| 20 28 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 | (should| have be|
|00000c60| 65 6e 20 20 31 39 37 34 | 20 63 68 61 72 63 61 74 |en 1974| charcat|
|00000c70| 65 72 73 29 27 0a 66 69 | 0a 66 69 0a 65 63 68 6f |ers)'.fi|.fi.echo|
|00000c80| 20 27 53 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 | 'Shar: |extracti|
|00000c90| 6e 67 20 27 6d 61 6b 65 | 66 69 6c 65 27 20 28 20 |ng 'make|file' ( |
|00000ca0| 31 31 34 34 20 63 68 61 | 72 61 63 74 65 72 73 29 |1144 cha|racters)|
|00000cb0| 27 0a 69 66 20 74 65 73 | 74 20 2d 66 20 27 6d 61 |'.if tes|t -f 'ma|
|00000cc0| 6b 65 66 69 6c 65 27 0a | 74 68 65 6e 0a 20 20 20 |kefile'.|then. |
|00000cd0| 20 65 63 68 6f 20 22 53 | 68 61 72 3a 20 77 69 6c | echo "S|har: wil|
|00000ce0| 6c 20 6e 6f 74 20 6f 76 | 65 72 77 72 69 74 65 20 |l not ov|erwrite |
|00000cf0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 27 6d |existing| file 'm|
|00000d00| 61 6b 65 66 69 6c 65 27 | 22 0a 65 6c 73 65 0a 20 |akefile'|".else. |
|00000d10| 20 20 20 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f | cat <|< \SHAR_|
|00000d20| 45 4f 46 20 3e 20 27 6d | 61 6b 65 66 69 6c 65 27 |EOF > 'm|akefile'|
|00000d30| 0a 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|00000d40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000d70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 0a |********|*******.|
|00000d80| 2f 2a 20 20 46 49 4c 45 | 3a 09 09 6d 61 6b 65 66 |/* FILE|:..makef|
|00000d90| 69 6c 65 0a 2f 2a 20 20 | 44 41 54 45 3a 09 09 41 |ile./* |DATE:..A|
|00000da0| 75 67 75 73 74 20 31 39 | 38 38 2e 0a 2f 2a 20 20 |ugust 19|88../* |
|00000db0| 41 55 54 48 4f 52 3a 09 | 09 52 69 63 68 61 72 64 |AUTHOR:.|.Richard|
|00000dc0| 20 41 2e 20 43 75 6c 73 | 68 61 77 2e 0a 2f 2a 20 | A. Culs|haw../* |
|00000dd0| 44 49 53 43 4c 41 49 4d | 45 52 3a 09 09 54 68 69 |DISCLAIM|ER:..Thi|
|00000de0| 73 20 66 69 6c 65 20 69 | 73 20 64 65 65 6d 65 64 |s file i|s deemed|
|00000df0| 20 74 6f 20 62 65 20 70 | 75 62 6c 69 63 2d 64 6f | to be p|ublic-do|
|00000e00| 6d 61 69 6e 2c 20 6f 6e | 20 74 68 65 20 73 69 6d |main, on| the sim|
|00000e10| 70 6c 65 0a 2f 2a 09 09 | 09 70 72 6f 76 69 73 6f |ple./*..|.proviso|
|00000e20| 73 20 74 68 61 74 20 74 | 68 69 73 20 73 65 63 74 |s that t|his sect|
|00000e30| 69 6f 6e 20 72 65 6d 61 | 69 6e 73 20 69 6e 20 74 |ion rema|ins in t|
|00000e40| 68 69 73 20 66 69 6c 65 | 20 61 6e 64 0a 2f 2a 09 |his file| and./*.|
|00000e50| 09 09 74 68 61 74 20 63 | 6f 64 65 20 75 73 69 6e |..that c|ode usin|
|00000e60| 67 20 69 74 20 64 6f 20 | 6e 6f 74 20 64 6f 20 73 |g it do |not do s|
|00000e70| 6f 20 66 6f 72 20 6d 6f | 6e 65 74 61 72 79 20 67 |o for mo|netary g|
|00000e80| 61 69 6e 2e 0a 2f 2a 09 | 09 09 4e 65 69 74 68 65 |ain../*.|..Neithe|
|00000e90| 72 20 74 68 65 20 61 75 | 74 68 6f 72 2c 20 6e 6f |r the au|thor, no|
|00000ea0| 72 20 74 68 65 20 61 75 | 74 68 6f 72 73 20 65 6d |r the au|thors em|
|00000eb0| 70 6c 6f 79 65 65 73 20 | 61 74 20 74 68 65 0a 2f |ployees |at the./|
|00000ec0| 2a 09 09 09 74 69 6d 65 | 20 6f 66 20 64 65 76 65 |*...time| of deve|
|00000ed0| 6c 6f 70 69 6e 67 20 74 | 68 69 73 20 63 6f 64 65 |loping t|his code|
|00000ee0| 2c 20 61 63 63 65 70 74 | 20 61 6e 79 20 6c 69 61 |, accept| any lia|
|00000ef0| 62 69 6c 69 74 79 20 6f | 72 0a 2f 2a 09 09 09 72 |bility o|r./*...r|
|00000f00| 65 73 70 6f 6e 73 69 62 | 69 6c 69 74 79 20 66 6f |esponsib|ility fo|
|00000f10| 72 20 74 68 65 20 75 73 | 65 2c 20 61 62 75 73 65 |r the us|e, abuse|
|00000f20| 20 6f 72 20 6d 69 73 75 | 73 65 20 6f 66 20 74 68 | or misu|se of th|
|00000f30| 69 73 0a 2f 2a 09 09 09 | 63 6f 64 65 2e 0a 2f 2a |is./*...|code../*|
|00000f40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000f80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0a 0a 23 |********|****/..#|
|00000f90| 20 55 73 65 20 2d 67 20 | 69 66 20 79 6f 75 20 77 | Use -g |if you w|
|00000fa0| 61 6e 74 20 6c 61 72 67 | 65 2c 20 62 75 74 20 73 |ant larg|e, but s|
|00000fb0| 64 62 2d 2c 67 64 62 2d | 2c 64 62 78 2d 61 62 6c |db-,gdb-|,dbx-abl|
|00000fc0| 65 20 6f 62 6a 65 63 74 | 73 2e 0a 4f 50 54 49 4f |e object|s..OPTIO|
|00000fd0| 4e 53 3d 20 2d 4f 0a 0a | 23 20 42 53 44 20 73 79 |NS= -O..|# BSD sy|
|00000fe0| 73 74 65 6d 73 2c 20 69 | 6e 20 70 61 72 74 69 63 |stems, i|n partic|
|00000ff0| 75 6c 61 72 2c 20 77 69 | 6c 6c 20 77 61 6e 74 20 |ular, wi|ll want |
|00001000| 2d 6c 63 75 72 73 65 73 | 20 2d 6c 74 65 72 6d 63 |-lcurses| -ltermc|
|00001010| 61 70 2e 0a 43 55 52 53 | 45 53 3d 20 20 2d 6c 63 |ap..CURS|ES= -lc|
|00001020| 75 72 73 65 73 0a 0a 23 | 20 53 59 53 35 20 73 79 |urses..#| SYS5 sy|
|00001030| 73 74 65 6d 73 2c 20 69 | 6e 20 70 61 72 74 69 63 |stems, i|n partic|
|00001040| 75 6c 61 72 2c 20 64 6f | 20 6e 6f 74 20 68 61 76 |ular, do| not hav|
|00001050| 65 20 72 61 6e 6c 69 62 | 28 31 29 20 66 6f 72 20 |e ranlib|(1) for |
|00001060| 74 68 65 69 72 20 6c 69 | 62 72 61 72 69 65 73 2e |their li|braries.|
|00001070| 0a 23 20 53 6f 20 64 65 | 66 69 6e 65 20 74 68 69 |.# So de|fine thi|
|00001080| 73 20 61 73 2c 20 66 6f | 72 20 65 78 61 6d 70 6c |s as, fo|r exampl|
|00001090| 65 2c 20 74 6f 75 63 68 | 2c 20 69 66 20 79 6f 75 |e, touch|, if you|
|000010a0| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 72 61 6e 6c | don't h|ave ranl|
|000010b0| 69 62 2e 0a 52 41 4e 4c | 49 42 3d 20 74 6f 75 63 |ib..RANL|IB= touc|
|000010c0| 68 0a 0a 57 44 47 54 4c | 49 42 3d 20 77 69 64 67 |h..WDGTL|IB= widg|
|000010d0| 65 74 6c 69 62 2e 61 0a | 0a 61 6c 6c 3a 20 77 70 |etlib.a.|.all: wp|
|000010e0| 61 67 65 0a 0a 77 69 64 | 67 65 74 6c 69 62 2e 61 |age..wid|getlib.a|
|000010f0| 3a 20 77 69 64 67 65 74 | 6c 69 62 2e 6f 20 77 69 |: widget|lib.o wi|
|00001100| 64 67 65 74 2e 68 0a 09 | 61 72 20 63 72 76 20 24 |dget.h..|ar crv $|
|00001110| 40 20 77 69 64 67 65 74 | 6c 69 62 2e 6f 0a 09 24 |@ widget|lib.o..$|
|00001120| 7b 52 41 4e 4c 49 42 7d | 20 24 40 0a 09 72 6d 20 |{RANLIB}| $@..rm |
|00001130| 2d 66 20 77 69 64 67 65 | 74 6c 69 62 2e 6f 0a 0a |-f widge|tlib.o..|
|00001140| 77 70 61 67 65 3a 20 77 | 69 64 67 65 74 6c 69 62 |wpage: w|idgetlib|
|00001150| 2e 61 20 77 70 61 67 65 | 2e 6f 0a 09 63 63 20 24 |.a wpage|.o..cc $|
|00001160| 7b 4f 50 54 49 4f 4e 7d | 20 2d 6f 20 24 40 20 77 |{OPTION}| -o $@ w|
|00001170| 70 61 67 65 2e 6f 20 24 | 7b 57 44 47 54 4c 49 42 |page.o $|{WDGTLIB|
|00001180| 7d 20 24 7b 43 55 52 53 | 45 53 7d 0a 0a 63 6c 65 |} ${CURS|ES}..cle|
|00001190| 61 6e 3a 0a 09 72 6d 20 | 2d 66 20 77 70 61 67 65 |an:..rm |-f wpage|
|000011a0| 20 2a 2e 6f 20 2a 2e 61 | 0a 53 48 41 52 5f 45 4f | *.o *.a|.SHAR_EO|
|000011b0| 46 0a 69 66 20 74 65 73 | 74 20 31 31 34 34 20 2d |F.if tes|t 1144 -|
|000011c0| 6e 65 20 60 77 63 20 2d | 63 20 3c 20 27 6d 61 6b |ne `wc -|c < 'mak|
|000011d0| 65 66 69 6c 65 27 60 0a | 74 68 65 6e 0a 20 20 20 |efile'`.|then. |
|000011e0| 20 65 63 68 6f 20 27 53 | 68 61 72 3a 20 65 72 72 | echo 'S|har: err|
|000011f0| 6f 72 20 74 72 61 6e 73 | 6d 69 74 74 69 6e 67 20 |or trans|mitting |
|00001200| 27 6d 61 6b 65 66 69 6c | 65 27 20 28 73 68 6f 75 |'makefil|e' (shou|
|00001210| 6c 64 20 68 61 76 65 20 | 62 65 65 6e 20 20 31 31 |ld have |been 11|
|00001220| 34 34 20 63 68 61 72 63 | 61 74 65 72 73 29 27 0a |44 charc|aters)'.|
|00001230| 66 69 0a 66 69 0a 65 63 | 68 6f 20 27 53 68 61 72 |fi.fi.ec|ho 'Shar|
|00001240| 3a 20 65 78 74 72 61 63 | 74 69 6e 67 20 27 77 69 |: extrac|ting 'wi|
|00001250| 64 67 65 74 2e 68 27 20 | 28 20 32 37 35 32 20 63 |dget.h' |( 2752 c|
|00001260| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|00001270| 65 73 74 20 2d 66 20 27 | 77 69 64 67 65 74 2e 68 |est -f '|widget.h|
|00001280| 27 0a 74 68 65 6e 0a 20 | 20 20 20 65 63 68 6f 20 |'.then. | echo |
|00001290| 22 53 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 |"Shar: w|ill not |
|000012a0| 6f 76 65 72 77 72 69 74 | 65 20 65 78 69 73 74 69 |overwrit|e existi|
|000012b0| 6e 67 20 66 69 6c 65 20 | 27 77 69 64 67 65 74 2e |ng file |'widget.|
|000012c0| 68 27 22 0a 65 6c 73 65 | 0a 20 20 20 20 63 61 74 |h'".else|. cat|
|000012d0| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|000012e0| 27 77 69 64 67 65 74 2e | 68 27 0a 2f 2a 2a 2a 2a |'widget.|h'./****|
|000012f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001300| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001310| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001320| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001330| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0a 2f 2a 20 20 46 49 |********|*./* FI|
|00001340| 4c 45 3a 09 09 77 69 64 | 67 65 74 2e 68 0a 2f 2a |LE:..wid|get.h./*|
|00001350| 20 20 44 41 54 45 3a 09 | 09 41 75 67 75 73 74 20 | DATE:.|.August |
|00001360| 31 39 38 38 2e 0a 2f 2a | 20 20 41 55 54 48 4f 52 |1988../*| AUTHOR|
|00001370| 3a 09 09 52 69 63 68 61 | 72 64 20 41 2e 20 43 75 |:..Richa|rd A. Cu|
|00001380| 6c 73 68 61 77 2e 0a 2f | 2a 20 20 44 45 53 43 52 |lshaw../|* DESCR|
|00001390| 49 50 54 49 4f 4e 3a 09 | 43 6f 6e 74 61 69 6e 73 |IPTION:.|Contains|
|000013a0| 20 74 68 65 20 64 65 66 | 69 6e 69 74 69 6f 6e 73 | the def|initions|
|000013b0| 20 6f 66 20 74 68 65 20 | 77 69 64 67 65 74 20 73 | of the |widget s|
|000013c0| 74 72 75 63 74 75 72 65 | 73 2e 0a 2f 2a 09 09 09 |tructure|s../*...|
|000013d0| 49 74 20 73 68 6f 75 6c | 64 20 62 65 20 69 6e 63 |It shoul|d be inc|
|000013e0| 6c 75 64 65 64 20 62 79 | 20 61 6c 6c 20 70 72 6f |luded by| all pro|
|000013f0| 67 72 61 6d 73 20 74 68 | 61 74 20 77 61 6e 74 20 |grams th|at want |
|00001400| 74 6f 0a 2f 2a 09 09 09 | 75 73 65 20 74 68 65 20 |to./*...|use the |
|00001410| 77 69 64 67 65 74 20 6c | 69 62 72 61 72 79 2e 0a |widget l|ibrary..|
|00001420| 2f 2a 20 44 49 53 43 4c | 41 49 4d 45 52 3a 09 09 |/* DISCL|AIMER:..|
|00001430| 54 68 69 73 20 66 69 6c | 65 20 69 73 20 64 65 65 |This fil|e is dee|
|00001440| 6d 65 64 20 74 6f 20 62 | 65 20 70 75 62 6c 69 63 |med to b|e public|
|00001450| 2d 64 6f 6d 61 69 6e 2c | 20 6f 6e 20 74 68 65 20 |-domain,| on the |
|00001460| 73 69 6d 70 6c 65 0a 2f | 2a 09 09 09 70 72 6f 76 |simple./|*...prov|
|00001470| 69 73 6f 73 20 74 68 61 | 74 20 74 68 69 73 20 73 |isos tha|t this s|
|00001480| 65 63 74 69 6f 6e 20 72 | 65 6d 61 69 6e 73 20 69 |ection r|emains i|
|00001490| 6e 20 74 68 69 73 20 66 | 69 6c 65 20 61 6e 64 0a |n this f|ile and.|
|000014a0| 2f 2a 09 09 09 74 68 61 | 74 20 63 6f 64 65 20 75 |/*...tha|t code u|
|000014b0| 73 69 6e 67 20 69 74 20 | 64 6f 20 6e 6f 74 20 64 |sing it |do not d|
|000014c0| 6f 20 73 6f 20 66 6f 72 | 20 6d 6f 6e 65 74 61 72 |o so for| monetar|
|000014d0| 79 20 67 61 69 6e 2e 0a | 2f 2a 09 09 09 4e 65 69 |y gain..|/*...Nei|
|000014e0| 74 68 65 72 20 74 68 65 | 20 61 75 74 68 6f 72 2c |ther the| author,|
|000014f0| 20 6e 6f 72 20 74 68 65 | 20 61 75 74 68 6f 72 73 | nor the| authors|
|00001500| 20 65 6d 70 6c 6f 79 65 | 65 73 20 61 74 20 74 68 | employe|es at th|
|00001510| 65 0a 2f 2a 09 09 09 74 | 69 6d 65 20 6f 66 20 64 |e./*...t|ime of d|
|00001520| 65 76 65 6c 6f 70 69 6e | 67 20 74 68 69 73 20 63 |evelopin|g this c|
|00001530| 6f 64 65 2c 20 61 63 63 | 65 70 74 20 61 6e 79 20 |ode, acc|ept any |
|00001540| 6c 69 61 62 69 6c 69 74 | 79 20 6f 72 0a 2f 2a 09 |liabilit|y or./*.|
|00001550| 09 09 72 65 73 70 6f 6e | 73 69 62 69 6c 69 74 79 |..respon|sibility|
|00001560| 20 66 6f 72 20 74 68 65 | 20 75 73 65 2c 20 61 62 | for the| use, ab|
|00001570| 75 73 65 20 6f 72 20 6d | 69 73 75 73 65 20 6f 66 |use or m|isuse of|
|00001580| 20 74 68 69 73 0a 2f 2a | 09 09 09 63 6f 64 65 2e | this./*|...code.|
|00001590| 0a 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|000015a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000015b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000015c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000015d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2f |********|*******/|
|000015e0| 0a 0a 23 69 6e 63 6c 75 | 64 65 20 3c 63 75 72 73 |..#inclu|de <curs|
|000015f0| 65 73 2e 68 3e 0a 0a 2f | 2a 20 64 65 66 69 6e 69 |es.h>../|* defini|
|00001600| 74 69 6f 6e 20 66 6f 72 | 20 63 6f 6d 6d 61 6e 64 |tion for| command|
|00001610| 20 77 69 64 67 65 74 20 | 65 6e 74 72 79 20 69 6e | widget |entry in|
|00001620| 20 6c 69 6e 6b 65 64 20 | 6c 69 73 74 20 2a 2f 0a | linked |list */.|
|00001630| 73 74 72 75 63 74 20 20 | 20 20 63 6d 64 77 69 64 |struct | cmdwid|
|00001640| 7b 0a 20 20 20 20 09 09 | 57 49 4e 44 4f 57 09 09 |{. ..|WINDOW..|
|00001650| 2a 77 69 64 67 65 74 3b | 0a 20 20 20 20 09 09 69 |*widget;|. ..i|
|00001660| 6e 74 09 09 69 64 3b 0a | 20 20 20 20 09 09 63 68 |nt..id;.| ..ch|
|00001670| 61 72 09 09 6d 73 67 5b | 31 30 30 5d 3b 0a 20 20 |ar..msg[|100];. |
|00001680| 20 20 09 09 63 68 61 72 | 09 09 61 63 70 74 3b 0a | ..char|..acpt;.|
|00001690| 20 20 20 20 09 09 69 6e | 74 09 09 28 2a 66 75 6e | ..in|t..(*fun|
|000016a0| 63 29 28 29 3b 0a 20 20 | 20 20 09 09 69 6e 74 09 |c)();. | ..int.|
|000016b0| 09 6c 65 6e 67 74 68 3b | 09 0a 20 20 20 20 09 09 |.length;|.. ..|
|000016c0| 69 6e 74 09 09 78 2c 79 | 3b 0a 09 09 69 6e 74 09 |int..x,y|;...int.|
|000016d0| 09 61 63 74 69 76 65 3b | 0a 20 20 20 20 09 09 73 |.active;|. ..s|
|000016e0| 74 72 75 63 74 20 63 6d | 64 77 69 64 09 2a 6e 65 |truct cm|dwid.*ne|
|000016f0| 78 74 3b 0a 20 20 20 20 | 09 7d 20 2a 63 6d 64 6c |xt;. |.} *cmdl|
|00001700| 69 73 74 3b 0a 0a 2f 2a | 20 64 65 66 69 6e 69 74 |ist;../*| definit|
|00001710| 69 6f 6e 20 66 6f 72 20 | 6c 61 62 65 6c 20 77 69 |ion for |label wi|
|00001720| 64 67 65 74 20 65 6e 74 | 72 79 20 69 6e 20 6c 69 |dget ent|ry in li|
|00001730| 6e 6b 65 64 20 6c 69 73 | 74 20 2a 2f 0a 73 74 72 |nked lis|t */.str|
|00001740| 75 63 74 20 20 20 20 6c | 62 6c 77 69 64 7b 0a 20 |uct l|blwid{. |
|00001750| 20 20 20 09 09 57 49 4e | 44 4f 57 09 09 2a 77 69 | ..WIN|DOW..*wi|
|00001760| 64 67 65 74 3b 0a 20 20 | 20 20 09 09 69 6e 74 09 |dget;. | ..int.|
|00001770| 09 69 64 3b 0a 20 20 20 | 20 09 09 63 68 61 72 09 |.id;. | ..char.|
|00001780| 09 6d 73 67 5b 31 30 30 | 5d 3b 0a 20 20 20 20 09 |.msg[100|];. .|
|00001790| 09 63 68 61 72 09 09 70 | 6f 73 3b 0a 20 20 20 20 |.char..p|os;. |
|000017a0| 09 09 69 6e 74 09 09 6c | 65 6e 67 74 68 3b 09 0a |..int..l|ength;..|
|000017b0| 09 09 69 6e 74 09 09 64 | 69 66 66 65 72 65 6e 63 |..int..d|ifferenc|
|000017c0| 65 3b 0a 20 20 20 20 09 | 09 69 6e 74 09 09 78 2c |e;. .|.int..x,|
|000017d0| 79 3b 0a 20 20 20 20 09 | 09 73 74 72 75 63 74 20 |y;. .|.struct |
|000017e0| 6c 62 6c 77 69 64 09 2a | 6e 65 78 74 3b 0a 20 20 |lblwid.*|next;. |
|000017f0| 20 20 09 7d 20 2a 6c 62 | 6c 6c 69 73 74 3b 0a 0a | .} *lb|llist;..|
|00001800| 2f 2a 20 64 65 66 69 6e | 69 74 69 6f 6e 20 66 6f |/* defin|ition fo|
|00001810| 72 20 74 6f 67 6c 65 20 | 77 69 64 67 65 74 20 65 |r togle |widget e|
|00001820| 6e 74 72 79 20 69 6e 20 | 6c 69 6e 6b 65 64 20 6c |ntry in |linked l|
|00001830| 69 73 74 20 2a 2f 0a 73 | 74 72 75 63 74 20 20 20 |ist */.s|truct |
|00001840| 20 20 74 67 6c 77 69 64 | 7b 0a 20 20 20 20 09 09 | tglwid|{. ..|
|00001850| 57 49 4e 44 4f 57 09 09 | 2a 77 69 64 67 65 74 3b |WINDOW..|*widget;|
|00001860| 0a 20 20 20 20 09 09 69 | 6e 74 09 09 69 64 3b 0a |. ..i|nt..id;.|
|00001870| 20 20 20 20 09 09 63 68 | 61 72 09 09 6d 73 67 5b | ..ch|ar..msg[|
|00001880| 31 30 30 5d 3b 0a 20 20 | 20 20 09 09 63 68 61 72 |100];. | ..char|
|00001890| 09 09 74 67 6c 5b 31 30 | 5d 5b 32 30 5d 3b 0a 20 |..tgl[10|][20];. |
|000018a0| 20 20 20 09 09 63 68 61 | 72 09 09 74 6f 67 67 6c | ..cha|r..toggl|
|000018b0| 65 3b 0a 20 20 20 20 09 | 09 69 6e 74 09 09 63 75 |e;. .|.int..cu|
|000018c0| 72 3b 0a 09 20 09 69 6e | 74 20 09 09 74 6f 74 61 |r;.. .in|t ..tota|
|000018d0| 6c 3b 0a 20 20 20 20 09 | 09 69 6e 74 09 09 6c 65 |l;. .|.int..le|
|000018e0| 6e 67 74 68 3b 0a 20 20 | 20 20 09 09 69 6e 74 20 |ngth;. | ..int |
|000018f0| 09 09 78 74 67 6c 3b 0a | 20 20 20 20 09 09 69 6e |..xtgl;.| ..in|
|00001900| 74 09 09 78 2c 79 3b 0a | 09 09 69 6e 74 09 09 61 |t..x,y;.|..int..a|
|00001910| 63 74 69 76 65 3b 0a 20 | 20 20 20 09 09 73 74 72 |ctive;. | ..str|
|00001920| 75 63 74 20 74 67 6c 77 | 69 64 09 2a 6e 65 78 74 |uct tglw|id.*next|
|00001930| 3b 0a 20 20 20 20 09 7d | 20 2a 74 67 6c 6c 69 73 |;. .}| *tgllis|
|00001940| 74 3b 0a 0a 2f 2a 20 64 | 65 66 69 6e 69 74 69 6f |t;../* d|efinitio|
|00001950| 6e 20 66 6f 72 20 69 6e | 70 75 74 20 77 69 64 67 |n for in|put widg|
|00001960| 65 74 20 65 6e 74 72 79 | 20 69 6e 20 6c 69 6e 6b |et entry| in link|
|00001970| 65 64 20 6c 69 73 74 20 | 2a 2f 0a 73 74 72 75 63 |ed list |*/.struc|
|00001980| 74 20 69 6e 70 77 69 64 | 7b 0a 20 20 20 20 09 09 |t inpwid|{. ..|
|00001990| 57 49 4e 44 4f 57 09 09 | 2a 77 69 64 67 65 74 3b |WINDOW..|*widget;|
|000019a0| 0a 20 20 20 20 09 09 69 | 6e 74 20 09 09 69 64 3b |. ..i|nt ..id;|
|000019b0| 0a 09 09 63 68 61 72 09 | 09 6d 73 67 5b 31 30 30 |...char.|.msg[100|
|000019c0| 5d 3b 0a 20 20 20 20 09 | 09 63 68 61 72 09 09 61 |];. .|.char..a|
|000019d0| 63 70 74 3b 0a 20 20 20 | 20 09 09 63 68 61 72 09 |cpt;. | ..char.|
|000019e0| 09 2a 69 6e 70 75 74 3b | 0a 09 09 69 6e 74 09 09 |.*input;|...int..|
|000019f0| 73 6f 66 69 3b 0a 09 09 | 69 6e 74 09 09 65 78 65 |sofi;...|int..exe|
|00001a00| 63 3b 0a 20 20 20 20 09 | 09 69 6e 74 09 09 6c 6f |c;. .|.int..lo|
|00001a10| 66 73 3b 0a 20 20 20 20 | 09 09 69 6e 74 09 09 6c |fs;. |..int..l|
|00001a20| 65 6e 67 74 68 3b 0a 20 | 20 20 20 09 09 69 6e 74 |ength;. | ..int|
|00001a30| 09 09 78 2c 79 3b 0a 09 | 09 69 6e 74 09 09 61 63 |..x,y;..|.int..ac|
|00001a40| 74 69 76 65 3b 0a 20 20 | 20 20 09 09 73 74 72 75 |tive;. | ..stru|
|00001a50| 63 74 20 69 6e 70 77 69 | 64 09 2a 6e 65 78 74 3b |ct inpwi|d.*next;|
|00001a60| 0a 20 20 20 20 09 7d 20 | 2a 69 6e 70 6c 69 73 74 |. .} |*inplist|
|00001a70| 3b 0a 20 20 20 20 0a 2f | 2a 20 6c 69 6e 6b 65 64 |;. ./|* linked|
|00001a80| 20 6c 69 73 74 20 6f 66 | 20 63 68 61 72 61 63 74 | list of| charact|
|00001a90| 65 72 73 20 75 73 65 64 | 20 66 6f 72 20 61 63 74 |ers used| for act|
|00001aa0| 69 76 61 74 69 6e 67 20 | 77 69 64 67 65 74 73 20 |ivating |widgets |
|00001ab0| 2a 2f 09 0a 73 74 72 75 | 63 74 20 63 68 65 6e 74 |*/..stru|ct chent|
|00001ac0| 72 79 20 7b 0a 20 20 20 | 20 09 09 63 68 61 72 09 |ry {. | ..char.|
|00001ad0| 09 20 20 63 68 3b 0a 20 | 20 20 20 09 09 69 6e 74 |. ch;. | ..int|
|00001ae0| 09 20 09 20 20 74 79 70 | 65 3b 0a 20 20 20 20 09 |. . typ|e;. .|
|00001af0| 09 69 6e 74 09 09 20 20 | 69 64 3b 0a 09 09 73 74 |.int.. |id;...st|
|00001b00| 72 75 63 74 20 63 68 65 | 6e 74 72 79 20 20 20 20 |ruct che|ntry |
|00001b10| 2a 6e 65 78 74 3b 0a 20 | 20 20 20 09 7d 20 2a 61 |*next;. | .} *a|
|00001b20| 63 74 6c 69 73 74 3b 0a | 0a 2f 2a 20 6e 75 6c 6c |ctlist;.|./* null|
|00001b30| 20 65 6e 74 72 69 65 73 | 20 69 6e 20 74 68 65 20 | entries| in the |
|00001b40| 76 61 72 69 6f 75 73 20 | 6c 69 6e 6b 65 64 20 6c |various |linked l|
|00001b50| 69 73 74 20 2a 2f 0a 23 | 64 65 66 69 6e 65 20 4e |ist */.#|define N|
|00001b60| 55 4c 4c 43 4d 44 09 09 | 28 73 74 72 75 63 74 20 |ULLCMD..|(struct |
|00001b70| 63 6d 64 77 69 64 20 2a | 29 4e 55 4c 4c 0a 23 64 |cmdwid *|)NULL.#d|
|00001b80| 65 66 69 6e 65 20 4e 55 | 4c 4c 4c 42 4c 20 09 28 |efine NU|LLLBL .(|
|00001b90| 73 74 72 75 63 74 20 6c | 62 6c 77 69 64 20 2a 29 |struct l|blwid *)|
|00001ba0| 4e 55 4c 4c 0a 23 64 65 | 66 69 6e 65 20 4e 55 4c |NULL.#de|fine NUL|
|00001bb0| 4c 54 47 4c 20 09 28 73 | 74 72 75 63 74 20 74 67 |LTGL .(s|truct tg|
|00001bc0| 6c 77 69 64 20 2a 29 4e | 55 4c 4c 0a 23 64 65 66 |lwid *)N|ULL.#def|
|00001bd0| 69 6e 65 20 4e 55 4c 4c | 49 4e 50 20 09 28 73 74 |ine NULL|INP .(st|
|00001be0| 72 75 63 74 20 69 6e 70 | 77 69 64 20 2a 29 4e 55 |ruct inp|wid *)NU|
|00001bf0| 4c 4c 0a 23 64 65 66 69 | 6e 65 20 4e 55 4c 4c 43 |LL.#defi|ne NULLC|
|00001c00| 48 20 09 09 28 73 74 72 | 75 63 74 20 63 68 65 6e |H ..(str|uct chen|
|00001c10| 74 72 79 20 2a 29 4e 55 | 4c 4c 0a 0a 2f 2a 20 70 |try *)NU|LL../* p|
|00001c20| 61 72 74 20 6f 66 20 74 | 68 65 20 73 70 65 63 69 |art of t|he speci|
|00001c30| 66 69 63 61 74 69 6f 6e | 73 20 66 6f 72 20 6c 61 |fication|s for la|
|00001c40| 62 65 6c 20 77 69 64 67 | 65 74 73 20 2a 2f 0a 23 |bel widg|ets */.#|
|00001c50| 64 65 66 69 6e 65 20 43 | 45 4e 54 52 45 09 09 31 |define C|ENTRE..1|
|00001c60| 0a 23 64 65 66 69 6e 65 | 09 4c 45 46 54 4a 55 53 |.#define|.LEFTJUS|
|00001c70| 54 09 32 0a 23 64 65 66 | 69 6e 65 20 52 49 47 48 |T.2.#def|ine RIGH|
|00001c80| 54 4a 55 53 54 09 34 0a | 23 64 65 66 69 6e 65 20 |TJUST.4.|#define |
|00001c90| 4e 4f 48 49 47 48 09 09 | 38 0a 0a 2f 2a 20 74 68 |NOHIGH..|8../* th|
|00001ca0| 65 20 74 79 70 65 73 20 | 6f 66 20 74 68 65 20 77 |e types |of the w|
|00001cb0| 69 64 67 65 74 73 20 2a | 2f 0a 23 64 65 66 69 6e |idgets *|/.#defin|
|00001cc0| 65 20 43 4d 44 09 09 31 | 0a 23 64 65 66 69 6e 65 |e CMD..1|.#define|
|00001cd0| 20 54 47 4c 09 09 32 0a | 23 64 65 66 69 6e 65 20 | TGL..2.|#define |
|00001ce0| 4c 42 4c 09 09 33 0a 23 | 64 65 66 69 6e 65 20 49 |LBL..3.#|define I|
|00001cf0| 4e 50 09 09 34 0a 0a 23 | 64 65 66 69 6e 65 20 42 |NP..4..#|define B|
|00001d00| 4c 41 4e 4b 09 09 31 0a | 23 64 65 66 69 6e 65 20 |LANK..1.|#define |
|00001d10| 4e 4f 42 4c 41 4e 4b 09 | 09 30 0a 0a 23 64 65 66 |NOBLANK.|.0..#def|
|00001d20| 69 6e 65 20 4e 55 4c 4c | 57 49 44 47 45 54 09 30 |ine NULL|WIDGET.0|
|00001d30| 0a 0a 23 64 65 66 69 6e | 65 20 45 58 45 43 09 09 |..#defin|e EXEC..|
|00001d40| 31 0a 23 64 65 66 69 6e | 65 20 4e 4f 45 58 45 43 |1.#defin|e NOEXEC|
|00001d50| 09 09 30 0a 0a 23 64 65 | 66 69 6e 65 20 56 45 52 |..0..#de|fine VER|
|00001d60| 54 49 43 41 4c 09 31 0a | 23 64 65 66 69 6e 65 20 |TICAL.1.|#define |
|00001d70| 48 4f 52 49 5a 4f 4e 54 | 41 4c 09 32 0a 0a 74 79 |HORIZONT|AL.2..ty|
|00001d80| 70 65 64 65 66 20 69 6e | 74 20 57 49 44 47 45 54 |pedef in|t WIDGET|
|00001d90| 3b 0a 74 79 70 65 64 65 | 66 20 69 6e 74 20 57 49 |;.typede|f int WI|
|00001da0| 44 47 45 54 54 59 50 45 | 3b 0a 0a 53 48 41 52 5f |DGETTYPE|;..SHAR_|
|00001db0| 45 4f 46 0a 69 66 20 74 | 65 73 74 20 32 37 35 32 |EOF.if t|est 2752|
|00001dc0| 20 2d 6e 65 20 60 77 63 | 20 2d 63 20 3c 20 27 77 | -ne `wc| -c < 'w|
|00001dd0| 69 64 67 65 74 2e 68 27 | 60 0a 74 68 65 6e 0a 20 |idget.h'|`.then. |
|00001de0| 20 20 20 65 63 68 6f 20 | 27 53 68 61 72 3a 20 65 | echo |'Shar: e|
|00001df0| 72 72 6f 72 20 74 72 61 | 6e 73 6d 69 74 74 69 6e |rror tra|nsmittin|
|00001e00| 67 20 27 77 69 64 67 65 | 74 2e 68 27 20 28 73 68 |g 'widge|t.h' (sh|
|00001e10| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 20 |ould hav|e been |
|00001e20| 32 37 35 32 20 63 68 61 | 72 63 61 74 65 72 73 29 |2752 cha|rcaters)|
|00001e30| 27 0a 66 69 0a 66 69 0a | 65 63 68 6f 20 27 53 68 |'.fi.fi.|echo 'Sh|
|00001e40| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 27 |ar: extr|acting '|
|00001e50| 77 69 64 67 65 74 2e 6d | 73 27 20 28 20 31 30 39 |widget.m|s' ( 109|
|00001e60| 34 36 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |46 chara|cters)'.|
|00001e70| 69 66 20 74 65 73 74 20 | 2d 66 20 27 77 69 64 67 |if test |-f 'widg|
|00001e80| 65 74 2e 6d 73 27 0a 74 | 68 65 6e 0a 20 20 20 20 |et.ms'.t|hen. |
|00001e90| 65 63 68 6f 20 22 53 68 | 61 72 3a 20 77 69 6c 6c |echo "Sh|ar: will|
|00001ea0| 20 6e 6f 74 20 6f 76 65 | 72 77 72 69 74 65 20 65 | not ove|rwrite e|
|00001eb0| 78 69 73 74 69 6e 67 20 | 66 69 6c 65 20 27 77 69 |xisting |file 'wi|
|00001ec0| 64 67 65 74 2e 6d 73 27 | 22 0a 65 6c 73 65 0a 20 |dget.ms'|".else. |
|00001ed0| 20 20 20 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f | cat <|< \SHAR_|
|00001ee0| 45 4f 46 20 3e 20 27 77 | 69 64 67 65 74 2e 6d 73 |EOF > 'w|idget.ms|
|00001ef0| 27 0a 2e 4e 44 0a 2e 4c | 50 0a 2e 6e 72 20 50 53 |'..ND..L|P..nr PS|
|00001f00| 20 31 32 0a 2e 6e 72 20 | 56 53 20 31 33 0a 2e 4c | 12..nr |VS 13..L|
|00001f10| 50 0a 2e 6e 68 0a 2e 52 | 50 0a 2e 54 4c 0a 41 20 |P..nh..R|P..TL.A |
|00001f20| 57 69 6e 64 6f 77 20 62 | 61 73 65 64 20 49 6e 74 |Window b|ased Int|
|00001f30| 65 72 61 63 74 69 76 65 | 20 50 72 6f 67 72 61 6d |eractive| Program|
|00001f40| 6d 69 6e 67 20 55 74 69 | 6c 69 74 79 20 4f 6e 20 |ming Uti|lity On |
|00001f50| 55 6e 69 78 3a 0a 41 20 | 4c 69 62 72 61 72 79 20 |Unix:.A |Library |
|00001f60| 50 61 63 6b 61 67 65 20 | 66 6f 72 20 43 20 70 72 |Package |for C pr|
|00001f70| 6f 67 72 61 6d 6d 65 72 | 73 0a 2e 41 55 0a 52 69 |ogrammer|s..AU.Ri|
|00001f80| 63 68 61 72 64 20 41 2e | 20 43 75 6c 73 68 61 77 |chard A.| Culshaw|
|00001f90| 0a 2e 41 49 0a 47 45 43 | 20 48 69 72 73 74 20 52 |..AI.GEC| Hirst R|
|00001fa0| 65 73 65 61 72 63 68 20 | 43 65 6e 74 72 65 0a 44 |esearch |Centre.D|
|00001fb0| 61 74 61 20 53 79 73 74 | 65 6d 73 20 44 69 76 69 |ata Syst|ems Divi|
|00001fc0| 73 69 6f 6e 0a 45 61 73 | 74 20 4c 61 6e 65 0a 57 |sion.Eas|t Lane.W|
|00001fd0| 65 6d 62 6c 65 79 0a 4d | 69 64 64 6c 65 73 65 78 |embley.M|iddlesex|
|00001fe0| 20 48 41 39 20 37 50 50 | 0a 2e 4e 44 0a 2e 4b 53 | HA9 7PP|..ND..KS|
|00001ff0| 0a 2e 53 48 0a 49 4e 54 | 52 4f 44 55 43 54 49 4f |..SH.INT|RODUCTIO|
|00002000| 4e 0a 0a 2e 50 50 0a 41 | 20 57 69 64 67 65 74 20 |N...PP.A| Widget |
|00002010| 69 73 20 61 20 75 73 65 | 72 20 64 65 66 69 6e 61 |is a use|r defina|
|00002020| 62 6c 65 20 0a 2e 42 20 | 22 77 69 6e 64 6f 77 20 |ble ..B |"window |
|00002030| 67 61 64 67 65 74 2e 22 | 0a 20 54 68 65 79 20 61 |gadget."|. They a|
|00002040| 6c 6c 6f 77 20 74 68 65 | 20 75 73 65 72 20 74 6f |llow the| user to|
|00002050| 20 69 6e 74 65 72 61 63 | 74 20 77 69 74 68 20 74 | interac|t with t|
|00002060| 68 65 20 70 72 6f 67 72 | 61 6d 20 69 6e 20 73 70 |he progr|am in sp|
|00002070| 65 63 69 66 79 69 6e 67 | 20 6f 70 65 72 61 74 69 |ecifying| operati|
|00002080| 6f 6e 73 20 74 6f 20 62 | 65 20 63 61 72 72 69 65 |ons to b|e carrie|
|00002090| 64 20 6f 75 74 2e 20 57 | 69 64 67 65 74 6c 69 62 |d out. W|idgetlib|
|000020a0| 20 69 73 20 61 20 73 65 | 74 20 6f 66 20 6c 69 62 | is a se|t of lib|
|000020b0| 72 61 72 79 20 66 75 6e | 63 74 69 6f 6e 73 20 77 |rary fun|ctions w|
|000020c0| 68 69 63 68 20 61 6c 6c | 6f 77 73 20 74 68 65 20 |hich all|ows the |
|000020d0| 75 73 65 72 20 74 6f 20 | 63 72 65 61 74 65 20 61 |user to |create a|
|000020e0| 6e 64 20 69 6e 74 65 72 | 61 63 74 20 77 69 74 68 |nd inter|act with|
|000020f0| 20 0a 2e 42 20 77 69 64 | 67 65 74 73 2e 0a 41 20 | ..B wid|gets..A |
|00002100| 77 69 64 67 65 74 20 63 | 61 6e 20 62 65 20 6f 6e |widget c|an be on|
|00002110| 65 20 6f 66 20 66 6f 75 | 72 20 74 79 70 65 73 20 |e of fou|r types |
|00002120| 3a 0a 2e 4c 50 0a 20 20 | 20 20 20 20 31 29 20 0a |:..LP. | 1) .|
|00002130| 2e 42 20 43 6f 6d 6d 61 | 6e 64 20 0a 57 69 64 67 |.B Comma|nd .Widg|
|00002140| 65 74 20 0a 20 20 20 20 | 20 20 32 29 20 0a 2e 42 |et . | 2) ..B|
|00002150| 20 4c 61 62 65 6c 20 0a | 57 69 64 67 65 74 0a 20 | Label .|Widget. |
|00002160| 20 20 20 20 20 33 29 20 | 0a 2e 42 20 54 6f 67 67 | 3) |..B Togg|
|00002170| 6c 65 20 0a 57 69 64 67 | 65 74 0a 20 20 20 20 20 |le .Widg|et. |
|00002180| 20 34 29 20 0a 2e 42 20 | 49 6e 70 75 74 20 0a 57 | 4) ..B |Input .W|
|00002190| 69 64 67 65 74 0a 0a 2e | 53 48 0a 43 6f 6d 6d 61 |idget...|SH.Comma|
|000021a0| 6e 64 20 57 69 64 67 65 | 74 73 0a 2e 50 50 0a 41 |nd Widge|ts..PP.A|
|000021b0| 20 63 6f 6d 6d 61 6e 64 | 20 77 69 64 67 65 74 20 | command| widget |
|000021c0| 61 6c 6c 6f 77 73 20 74 | 68 65 20 75 73 65 72 20 |allows t|he user |
|000021d0| 74 6f 20 73 65 6c 65 63 | 74 20 61 20 66 75 6e 63 |to selec|t a func|
|000021e0| 74 69 6f 6e 20 74 6f 20 | 62 65 20 63 61 72 72 69 |tion to |be carri|
|000021f0| 65 64 20 6f 75 74 2c 20 | 65 2e 67 20 69 6e 20 61 |ed out, |e.g in a|
|00002200| 20 70 61 67 69 6e 67 20 | 70 72 6f 67 72 61 6d 20 | paging |program |
|00002210| 6f 6e 65 20 73 75 63 68 | 20 63 6f 6d 6d 61 6e 64 |one such| command|
|00002220| 20 63 6f 75 6c 64 20 62 | 65 20 27 4e 65 78 74 20 | could b|e 'Next |
|00002230| 50 61 67 65 27 2e 20 49 | 6e 20 63 72 65 61 74 69 |Page'. I|n creati|
|00002240| 6e 67 20 61 20 63 6f 6d | 6d 61 6e 64 20 77 69 64 |ng a com|mand wid|
|00002250| 67 65 74 20 74 68 65 20 | 70 72 6f 67 72 61 6d 6d |get the |programm|
|00002260| 65 72 20 6d 75 73 74 20 | 70 61 73 73 20 69 74 20 |er must |pass it |
|00002270| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 |the func|tion to |
|00002280| 62 65 20 63 61 72 72 69 | 65 64 20 6f 75 74 20 77 |be carri|ed out w|
|00002290| 68 65 6e 20 74 68 65 20 | 77 69 64 67 65 74 20 69 |hen the |widget i|
|000022a0| 73 20 73 65 6c 65 63 74 | 65 64 20 28 61 63 74 69 |s select|ed (acti|
|000022b0| 76 61 74 65 64 29 2e 20 | 54 68 65 20 77 69 64 67 |vated). |The widg|
|000022c0| 65 74 20 69 73 20 61 63 | 74 69 76 61 74 65 64 20 |et is ac|tivated |
|000022d0| 75 73 69 6e 67 20 61 20 | 75 6e 69 71 75 65 20 27 |using a |unique '|
|000022e0| 61 63 74 69 76 61 74 69 | 6f 6e 27 20 63 68 61 72 |activati|on' char|
|000022f0| 61 63 74 65 72 20 77 68 | 69 63 68 20 69 73 20 64 |acter wh|ich is d|
|00002300| 69 73 70 6c 61 79 65 64 | 20 69 6e 20 74 68 65 20 |isplayed| in the |
|00002310| 77 69 64 67 65 74 20 66 | 6f 72 20 65 61 73 79 20 |widget f|or easy |
|00002320| 72 65 66 65 72 65 6e 63 | 65 2e 0a 0a 2e 53 48 0a |referenc|e....SH.|
|00002330| 4c 61 62 65 6c 20 57 69 | 64 67 65 74 73 0a 2e 50 |Label Wi|dgets..P|
|00002340| 50 0a 41 20 6c 61 62 65 | 6c 20 77 69 64 67 65 74 |P.A labe|l widget|
|00002350| 20 69 73 20 73 69 6d 70 | 6c 79 20 61 20 77 69 64 | is simp|ly a wid|
|00002360| 67 65 74 20 77 68 69 63 | 68 20 68 6f 6c 64 73 20 |get whic|h holds |
|00002370| 61 20 63 68 61 72 61 63 | 74 65 72 20 73 74 72 69 |a charac|ter stri|
|00002380| 6e 67 20 73 75 63 68 20 | 61 73 20 61 20 68 65 61 |ng such |as a hea|
|00002390| 64 69 6e 67 2c 20 77 68 | 69 63 68 20 63 61 6e 20 |ding, wh|ich can |
|000023a0| 62 65 20 63 68 61 6e 67 | 65 64 20 61 74 20 77 69 |be chang|ed at wi|
|000023b0| 6c 6c 20 6c 61 74 65 72 | 2e 20 54 68 65 20 70 72 |ll later|. The pr|
|000023c0| 6f 67 72 61 6d 6d 65 72 | 20 63 61 6e 20 73 75 70 |ogrammer| can sup|
|000023d0| 70 6c 79 20 70 61 72 61 | 6d 65 74 65 72 73 20 77 |ply para|meters w|
|000023e0| 68 69 63 68 20 63 61 6e | 20 65 69 74 68 65 72 20 |hich can| either |
|000023f0| 6c 65 66 74 20 6a 75 73 | 74 69 66 79 20 28 64 65 |left jus|tify (de|
|00002400| 66 61 75 6c 74 29 2c 20 | 72 69 67 68 74 20 6a 75 |fault), |right ju|
|00002410| 73 74 69 66 79 2c 20 6f | 72 20 63 65 6e 74 72 65 |stify, o|r centre|
|00002420| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 77 69 74 | the mes|sage wit|
|00002430| 68 69 6e 20 74 68 65 20 | 77 69 64 67 65 74 20 28 |hin the |widget (|
|00002440| 77 68 69 63 68 20 68 61 | 73 20 61 20 75 73 65 72 |which ha|s a user|
|00002450| 20 64 65 66 69 6e 61 62 | 6c 65 20 77 69 64 74 68 | definab|le width|
|00002460| 29 20 61 73 20 77 65 6c | 6c 20 61 73 20 68 69 67 |) as wel|l as hig|
|00002470| 68 6c 69 67 68 74 20 28 | 64 65 66 61 75 6c 74 29 |hlight (|default)|
|00002480| 20 6f 72 20 64 65 68 69 | 67 68 6c 69 67 68 74 20 | or dehi|ghlight |
|00002490| 69 74 2e 0a 0a 2e 53 48 | 0a 54 6f 67 67 6c 65 20 |it....SH|.Toggle |
|000024a0| 57 69 64 67 65 74 73 0a | 2e 50 50 0a 41 20 74 6f |Widgets.|.PP.A to|
|000024b0| 67 67 6c 65 20 77 69 64 | 67 65 74 20 63 6f 6e 74 |ggle wid|get cont|
|000024c0| 61 69 6e 73 20 61 20 6d | 65 73 73 61 67 65 20 77 |ains a m|essage w|
|000024d0| 68 69 63 68 20 69 6e 64 | 69 63 61 74 65 73 20 74 |hich ind|icates t|
|000024e0| 68 65 20 63 75 72 72 65 | 6e 74 20 76 61 6c 75 65 |he curre|nt value|
|000024f0| 20 6f 66 20 61 6e 20 65 | 6e 74 69 74 79 20 77 68 | of an e|ntity wh|
|00002500| 69 63 68 20 63 61 6e 20 | 62 65 20 6d 6f 72 65 20 |ich can |be more |
|00002510| 74 68 61 6e 20 6f 6e 65 | 20 76 61 6c 75 65 20 65 |than one| value e|
|00002520| 2e 67 2c 20 59 65 73 2f | 4e 6f 2f 44 6f 6e 27 74 |.g, Yes/|No/Don't|
|00002530| 2d 4b 6e 6f 77 2e 20 54 | 68 65 20 76 61 6c 75 65 |-Know. T|he value|
|00002540| 20 69 73 20 74 6f 67 67 | 6c 65 64 20 77 68 65 6e | is togg|led when|
|00002550| 20 61 20 67 69 76 65 6e | 20 63 68 61 72 61 63 74 | a given| charact|
|00002560| 65 72 20 69 73 20 70 72 | 65 73 73 65 64 2e 20 54 |er is pr|essed. T|
|00002570| 68 65 20 61 63 74 69 76 | 61 74 69 6f 6e 20 63 68 |he activ|ation ch|
|00002580| 61 72 61 63 74 65 72 20 | 69 73 20 61 6c 73 6f 20 |aracter |is also |
|00002590| 64 69 73 70 6c 61 79 65 | 64 20 69 6e 20 74 68 65 |displaye|d in the|
|000025a0| 20 77 69 64 67 65 74 2e | 20 41 74 20 61 6e 79 20 | widget.| At any |
|000025b0| 70 6f 69 6e 74 20 74 68 | 65 20 70 72 6f 67 72 61 |point th|e progra|
|000025c0| 6d 6d 65 72 20 63 61 6e | 20 65 6e 71 75 69 72 65 |mmer can| enquire|
|000025d0| 20 61 73 20 74 6f 20 74 | 68 65 20 74 68 65 20 63 | as to t|he the c|
|000025e0| 75 72 72 65 6e 74 20 74 | 6f 67 67 6c 65 20 76 61 |urrent t|oggle va|
|000025f0| 6c 75 65 2e 0a 0a 2e 53 | 48 0a 49 6e 70 75 74 20 |lue....S|H.Input |
|00002600| 57 69 64 67 65 74 73 0a | 2e 50 50 0a 41 6e 20 69 |Widgets.|.PP.An i|
|00002610| 6e 70 75 74 20 77 69 64 | 67 65 74 20 61 6c 6c 6f |nput wid|get allo|
|00002620| 77 73 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 65 |ws the u|ser to e|
|00002630| 6e 74 65 72 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |nter inf|ormation|
|00002640| 20 69 6e 74 6f 20 74 68 | 65 20 70 72 6f 67 72 61 | into th|e progra|
|00002650| 6d 20 69 6e 20 74 68 65 | 20 66 6f 72 6d 20 6f 66 |m in the| form of|
|00002660| 20 61 20 73 74 72 69 6e | 67 2c 20 65 2e 67 20 69 | a strin|g, e.g i|
|00002670| 6e 20 61 20 70 61 67 69 | 6e 67 20 70 72 6f 67 72 |n a pagi|ng progr|
|00002680| 61 6d 20 6f 6e 65 20 6d | 69 67 68 74 20 77 61 6e |am one m|ight wan|
|00002690| 74 20 74 6f 20 73 75 70 | 70 6c 79 20 61 20 66 69 |t to sup|ply a fi|
|000026a0| 6c 65 20 6e 61 6d 65 2e | 20 54 68 65 72 65 20 61 |le name.| There a|
|000026b0| 72 65 20 74 77 6f 20 74 | 79 70 65 73 20 6f 66 20 |re two t|ypes of |
|000026c0| 69 6e 70 75 74 20 77 69 | 64 67 65 74 73 20 3a 0a |input wi|dgets :.|
|000026d0| 0a 61 29 20 54 68 65 20 | 77 69 64 67 65 74 20 69 |.a) The |widget i|
|000026e0| 73 20 61 63 74 69 76 61 | 74 65 64 20 69 6d 6d 65 |s activa|ted imme|
|000026f0| 64 69 61 74 65 6c 79 20 | 6f 6e 20 63 72 65 61 74 |diately |on creat|
|00002700| 69 6f 6e 20 74 68 65 72 | 65 66 6f 72 65 20 61 6e |ion ther|efore an|
|00002710| 20 61 63 74 69 76 61 74 | 69 6f 6e 20 63 68 61 72 | activat|ion char|
|00002720| 61 63 74 65 72 20 69 73 | 20 6e 6f 74 20 72 65 71 |acter is| not req|
|00002730| 75 69 72 65 64 2e 20 45 | 2e 67 20 69 6e 20 61 20 |uired. E|.g in a |
|00002740| 70 61 67 69 6e 67 20 70 | 72 6f 67 72 61 6d 20 6f |paging p|rogram o|
|00002750| 6e 65 20 6d 69 67 68 74 | 20 68 61 76 65 20 61 20 |ne might| have a |
|00002760| 63 6f 6d 6d 61 6e 64 20 | 77 69 64 67 65 74 20 77 |command |widget w|
|00002770| 68 69 63 68 20 61 63 74 | 69 76 61 74 65 73 20 74 |hich act|ivates t|
|00002780| 68 69 73 20 74 79 70 65 | 20 6f 66 20 69 6e 70 75 |his type| of inpu|
|00002790| 74 20 77 69 64 67 65 74 | 20 69 6e 20 6f 72 64 65 |t widget| in orde|
|000027a0| 72 20 74 6f 20 67 65 74 | 20 61 20 66 69 6c 65 20 |r to get| a file |
|000027b0| 6e 61 6d 65 2e 0a 2e 4c | 50 0a 62 29 20 54 68 65 |name...L|P.b) The|
|000027c0| 20 77 69 64 67 65 74 20 | 68 61 73 20 61 6e 20 61 | widget |has an a|
|000027d0| 73 73 6f 63 69 61 74 65 | 64 20 61 63 74 69 76 61 |ssociate|d activa|
|000027e0| 74 69 6f 6e 20 63 68 61 | 72 61 63 74 65 72 20 73 |tion cha|racter s|
|000027f0| 6f 20 74 68 65 72 65 66 | 6f 72 65 20 69 74 20 6d |o theref|ore it m|
|00002800| 61 79 20 62 65 20 61 63 | 74 69 76 61 74 65 64 20 |ay be ac|tivated |
|00002810| 61 74 20 61 6e 79 20 70 | 6f 69 6e 74 20 61 66 74 |at any p|oint aft|
|00002820| 65 72 20 63 72 65 61 74 | 69 6f 6e 2e 20 54 68 65 |er creat|ion. The|
|00002830| 20 63 68 61 72 61 63 74 | 65 72 20 69 73 20 64 69 | charact|er is di|
|00002840| 73 70 6c 61 79 65 64 20 | 69 6e 20 74 68 65 20 77 |splayed |in the w|
|00002850| 69 64 67 65 74 2e 0a 0a | 46 6f 72 20 65 61 73 65 |idget...|For ease|
|00002860| 20 6f 66 20 75 73 65 20 | 74 68 65 20 69 6e 70 75 | of use |the inpu|
|00002870| 74 20 77 69 64 67 65 74 | 73 20 63 6f 6e 74 61 69 |t widget|s contai|
|00002880| 6e 20 63 68 61 72 61 63 | 74 65 72 20 73 74 72 69 |n charac|ter stri|
|00002890| 6e 67 73 20 77 68 69 63 | 68 20 63 61 6e 20 65 78 |ngs whic|h can ex|
|000028a0| 70 6c 61 69 6e 0a 74 68 | 65 72 65 20 75 73 65 20 |plain.th|ere use |
|000028b0| 77 69 74 68 69 6e 20 74 | 68 65 20 70 72 6f 67 72 |within t|he progr|
|000028c0| 61 6d 2e 0a 2e 4b 45 0a | 2e 62 70 0a 2e 53 48 0a |am...KE.|.bp..SH.|
|000028d0| 54 65 78 74 20 57 69 6e | 64 6f 77 0a 2e 50 50 0a |Text Win|dow..PP.|
|000028e0| 54 68 65 20 6c 69 62 72 | 61 72 79 20 61 6c 73 6f |The libr|ary also|
|000028f0| 20 61 6c 6c 6f 77 73 20 | 74 68 65 20 75 73 65 72 | allows |the user|
|00002900| 20 74 6f 20 64 65 66 69 | 6e 65 20 61 20 74 65 78 | to defi|ne a tex|
|00002910| 74 20 77 69 6e 64 6f 77 | 20 69 6e 74 6f 20 77 68 |t window| into wh|
|00002920| 69 63 68 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |ich the |program |
|00002930| 6d 61 79 20 72 65 70 6f | 72 74 20 69 6e 66 6f 72 |may repo|rt infor|
|00002940| 6d 61 74 69 6f 6e 2e 20 | 4f 6e 20 63 72 65 61 74 |mation. |On creat|
|00002950| 69 6f 6e 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |ion the |program |
|00002960| 68 61 73 20 74 6f 20 70 | 61 73 73 20 61 20 70 61 |has to p|ass a pa|
|00002970| 72 61 6d 65 74 65 72 20 | 77 68 69 63 68 20 73 70 |rameter |which sp|
|00002980| 65 63 69 66 69 65 73 20 | 68 6f 77 20 6d 75 63 68 |ecifies |how much|
|00002990| 20 72 6f 6f 6d 20 74 6f | 20 6c 65 61 76 65 20 62 | room to| leave b|
|000029a0| 65 66 6f 72 65 20 74 68 | 65 20 74 6f 70 20 6f 66 |efore th|e top of|
|000029b0| 20 74 68 65 20 74 65 78 | 74 20 77 69 6e 64 6f 77 | the tex|t window|
|000029c0| 2e 20 45 2e 67 20 30 20 | 6d 65 61 6e 73 20 70 6c |. E.g 0 |means pl|
|000029d0| 61 63 65 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 |ace the |window i|
|000029e0| 6d 6d 65 64 69 61 74 65 | 6c 79 20 62 65 6c 6f 77 |mmediate|ly below|
|000029f0| 20 74 68 65 20 6c 6f 77 | 65 73 74 20 77 69 64 67 | the low|est widg|
|00002a00| 65 74 2c 20 31 20 6d 65 | 61 6e 73 20 61 6c 6c 6f |et, 1 me|ans allo|
|00002a10| 77 20 72 6f 6f 6d 20 66 | 6f 72 20 6f 6e 65 20 6d |w room f|or one m|
|00002a20| 6f 72 65 20 72 6f 77 20 | 6f 66 20 77 69 64 67 65 |ore row |of widge|
|00002a30| 74 73 20 62 65 66 6f 72 | 65 20 70 6c 61 63 69 6e |ts befor|e placin|
|00002a40| 67 20 74 68 65 20 77 69 | 6e 64 6f 77 2e 20 54 68 |g the wi|ndow. Th|
|00002a50| 65 20 74 65 78 74 20 77 | 69 6e 64 6f 77 20 61 6c |e text w|indow al|
|00002a60| 77 61 79 73 20 73 74 72 | 65 74 63 68 65 73 20 74 |ways str|etches t|
|00002a70| 6f 20 74 68 65 20 62 6f | 74 74 6f 6d 20 6f 66 20 |o the bo|ttom of |
|00002a80| 74 68 65 20 73 63 72 65 | 65 6e 2e 20 54 68 65 20 |the scre|en. The |
|00002a90| 77 69 6e 64 6f 77 20 63 | 61 6e 20 62 65 20 62 6f |window c|an be bo|
|00002aa0| 72 64 65 72 65 64 20 6f | 6e 20 61 6e 79 20 32 20 |rdered o|n any 2 |
|00002ab0| 6f 70 70 6f 73 69 74 65 | 20 73 69 64 65 73 20 6f |opposite| sides o|
|00002ac0| 72 20 6f 6e 20 61 6c 6c | 20 34 20 28 65 66 66 65 |r on all| 4 (effe|
|00002ad0| 63 74 69 76 65 6c 79 20 | 62 6f 78 69 6e 67 20 0a |ctively |boxing .|
|00002ae0| 0a 0a 0a 0a 0a 69 74 29 | 2e 0a 0a 2e 53 48 0a 57 |.....it)|....SH.W|
|00002af0| 69 64 67 65 74 20 50 6c | 61 63 65 6d 65 6e 74 0a |idget Pl|acement.|
|00002b00| 2e 50 50 0a 54 68 65 20 | 6c 69 62 72 61 72 79 20 |.PP.The |library |
|00002b10| 6d 61 69 6e 74 61 69 6e | 73 20 74 68 65 20 63 75 |maintain|s the cu|
|00002b20| 72 72 65 6e 74 20 58 2c | 59 20 63 6f 6f 72 64 69 |rrent X,|Y coordi|
|00002b30| 6e 61 74 65 20 6f 66 20 | 74 68 65 20 6c 61 73 74 |nate of |the last|
|00002b40| 20 77 69 64 67 65 74 20 | 63 72 65 61 74 65 64 2e | widget |created.|
|00002b50| 20 57 68 65 6e 20 61 20 | 6e 65 77 20 77 69 64 67 | When a |new widg|
|00002b60| 65 74 20 69 73 20 63 72 | 65 61 74 65 64 20 74 68 |et is cr|eated th|
|00002b70| 65 20 70 72 6f 67 72 61 | 6d 20 6d 75 73 74 20 70 |e progra|m must p|
|00002b80| 61 73 73 20 61 20 70 61 | 72 61 6d 65 74 65 72 20 |ass a pa|rameter |
|00002b90| 30 20 6f 72 20 31 2e 20 | 41 20 30 20 6d 65 61 6e |0 or 1. |A 0 mean|
|00002ba0| 73 20 70 75 74 20 74 68 | 65 20 6e 65 77 20 77 69 |s put th|e new wi|
|00002bb0| 64 67 65 74 20 6f 6e 20 | 74 68 65 20 63 75 72 72 |dget on |the curr|
|00002bc0| 65 6e 74 20 72 6f 77 20 | 69 66 20 70 6f 73 73 69 |ent row |if possi|
|00002bd0| 62 6c 65 2c 20 65 6c 73 | 65 20 67 6f 20 6f 6e 74 |ble, els|e go ont|
|00002be0| 6f 20 74 68 65 20 6e 65 | 78 74 20 72 6f 77 2e 20 |o the ne|xt row. |
|00002bf0| 41 20 31 20 66 6f 72 63 | 65 73 20 74 68 65 20 6e |A 1 forc|es the n|
|00002c00| 65 77 20 77 69 64 67 65 | 74 20 6f 6e 74 6f 20 74 |ew widge|t onto t|
|00002c10| 68 65 20 6e 65 78 74 20 | 72 6f 77 2e 20 54 68 69 |he next |row. Thi|
|00002c20| 73 20 6d 65 61 6e 73 20 | 74 68 61 74 20 77 69 64 |s means |that wid|
|00002c30| 67 65 74 73 20 63 61 6e | 20 6f 6e 6c 79 20 67 6f |gets can| only go|
|00002c40| 20 61 66 74 65 72 20 70 | 72 65 63 65 64 69 6e 67 | after p|receding|
|00002c50| 20 6f 6e 65 73 20 61 6e | 64 20 6e 6f 74 20 62 65 | ones an|d not be|
|00002c60| 66 6f 72 65 2e 20 42 75 | 74 20 68 6f 77 65 76 65 |fore. Bu|t howeve|
|00002c70| 72 20 77 69 64 67 65 74 | 73 20 63 61 6e 20 62 65 |r widget|s can be|
|00002c80| 20 70 6c 61 63 65 64 20 | 6f 76 65 72 20 77 69 64 | placed |over wid|
|00002c90| 67 65 74 73 20 77 68 69 | 63 68 20 68 61 76 65 20 |gets whi|ch have |
|00002ca0| 70 72 65 76 69 6f 75 73 | 6c 79 20 62 65 65 6e 20 |previous|ly been |
|00002cb0| 64 65 73 74 72 6f 79 65 | 64 2e 0a 0a 2e 53 48 0a |destroye|d....SH.|
|00002cc0| 43 6f 6d 70 69 6c 69 6e | 67 20 54 68 69 6e 67 73 |Compilin|g Things|
|00002cd0| 0a 2e 50 50 0a 49 6e 20 | 6f 72 64 65 72 20 74 6f |..PP.In |order to|
|00002ce0| 20 75 73 65 20 74 68 65 | 20 6c 69 62 72 61 72 79 | use the| library|
|00002cf0| 2c 20 69 74 20 69 73 20 | 6e 65 63 65 73 73 61 72 |, it is |necessar|
|00002d00| 79 20 74 6f 20 68 61 76 | 65 20 63 65 72 74 61 69 |y to hav|e certai|
|00002d10| 6e 20 74 79 70 65 73 20 | 61 6e 64 20 76 61 72 69 |n types |and vari|
|00002d20| 61 62 6c 65 73 20 64 65 | 66 69 6e 65 64 2e 20 54 |ables de|fined. T|
|00002d30| 68 65 72 65 66 6f 72 65 | 2c 20 74 68 65 20 70 72 |herefore|, the pr|
|00002d40| 6f 67 72 61 6d 20 6d 75 | 73 74 20 68 61 76 65 20 |ogram mu|st have |
|00002d50| 74 68 65 20 6c 69 6e 65 | 3a 0a 2e 50 50 0a 2e 42 |the line|:..PP..B|
|00002d60| 20 22 23 69 6e 63 6c 75 | 64 65 20 3c 77 69 64 67 | "#inclu|de <widg|
|00002d70| 65 74 73 2e 68 3e 22 0a | 2e 4c 50 0a 61 74 20 74 |ets.h>".|.LP.at t|
|00002d80| 68 65 20 74 6f 70 20 6f | 66 20 74 68 65 20 73 6f |he top o|f the so|
|00002d90| 75 72 63 65 2e 20 54 68 | 65 20 68 65 61 64 65 72 |urce. Th|e header|
|00002da0| 20 66 69 6c 65 20 69 6e | 63 6c 75 64 65 73 20 3c | file in|cludes <|
|00002db0| 63 75 72 73 65 73 2e 68 | 3e 2c 20 3c 73 67 65 74 |curses.h|>, <sget|
|00002dc0| 74 79 2e 68 3e 2c 20 3c | 73 74 64 69 6f 2e 68 3e |ty.h>, <|stdio.h>|
|00002dd0| 20 73 6f 20 79 6f 75 20 | 64 6f 6e 27 74 20 68 61 | so you |don't ha|
|00002de0| 76 65 20 74 6f 20 69 6e | 63 6c 75 64 65 20 74 68 |ve to in|clude th|
|00002df0| 65 6d 20 61 6c 73 6f 2e | 20 41 6c 73 6f 20 63 6f |em also.| Also co|
|00002e00| 6d 70 69 6c 61 74 69 6f | 6e 73 20 73 68 6f 75 6c |mpilatio|ns shoul|
|00002e10| 64 20 68 61 76 65 20 74 | 68 65 20 66 6f 6c 6c 6f |d have t|he follo|
|00002e20| 77 69 6e 67 20 66 6f 72 | 6d 3a 0a 2e 50 50 0a 2e |wing for|m:..PP..|
|00002e30| 42 20 22 63 63 20 5b 66 | 6c 61 67 73 5d 20 66 69 |B "cc [f|lags] fi|
|00002e40| 6c 65 20 2e 2e 2e 20 2d | 6c 77 69 64 67 65 74 73 |le ... -|lwidgets|
|00002e50| 20 2d 6c 63 75 72 73 65 | 73 22 0a 0a 2e 53 48 0a | -lcurse|s"...SH.|
|00002e60| 54 79 70 65 20 44 65 66 | 69 6e 69 74 69 6f 6e 73 |Type Def|initions|
|00002e70| 0a 2e 4c 50 0a 54 68 65 | 20 66 75 6e 63 74 69 6f |..LP.The| functio|
|00002e80| 6e 73 20 77 68 69 63 68 | 20 63 72 65 61 74 65 20 |ns which| create |
|00002e90| 77 69 64 67 65 74 73 20 | 72 65 74 75 72 6e 20 61 |widgets |return a|
|00002ea0| 20 74 79 70 65 20 0a 2e | 42 20 57 49 44 47 45 54 | type ..|B WIDGET|
|00002eb0| 0a 77 68 69 63 68 20 69 | 73 20 75 73 65 64 20 66 |.which i|s used f|
|00002ec0| 6f 72 20 6c 61 74 65 72 | 20 69 64 65 6e 74 69 66 |or later| identif|
|00002ed0| 69 63 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 77 |ication |of the w|
|00002ee0| 69 64 67 65 74 2e 0a 2e | 4c 50 0a 49 66 20 61 20 |idget...|LP.If a |
|00002ef0| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 72 65 71 75 |function| is requ|
|00002f00| 69 72 65 64 20 74 6f 20 | 72 65 74 75 72 6e 20 61 |ired to |return a|
|00002f10| 20 77 69 64 67 65 74 20 | 69 64 65 6e 74 69 66 69 | widget |identifi|
|00002f20| 65 72 2c 20 74 68 65 6e | 20 69 74 20 77 69 6c 6c |er, then| it will|
|00002f30| 20 72 65 74 75 72 6e 20 | 0a 2e 42 20 4e 55 4c 4c | return |..B NULL|
|00002f40| 57 49 44 47 45 54 0a 75 | 70 6f 6e 20 65 72 72 6f |WIDGET.u|pon erro|
|00002f50| 72 2e 0a 0a 2e 53 48 0a | 53 63 72 65 65 6e 20 52 |r....SH.|Screen R|
|00002f60| 65 66 72 65 73 68 0a 2e | 4c 50 0a 54 68 65 20 6c |efresh..|LP.The l|
|00002f70| 69 62 72 61 72 79 20 73 | 75 70 70 6f 72 74 73 20 |ibrary s|upports |
|00002f80| 61 20 73 74 61 6e 64 61 | 72 64 20 73 63 72 65 65 |a standa|rd scree|
|00002f90| 6e 20 72 65 66 72 65 73 | 68 20 69 6e 76 6f 6b 65 |n refres|h invoke|
|00002fa0| 64 20 62 79 20 5e 4c 2e | 0a 2e 4b 45 0a 2e 62 70 |d by ^L.|..KE..bp|
|00002fb0| 0a 2e 4b 53 0a 2e 53 48 | 0a 20 20 20 20 20 20 20 |..KS..SH|. |
|00002fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002fe0| 20 20 20 20 20 20 20 55 | 53 41 47 45 0a 2e 53 48 | U|SAGE..SH|
|00002ff0| 0a 47 65 74 74 69 6e 67 | 20 53 74 61 72 74 65 64 |.Getting| Started|
|00003000| 0a 2e 4c 50 0a 54 68 65 | 20 66 69 72 73 74 20 74 |..LP.The| first t|
|00003010| 68 69 6e 67 20 74 6f 20 | 64 6f 20 77 68 65 6e 20 |hing to |do when |
|00003020| 75 73 69 6e 67 20 74 68 | 65 20 6c 69 62 72 61 72 |using th|e librar|
|00003030| 79 20 69 73 20 73 65 74 | 20 75 70 20 74 68 65 20 |y is set| up the |
|00003040| 77 69 6e 64 6f 77 69 6e | 67 20 73 79 73 74 65 6d |windowin|g system|
|00003050| 20 62 79 20 63 61 6c 6c | 69 6e 67 20 0a 2e 4c 50 | by call|ing ..LP|
|00003060| 0a 2e 69 6e 20 30 2e 35 | 69 0a 69 6e 69 74 69 61 |..in 0.5|i.initia|
|00003070| 6c 69 73 65 77 69 64 67 | 65 74 73 28 29 0a 2e 69 |lisewidg|ets()..i|
|00003080| 6e 20 30 0a 0a 2e 53 48 | 0a 43 72 65 61 74 69 6e |n 0...SH|.Creatin|
|00003090| 67 20 57 69 64 67 65 74 | 73 0a 2e 4c 50 0a 2e 62 |g Widget|s..LP..b|
|000030a0| 72 0a 0a 2e 69 6e 20 30 | 2e 35 69 0a 57 49 44 47 |r...in 0|.5i.WIDG|
|000030b0| 45 54 20 6d 6b 63 6d 64 | 77 69 64 67 65 74 20 28 |ET mkcmd|widget (|
|000030c0| 6d 65 73 73 61 67 65 2c | 20 63 68 2c 20 66 75 6e |message,| ch, fun|
|000030d0| 63 74 69 6f 6e 2c 20 72 | 6f 77 29 0a 2e 62 72 20 |ction, r|ow)..br |
|000030e0| 0a 63 68 61 72 20 6d 65 | 73 73 61 67 65 5b 5d 3b |.char me|ssage[];|
|000030f0| 0a 2e 62 72 20 0a 63 68 | 61 72 20 63 68 3b 0a 2e |..br .ch|ar ch;..|
|00003100| 62 72 20 0a 69 6e 74 20 | 0a 28 2a 66 75 6e 63 29 |br .int |.(*func)|
|00003110| 28 29 3b 0a 2e 62 72 20 | 0a 69 6e 74 20 6c 69 6e |();..br |.int lin|
|00003120| 65 3b 0a 2e 69 6e 20 30 | 0a 2e 4c 50 0a 43 72 65 |e;..in 0|..LP.Cre|
|00003130| 61 74 65 73 20 61 20 6e | 65 77 20 63 6f 6d 6d 61 |ates a n|ew comma|
|00003140| 6e 64 20 77 69 64 67 65 | 74 2e 20 6d 65 73 73 61 |nd widge|t. messa|
|00003150| 67 65 20 68 6f 6c 64 73 | 20 74 68 65 20 6d 65 73 |ge holds| the mes|
|00003160| 73 61 67 65 20 74 6f 20 | 62 65 20 64 69 73 70 6c |sage to |be displ|
|00003170| 61 79 65 64 20 69 6e 20 | 74 68 65 20 63 6f 6d 6d |ayed in |the comm|
|00003180| 61 6e 64 20 77 69 64 67 | 65 74 2e 20 63 68 20 69 |and widg|et. ch i|
|00003190| 73 20 74 68 65 20 61 63 | 74 69 76 61 74 69 6f 6e |s the ac|tivation|
|000031a0| 20 63 68 61 72 61 63 74 | 65 72 20 6f 6e 20 77 68 | charact|er on wh|
|000031b0| 69 63 68 20 66 75 6e 63 | 74 69 6f 6e 20 69 73 20 |ich func|tion is |
|000031c0| 65 78 65 63 75 74 65 64 | 2e 20 72 6f 77 20 73 70 |executed|. row sp|
|000031d0| 65 63 69 66 69 65 73 20 | 77 68 65 72 65 20 74 6f |ecifies |where to|
|000031e0| 20 70 6c 61 63 65 20 74 | 68 65 20 77 69 64 67 65 | place t|he widge|
|000031f0| 74 20 28 61 73 20 64 65 | 73 63 72 69 62 65 64 20 |t (as de|scribed |
|00003200| 61 62 6f 76 65 29 2e 20 | 54 68 65 20 72 65 74 75 |above). |The retu|
|00003210| 72 6e 65 64 20 76 61 6c | 75 65 20 69 73 20 74 68 |rned val|ue is th|
|00003220| 65 20 77 69 64 67 65 74 | 20 69 64 65 6e 74 69 66 |e widget| identif|
|00003230| 69 65 72 20 66 6f 72 20 | 6c 61 74 65 72 20 75 73 |ier for |later us|
|00003240| 65 2e 0a 0a 2e 4c 50 0a | 2e 69 6e 20 30 2e 35 69 |e....LP.|.in 0.5i|
|00003250| 0a 57 49 44 47 45 54 20 | 6d 6b 6c 62 6c 77 69 64 |.WIDGET |mklblwid|
|00003260| 67 65 74 20 28 6d 65 73 | 73 61 67 65 2c 20 70 6f |get (mes|sage, po|
|00003270| 73 69 74 69 6f 6e 2c 20 | 73 70 61 63 65 2c 20 72 |sition, |space, r|
|00003280| 6f 77 29 0a 2e 62 72 0a | 63 68 61 72 20 6d 65 73 |ow)..br.|char mes|
|00003290| 73 61 67 65 5b 5d 3b 0a | 2e 62 72 0a 69 6e 74 20 |sage[];.|.br.int |
|000032a0| 20 70 6f 73 69 74 69 6f | 6e 2c 20 73 70 61 63 65 | positio|n, space|
|000032b0| 2c 20 72 6f 77 3b 0a 2e | 69 6e 20 30 0a 2e 4c 50 |, row;..|in 0..LP|
|000032c0| 0a 43 72 65 61 74 65 73 | 20 61 20 6e 65 77 20 6c |.Creates| a new l|
|000032d0| 61 62 65 6c 20 77 69 64 | 67 65 74 2e 20 4d 65 73 |abel wid|get. Mes|
|000032e0| 73 61 67 65 20 68 6f 6c | 64 73 20 74 68 65 20 63 |sage hol|ds the c|
|000032f0| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 68 65 20 6c |ontents |of the l|
|00003300| 61 62 65 6c 2c 20 70 6f | 73 69 74 69 6f 6e 20 73 |abel, po|sition s|
|00003310| 70 65 63 69 66 69 65 73 | 20 68 6f 77 20 74 68 65 |pecifies| how the|
|00003320| 20 6d 65 73 73 61 67 65 | 20 69 73 20 74 6f 20 61 | message| is to a|
|00003330| 70 70 65 61 72 2e 20 55 | 73 69 6e 67 20 74 68 65 |ppear. U|sing the|
|00003340| 20 63 6f 6e 73 74 61 6e | 74 73 20 43 45 4e 54 52 | constan|ts CENTR|
|00003350| 45 2c 20 4c 45 46 54 4a | 55 53 54 2c 20 52 49 47 |E, LEFTJ|UST, RIG|
|00003360| 48 54 4a 55 53 54 2c 20 | 4e 4f 48 49 47 48 2c 20 |HTJUST, |NOHIGH, |
|00003370| 70 61 73 73 20 61 20 63 | 6f 6d 62 69 6e 61 74 69 |pass a c|ombinati|
|00003380| 6f 6e 20 74 6f 20 70 6f | 73 69 74 69 6f 6e 20 65 |on to po|sition e|
|00003390| 2e 67 20 43 45 4e 54 52 | 45 20 6f 72 20 4c 45 46 |.g CENTR|E or LEF|
|000033a0| 54 4a 55 53 54 7c 4e 4f | 48 49 47 48 20 65 74 63 |TJUST|NO|HIGH etc|
|000033b0| 2e 73 70 61 63 65 20 69 | 6e 64 69 63 61 74 65 73 |.space i|ndicates|
|000033c0| 20 68 6f 77 20 6c 61 72 | 67 65 20 74 68 65 20 6c | how lar|ge the l|
|000033d0| 61 62 65 6c 20 77 69 64 | 67 65 74 20 69 73 20 74 |abel wid|get is t|
|000033e0| 6f 20 62 65 2e 20 41 20 | 70 6f 73 69 74 69 76 65 |o be. A |positive|
|000033f0| 20 76 61 6c 75 65 20 69 | 73 20 74 68 65 20 61 62 | value i|s the ab|
|00003400| 73 6f 6c 75 74 65 20 6c | 65 6e 67 74 68 20 6f 66 |solute l|ength of|
|00003410| 20 74 68 65 20 77 69 64 | 67 65 74 2c 20 77 68 65 | the wid|get, whe|
|00003420| 72 65 61 73 20 76 61 6c | 75 65 20 3c 3d 20 30 20 |reas val|ue <= 0 |
|00003430| 73 70 65 63 69 66 69 65 | 73 20 68 6f 77 20 66 61 |specifie|s how fa|
|00003440| 72 20 74 68 65 20 77 69 | 64 67 65 74 20 69 73 20 |r the wi|dget is |
|00003450| 74 6f 20 62 65 20 66 72 | 6f 6d 20 74 68 65 20 72 |to be fr|om the r|
|00003460| 69 67 68 74 68 61 6e 64 | 20 65 64 67 65 20 6f 66 |ighthand| edge of|
|00003470| 20 74 68 65 20 73 63 72 | 65 65 6e 2e 20 72 6f 77 | the scr|een. row|
|00003480| 20 73 70 65 63 69 66 69 | 65 73 20 77 68 65 72 65 | specifi|es where|
|00003490| 20 74 6f 20 70 6c 61 63 | 65 20 74 68 65 20 77 69 | to plac|e the wi|
|000034a0| 64 67 65 74 20 28 61 73 | 20 64 65 73 63 72 69 62 |dget (as| describ|
|000034b0| 65 64 20 61 62 6f 76 65 | 29 2e 20 54 68 65 20 72 |ed above|). The r|
|000034c0| 0a 0a 0a 0a 0a 0a 65 74 | 75 72 6e 65 64 20 76 61 |......et|urned va|
|000034d0| 6c 75 65 20 69 73 20 74 | 68 65 20 77 69 64 67 65 |lue is t|he widge|
|000034e0| 74 20 69 64 65 6e 74 69 | 66 69 65 72 20 66 6f 72 |t identi|fier for|
|000034f0| 20 6c 61 74 65 72 20 75 | 73 65 2e 0a 0a 2e 4c 50 | later u|se....LP|
|00003500| 0a 2e 69 6e 20 30 2e 35 | 69 0a 57 49 44 47 45 54 |..in 0.5|i.WIDGET|
|00003510| 20 6d 6b 74 67 6c 77 69 | 64 67 65 74 20 28 6d 65 | mktglwi|dget (me|
|00003520| 73 73 61 67 65 2c 20 6e | 75 6d 62 65 72 2c 20 74 |ssage, n|umber, t|
|00003530| 67 6c 2c 20 74 67 6c 63 | 68 2c 20 72 6f 77 29 0a |gl, tglc|h, row).|
|00003540| 2e 62 72 0a 63 68 61 72 | 20 6d 65 73 73 61 67 65 |.br.char| message|
|00003550| 5b 5d 3b 0a 2e 62 72 0a | 69 6e 74 20 20 6e 75 6d |[];..br.|int num|
|00003560| 62 65 72 3b 0a 2e 62 72 | 0a 63 68 61 72 20 74 67 |ber;..br|.char tg|
|00003570| 6c 5b 31 30 5d 5b 32 30 | 5d 3b 0a 2e 62 72 0a 63 |l[10][20|];..br.c|
|00003580| 68 61 72 20 74 67 6c 63 | 68 3b 0a 2e 62 72 0a 69 |har tglc|h;..br.i|
|00003590| 6e 74 20 20 72 6f 77 3b | 0a 2e 69 6e 20 30 0a 2e |nt row;|..in 0..|
|000035a0| 4c 50 0a 43 72 65 61 74 | 65 73 20 61 20 6e 65 77 |LP.Creat|es a new|
|000035b0| 20 74 6f 67 67 6c 65 20 | 77 69 64 67 65 74 2e 20 | toggle |widget. |
|000035c0| 6d 65 73 73 61 67 65 20 | 63 6f 6e 74 61 69 6e 73 |message |contains|
|000035d0| 20 61 20 6c 61 62 65 6c | 20 66 6f 72 20 74 68 65 | a label| for the|
|000035e0| 20 77 69 64 67 65 74 2c | 20 61 6e 64 20 6e 75 6d | widget,| and num|
|000035f0| 62 65 72 20 68 6f 6c 64 | 73 20 74 68 65 20 6e 75 |ber hold|s the nu|
|00003600| 6d 62 65 72 20 6f 66 20 | 74 6f 67 67 6c 65 20 76 |mber of |toggle v|
|00003610| 61 6c 75 65 73 2e 20 74 | 67 6c 20 69 73 20 75 73 |alues. t|gl is us|
|00003620| 65 64 20 66 6f 72 20 68 | 6f 6c 64 69 6e 67 20 61 |ed for h|olding a|
|00003630| 63 74 75 61 6c 20 74 6f | 67 67 6c 65 20 76 61 6c |ctual to|ggle val|
|00003640| 75 65 73 20 77 68 69 63 | 68 20 61 72 65 20 74 6f |ues whic|h are to|
|00003650| 67 67 6c 65 64 20 62 65 | 74 77 65 65 6e 20 75 73 |ggled be|tween us|
|00003660| 69 6e 67 20 74 68 65 20 | 61 63 74 69 76 61 74 69 |ing the |activati|
|00003670| 6f 6e 20 63 68 61 72 61 | 63 74 65 72 20 74 67 6c |on chara|cter tgl|
|00003680| 63 68 2e 20 41 74 20 70 | 72 65 73 65 6e 74 20 74 |ch. At p|resent t|
|00003690| 68 65 72 65 20 69 73 20 | 61 20 6c 69 6d 69 74 20 |here is |a limit |
|000036a0| 6f 66 20 31 30 20 74 6f | 67 67 6c 65 20 76 61 6c |of 10 to|ggle val|
|000036b0| 75 65 73 2c 20 65 61 63 | 68 20 62 65 69 6e 67 20 |ues, eac|h being |
|000036c0| 61 20 6d 61 78 69 6d 75 | 6d 20 6c 65 6e 67 74 68 |a maximu|m length|
|000036d0| 20 6f 66 20 32 30 20 63 | 68 61 72 61 63 74 65 72 | of 20 c|haracter|
|000036e0| 73 2e 20 72 6f 77 20 73 | 70 65 63 69 66 69 65 73 |s. row s|pecifies|
|000036f0| 20 77 68 65 72 65 20 74 | 6f 20 70 6c 61 63 65 20 | where t|o place |
|00003700| 74 68 65 20 77 69 64 67 | 65 74 20 28 61 73 20 64 |the widg|et (as d|
|00003710| 65 73 63 72 69 62 65 64 | 20 61 62 6f 76 65 29 2e |escribed| above).|
|00003720| 20 54 68 65 20 72 65 74 | 75 72 6e 65 64 20 76 61 | The ret|urned va|
|00003730| 6c 75 65 20 69 73 20 74 | 68 65 20 77 69 64 67 65 |lue is t|he widge|
|00003740| 74 20 69 64 65 6e 74 69 | 66 69 65 72 20 66 6f 72 |t identi|fier for|
|00003750| 20 6c 61 74 65 72 20 75 | 73 65 2e 0a 2e 4c 50 0a | later u|se...LP.|
|00003760| 2e 4b 45 0a 2e 62 70 0a | 2e 4b 53 0a 2e 69 6e 20 |.KE..bp.|.KS..in |
|00003770| 30 2e 35 69 0a 57 49 44 | 47 45 54 20 6d 6b 69 6e |0.5i.WID|GET mkin|
|00003780| 70 77 69 64 67 65 74 20 | 28 6d 65 73 73 61 67 65 |pwidget |(message|
|00003790| 2c 20 63 68 61 72 61 63 | 74 65 72 2c 20 69 6e 70 |, charac|ter, inp|
|000037a0| 75 74 2c 20 6c 65 6e 67 | 74 68 73 74 72 2c 20 6c |ut, leng|thstr, l|
|000037b0| 65 6e 67 74 68 77 69 64 | 2c 20 72 6f 77 2c 20 65 |engthwid|, row, e|
|000037c0| 78 65 63 29 0a 2e 62 72 | 0a 63 68 61 72 20 6d 65 |xec)..br|.char me|
|000037d0| 73 73 61 67 65 5b 5d 2c | 20 63 68 61 72 61 63 74 |ssage[],| charact|
|000037e0| 65 72 2c 20 69 6e 70 75 | 74 5b 5d 3b 0a 2e 62 72 |er, inpu|t[];..br|
|000037f0| 0a 69 6e 74 20 20 6c 65 | 6e 67 74 68 73 74 72 2c |.int le|ngthstr,|
|00003800| 20 6c 65 6e 67 74 68 77 | 69 64 2c 20 72 6f 77 2c | lengthw|id, row,|
|00003810| 20 65 78 65 63 3b 20 0a | 2e 69 6e 20 30 0a 2e 4c | exec; .|.in 0..L|
|00003820| 50 0a 43 72 65 61 74 65 | 73 20 61 20 6e 65 77 20 |P.Create|s a new |
|00003830| 69 6e 70 75 74 20 77 69 | 64 67 65 74 2e 20 6d 65 |input wi|dget. me|
|00003840| 73 73 61 67 65 20 63 6f | 6e 74 61 69 6e 73 20 74 |ssage co|ntains t|
|00003850| 68 65 20 6c 61 62 65 6c | 20 66 6f 72 20 74 68 65 |he label| for the|
|00003860| 20 77 69 64 67 65 74 2c | 20 61 6e 64 20 63 68 61 | widget,| and cha|
|00003870| 72 61 63 74 65 72 20 69 | 73 20 74 68 65 20 61 63 |racter i|s the ac|
|00003880| 74 69 76 61 74 69 6f 6e | 20 63 68 61 72 61 63 74 |tivation| charact|
|00003890| 65 72 20 66 6f 72 20 74 | 68 65 20 77 69 64 67 65 |er for t|he widge|
|000038a0| 74 2e 20 69 6e 70 75 74 | 20 69 73 20 74 68 65 20 |t. input| is the |
|000038b0| 76 61 72 69 61 62 6c 65 | 20 69 6e 20 77 68 69 63 |variable| in whic|
|000038c0| 68 20 74 68 65 20 75 73 | 65 72 20 77 69 73 68 65 |h the us|er wishe|
|000038d0| 73 20 74 68 65 20 64 61 | 74 61 20 6f 62 74 61 69 |s the da|ta obtai|
|000038e0| 6e 65 64 20 66 72 6f 6d | 20 74 68 65 20 69 6e 70 |ned from| the inp|
|000038f0| 75 74 20 77 69 64 67 65 | 74 20 74 6f 20 62 65 20 |ut widge|t to be |
|00003900| 70 6c 61 63 65 64 2c 20 | 6c 65 6e 67 74 68 73 74 |placed, |lengthst|
|00003910| 72 20 69 73 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |r is the| length |
|00003920| 6f 66 20 69 6e 70 75 74 | 2e 20 6c 65 6e 67 74 68 |of input|. length|
|00003930| 77 69 64 20 73 70 65 63 | 69 66 69 65 73 20 68 6f |wid spec|ifies ho|
|00003940| 77 20 62 69 67 20 74 6f | 20 6d 61 6b 65 20 74 68 |w big to| make th|
|00003950| 65 20 77 69 64 67 65 74 | 2e 20 41 20 70 6f 73 69 |e widget|. A posi|
|00003960| 74 69 76 65 20 76 61 6c | 75 65 20 69 6e 64 69 63 |tive val|ue indic|
|00003970| 61 74 65 73 20 74 68 65 | 20 61 62 73 6f 6c 75 74 |ates the| absolut|
|00003980| 65 20 6c 65 6e 67 74 68 | 20 6f 66 20 74 68 65 20 |e length| of the |
|00003990| 77 69 64 67 65 74 2c 20 | 77 68 65 72 65 20 61 73 |widget, |where as|
|000039a0| 20 61 20 76 61 6c 75 65 | 20 3c 3d 20 30 20 69 6e | a value| <= 0 in|
|000039b0| 64 69 63 61 74 65 73 20 | 68 6f 77 20 66 61 72 20 |dicates |how far |
|000039c0| 66 72 6f 6d 20 74 68 65 | 20 72 69 67 68 74 68 61 |from the| rightha|
|000039d0| 6e 64 20 65 64 67 65 20 | 74 68 65 20 77 69 64 67 |nd edge |the widg|
|000039e0| 65 74 20 69 73 20 74 6f | 20 62 65 2e 20 65 78 65 |et is to| be. exe|
|000039f0| 63 20 69 73 20 75 73 65 | 64 20 74 6f 20 69 6e 64 |c is use|d to ind|
|00003a00| 69 63 61 74 65 20 77 68 | 65 74 68 65 72 20 74 68 |icate wh|ether th|
|00003a10| 65 20 77 69 64 67 65 74 | 20 73 68 6f 75 6c 64 20 |e widget| should |
|00003a20| 62 0a 0a 0a 0a 0a 0a 65 | 20 61 63 74 69 76 61 74 |b......e| activat|
|00003a30| 65 64 20 6f 6e 20 63 72 | 65 61 74 69 6f 6e 20 62 |ed on cr|eation b|
|00003a40| 79 20 28 70 61 73 73 69 | 6e 67 20 45 58 45 43 29 |y (passi|ng EXEC)|
|00003a50| 2c 20 6f 72 20 73 68 6f | 75 6c 64 20 72 65 6d 61 |, or sho|uld rema|
|00003a60| 69 6e 20 64 6f 72 6d 61 | 6e 74 20 75 6e 74 69 6c |in dorma|nt until|
|00003a70| 20 74 68 65 20 61 63 74 | 69 76 61 74 69 6f 6e 20 | the act|ivation |
|00003a80| 63 68 61 72 61 63 74 65 | 72 20 69 73 20 75 73 65 |characte|r is use|
|00003a90| 64 20 28 70 61 73 73 69 | 6e 67 20 4e 4f 45 58 45 |d (passi|ng NOEXE|
|00003aa0| 43 29 2e 20 28 6e 2e 62 | 20 77 68 65 6e 20 70 61 |C). (n.b| when pa|
|00003ab0| 73 73 69 6e 67 20 45 58 | 45 43 20 61 6e 20 61 63 |ssing EX|EC an ac|
|00003ac0| 74 69 76 61 74 69 6f 6e | 20 63 68 61 72 61 63 74 |tivation| charact|
|00003ad0| 65 72 20 69 73 20 6e 6f | 74 20 6e 65 65 64 65 64 |er is no|t needed|
|00003ae0| 20 74 68 65 72 65 66 6f | 72 65 20 6f 6e 65 20 63 | therefo|re one c|
|00003af0| 6f 75 6c 64 20 70 61 73 | 73 20 4e 55 4c 4c 20 66 |ould pas|s NULL f|
|00003b00| 6f 72 20 63 68 61 72 61 | 63 74 65 72 2e 29 0a 0a |or chara|cter.)..|
|00003b10| 2e 53 48 0a 54 65 78 74 | 20 57 69 6e 64 6f 77 20 |.SH.Text| Window |
|00003b20| 4d 61 6e 61 67 65 6d 65 | 6e 74 0a 2e 4c 50 0a 2e |Manageme|nt..LP..|
|00003b30| 62 72 0a 0a 2e 69 6e 20 | 30 2e 35 69 0a 69 6e 74 |br...in |0.5i.int|
|00003b40| 20 6f 70 65 6e 74 65 78 | 74 77 69 6e 64 6f 77 20 | opentex|twindow |
|00003b50| 28 70 6f 73 69 74 69 6f | 6e 2c 20 62 6f 72 64 65 |(positio|n, borde|
|00003b60| 72 29 0a 2e 62 72 0a 69 | 6e 74 20 70 6f 73 69 74 |r)..br.i|nt posit|
|00003b70| 69 6f 6e 2c 20 62 6f 72 | 64 65 72 3b 0a 2e 69 6e |ion, bor|der;..in|
|00003b80| 20 30 0a 2e 4c 50 0a 4f | 70 65 6e 73 20 61 6e 64 | 0..LP.O|pens and|
|00003b90| 20 64 69 73 70 6c 61 79 | 73 20 74 68 65 20 74 65 | display|s the te|
|00003ba0| 78 74 20 77 69 6e 64 6f | 77 2e 20 70 6f 73 69 74 |xt windo|w. posit|
|00003bb0| 69 6f 6e 20 73 70 65 63 | 69 66 69 65 73 20 77 68 |ion spec|ifies wh|
|00003bc0| 65 72 65 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 |ere the |window i|
|00003bd0| 73 20 74 6f 20 67 6f 2e | 20 69 2e 65 20 70 6f 73 |s to go.| i.e pos|
|00003be0| 69 74 69 6f 6e 20 3d 20 | 30 20 77 69 6c 6c 20 70 |ition = |0 will p|
|00003bf0| 6c 61 63 65 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |lace the| window |
|00003c00| 69 6d 6d 65 64 69 61 74 | 65 6c 79 20 62 65 6c 6f |immediat|ely belo|
|00003c10| 77 20 74 68 65 20 6c 6f | 77 65 73 74 20 77 69 64 |w the lo|west wid|
|00003c20| 67 65 74 2c 20 70 6f 73 | 69 74 69 6f 6e 20 3d 20 |get, pos|ition = |
|00003c30| 31 20 77 69 6c 6c 20 61 | 6c 6c 6f 77 20 72 6f 6f |1 will a|llow roo|
|00003c40| 6d 20 66 6f 72 20 31 20 | 6d 6f 72 65 20 72 6f 77 |m for 1 |more row|
|00003c50| 20 6f 66 20 77 69 64 67 | 65 74 73 20 62 65 6c 6f | of widg|ets belo|
|00003c60| 77 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6c 6f |w the cu|rrent lo|
|00003c70| 77 65 73 74 20 62 65 66 | 6f 72 65 20 70 6c 61 63 |west bef|ore plac|
|00003c80| 69 6e 67 20 74 68 65 20 | 77 69 6e 64 6f 77 20 65 |ing the |window e|
|00003c90| 74 63 2e 20 62 6f 72 64 | 65 72 20 69 73 20 75 73 |tc. bord|er is us|
|00003ca0| 65 64 20 74 6f 20 69 6e | 64 69 63 61 74 65 20 77 |ed to in|dicate w|
|00003cb0| 68 65 74 68 65 72 20 74 | 68 65 20 77 69 6e 64 6f |hether t|he windo|
|00003cc0| 77 20 73 68 6f 75 6c 64 | 20 62 65 20 62 6f 72 64 |w should| be bord|
|00003cd0| 65 72 65 64 2e 20 69 2e | 65 20 75 73 69 6e 67 20 |ered. i.|e using |
|00003ce0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 56 |the para|meters V|
|00003cf0| 45 52 54 49 43 41 4c 20 | 26 20 48 4f 52 49 5a 4f |ERTICAL |& HORIZO|
|00003d00| 4e 54 41 4c 2c 20 6f 6e | 65 20 63 61 6e 20 73 70 |NTAL, on|e can sp|
|00003d10| 65 63 69 66 79 20 77 68 | 65 74 68 65 72 20 74 68 |ecify wh|ether th|
|00003d20| 65 20 77 69 6e 64 6f 77 | 20 73 68 6f 75 6c 64 20 |e window| should |
|00003d30| 62 65 20 62 6f 72 64 65 | 72 65 64 20 76 65 72 74 |be borde|red vert|
|00003d40| 69 63 61 6c 6c 79 20 28 | 70 61 73 73 69 6e 67 20 |ically (|passing |
|00003d50| 56 45 52 54 49 43 41 4c | 29 2c 20 68 6f 72 69 7a |VERTICAL|), horiz|
|00003d60| 6f 6e 74 61 6c 6c 79 20 | 28 70 61 73 73 69 6e 67 |ontally |(passing|
|00003d70| 20 48 4f 52 49 5a 4f 4e | 54 41 4c 29 2c 20 62 6f | HORIZON|TAL), bo|
|00003d80| 74 68 20 28 70 61 0a 0a | 0a 0a 0a 0a 73 73 69 6e |th (pa..|....ssin|
|00003d90| 67 20 56 45 52 54 49 43 | 41 4c 7c 48 4f 52 49 5a |g VERTIC|AL|HORIZ|
|00003da0| 4f 4e 54 41 4c 29 2c 20 | 6f 72 20 6e 65 69 74 68 |ONTAL), |or neith|
|00003db0| 65 72 20 28 70 61 73 73 | 69 6e 67 20 30 29 2e 20 |er (pass|ing 0). |
|00003dc0| 54 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 72 65 74 |The func|tion ret|
|00003dd0| 75 72 6e 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |urns the| number |
|00003de0| 6f 66 20 6c 69 6e 65 73 | 20 77 69 74 68 69 6e 20 |of lines| within |
|00003df0| 74 68 65 20 77 69 6e 64 | 6f 77 2e 0a 0a 2e 69 6e |the wind|ow....in|
|00003e00| 20 30 2e 35 69 0a 72 65 | 70 6f 72 74 20 28 6d 65 | 0.5i.re|port (me|
|00003e10| 73 73 61 67 65 29 0a 2e | 62 72 0a 63 68 61 72 20 |ssage)..|br.char |
|00003e20| 2a 6d 65 73 73 61 67 65 | 3b 0a 2e 69 6e 20 30 0a |*message|;..in 0.|
|00003e30| 2e 4c 50 0a 44 69 73 70 | 6c 61 79 73 20 74 68 65 |.LP.Disp|lays the|
|00003e40| 20 67 69 76 65 6e 20 6d | 65 73 73 61 67 65 20 69 | given m|essage i|
|00003e50| 6e 20 74 68 65 20 74 65 | 78 74 20 77 69 6e 64 6f |n the te|xt windo|
|00003e60| 77 2e 20 53 63 72 6f 6c | 6c 69 6e 67 20 69 73 20 |w. Scrol|ling is |
|00003e70| 64 6f 6e 65 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |done aut|omatical|
|00003e80| 6c 79 20 77 68 65 6e 20 | 74 68 65 20 62 6f 74 74 |ly when |the bott|
|00003e90| 6f 6d 20 6f 66 20 74 68 | 65 20 77 69 6e 64 6f 77 |om of th|e window|
|00003ea0| 20 69 73 20 72 65 61 63 | 68 65 64 20 61 6e 64 20 | is reac|hed and |
|00003eb0| 69 73 20 74 68 65 72 65 | 66 6f 72 65 20 6f 66 20 |is there|fore of |
|00003ec0| 6e 6f 20 63 6f 6e 63 65 | 72 6e 20 66 6f 72 20 74 |no conce|rn for t|
|00003ed0| 68 65 20 75 73 65 72 2e | 0a 0a 2e 69 6e 20 30 2e |he user.|...in 0.|
|00003ee0| 35 69 0a 63 6c 65 61 72 | 74 65 78 74 77 69 6e 64 |5i.clear|textwind|
|00003ef0| 6f 77 20 28 29 0a 2e 69 | 6e 20 30 0a 2e 4c 50 0a |ow ()..i|n 0..LP.|
|00003f00| 43 6c 65 61 72 73 20 74 | 68 65 20 74 65 78 74 20 |Clears t|he text |
|00003f10| 77 69 6e 64 6f 77 20 61 | 6e 64 20 72 65 74 75 72 |window a|nd retur|
|00003f20| 6e 73 20 69 74 73 20 63 | 75 72 73 6f 72 20 74 6f |ns its c|ursor to|
|00003f30| 20 74 68 65 20 74 6f 70 | 20 6c 65 66 74 68 61 6e | the top| lefthan|
|00003f40| 64 20 63 6f 72 6e 65 72 | 2e 20 0a 0a 2e 69 6e 20 |d corner|. ...in |
|00003f50| 30 2e 35 69 0a 6b 69 6c | 6c 74 65 78 74 77 69 6e |0.5i.kil|ltextwin|
|00003f60| 64 6f 77 20 28 29 0a 2e | 69 6e 20 30 0a 2e 4c 50 |dow ()..|in 0..LP|
|00003f70| 0a 44 65 73 74 72 6f 79 | 73 20 74 68 65 20 74 65 |.Destroy|s the te|
|00003f80| 78 74 20 77 69 6e 64 6f | 77 2e 20 54 68 65 20 74 |xt windo|w. The t|
|00003f90| 65 78 74 20 77 69 6e 64 | 6f 77 20 63 61 6e 20 62 |ext wind|ow can b|
|00003fa0| 65 20 72 65 64 65 66 69 | 6e 65 64 20 61 74 20 61 |e redefi|ned at a|
|00003fb0| 20 6c 61 74 65 72 20 64 | 61 74 65 2e 0a 0a 2e 53 | later d|ate....S|
|00003fc0| 48 0a 4b 69 6c 6c 69 6e | 67 20 57 69 64 67 65 74 |H.Killin|g Widget|
|00003fd0| 73 0a 0a 2e 4c 50 0a 2e | 62 72 0a 2e 69 6e 20 30 |s...LP..|br..in 0|
|00003fe0| 2e 35 69 0a 69 6e 74 20 | 6b 69 6c 6c 77 69 64 67 |.5i.int |killwidg|
|00003ff0| 65 74 20 28 70 74 72 29 | 0a 2e 62 72 0a 57 49 44 |et (ptr)|..br.WID|
|00004000| 47 45 54 20 70 74 72 3b | 0a 2e 69 6e 20 30 0a 2e |GET ptr;|..in 0..|
|00004010| 4c 50 0a 4b 69 6c 6c 73 | 20 74 68 65 20 67 69 76 |LP.Kills| the giv|
|00004020| 65 6e 20 77 69 64 67 65 | 74 2e 20 74 68 65 20 66 |en widge|t. the f|
|00004030| 75 6e 63 74 69 6f 6e 20 | 72 65 74 75 72 6e 73 20 |unction |returns |
|00004040| 54 52 55 45 20 69 66 20 | 73 75 63 63 65 73 73 66 |TRUE if |successf|
|00004050| 75 6c 6c 20 6f 72 20 46 | 41 4c 53 45 20 69 66 20 |ull or F|ALSE if |
|00004060| 74 68 65 20 77 69 64 67 | 65 74 20 64 6f 65 73 6e |the widg|et doesn|
|00004070| 27 74 20 65 78 69 73 74 | 2e 0a 2e 4b 45 0a 2e 62 |'t exist|...KE..b|
|00004080| 70 0a 2e 4b 53 0a 2e 53 | 48 0a 49 6e 74 65 72 61 |p..KS..S|H.Intera|
|00004090| 63 74 69 6f 6e 0a 0a 2e | 4c 50 0a 2e 62 72 0a 2e |ction...|LP..br..|
|000040a0| 69 6e 20 30 2e 35 69 0a | 57 49 44 47 45 54 20 77 |in 0.5i.|WIDGET w|
|000040b0| 69 64 67 65 74 69 6e 70 | 75 74 20 28 29 0a 2e 69 |idgetinp|ut ()..i|
|000040c0| 6e 20 30 0a 2e 4c 50 0a | 57 61 69 74 20 66 6f 72 |n 0..LP.|Wait for|
|000040d0| 20 69 6e 70 75 74 20 66 | 72 6f 6d 20 77 69 64 67 | input f|rom widg|
|000040e0| 65 74 73 2e 20 50 72 6f | 67 72 61 6d 20 63 6f 6e |ets. Pro|gram con|
|000040f0| 74 72 6f 6c 20 69 73 20 | 70 61 73 73 65 64 20 62 |trol is |passed b|
|00004100| 61 63 6b 20 77 68 65 6e | 20 3a 2d 0a 2e 62 72 0a |ack when| :-..br.|
|00004110| 61 29 20 41 20 43 6f 6d | 6d 61 6e 64 20 77 69 64 |a) A Com|mand wid|
|00004120| 67 65 74 20 69 73 20 61 | 63 74 69 76 61 74 65 64 |get is a|ctivated|
|00004130| 20 61 6e 64 20 63 6f 6e | 74 72 6f 6c 20 69 73 20 | and con|trol is |
|00004140| 70 61 73 73 65 64 20 74 | 6f 20 69 74 73 20 61 73 |passed t|o its as|
|00004150| 73 6f 63 69 61 74 65 64 | 20 66 75 6e 63 74 69 6f |sociated| functio|
|00004160| 6e 2e 0a 2e 62 72 0a 62 | 29 20 41 6e 20 69 6e 70 |n...br.b|) An inp|
|00004170| 75 74 20 77 69 64 67 65 | 74 20 69 73 20 61 63 74 |ut widge|t is act|
|00004180| 69 76 61 74 65 64 20 61 | 6e 64 20 61 66 74 65 72 |ivated a|nd after|
|00004190| 20 73 75 62 73 65 71 75 | 65 6e 74 20 69 6e 70 75 | subsequ|ent inpu|
|000041a0| 74 2c 20 63 6f 6e 74 72 | 6f 6c 20 69 73 20 70 61 |t, contr|ol is pa|
|000041b0| 73 73 65 64 20 74 6f 20 | 74 68 65 20 63 61 6c 6c |ssed to |the call|
|000041c0| 69 6e 67 20 66 75 6e 63 | 74 69 6f 6e 20 77 69 74 |ing func|tion wit|
|000041d0| 68 20 74 68 65 20 77 69 | 64 67 65 74 20 70 6f 69 |h the wi|dget poi|
|000041e0| 6e 74 65 72 20 6f 66 20 | 74 68 65 20 61 63 74 69 |nter of |the acti|
|000041f0| 76 61 74 65 64 20 69 6e | 70 75 74 20 77 69 64 67 |vated in|put widg|
|00004200| 65 74 2e 0a 2e 62 72 0a | 41 63 74 69 76 61 74 69 |et...br.|Activati|
|00004210| 6e 67 20 61 20 74 6f 67 | 67 6c 65 20 77 69 64 67 |ng a tog|gle widg|
|00004220| 65 74 20 6a 75 73 74 20 | 74 6f 67 67 6c 65 73 20 |et just |toggles |
|00004230| 74 68 65 20 77 69 64 67 | 65 74 2c 20 63 6f 6e 74 |the widg|et, cont|
|00004240| 72 6f 6c 20 69 73 20 6f | 6e 6c 79 20 70 61 73 73 |rol is o|nly pass|
|00004250| 65 64 20 62 61 63 6b 20 | 75 70 6f 6e 20 6f 6e 65 |ed back |upon one|
|00004260| 20 6f 66 20 74 68 65 20 | 61 62 6f 76 65 20 63 6f | of the |above co|
|00004270| 6e 64 69 74 69 6f 6e 73 | 2e 0a 0a 2e 4c 50 0a 2e |nditions|....LP..|
|00004280| 62 72 0a 2e 69 6e 20 30 | 2e 35 69 0a 69 6e 74 20 |br..in 0|.5i.int |
|00004290| 74 73 74 74 67 6c 77 69 | 64 67 65 74 20 28 70 74 |tsttglwi|dget (pt|
|000042a0| 72 29 0a 2e 62 72 0a 57 | 49 44 47 45 54 20 70 74 |r)..br.W|IDGET pt|
|000042b0| 72 3b 0a 2e 69 6e 20 30 | 0a 2e 4c 50 0a 52 65 74 |r;..in 0|..LP.Ret|
|000042c0| 75 72 6e 73 20 74 68 65 | 20 69 6e 64 65 78 20 76 |urns the| index v|
|000042d0| 61 6c 75 65 20 6f 66 20 | 74 68 65 20 63 75 72 72 |alue of |the curr|
|000042e0| 65 6e 74 20 73 74 61 74 | 65 20 6f 66 20 74 68 65 |ent stat|e of the|
|000042f0| 20 67 69 76 65 6e 20 74 | 6f 67 67 6c 65 20 77 69 | given t|oggle wi|
|00004300| 64 67 65 74 20 28 30 20 | 3c 20 69 6e 64 65 78 20 |dget (0 |< index |
|00004310| 3c 20 6e 75 6d 62 65 72 | 20 74 6f 67 67 6c 65 20 |< number| toggle |
|00004320| 76 61 6c 75 65 73 20 2d | 20 31 29 2e 20 52 65 74 |values -| 1). Ret|
|00004330| 75 72 6e 73 20 46 41 4c | 53 45 20 69 66 20 74 68 |urns FAL|SE if th|
|00004340| 65 20 67 69 76 65 6e 20 | 77 69 64 67 65 74 20 64 |e given |widget d|
|00004350| 6f 65 73 20 6e 6f 74 20 | 65 78 69 73 74 2e 0a 0a |oes not |exist...|
|00004360| 2e 4c 50 0a 2e 62 72 0a | 2e 69 6e 20 30 2e 35 69 |.LP..br.|.in 0.5i|
|00004370| 0a 69 6e 74 20 61 63 74 | 69 76 61 74 65 20 28 70 |.int act|ivate (p|
|00004380| 74 72 29 0a 2e 62 72 0a | 57 49 44 47 45 54 20 70 |tr)..br.|WIDGET p|
|00004390| 74 72 3b 0a 2e 69 6e 20 | 30 0a 2e 4c 50 0a 52 65 |tr;..in |0..LP.Re|
|000043a0| 61 63 74 69 76 61 74 65 | 73 20 61 20 77 69 64 67 |activate|s a widg|
|000043b0| 65 74 20 77 68 69 63 68 | 20 77 61 73 20 70 72 65 |et which| was pre|
|000043c0| 76 69 6f 75 73 6c 79 20 | 64 65 61 63 74 69 76 61 |viously |deactiva|
|000043d0| 74 65 64 2e 20 52 65 74 | 75 72 6e 73 20 54 52 55 |ted. Ret|urns TRU|
|000043e0| 45 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 20 |E if suc|cessful |
|000043f0| 6f 74 68 65 72 77 69 73 | 65 20 46 41 4c 53 45 2e |otherwis|e FALSE.|
|00004400| 0a 0a 2e 4c 50 0a 2e 62 | 72 0a 2e 69 6e 20 30 2e |...LP..b|r..in 0.|
|00004410| 35 69 0a 69 6e 74 20 64 | 65 61 63 74 69 76 61 74 |5i.int d|eactivat|
|00004420| 65 20 28 70 74 72 2c 20 | 62 6c 61 6e 6b 29 0a 2e |e (ptr, |blank)..|
|00004430| 62 72 0a 57 49 44 47 45 | 54 20 70 74 72 3b 0a 2e |br.WIDGE|T ptr;..|
|00004440| 62 72 0a 69 6e 74 20 20 | 20 20 62 6c 61 6e 6b 3b |br.int | blank;|
|00004450| 0a 2e 69 6e 20 30 0a 2e | 4c 50 0a 44 65 61 63 74 |..in 0..|LP.Deact|
|00004460| 69 76 61 74 65 73 20 74 | 68 65 20 67 69 76 65 6e |ivates t|he given|
|00004470| 20 61 63 74 69 76 65 20 | 77 69 64 67 65 74 2e 20 | active |widget. |
|00004480| 54 68 65 20 77 69 64 67 | 65 74 20 72 65 6d 61 69 |The widg|et remai|
|00004490| 6e 73 20 6f 6e 20 73 63 | 72 65 65 6e 20 62 75 74 |ns on sc|reen but|
|000044a0| 20 69 74 20 63 61 6e 6e | 6f 74 20 62 65 20 61 63 | it cann|ot be ac|
|000044b0| 74 69 76 61 74 65 64 2e | 20 62 6c 61 6e 6b 20 63 |tivated.| blank c|
|000044c0| 61 6e 20 62 65 20 42 4c | 41 4e 4b 20 6f 72 20 4e |an be BL|ANK or N|
|000044d0| 4f 42 4c 41 4e 4b 20 77 | 68 69 63 68 20 69 6e 64 |OBLANK w|hich ind|
|000044e0| 69 63 61 74 65 73 20 77 | 68 65 74 68 65 72 20 74 |icates w|hether t|
|000044f0| 68 65 20 63 6f 6e 74 65 | 6e 74 73 20 6f 66 20 74 |he conte|nts of t|
|00004500| 68 65 20 77 69 64 67 65 | 74 20 73 68 6f 75 6c 64 |he widge|t should|
|00004510| 20 62 65 20 62 6c 61 6e | 6b 65 64 20 6f 75 74 20 | be blan|ked out |
|00004520| 6f 72 20 6e 6f 74 20 77 | 68 69 6c 65 20 69 74 20 |or not w|hile it |
|00004530| 69 73 20 69 6e 61 63 74 | 69 76 65 2e 20 54 68 65 |is inact|ive. The|
|00004540| 20 66 75 6e 63 74 69 6f | 6e 20 72 65 74 75 72 6e | functio|n return|
|00004550| 73 20 54 52 55 45 20 69 | 66 20 73 75 63 63 65 73 |s TRUE i|f succes|
|00004560| 73 66 75 6c 20 6f 72 20 | 46 41 4c 53 45 20 69 66 |sful or |FALSE if|
|00004570| 20 74 68 65 20 67 69 76 | 65 6e 20 77 69 64 67 65 | the giv|en widge|
|00004580| 74 20 64 6f 65 73 20 6e | 6f 74 20 65 78 69 73 74 |t does n|ot exist|
|00004590| 2e 0a 0a 2e 4c 50 0a 2e | 62 72 0a 2e 69 6e 20 30 |....LP..|br..in 0|
|000045a0| 2e 35 69 0a 69 6e 74 20 | 68 69 67 68 6c 69 67 68 |.5i.int |highligh|
|000045b0| 74 20 28 70 74 72 29 0a | 2e 62 72 0a 57 49 44 47 |t (ptr).|.br.WIDG|
|000045c0| 45 54 20 70 74 72 3b 0a | 2e 69 6e 20 30 0a 2e 4c |ET ptr;.|.in 0..L|
|000045d0| 50 0a 48 69 67 68 6c 69 | 67 68 74 73 20 74 68 65 |P.Highli|ghts the|
|000045e0| 20 67 69 76 65 6e 20 77 | 69 64 67 65 74 2e 20 52 | given w|idget. R|
|000045f0| 65 74 75 72 6e 73 20 54 | 52 55 45 20 69 66 20 73 |eturns T|RUE if s|
|00004600| 75 63 63 65 73 73 66 75 | 6c 20 65 6c 73 65 20 46 |uccessfu|l else F|
|00004610| 41 4c 53 45 20 69 66 20 | 74 68 65 20 77 69 64 67 |ALSE if |the widg|
|00004620| 65 74 20 64 6f 65 73 20 | 6e 6f 74 20 65 78 69 73 |et does |not exis|
|00004630| 74 2e 0a 0a 2e 4c 50 0a | 2e 62 72 0a 2e 69 6e 20 |t....LP.|.br..in |
|00004640| 30 2e 35 69 0a 69 6e 74 | 20 64 65 68 69 67 68 6c |0.5i.int| dehighl|
|00004650| 69 67 68 74 20 28 70 74 | 72 29 0a 2e 62 72 0a 57 |ight (pt|r)..br.W|
|00004660| 49 44 47 45 54 20 70 74 | 72 3b 0a 2e 69 6e 20 30 |IDGET pt|r;..in 0|
|00004670| 0a 2e 4c 50 0a 54 75 72 | 6e 73 20 6f 66 66 20 74 |..LP.Tur|ns off t|
|00004680| 68 65 20 68 69 67 68 6c | 69 67 68 74 69 6e 67 20 |he highl|ighting |
|00004690| 6f 66 20 74 68 65 20 67 | 69 76 65 6e 20 77 69 64 |of the g|iven wid|
|000046a0| 67 65 74 2e 20 52 65 74 | 75 72 6e 73 20 54 52 55 |get. Ret|urns TRU|
|000046b0| 45 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 20 |E if suc|cessful |
|000046c0| 65 6c 73 65 20 46 41 4c | 53 45 20 69 66 20 74 68 |else FAL|SE if th|
|000046d0| 65 20 77 69 64 67 65 74 | 20 64 6f 65 73 20 6e 6f |e widget| does no|
|000046e0| 74 20 65 78 69 73 74 2e | 0a 0a 2e 4c 50 0a 2e 62 |t exist.|...LP..b|
|000046f0| 72 0a 2e 69 6e 20 30 2e | 35 69 0a 69 6e 74 20 63 |r..in 0.|5i.int c|
|00004700| 68 61 6e 67 65 6c 62 6c | 77 69 64 67 65 74 20 28 |hangelbl|widget (|
|00004710| 70 74 72 2c 20 6d 65 73 | 73 61 67 65 2c 20 70 6f |ptr, mes|sage, po|
|00004720| 73 69 74 69 6f 6e 29 0a | 2e 62 72 0a 57 49 44 47 |sition).|.br.WIDG|
|00004730| 45 54 20 70 74 72 3b 0a | 2e 62 72 0a 63 68 61 72 |ET ptr;.|.br.char|
|00004740| 20 20 20 6d 65 73 73 61 | 67 65 5b 5d 3b 0a 2e 62 | messa|ge[];..b|
|00004750| 72 0a 69 6e 74 20 20 20 | 20 70 6f 73 69 74 69 6f |r.int | positio|
|00004760| 6e 3b 0a 2e 69 6e 20 30 | 0a 2e 4c 50 0a 43 68 61 |n;..in 0|..LP.Cha|
|00004770| 6e 67 65 73 20 74 68 65 | 20 63 6f 6e 74 65 6e 74 |nges the| content|
|00004780| 73 20 6f 66 20 74 68 65 | 20 67 69 76 65 6e 20 6c |s of the| given l|
|00004790| 61 62 65 6c 20 77 69 64 | 67 65 74 20 74 6f 20 74 |abel wid|get to t|
|000047a0| 68 61 74 20 67 69 76 65 | 6e 20 69 6e 20 6d 65 73 |hat give|n in mes|
|000047b0| 73 61 67 65 2e 20 70 6f | 73 69 74 69 6f 6e 20 73 |sage. po|sition s|
|000047c0| 70 65 63 69 66 69 65 73 | 20 68 6f 77 20 74 68 65 |pecifies| how the|
|000047d0| 20 6d 65 73 73 61 67 65 | 20 69 73 20 74 6f 20 61 | message| is to a|
|000047e0| 70 70 65 61 72 20 28 73 | 65 65 20 6d 6b 6c 62 6c |ppear (s|ee mklbl|
|000047f0| 77 69 64 67 65 74 29 2e | 20 54 68 65 20 66 75 6e |widget).| The fun|
|00004800| 63 74 69 6f 6e 20 72 65 | 74 75 72 6e 73 20 54 52 |ction re|turns TR|
|00004810| 55 45 20 69 66 20 73 75 | 63 63 65 73 73 66 75 6c |UE if su|ccessful|
|00004820| 20 65 6c 73 65 20 46 41 | 4c 53 45 2e 0a 2e 4b 45 | else FA|LSE...KE|
|00004830| 0a 2e 4b 53 0a 2e 4c 50 | 0a 2e 62 72 0a 2e 69 6e |..KS..LP|..br..in|
|00004840| 20 30 2e 35 69 0a 57 49 | 44 47 45 54 54 59 50 45 | 0.5i.WI|DGETTYPE|
|00004850| 20 77 69 64 67 65 74 74 | 79 70 65 20 28 70 74 72 | widgett|ype (ptr|
|00004860| 29 0a 2e 62 72 0a 57 49 | 44 47 45 54 20 70 74 72 |)..br.WI|DGET ptr|
|00004870| 3b 0a 2e 69 6e 20 30 0a | 2e 4c 50 0a 52 65 74 75 |;..in 0.|.LP.Retu|
|00004880| 72 6e 73 20 74 68 65 20 | 74 79 70 65 20 6f 66 20 |rns the |type of |
|00004890| 77 69 64 67 65 74 20 70 | 6f 69 6e 74 65 64 20 74 |widget p|ointed t|
|000048a0| 6f 6f 20 62 79 20 70 74 | 72 2e 20 54 68 65 20 72 |oo by pt|r. The r|
|000048b0| 65 74 75 72 6e 65 64 20 | 74 79 70 65 20 76 61 6c |eturned |type val|
|000048c0| 75 65 20 69 73 20 6f 6e | 65 20 6f 66 20 43 4d 44 |ue is on|e of CMD|
|000048d0| 2c 20 4c 42 4c 2c 20 54 | 47 4c 2c 20 49 4e 50 20 |, LBL, T|GL, INP |
|000048e0| 6f 72 20 46 41 4c 53 45 | 20 69 66 20 74 68 65 20 |or FALSE| if the |
|000048f0| 77 69 64 67 65 74 20 64 | 6f 65 73 20 6e 6f 74 20 |widget d|oes not |
|00004900| 65 78 69 73 74 2e 0a 0a | 2e 53 48 0a 46 69 6e 69 |exist...|.SH.Fini|
|00004910| 73 68 69 6e 67 20 55 70 | 0a 0a 2e 4c 50 0a 2e 62 |shing Up|...LP..b|
|00004920| 72 0a 2e 69 6e 20 30 2e | 35 69 0a 65 6e 64 77 69 |r..in 0.|5i.endwi|
|00004930| 64 67 65 74 73 20 28 29 | 0a 2e 69 6e 20 30 0a 2e |dgets ()|..in 0..|
|00004940| 4c 50 0a 43 6c 6f 73 65 | 73 20 64 6f 77 6e 20 74 |LP.Close|s down t|
|00004950| 68 65 20 77 69 6e 64 6f | 77 69 6e 67 20 73 79 73 |he windo|wing sys|
|00004960| 74 65 6d 20 61 6e 64 20 | 73 68 6f 75 6c 64 20 62 |tem and |should b|
|00004970| 65 20 75 73 65 64 20 61 | 74 20 74 68 65 20 65 6e |e used a|t the en|
|00004980| 64 2e 20 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |d. This |function|
|00004990| 20 69 73 20 61 6c 73 6f | 20 61 75 74 6f 6d 61 74 | is also| automat|
|000049a0| 69 63 61 6c 6c 79 20 63 | 61 6c 6c 65 64 20 6f 6e |ically c|alled on|
|000049b0| 20 61 6e 20 69 6e 74 65 | 72 72 75 70 74 20 28 65 | an inte|rrupt (e|
|000049c0| 2e 67 20 5e 43 29 2e 0a | 2e 4b 45 0a 53 48 41 52 |.g ^C)..|.KE.SHAR|
|000049d0| 5f 45 4f 46 0a 69 66 20 | 74 65 73 74 20 31 30 39 |_EOF.if |test 109|
|000049e0| 34 36 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 20 |46 -ne `|wc -c < |
|000049f0| 27 77 69 64 67 65 74 2e | 6d 73 27 60 0a 74 68 65 |'widget.|ms'`.the|
|00004a00| 6e 0a 20 20 20 20 65 63 | 68 6f 20 27 53 68 61 72 |n. ec|ho 'Shar|
|00004a10| 3a 20 65 72 72 6f 72 20 | 74 72 61 6e 73 6d 69 74 |: error |transmit|
|00004a20| 74 69 6e 67 20 27 77 69 | 64 67 65 74 2e 6d 73 27 |ting 'wi|dget.ms'|
|00004a30| 20 28 73 68 6f 75 6c 64 | 20 68 61 76 65 20 62 65 | (should| have be|
|00004a40| 65 6e 20 20 31 30 39 34 | 36 20 63 68 61 72 63 61 |en 1094|6 charca|
|00004a50| 74 65 72 73 29 27 0a 66 | 69 0a 66 69 0a 65 63 68 |ters)'.f|i.fi.ech|
|00004a60| 6f 20 27 53 68 61 72 3a | 20 65 78 74 72 61 63 74 |o 'Shar:| extract|
|00004a70| 69 6e 67 20 27 77 69 64 | 67 65 74 6c 69 62 2e 63 |ing 'wid|getlib.c|
|00004a80| 27 20 28 20 33 34 38 31 | 37 20 63 68 61 72 61 63 |' ( 3481|7 charac|
|00004a90| 74 65 72 73 29 27 0a 69 | 66 20 74 65 73 74 20 2d |ters)'.i|f test -|
|00004aa0| 66 20 27 77 69 64 67 65 | 74 6c 69 62 2e 63 27 0a |f 'widge|tlib.c'.|
|00004ab0| 74 68 65 6e 0a 20 20 20 | 20 65 63 68 6f 20 22 53 |then. | echo "S|
|00004ac0| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|00004ad0| 65 72 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |erwrite |existing|
|00004ae0| 20 66 69 6c 65 20 27 77 | 69 64 67 65 74 6c 69 62 | file 'w|idgetlib|
|00004af0| 2e 63 27 22 0a 65 6c 73 | 65 0a 20 20 20 20 63 61 |.c'".els|e. ca|
|00004b00| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|00004b10| 20 27 77 69 64 67 65 74 | 6c 69 62 2e 63 27 0a 2f | 'widget|lib.c'./|
|00004b20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004b30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004b40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004b50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004b60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 0a 2f 2a |********|*****./*|
|00004b70| 20 20 46 49 4c 45 3a 09 | 09 77 69 64 67 65 74 6c | FILE:.|.widgetl|
|00004b80| 69 62 2e 63 0a 2f 2a 20 | 20 44 41 54 45 3a 09 09 |ib.c./* | DATE:..|
|00004b90| 41 75 67 75 73 74 20 31 | 39 38 38 2e 0a 2f 2a 20 |August 1|988../* |
|00004ba0| 20 41 55 54 48 4f 52 3a | 09 09 52 69 63 68 61 72 | AUTHOR:|..Richar|
|00004bb0| 64 20 41 2e 20 43 75 6c | 73 68 61 77 2e 0a 2f 2a |d A. Cul|shaw../*|
|00004bc0| 20 20 44 45 53 43 52 49 | 50 54 49 4f 4e 3a 09 43 | DESCRI|PTION:.C|
|00004bd0| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 63 6f 64 65 |ontains |the code|
|00004be0| 20 74 6f 20 6d 61 6e 69 | 70 75 6c 61 74 65 20 74 | to mani|pulate t|
|00004bf0| 68 65 20 77 69 64 67 65 | 74 20 73 74 72 75 63 74 |he widge|t struct|
|00004c00| 75 72 65 73 0a 2f 2a 09 | 09 09 61 6e 64 20 74 68 |ures./*.|..and th|
|00004c10| 65 20 69 2f 6f 2e 20 49 | 74 20 66 6f 72 6d 73 20 |e i/o. I|t forms |
|00004c20| 61 20 73 69 6e 67 6c 65 | 20 6c 69 62 72 61 72 79 |a single| library|
|00004c30| 20 74 68 61 74 20 73 68 | 6f 75 6c 64 0a 2f 2a 09 | that sh|ould./*.|
|00004c40| 09 09 62 65 20 6c 69 6e | 6b 65 64 20 69 6e 20 77 |..be lin|ked in w|
|00004c50| 69 74 68 20 61 6c 6c 20 | 63 6f 64 65 20 75 73 69 |ith all |code usi|
|00004c60| 6e 67 20 74 68 65 73 65 | 20 77 69 64 67 65 74 73 |ng these| widgets|
|00004c70| 2e 0a 2f 2a 20 44 49 53 | 43 4c 41 49 4d 45 52 3a |../* DIS|CLAIMER:|
|00004c80| 09 09 54 68 69 73 20 66 | 69 6c 65 20 69 73 20 64 |..This f|ile is d|
|00004c90| 65 65 6d 65 64 20 74 6f | 20 62 65 20 70 75 62 6c |eemed to| be publ|
|00004ca0| 69 63 2d 64 6f 6d 61 69 | 6e 2c 20 6f 6e 20 74 68 |ic-domai|n, on th|
|00004cb0| 65 20 73 69 6d 70 6c 65 | 0a 2f 2a 09 09 09 70 72 |e simple|./*...pr|
|00004cc0| 6f 76 69 73 6f 73 20 74 | 68 61 74 20 74 68 69 73 |ovisos t|hat this|
|00004cd0| 20 73 65 63 74 69 6f 6e | 20 72 65 6d 61 69 6e 73 | section| remains|
|00004ce0| 20 69 6e 20 74 68 69 73 | 20 66 69 6c 65 20 61 6e | in this| file an|
|00004cf0| 64 0a 2f 2a 09 09 09 74 | 68 61 74 20 63 6f 64 65 |d./*...t|hat code|
|00004d00| 20 75 73 69 6e 67 20 69 | 74 20 64 6f 20 6e 6f 74 | using i|t do not|
|00004d10| 20 64 6f 20 73 6f 20 66 | 6f 72 20 6d 6f 6e 65 74 | do so f|or monet|
|00004d20| 61 72 79 20 67 61 69 6e | 2e 0a 2f 2a 09 09 09 4e |ary gain|../*...N|
|00004d30| 65 69 74 68 65 72 20 74 | 68 65 20 61 75 74 68 6f |either t|he autho|
|00004d40| 72 2c 20 6e 6f 72 20 74 | 68 65 20 61 75 74 68 6f |r, nor t|he autho|
|00004d50| 72 73 20 65 6d 70 6c 6f | 79 65 65 73 20 61 74 20 |rs emplo|yees at |
|00004d60| 74 68 65 0a 2f 2a 09 09 | 09 74 69 6d 65 20 6f 66 |the./*..|.time of|
|00004d70| 20 64 65 76 65 6c 6f 70 | 69 6e 67 20 74 68 69 73 | develop|ing this|
|00004d80| 20 63 6f 64 65 2c 20 61 | 63 63 65 70 74 20 61 6e | code, a|ccept an|
|00004d90| 79 20 6c 69 61 62 69 6c | 69 74 79 20 6f 72 0a 2f |y liabil|ity or./|
|00004da0| 2a 09 09 09 72 65 73 70 | 6f 6e 73 69 62 69 6c 69 |*...resp|onsibili|
|00004db0| 74 79 20 66 6f 72 20 74 | 68 65 20 75 73 65 2c 20 |ty for t|he use, |
|00004dc0| 61 62 75 73 65 20 6f 72 | 20 6d 69 73 75 73 65 20 |abuse or| misuse |
|00004dd0| 6f 66 20 74 68 69 73 0a | 2f 2a 09 09 09 63 6f 64 |of this.|/*...cod|
|00004de0| 65 2e 0a 2f 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |e../****|********|
|00004df0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e00| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e10| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e20| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004e30| 2a 2f 0a 0a 23 69 6e 63 | 6c 75 64 65 20 3c 77 69 |*/..#inc|lude <wi|
|00004e40| 64 67 65 74 2e 68 3e 0a | 0a 65 78 74 65 72 6e 20 |dget.h>.|.extern |
|00004e50| 63 68 61 72 20 20 20 20 | 20 2a 6d 61 6c 6c 6f 63 |char | *malloc|
|00004e60| 28 29 3b 0a 69 6e 74 09 | 09 74 65 78 74 77 69 6e |();.int.|.textwin|
|00004e70| 64 6f 77 64 65 66 69 6e | 65 64 20 3d 20 46 41 4c |dowdefin|ed = FAL|
|00004e80| 53 45 3b 0a 69 6e 74 20 | 20 20 20 09 09 77 69 64 |SE;.int | ..wid|
|00004e90| 78 2c 20 77 69 64 79 3b | 09 0a 69 6e 74 09 09 6d |x, widy;|..int..m|
|00004ea0| 61 78 77 69 64 79 3b 0a | 69 6e 74 20 20 20 20 09 |axwidy;.|int .|
|00004eb0| 09 73 63 72 79 3b 0a 69 | 6e 74 20 20 20 20 09 09 |.scry;.i|nt ..|
|00004ec0| 63 75 72 69 64 3b 0a 69 | 6e 74 09 09 73 69 7a 65 |curid;.i|nt..size|
|00004ed0| 73 63 72 65 67 3b 0a 69 | 6e 74 09 09 73 63 72 65 |screg;.i|nt..scre|
|00004ee0| 65 6e 62 6f 72 64 65 72 | 20 3d 20 30 3b 0a 0a 57 |enborder| = 0;..W|
|00004ef0| 49 4e 44 4f 57 20 20 20 | 20 2a 73 63 72 65 65 6e |INDOW | *screen|
|00004f00| 3b 0a 57 49 4e 44 4f 57 | 20 20 20 20 2a 73 63 72 |;.WINDOW| *scr|
|00004f10| 65 65 6e 62 6f 78 3b 0a | 57 49 4e 44 4f 57 20 20 |eenbox;.|WINDOW |
|00004f20| 20 20 2a 65 64 67 65 31 | 3b 0a 57 49 4e 44 4f 57 | *edge1|;.WINDOW|
|00004f30| 09 20 20 2a 65 64 67 65 | 32 3b 0a 0a 0a 69 6e 69 |. *edge|2;...ini|
|00004f40| 74 69 61 6c 69 73 65 77 | 69 64 67 65 74 73 20 28 |tialisew|idgets (|
|00004f50| 29 0a 2f 2a 20 73 65 74 | 73 20 75 70 20 73 63 72 |)./* set|s up scr|
|00004f60| 65 65 6e 20 61 6e 64 20 | 69 6e 69 74 69 61 6c 69 |een and |initiali|
|00004f70| 73 65 73 20 67 6c 6f 62 | 61 6c 20 76 61 72 69 61 |ses glob|al varia|
|00004f80| 62 6c 65 73 20 2a 2f 0a | 7b 0a 20 20 20 20 69 6e |bles */.|{. in|
|00004f90| 74 20 69 2c 20 65 6e 64 | 77 69 64 67 65 74 73 28 |t i, end|widgets(|
|00004fa0| 29 3b 0a 0a 20 20 20 20 | 77 69 64 78 20 3d 20 77 |);.. |widx = w|
|00004fb0| 69 64 79 20 3d 20 73 63 | 72 79 20 3d 20 30 3b 0a |idy = sc|ry = 0;.|
|00004fc0| 20 20 20 20 63 75 72 69 | 64 20 3d 20 31 3b 0a 20 | curi|d = 1;. |
|00004fd0| 20 20 20 6d 61 78 77 69 | 64 79 20 3d 20 4c 49 4e | maxwi|dy = LIN|
|00004fe0| 45 53 20 2d 20 33 3b 0a | 20 20 20 20 69 6e 69 74 |ES - 3;.| init|
|00004ff0| 73 63 72 20 28 29 3b 0a | 20 20 20 20 63 72 6d 6f |scr ();.| crmo|
|00005000| 64 65 20 28 29 3b 0a 20 | 20 20 20 6e 6f 65 63 68 |de ();. | noech|
|00005010| 6f 20 28 29 3b 0a 20 20 | 20 20 63 6d 64 6c 69 73 |o ();. | cmdlis|
|00005020| 74 20 3d 20 4e 55 4c 4c | 43 4d 44 3b 0a 20 20 20 |t = NULL|CMD;. |
|00005030| 20 6c 62 6c 6c 69 73 74 | 20 3d 20 4e 55 4c 4c 4c | lbllist| = NULLL|
|00005040| 42 4c 3b 0a 20 20 20 20 | 74 67 6c 6c 69 73 74 20 |BL;. |tgllist |
|00005050| 3d 20 4e 55 4c 4c 54 47 | 4c 3b 0a 20 20 20 20 69 |= NULLTG|L;. i|
|00005060| 6e 70 6c 69 73 74 20 3d | 20 4e 55 4c 4c 49 4e 50 |nplist =| NULLINP|
|00005070| 3b 0a 20 20 20 20 61 63 | 74 6c 69 73 74 20 3d 20 |;. ac|tlist = |
|00005080| 4e 55 4c 4c 43 48 3b 0a | 20 20 20 20 66 6f 72 20 |NULLCH;.| for |
|00005090| 28 69 3d 30 3b 20 69 3c | 31 38 3b 20 69 2b 2b 29 |(i=0; i<|18; i++)|
|000050a0| 0a 09 73 69 67 6e 61 6c | 20 28 69 2c 20 65 6e 64 |..signal| (i, end|
|000050b0| 77 69 64 67 65 74 73 29 | 3b 0a 7d 0a 0a 64 72 61 |widgets)|;.}..dra|
|000050c0| 77 74 65 78 74 77 69 6e | 64 6f 77 20 28 79 29 0a |wtextwin|dow (y).|
|000050d0| 2f 2a 20 64 72 61 77 73 | 20 74 68 65 20 74 65 78 |/* draws| the tex|
|000050e0| 74 20 77 69 6e 64 6f 77 | 20 61 6e 64 20 64 72 61 |t window| and dra|
|000050f0| 77 73 20 61 20 62 6f 78 | 20 61 72 6f 75 6e 64 20 |ws a box| around |
|00005100| 69 74 20 2a 2f 0a 69 6e | 74 20 79 3b 0a 7b 0a 20 |it */.in|t y;.{. |
|00005110| 20 20 20 69 6e 74 20 69 | 3b 0a 0a 20 20 20 20 69 | int i|;.. i|
|00005120| 66 20 28 28 73 63 72 65 | 65 6e 62 6f 72 64 65 72 |f ((scre|enborder|
|00005130| 20 26 20 56 45 52 54 49 | 43 41 4c 29 20 26 26 20 | & VERTI|CAL) && |
|00005140| 28 73 63 72 65 65 6e 62 | 6f 72 64 65 72 20 26 20 |(screenb|order & |
|00005150| 48 4f 52 49 5a 4f 4e 54 | 41 4c 29 29 20 7b 0a 20 |HORIZONT|AL)) {. |
|00005160| 20 20 20 20 20 20 20 62 | 6f 78 20 28 73 63 72 65 | b|ox (scre|
|00005170| 65 6e 62 6f 78 2c 20 27 | 7c 27 2c 20 27 2d 27 29 |enbox, '||', '-')|
|00005180| 3b 0a 20 20 20 20 09 6d | 76 77 61 64 64 63 68 20 |;. .m|vwaddch |
|00005190| 28 73 63 72 65 65 6e 62 | 6f 78 2c 20 30 2c 20 30 |(screenb|ox, 0, 0|
|000051a0| 2c 20 27 2e 27 29 3b 0a | 20 20 20 20 09 6d 76 77 |, '.');.| .mvw|
|000051b0| 61 64 64 63 68 20 28 73 | 63 72 65 65 6e 62 6f 78 |addch (s|creenbox|
|000051c0| 2c 20 30 2c 20 43 4f 4c | 53 2d 32 2c 20 27 2e 27 |, 0, COL|S-2, '.'|
|000051d0| 29 3b 0a 20 20 20 20 09 | 6d 76 77 61 64 64 63 68 |);. .|mvwaddch|
|000051e0| 20 28 73 63 72 65 65 6e | 62 6f 78 2c 20 4c 49 4e | (screen|box, LIN|
|000051f0| 45 53 2d 79 2d 31 2c 20 | 30 2c 20 27 60 27 29 3b |ES-y-1, |0, '`');|
|00005200| 0a 20 20 20 20 09 6d 76 | 77 61 64 64 63 68 20 28 |. .mv|waddch (|
|00005210| 73 63 72 65 65 6e 62 6f | 78 2c 20 4c 49 4e 45 53 |screenbo|x, LINES|
|00005220| 2d 79 2d 31 2c 20 43 4f | 4c 53 2d 32 2c 20 27 5c |-y-1, CO|LS-2, '\|
|00005230| 27 27 29 3b 0a 20 20 20 | 20 09 74 6f 75 63 68 77 |'');. | .touchw|
|00005240| 69 6e 20 28 73 63 72 65 | 65 6e 62 6f 78 29 3b 0a |in (scre|enbox);.|
|00005250| 20 20 20 20 20 20 20 20 | 77 72 65 66 72 65 73 68 | |wrefresh|
|00005260| 20 28 73 63 72 65 65 6e | 62 6f 78 29 3b 0a 20 20 | (screen|box);. |
|00005270| 20 20 7d 0a 20 20 20 20 | 65 6c 73 65 20 69 66 20 | }. |else if |
|00005280| 28 73 63 72 65 65 6e 62 | 6f 72 64 65 72 20 26 20 |(screenb|order & |
|00005290| 48 4f 52 49 5a 4f 4e 54 | 41 4c 29 20 7b 0a 09 77 |HORIZONT|AL) {..w|
|000052a0| 61 64 64 73 74 72 20 28 | 65 64 67 65 31 2c 20 22 |addstr (|edge1, "|
|000052b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 22 |--------|-------"|
|00005300| 29 3b 0a 20 20 20 20 20 | 20 20 20 77 61 64 64 73 |);. | wadds|
|00005310| 74 72 20 28 65 64 67 65 | 32 2c 20 22 2d 2d 2d 2d |tr (edge|2, "----|
|00005320| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005330| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005340| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005350| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005360| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 22 29 3b 0a 09 |--------|---");..|
|00005370| 77 72 65 66 72 65 73 68 | 20 28 65 64 67 65 31 29 |wrefresh| (edge1)|
|00005380| 3b 0a 09 77 72 65 66 72 | 65 73 68 20 28 65 64 67 |;..wrefr|esh (edg|
|00005390| 65 32 29 3b 0a 20 20 20 | 20 7d 0a 20 20 20 20 65 |e2);. | }. e|
|000053a0| 6c 73 65 20 69 66 20 28 | 73 63 72 65 65 6e 62 6f |lse if (|screenbo|
|000053b0| 72 64 65 72 20 26 20 56 | 45 52 54 49 43 41 4c 29 |rder & V|ERTICAL)|
|000053c0| 20 7b 0a 09 66 6f 72 20 | 28 69 3d 30 3b 20 69 3c | {..for |(i=0; i<|
|000053d0| 3d 73 69 7a 65 73 63 72 | 65 67 3b 20 69 2b 2b 29 |=sizescr|eg; i++)|
|000053e0| 20 7b 0a 09 20 20 20 20 | 6d 76 77 61 64 64 63 68 | {.. |mvwaddch|
|000053f0| 20 28 65 64 67 65 31 2c | 20 69 2c 20 30 2c 20 27 | (edge1,| i, 0, '|
|00005400| 7c 27 29 3b 0a 09 20 20 | 20 20 6d 76 77 61 64 64 ||');.. | mvwadd|
|00005410| 63 68 20 28 65 64 67 65 | 32 2c 20 69 2c 20 30 2c |ch (edge|2, i, 0,|
|00005420| 20 27 7c 27 29 3b 0a 20 | 20 20 09 7d 0a 09 77 72 | '|');. | .}..wr|
|00005430| 65 66 72 65 73 68 20 28 | 65 64 67 65 31 29 3b 0a |efresh (|edge1);.|
|00005440| 09 77 72 65 66 72 65 73 | 68 20 28 65 64 67 65 32 |.wrefres|h (edge2|
|00005450| 29 3b 0a 20 20 20 20 7d | 0a 20 20 20 20 74 6f 75 |);. }|. tou|
|00005460| 63 68 77 69 6e 20 28 73 | 63 72 65 65 6e 29 3b 0a |chwin (s|creen);.|
|00005470| 20 20 20 20 77 72 65 66 | 72 65 73 68 20 28 73 63 | wref|resh (sc|
|00005480| 72 65 65 6e 29 3b 0a 7d | 0a 0a 69 6e 74 20 6f 70 |reen);.}|..int op|
|00005490| 65 6e 74 65 78 74 77 69 | 6e 64 6f 77 20 28 70 6f |entextwi|ndow (po|
|000054a0| 73 69 74 69 6f 6e 2c 20 | 62 6f 72 64 65 72 29 0a |sition, |border).|
|000054b0| 2f 2a 20 64 65 66 69 6e | 65 20 74 68 65 20 74 65 |/* defin|e the te|
|000054c0| 78 74 20 77 69 6e 64 6f | 77 20 66 72 6f 6d 20 63 |xt windo|w from c|
|000054d0| 75 72 72 65 6e 74 20 70 | 6f 73 69 74 69 6f 6e 20 |urrent p|osition |
|000054e0| 64 6f 77 6e 20 2b 20 70 | 6f 73 69 74 69 6f 6e 20 |down + p|osition |
|000054f0| 2a 20 77 69 64 67 65 74 | 20 64 65 70 74 68 2a 2f |* widget| depth*/|
|00005500| 0a 69 6e 74 20 20 20 20 | 70 6f 73 69 74 69 6f 6e |.int |position|
|00005510| 3b 0a 69 6e 74 20 20 20 | 20 62 6f 72 64 65 72 3b |;.int | border;|
|00005520| 0a 7b 0a 20 20 20 20 69 | 66 20 28 28 70 6f 73 69 |.{. i|f ((posi|
|00005530| 74 69 6f 6e 20 3e 3d 20 | 30 29 20 26 26 20 28 21 |tion >= |0) && (!|
|00005540| 74 65 78 74 77 69 6e 64 | 6f 77 64 65 66 69 6e 65 |textwind|owdefine|
|00005550| 64 29 20 26 26 20 28 77 | 69 64 79 20 2b 20 33 2a |d) && (w|idy + 3*|
|00005560| 70 6f 73 69 74 69 6f 6e | 20 3c 20 32 31 29 29 20 |position| < 21)) |
|00005570| 7b 0a 20 20 20 20 09 6d | 61 78 77 69 64 79 20 3d |{. .m|axwidy =|
|00005580| 20 77 69 64 79 20 2b 20 | 70 6f 73 69 74 69 6f 6e | widy + |position|
|00005590| 20 2a 20 33 20 2b 20 33 | 3b 0a 09 69 66 20 28 28 | * 3 + 3|;..if ((|
|000055a0| 62 6f 72 64 65 72 20 26 | 20 56 45 52 54 49 43 41 |border &| VERTICA|
|000055b0| 4c 29 20 26 26 20 28 62 | 6f 72 64 65 72 20 26 20 |L) && (b|order & |
|000055c0| 48 4f 52 49 5a 4f 4e 54 | 41 4c 29 29 20 7b 0a 20 |HORIZONT|AL)) {. |
|000055d0| 20 20 20 20 20 20 20 20 | 20 20 20 73 63 72 65 65 | | scree|
|000055e0| 6e 62 6f 78 20 3d 20 6e | 65 77 77 69 6e 20 28 4c |nbox = n|ewwin (L|
|000055f0| 49 4e 45 53 2d 6d 61 78 | 77 69 64 79 2c 20 43 4f |INES-max|widy, CO|
|00005600| 4c 53 2d 31 2c 20 6d 61 | 78 77 69 64 79 2c 20 30 |LS-1, ma|xwidy, 0|
|00005610| 29 3b 0a 09 20 20 20 20 | 73 63 72 65 65 6e 20 3d |);.. |screen =|
|00005620| 20 6e 65 77 77 69 6e 20 | 28 4c 49 4e 45 53 2d 32 | newwin |(LINES-2|
|00005630| 2d 6d 61 78 77 69 64 79 | 2c 20 43 4f 4c 53 2d 33 |-maxwidy|, COLS-3|
|00005640| 2c 20 6d 61 78 77 69 64 | 79 2b 31 2c 20 31 29 3b |, maxwid|y+1, 1);|
|00005650| 0a 09 20 20 20 20 73 69 | 7a 65 73 63 72 65 67 20 |.. si|zescreg |
|00005660| 3d 20 4c 49 4e 45 53 2d | 32 2d 6d 61 78 77 69 64 |= LINES-|2-maxwid|
|00005670| 79 3b 0a 20 20 20 20 20 | 20 20 20 7d 0a 09 65 6c |y;. | }..el|
|00005680| 73 65 20 69 66 20 28 62 | 6f 72 64 65 72 20 26 20 |se if (b|order & |
|00005690| 48 4f 52 49 5a 4f 4e 54 | 41 4c 29 20 7b 0a 09 20 |HORIZONT|AL) {.. |
|000056a0| 20 20 20 73 63 72 65 65 | 6e 20 3d 20 6e 65 77 77 | scree|n = neww|
|000056b0| 69 6e 20 28 4c 49 4e 45 | 53 2d 32 2d 6d 61 78 77 |in (LINE|S-2-maxw|
|000056c0| 69 64 79 2c 20 43 4f 4c | 53 2d 31 2c 20 6d 61 78 |idy, COL|S-1, max|
|000056d0| 77 69 64 79 2b 31 2c 20 | 30 29 3b 0a 20 20 20 20 |widy+1, |0);. |
|000056e0| 09 20 20 20 20 65 64 67 | 65 31 20 3d 20 6e 65 77 |. edg|e1 = new|
|000056f0| 77 69 6e 20 28 31 2c 20 | 43 4f 4c 53 2d 31 2c 20 |win (1, |COLS-1, |
|00005700| 6d 61 78 77 69 64 79 2c | 20 30 29 3b 0a 20 20 20 |maxwidy,| 0);. |
|00005710| 20 20 20 20 20 20 20 20 | 20 65 64 67 65 32 20 3d | | edge2 =|
|00005720| 20 6e 65 77 77 69 6e 20 | 28 31 2c 20 43 4f 4c 53 | newwin |(1, COLS|
|00005730| 2d 31 2c 20 4c 49 4e 45 | 53 2d 31 2c 20 30 29 3b |-1, LINE|S-1, 0);|
|00005740| 0a 09 20 20 20 20 73 69 | 7a 65 73 63 72 65 67 20 |.. si|zescreg |
|00005750| 3d 20 4c 49 4e 45 53 2d | 32 2d 6d 61 78 77 69 64 |= LINES-|2-maxwid|
|00005760| 79 3b 0a 20 20 20 20 20 | 20 20 20 7d 0a 09 65 6c |y;. | }..el|
|00005770| 73 65 20 69 66 20 28 62 | 6f 72 64 65 72 20 26 20 |se if (b|order & |
|00005780| 56 45 52 54 49 43 41 4c | 29 20 7b 0a 09 20 20 20 |VERTICAL|) {.. |
|00005790| 20 73 63 72 65 65 6e 20 | 3d 20 6e 65 77 77 69 6e | screen |= newwin|
|000057a0| 20 28 4c 49 4e 45 53 2d | 6d 61 78 77 69 64 79 2c | (LINES-|maxwidy,|
|000057b0| 20 43 4f 4c 53 2d 33 2c | 20 6d 61 78 77 69 64 79 | COLS-3,| maxwidy|
|000057c0| 2c 20 31 29 3b 0a 09 20 | 20 20 20 65 64 67 65 31 |, 1);.. | edge1|
|000057d0| 20 3d 20 6e 65 77 77 69 | 6e 20 28 4c 49 4e 45 53 | = newwi|n (LINES|
|000057e0| 2d 6d 61 78 77 69 64 79 | 2c 20 31 2c 20 6d 61 78 |-maxwidy|, 1, max|
|000057f0| 77 69 64 79 2c 20 30 29 | 3b 0a 09 20 20 20 20 65 |widy, 0)|;.. e|
|00005800| 64 67 65 32 20 3d 20 6e | 65 77 77 69 6e 20 28 4c |dge2 = n|ewwin (L|
|00005810| 49 4e 45 53 2d 6d 61 78 | 77 69 64 79 2c 20 31 2c |INES-max|widy, 1,|
|00005820| 20 6d 61 78 77 69 64 79 | 2c 20 43 4f 4c 53 2d 32 | maxwidy|, COLS-2|
|00005830| 29 3b 0a 09 20 20 20 20 | 73 69 7a 65 73 63 72 65 |);.. |sizescre|
|00005840| 67 20 3d 20 4c 49 4e 45 | 53 2d 6d 61 78 77 69 64 |g = LINE|S-maxwid|
|00005850| 79 3b 0a 20 20 20 20 20 | 20 20 20 7d 0a 09 65 6c |y;. | }..el|
|00005860| 73 65 20 7b 0a 09 20 20 | 20 20 73 63 72 65 65 6e |se {.. | screen|
|00005870| 20 3d 20 6e 65 77 77 69 | 6e 20 28 4c 49 4e 45 53 | = newwi|n (LINES|
|00005880| 2d 6d 61 78 77 69 64 79 | 2c 20 43 4f 4c 53 2d 31 |-maxwidy|, COLS-1|
|00005890| 2c 20 6d 61 78 77 69 64 | 79 2c 20 30 29 3b 0a 09 |, maxwid|y, 0);..|
|000058a0| 20 20 20 20 73 69 7a 65 | 73 63 72 65 67 20 3d 20 | size|screg = |
|000058b0| 4c 49 4e 45 53 2d 6d 61 | 78 77 69 64 79 3b 0a 20 |LINES-ma|xwidy;. |
|000058c0| 20 20 20 20 20 20 20 7d | 0a 20 20 20 20 20 20 20 | }|. |
|000058d0| 20 73 63 72 65 65 6e 62 | 6f 72 64 65 72 20 3d 20 | screenb|order = |
|000058e0| 62 6f 72 64 65 72 3b 0a | 20 20 20 20 20 20 20 20 |border;.| |
|000058f0| 73 63 72 6f 6c 6c 6f 6b | 20 28 73 63 72 65 65 6e |scrollok| (screen|
|00005900| 2c 20 54 52 55 45 29 3b | 0a 09 64 72 61 77 74 65 |, TRUE);|..drawte|
|00005910| 78 74 77 69 6e 64 6f 77 | 20 28 6d 61 78 77 69 64 |xtwindow| (maxwid|
|00005920| 79 29 3b 0a 20 20 20 20 | 20 20 20 20 77 6d 6f 76 |y);. | wmov|
|00005930| 65 20 28 73 63 72 65 65 | 6e 2c 20 73 63 72 79 2c |e (scree|n, scry,|
|00005940| 20 30 29 3b 0a 09 77 72 | 65 66 72 65 73 68 20 28 | 0);..wr|efresh (|
|00005950| 73 63 72 65 65 6e 29 3b | 0a 09 74 65 78 74 77 69 |screen);|..textwi|
|00005960| 6e 64 6f 77 64 65 66 69 | 6e 65 64 20 3d 20 31 3b |ndowdefi|ned = 1;|
|00005970| 0a 09 72 65 74 75 72 6e | 20 73 69 7a 65 73 63 72 |..return| sizescr|
|00005980| 65 67 3b 0a 20 20 20 20 | 7d 0a 7d 0a 0a 69 6e 74 |eg;. |}.}..int|
|00005990| 20 61 64 64 74 6f 63 68 | 6c 69 73 74 20 28 63 68 | addtoch|list (ch|
|000059a0| 2c 20 69 64 2c 20 74 79 | 70 65 29 0a 2f 2a 20 61 |, id, ty|pe)./* a|
|000059b0| 64 64 20 61 20 6e 65 77 | 20 63 68 61 72 61 63 74 |dd a new| charact|
|000059c0| 65 72 20 74 6f 20 61 72 | 72 61 79 20 6f 66 20 61 |er to ar|ray of a|
|000059d0| 63 74 69 76 61 74 69 6f | 6e 20 63 68 61 72 73 2e |ctivatio|n chars.|
|000059e0| 0a 20 2a 20 72 65 74 75 | 72 6e 73 20 54 52 55 45 |. * retu|rns TRUE|
|000059f0| 20 69 66 20 73 75 63 63 | 65 73 73 66 75 6c 20 28 | if succ|essful (|
|00005a00| 63 68 61 72 20 6e 6f 74 | 20 61 6c 72 65 61 64 79 |char not| already|
|00005a10| 20 69 6e 20 6c 69 73 74 | 29 20 65 6c 73 65 20 46 | in list|) else F|
|00005a20| 41 4c 53 45 0a 20 2a 2f | 0a 63 68 61 72 20 20 20 |ALSE. */|.char |
|00005a30| 09 20 20 20 20 63 68 3b | 0a 69 6e 74 20 20 20 20 |. ch;|.int |
|00005a40| 09 20 20 20 20 69 64 3b | 0a 57 49 44 47 45 54 54 |. id;|.WIDGETT|
|00005a50| 59 50 45 20 20 74 79 70 | 65 3b 09 0a 7b 0a 20 20 |YPE typ|e;..{. |
|00005a60| 20 20 73 74 72 75 63 74 | 20 63 68 65 6e 74 72 79 | struct| chentry|
|00005a70| 20 20 2a 63 68 6c 69 73 | 74 3b 0a 20 20 20 20 73 | *chlis|t;. s|
|00005a80| 74 72 75 63 74 20 63 68 | 65 6e 74 72 79 20 20 2a |truct ch|entry *|
|00005a90| 6e 65 77 65 6e 74 72 79 | 3b 0a 20 20 20 20 2f 2a |newentry|;. /*|
|00005aa0| 20 73 65 61 72 63 68 20 | 6c 69 73 74 20 74 6f 20 | search |list to |
|00005ab0| 73 65 65 20 63 68 61 72 | 20 61 6c 72 65 61 64 79 |see char| already|
|00005ac0| 20 65 6e 74 65 72 65 64 | 20 69 6e 20 74 68 65 20 | entered| in the |
|00005ad0| 6c 69 73 74 20 2a 2f 09 | 0a 20 20 20 20 63 68 6c |list */.|. chl|
|00005ae0| 69 73 74 20 3d 20 61 63 | 74 6c 69 73 74 3b 0a 20 |ist = ac|tlist;. |
|00005af0| 20 20 20 69 66 20 28 63 | 68 6c 69 73 74 20 21 3d | if (c|hlist !=|
|00005b00| 20 4e 55 4c 4c 43 48 29 | 20 7b 0a 09 77 68 69 6c | NULLCH)| {..whil|
|00005b10| 65 20 28 63 68 6c 69 73 | 74 20 2d 3e 20 6e 65 78 |e (chlis|t -> nex|
|00005b20| 74 20 21 3d 20 4e 55 4c | 4c 43 48 29 20 0a 09 20 |t != NUL|LCH) .. |
|00005b30| 20 20 69 66 20 28 63 68 | 6c 69 73 74 20 2d 3e 20 | if (ch|list -> |
|00005b40| 63 68 20 3d 3d 20 63 68 | 29 0a 09 09 72 65 74 75 |ch == ch|)...retu|
|00005b50| 72 6e 20 46 41 4c 53 45 | 3b 20 20 20 20 20 20 20 |rn FALSE|; |
|00005b60| 20 20 20 20 2f 2a 20 63 | 68 61 72 20 65 78 69 73 | /* c|har exis|
|00005b70| 74 73 20 3d 3e 20 65 72 | 72 6f 72 20 2a 2f 0a 09 |ts => er|ror */..|
|00005b80| 20 20 20 20 65 6c 73 65 | 0a 09 09 63 68 6c 69 73 | else|...chlis|
|00005b90| 74 20 3d 20 63 68 6c 69 | 73 74 20 2d 3e 20 6e 65 |t = chli|st -> ne|
|00005ba0| 78 74 3b 0a 20 20 20 20 | 09 6e 65 77 65 6e 74 72 |xt;. |.newentr|
|00005bb0| 79 20 3d 20 28 73 74 72 | 75 63 74 20 63 68 65 6e |y = (str|uct chen|
|00005bc0| 74 72 79 2a 29 6d 61 6c | 6c 6f 63 28 28 75 6e 73 |try*)mal|loc((uns|
|00005bd0| 69 67 6e 65 64 29 73 69 | 7a 65 6f 66 28 73 74 72 |igned)si|zeof(str|
|00005be0| 75 63 74 20 63 68 65 6e | 74 72 79 29 29 3b 0a 09 |uct chen|try));..|
|00005bf0| 63 68 6c 69 73 74 20 2d | 3e 20 6e 65 78 74 20 3d |chlist -|> next =|
|00005c00| 20 6e 65 77 65 6e 74 72 | 79 3b 0a 20 20 20 20 7d | newentr|y;. }|
|00005c10| 0a 20 20 20 20 65 6c 73 | 65 20 7b 0a 20 20 20 20 |. els|e {. |
|00005c20| 09 6e 65 77 65 6e 74 72 | 79 20 3d 20 28 73 74 72 |.newentr|y = (str|
|00005c30| 75 63 74 20 63 68 65 6e | 74 72 79 2a 29 6d 61 6c |uct chen|try*)mal|
|00005c40| 6c 6f 63 28 28 75 6e 73 | 69 67 6e 65 64 29 73 69 |loc((uns|igned)si|
|00005c50| 7a 65 6f 66 28 73 74 72 | 75 63 74 20 63 68 65 6e |zeof(str|uct chen|
|00005c60| 74 72 79 29 29 3b 0a 09 | 61 63 74 6c 69 73 74 20 |try));..|actlist |
|00005c70| 3d 20 6e 65 77 65 6e 74 | 72 79 3b 0a 20 20 20 20 |= newent|ry;. |
|00005c80| 7d 0a 20 20 20 20 2f 2a | 20 63 68 61 72 20 6e 6f |}. /*| char no|
|00005c90| 74 20 74 68 65 72 65 20 | 73 6f 20 61 64 64 20 74 |t there |so add t|
|00005ca0| 6f 20 6c 69 73 74 20 2a | 2f 0a 20 20 20 20 6e 65 |o list *|/. ne|
|00005cb0| 77 65 6e 74 72 79 20 2d | 3e 20 63 68 20 3d 20 63 |wentry -|> ch = c|
|00005cc0| 68 3b 0a 20 20 20 20 6e | 65 77 65 6e 74 72 79 20 |h;. n|ewentry |
|00005cd0| 2d 3e 20 69 64 20 3d 20 | 69 64 3b 0a 20 20 20 20 |-> id = |id;. |
|00005ce0| 6e 65 77 65 6e 74 72 79 | 20 2d 3e 20 74 79 70 65 |newentry| -> type|
|00005cf0| 20 3d 20 74 79 70 65 3b | 0a 20 20 20 20 6e 65 77 | = type;|. new|
|00005d00| 65 6e 74 72 79 20 2d 3e | 20 6e 65 78 74 20 3d 20 |entry ->| next = |
|00005d10| 4e 55 4c 4c 43 48 3b 0a | 20 20 20 20 72 65 74 75 |NULLCH;.| retu|
|00005d20| 72 6e 20 54 52 55 45 3b | 0a 7d 0a 0a 0a 57 49 44 |rn TRUE;|.}...WID|
|00005d30| 47 45 54 54 59 50 45 20 | 77 69 64 67 65 74 74 79 |GETTYPE |widgetty|
|00005d40| 70 65 20 28 70 74 72 29 | 0a 2f 2a 20 67 69 76 65 |pe (ptr)|./* give|
|00005d50| 6e 20 61 20 77 69 64 67 | 65 74 20 70 6f 69 6e 74 |n a widg|et point|
|00005d60| 65 72 20 72 65 74 75 72 | 6e 73 20 74 68 65 20 74 |er retur|ns the t|
|00005d70| 79 70 65 20 6f 66 20 77 | 69 64 67 65 74 2e 0a 20 |ype of w|idget.. |
|00005d80| 2a 2f 0a 57 49 44 47 45 | 54 20 20 20 20 70 74 72 |*/.WIDGE|T ptr|
|00005d90| 3b 0a 7b 0a 20 20 20 20 | 73 74 72 75 63 74 20 63 |;.{. |struct c|
|00005da0| 6d 64 77 69 64 20 20 20 | 20 2a 63 6c 69 73 74 3b |mdwid | *clist;|
|00005db0| 0a 20 20 20 20 73 74 72 | 75 63 74 20 74 67 6c 77 |. str|uct tglw|
|00005dc0| 69 64 20 20 20 20 2a 74 | 6c 69 73 74 3b 0a 20 20 |id *t|list;. |
|00005dd0| 20 20 73 74 72 75 63 74 | 20 6c 62 6c 77 69 64 20 | struct| lblwid |
|00005de0| 20 20 20 2a 6c 6c 69 73 | 74 3b 0a 20 20 20 20 73 | *llis|t;. s|
|00005df0| 74 72 75 63 74 20 69 6e | 70 77 69 64 20 20 20 20 |truct in|pwid |
|00005e00| 2a 69 6c 69 73 74 3b 0a | 0a 20 20 20 20 2f 2a 20 |*ilist;.|. /* |
|00005e10| 69 73 20 69 74 20 61 20 | 63 6f 6d 6d 61 6e 64 20 |is it a |command |
|00005e20| 77 69 64 67 65 74 20 3f | 20 2a 2f 0a 20 20 20 20 |widget ?| */. |
|00005e30| 66 6f 72 20 28 63 6c 69 | 73 74 20 3d 20 63 6d 64 |for (cli|st = cmd|
|00005e40| 6c 69 73 74 3b 20 63 6c | 69 73 74 20 21 3d 20 4e |list; cl|ist != N|
|00005e50| 55 4c 4c 43 4d 44 3b 20 | 63 6c 69 73 74 20 3d 20 |ULLCMD; |clist = |
|00005e60| 63 6c 69 73 74 20 2d 3e | 20 6e 65 78 74 29 20 20 |clist ->| next) |
|00005e70| 20 20 20 20 20 0a 20 20 | 20 20 09 69 66 20 28 28 | . | .if ((|
|00005e80| 63 6c 69 73 74 20 21 3d | 20 4e 55 4c 4c 43 4d 44 |clist !=| NULLCMD|
|00005e90| 29 20 26 26 20 28 63 6c | 69 73 74 20 2d 3e 20 69 |) && (cl|ist -> i|
|00005ea0| 64 20 3d 3d 20 70 74 72 | 29 29 0a 20 20 20 20 09 |d == ptr|)). .|
|00005eb0| 09 72 65 74 75 72 6e 20 | 43 4d 44 3b 0a 0a 20 20 |.return |CMD;.. |
|00005ec0| 20 20 2f 2a 20 69 73 20 | 69 74 20 61 20 74 6f 67 | /* is |it a tog|
|00005ed0| 67 6c 65 20 77 69 64 67 | 65 74 20 3f 20 2a 2f 0a |gle widg|et ? */.|
|00005ee0| 20 20 20 20 66 6f 72 20 | 28 74 6c 69 73 74 20 3d | for |(tlist =|
|00005ef0| 20 74 67 6c 6c 69 73 74 | 3b 20 74 6c 69 73 74 20 | tgllist|; tlist |
|00005f00| 21 3d 20 4e 55 4c 4c 54 | 47 4c 3b 20 74 6c 69 73 |!= NULLT|GL; tlis|
|00005f10| 74 20 3d 20 74 6c 69 73 | 74 20 2d 3e 20 6e 65 78 |t = tlis|t -> nex|
|00005f20| 74 29 20 20 20 20 20 20 | 20 0a 20 20 20 20 09 69 |t) | . .i|
|00005f30| 66 20 28 28 74 6c 69 73 | 74 20 21 3d 20 4e 55 4c |f ((tlis|t != NUL|
|00005f40| 4c 54 47 4c 29 20 26 26 | 20 28 74 6c 69 73 74 20 |LTGL) &&| (tlist |
|00005f50| 2d 3e 20 69 64 20 3d 3d | 20 70 74 72 29 29 0a 20 |-> id ==| ptr)). |
|00005f60| 20 20 20 09 09 72 65 74 | 75 72 6e 20 54 47 4c 3b | ..ret|urn TGL;|
|00005f70| 0a 0a 20 20 20 20 2f 2a | 20 69 73 20 69 74 20 61 |.. /*| is it a|
|00005f80| 20 6c 61 62 65 6c 20 77 | 69 64 67 65 74 20 3f 20 | label w|idget ? |
|00005f90| 2a 2f 0a 20 20 20 20 66 | 6f 72 20 28 6c 6c 69 73 |*/. f|or (llis|
|00005fa0| 74 20 3d 20 6c 62 6c 6c | 69 73 74 3b 20 6c 6c 69 |t = lbll|ist; lli|
|00005fb0| 73 74 20 21 3d 20 4e 55 | 4c 4c 4c 42 4c 3b 20 6c |st != NU|LLLBL; l|
|00005fc0| 6c 69 73 74 20 3d 20 6c | 6c 69 73 74 20 2d 3e 20 |list = l|list -> |
|00005fd0| 6e 65 78 74 29 20 20 20 | 20 20 20 20 0a 20 20 20 |next) | . |
|00005fe0| 20 09 69 66 20 28 28 6c | 6c 69 73 74 20 21 3d 20 | .if ((l|list != |
|00005ff0| 4e 55 4c 4c 4c 42 4c 29 | 20 26 26 20 28 6c 6c 69 |NULLLBL)| && (lli|
|00006000| 73 74 20 2d 3e 20 69 64 | 20 3d 3d 20 70 74 72 29 |st -> id| == ptr)|
|00006010| 29 0a 20 20 20 20 09 09 | 72 65 74 75 72 6e 20 4c |). ..|return L|
|00006020| 42 4c 3b 0a 0a 20 20 20 | 20 2f 2a 20 69 73 20 69 |BL;.. | /* is i|
|00006030| 6e 20 61 6e 20 69 6e 70 | 75 74 20 77 69 64 67 65 |n an inp|ut widge|
|00006040| 74 20 3f 20 2a 2f 0a 20 | 20 20 20 66 6f 72 20 28 |t ? */. | for (|
|00006050| 69 6c 69 73 74 20 3d 20 | 69 6e 70 6c 69 73 74 3b |ilist = |inplist;|
|00006060| 20 69 6c 69 73 74 20 21 | 3d 20 4e 55 4c 4c 49 4e | ilist !|= NULLIN|
|00006070| 50 3b 20 69 6c 69 73 74 | 20 3d 20 69 6c 69 73 74 |P; ilist| = ilist|
|00006080| 20 2d 3e 20 6e 65 78 74 | 29 20 20 20 20 20 20 20 | -> next|) |
|00006090| 0a 20 20 20 20 09 69 66 | 20 28 28 69 6c 69 73 74 |. .if| ((ilist|
|000060a0| 20 21 3d 20 4e 55 4c 4c | 49 4e 50 29 20 26 26 20 | != NULL|INP) && |
|000060b0| 28 69 6c 69 73 74 20 2d | 3e 20 69 64 20 3d 3d 20 |(ilist -|> id == |
|000060c0| 70 74 72 29 29 0a 20 20 | 20 20 09 09 72 65 74 75 |ptr)). | ..retu|
|000060d0| 72 6e 20 49 4e 50 3b 0a | 0a 20 20 20 20 2f 2a 20 |rn INP;.|. /* |
|000060e0| 64 6f 65 73 6e 27 74 20 | 65 78 69 73 74 2c 20 72 |doesn't |exist, r|
|000060f0| 65 74 75 72 6e 20 65 72 | 72 6f 72 20 2a 2f 0a 20 |eturn er|ror */. |
|00006100| 20 20 20 72 65 74 75 72 | 6e 20 46 41 4c 53 45 3b | retur|n FALSE;|
|00006110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 0a 7d 0a | | .}.|
|00006120| 0a 62 6f 78 77 69 64 67 | 65 74 20 28 77 69 64 67 |.boxwidg|et (widg|
|00006130| 65 74 2c 20 6c 65 6e 67 | 74 68 29 0a 57 49 4e 44 |et, leng|th).WIND|
|00006140| 4f 57 09 2a 77 69 64 67 | 65 74 3b 0a 69 6e 74 09 |OW.*widg|et;.int.|
|00006150| 6c 65 6e 67 74 68 3b 0a | 7b 0a 20 20 20 20 69 6e |length;.|{. in|
|00006160| 74 20 69 3b 0a 0a 20 20 | 20 20 77 6d 6f 76 65 20 |t i;.. | wmove |
|00006170| 28 77 69 64 67 65 74 2c | 20 30 2c 20 31 29 3b 0a |(widget,| 0, 1);.|
|00006180| 20 20 20 20 66 6f 72 20 | 28 69 3d 31 3b 20 69 20 | for |(i=1; i |
|00006190| 3c 20 6c 65 6e 67 74 68 | 3b 20 69 2b 2b 29 0a 20 |< length|; i++). |
|000061a0| 20 20 20 20 20 20 09 77 | 61 64 64 63 68 20 28 77 | .w|addch (w|
|000061b0| 69 64 67 65 74 2c 20 27 | 2d 27 29 3b 0a 20 20 20 |idget, '|-');. |
|000061c0| 20 77 6d 6f 76 65 20 28 | 77 69 64 67 65 74 2c 20 | wmove (|widget, |
|000061d0| 32 2c 20 31 29 3b 0a 20 | 20 20 20 66 6f 72 20 28 |2, 1);. | for (|
|000061e0| 69 3d 31 3b 20 69 20 3c | 20 6c 65 6e 67 74 68 3b |i=1; i <| length;|
|000061f0| 20 69 2b 2b 29 0a 20 20 | 20 20 20 20 20 09 77 61 | i++). | .wa|
|00006200| 64 64 63 68 20 28 77 69 | 64 67 65 74 2c 20 27 2d |ddch (wi|dget, '-|
|00006210| 27 29 3b 0a 20 20 20 20 | 6d 76 77 61 64 64 63 68 |');. |mvwaddch|
|00006220| 20 28 77 69 64 67 65 74 | 2c 20 31 2c 20 30 2c 20 | (widget|, 1, 0, |
|00006230| 27 7c 27 29 3b 0a 20 20 | 20 20 6d 76 77 61 64 64 |'|');. | mvwadd|
|00006240| 63 68 20 28 77 69 64 67 | 65 74 2c 20 31 2c 20 6c |ch (widg|et, 1, l|
|00006250| 65 6e 67 74 68 2c 20 27 | 7c 27 29 3b 0a 20 20 20 |ength, '||');. |
|00006260| 20 6d 76 77 61 64 64 63 | 68 20 28 77 69 64 67 65 | mvwaddc|h (widge|
|00006270| 74 2c 20 30 2c 20 30 2c | 20 27 2e 27 29 3b 0a 20 |t, 0, 0,| '.');. |
|00006280| 20 20 20 6d 76 77 61 64 | 64 63 68 20 28 77 69 64 | mvwad|dch (wid|
|00006290| 67 65 74 2c 20 30 2c 20 | 6c 65 6e 67 74 68 2c 20 |get, 0, |length, |
|000062a0| 27 2e 27 29 3b 0a 20 20 | 20 20 6d 76 77 61 64 64 |'.');. | mvwadd|
|000062b0| 63 68 20 28 77 69 64 67 | 65 74 2c 20 32 2c 20 30 |ch (widg|et, 2, 0|
|000062c0| 2c 20 27 60 27 29 3b 0a | 20 20 20 20 6d 76 77 61 |, '`');.| mvwa|
|000062d0| 64 64 63 68 20 28 77 69 | 64 67 65 74 2c 20 32 2c |ddch (wi|dget, 2,|
|000062e0| 20 6c 65 6e 67 74 68 2c | 20 27 5c 27 27 29 3b 0a | length,| '\'');.|
|000062f0| 7d 0a 0a 64 72 61 77 63 | 6d 64 77 69 64 67 65 74 |}..drawc|mdwidget|
|00006300| 20 28 77 69 64 67 65 74 | 2c 20 69 6e 66 6f 2c 20 | (widget|, info, |
|00006310| 63 68 2c 20 6c 65 6e 67 | 74 68 2c 20 62 6f 6f 6c |ch, leng|th, bool|
|00006320| 65 61 6e 29 0a 57 49 4e | 44 4f 57 09 2a 77 69 64 |ean).WIN|DOW.*wid|
|00006330| 67 65 74 3b 0a 63 68 61 | 72 09 69 6e 66 6f 5b 5d |get;.cha|r.info[]|
|00006340| 3b 0a 63 68 61 72 09 63 | 68 3b 0a 69 6e 74 09 6c |;.char.c|h;.int.l|
|00006350| 65 6e 67 74 68 3b 0a 69 | 6e 74 09 62 6f 6f 6c 65 |ength;.i|nt.boole|
|00006360| 61 6e 3b 0a 7b 0a 20 20 | 20 20 62 6f 78 77 69 64 |an;.{. | boxwid|
|00006370| 67 65 74 20 28 77 69 64 | 67 65 74 2c 20 6c 65 6e |get (wid|get, len|
|00006380| 67 74 68 2d 31 29 3b 0a | 20 20 20 20 77 6d 6f 76 |gth-1);.| wmov|
|00006390| 65 20 28 77 69 64 67 65 | 74 2c 20 31 2c 20 31 29 |e (widge|t, 1, 1)|
|000063a0| 3b 0a 20 20 20 20 77 73 | 74 61 6e 64 6f 75 74 20 |;. ws|tandout |
|000063b0| 28 77 69 64 67 65 74 29 | 3b 0a 20 20 20 20 77 61 |(widget)|;. wa|
|000063c0| 64 64 63 68 20 28 77 69 | 64 67 65 74 2c 20 63 68 |ddch (wi|dget, ch|
|000063d0| 29 3b 0a 20 20 20 20 69 | 66 20 28 21 62 6f 6f 6c |);. i|f (!bool|
|000063e0| 65 61 6e 29 0a 20 20 20 | 20 20 20 20 20 77 73 74 |ean). | wst|
|000063f0| 61 6e 64 65 6e 64 20 28 | 77 69 64 67 65 74 29 3b |andend (|widget);|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.