home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume4 / curses-widgets < prev    next >
SHell self-extracting ARchive  |  1989-02-03  |  56.2 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C source text default
98% file makefile script text default
97% file C source, ASCII text, with very long lines (511) default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 78 61 | 6e 74 68 21 6e 69 63 2e |Path: xa|nth!nic.|
|00000010| 4d 52 2e 4e 45 54 21 68 | 61 6c 21 6e 63 6f 61 73 |MR.NET!h|al!ncoas|
|00000020| 74 21 61 6c 6c 62 65 72 | 79 0a 46 72 6f 6d 3a 20 |t!allber|y.From: |
|00000030| 72 61 63 40 67 65 63 2d | 72 6c 2d 68 72 63 2e 63 |rac@gec-|rl-hrc.c|
|00000040| 6f 2e 75 6b 20 28 72 61 | 63 29 0a 4e 65 77 73 67 |o.uk (ra|c).Newsg|
|00000050| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 73 6f 75 72 |roups: c|omp.sour|
|00000060| 63 65 73 2e 6d 69 73 63 | 0a 53 75 62 6a 65 63 74 |ces.misc|.Subject|
|00000070| 3a 20 76 30 34 69 31 33 | 31 3a 20 63 75 72 73 65 |: v04i13|1: curse|
|00000080| 73 2d 62 61 73 65 64 20 | 77 69 64 67 65 74 20 6c |s-based |widget l|
|00000090| 69 62 72 61 72 79 20 61 | 6e 64 20 64 65 6d 2e 0a |ibrary a|nd dem..|
|000000a0| 4b 65 79 77 6f 72 64 73 | 3a 20 63 75 72 73 65 73 |Keywords|: curses|
|000000b0| 2c 20 77 69 64 67 65 74 | 2e 0a 4d 65 73 73 61 67 |, widget|..Messag|
|000000c0| 65 2d 49 44 3a 20 3c 35 | 33 37 40 68 72 63 36 33 |e-ID: <5|37@hrc63|
|000000d0| 2e 63 6f 2e 75 6b 3e 0a | 44 61 74 65 3a 20 32 32 |.co.uk>.|Date: 22|
|000000e0| 20 4f 63 74 20 38 38 20 | 30 31 3a 33 31 3a 32 31 | Oct 88 |01:31:21|
|000000f0| 20 47 4d 54 0a 53 65 6e | 64 65 72 3a 20 61 6c 6c | GMT.Sen|der: all|
|00000100| 62 65 72 79 40 6e 63 6f | 61 73 74 2e 55 55 43 50 |bery@nco|ast.UUCP|
|00000110| 0a 52 65 70 6c 79 2d 54 | 6f 3a 20 72 61 63 40 67 |.Reply-T|o: rac@g|
|00000120| 65 63 2d 72 6c 2d 68 72 | 63 2e 63 6f 2e 75 6b 20 |ec-rl-hr|c.co.uk |
|00000130| 28 72 61 63 29 0a 4f 72 | 67 61 6e 69 7a 61 74 69 |(rac).Or|ganizati|
|00000140| 6f 6e 3a 20 47 45 43 20 | 48 69 72 73 74 20 52 65 |on: GEC |Hirst Re|
|00000150| 73 65 61 72 63 68 20 43 | 65 6e 74 72 65 2c 20 57 |search C|entre, W|
|00000160| 65 6d 62 6c 65 79 2c 20 | 45 6e 67 6c 61 6e 64 2e |embley, |England.|
|00000170| 0a 4c 69 6e 65 73 3a 20 | 32 31 32 39 0a 41 70 70 |.Lines: |2129.App|
|00000180| 72 6f 76 65 64 3a 20 61 | 6c 6c 62 65 72 79 40 6e |roved: a|llbery@n|
|00000190| 63 6f 61 73 74 2e 55 55 | 43 50 0a 0a 50 6f 73 74 |coast.UU|CP..Post|
|000001a0| 69 6e 67 2d 6e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-numb|er: Volu|
|000001b0| 6d 65 20 34 2c 20 49 73 | 73 75 65 20 31 33 31 0a |me 4, Is|sue 131.|
|000001c0| 53 75 62 6d 69 74 74 65 | 64 2d 62 79 3a 20 22 72 |Submitte|d-by: "r|
|000001d0| 61 63 22 20 3c 72 61 63 | 40 67 65 63 2d 72 6c 2d |ac" <rac|@gec-rl-|
|000001e0| 68 72 63 2e 63 6f 2e 75 | 6b 3e 0a 41 72 63 68 69 |hrc.co.u|k>.Archi|
|000001f0| 76 65 2d 6e 61 6d 65 3a | 20 63 75 72 73 65 73 2d |ve-name:| curses-|
|00000200| 77 69 64 67 65 74 73 0a | 0a 2d 2d 2d 2d 2d 2d 2d |widgets.|.-------|
|00000210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000220| 2d 2d 2d 2d 20 43 55 54 | 20 48 45 52 45 20 2d 2d |---- CUT| HERE --|
|00000230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 23 21 20 |--------|----.#! |
|00000250| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000260| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000270| 65 2e 20 54 6f 20 65 78 | 74 72 61 63 74 20 74 68 |e. To ex|tract th|
|00000280| 65 20 66 69 6c 65 73 20 | 74 79 70 65 20 27 73 68 |e files |type 'sh|
|00000290| 20 66 69 6c 65 27 0a 23 | 20 54 68 69 73 20 61 72 | file'.#| This ar|
|000002a0| 63 68 69 76 65 20 63 72 | 65 61 74 65 64 20 6f 6e |chive cr|eated on|
|000002b0| 20 46 72 69 20 4f 63 74 | 20 31 34 20 31 33 3a 32 | Fri Oct| 14 13:2|
|000002c0| 38 3a 35 31 20 42 53 54 | 20 31 39 38 38 0a 0a 65 |8:51 BST| 1988..e|
|000002d0| 78 70 6f 72 74 20 50 41 | 54 48 3b 20 50 41 54 48 |xport PA|TH; PATH|
|000002e0| 3d 2f 62 69 6e 3a 24 50 | 41 54 48 0a 65 63 68 6f |=/bin:$P|ATH.echo|
|000002f0| 20 27 53 68 61 72 3a 20 | 65 78 74 72 61 63 74 69 | 'Shar: |extracti|
|00000300| 6e 67 20 27 52 45 41 44 | 4d 45 27 20 28 20 31 39 |ng 'READ|ME' ( 19|
|00000310| 37 34 20 63 68 61 72 61 | 63 74 65 72 73 29 27 0a |74 chara|cters)'.|
|00000320| 69 66 20 74 65 73 74 20 | 2d 66 20 27 52 45 41 44 |if test |-f 'READ|
|00000330| 4d 45 27 0a 74 68 65 6e | 0a 20 20 20 20 65 63 68 |ME'.then|. ech|
|00000340| 6f 20 22 53 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |o "Shar:| will no|
|00000350| 74 20 6f 76 65 72 77 72 | 69 74 65 20 65 78 69 73 |t overwr|ite exis|
|00000360| 74 69 6e 67 20 66 69 6c | 65 20 27 52 45 41 44 4d |ting fil|e 'READM|
|00000370| 45 27 22 0a 65 6c 73 65 | 0a 20 20 20 20 63 61 74 |E'".else|. cat|
|00000380| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00000390| 27 52 45 41 44 4d 45 27 | 0a 2f 2a 2a 2a 2a 2a 2a |'README'|./******|
|000003a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000003e0| 2a 2a 2a 2a 2a 2a 2a 0a | 2f 2a 20 20 46 49 4c 45 |*******.|/* FILE|
|000003f0| 3a 09 09 52 45 41 44 4d | 45 0a 2f 2a 20 20 44 41 |:..READM|E./* DA|
|00000400| 54 45 3a 09 09 41 75 67 | 75 73 74 20 31 39 38 38 |TE:..Aug|ust 1988|
|00000410| 2e 0a 2f 2a 20 20 41 55 | 54 48 4f 52 3a 09 09 52 |../* AU|THOR:..R|
|00000420| 69 63 68 61 72 64 20 41 | 2e 20 43 75 6c 73 68 61 |ichard A|. Culsha|
|00000430| 77 2e 0a 2f 2a 20 44 49 | 53 43 4c 41 49 4d 45 52 |w../* DI|SCLAIMER|
|00000440| 3a 09 09 54 68 69 73 20 | 66 69 6c 65 20 69 73 20 |:..This |file is |
|00000450| 64 65 65 6d 65 64 20 74 | 6f 20 62 65 20 70 75 62 |deemed t|o be pub|
|00000460| 6c 69 63 2d 64 6f 6d 61 | 69 6e 2c 20 6f 6e 20 74 |lic-doma|in, on t|
|00000470| 68 65 20 73 69 6d 70 6c | 65 0a 2f 2a 09 09 09 70 |he simpl|e./*...p|
|00000480| 72 6f 76 69 73 6f 73 20 | 74 68 61 74 20 74 68 69 |rovisos |that thi|
|00000490| 73 20 73 65 63 74 69 6f | 6e 20 72 65 6d 61 69 6e |s sectio|n remain|
|000004a0| 73 20 69 6e 20 74 68 69 | 73 20 66 69 6c 65 20 61 |s in thi|s file a|
|000004b0| 6e 64 0a 2f 2a 09 09 09 | 74 68 61 74 20 63 6f 64 |nd./*...|that cod|
|000004c0| 65 20 75 73 69 6e 67 20 | 69 74 20 64 6f 20 6e 6f |e using |it do no|
|000004d0| 74 20 64 6f 20 73 6f 20 | 66 6f 72 20 6d 6f 6e 65 |t do so |for mone|
|000004e0| 74 61 72 79 20 67 61 69 | 6e 2e 0a 2f 2a 09 09 09 |tary gai|n../*...|
|000004f0| 4e 65 69 74 68 65 72 20 | 74 68 65 20 61 75 74 68 |Neither |the auth|
|00000500| 6f 72 2c 20 6e 6f 72 20 | 74 68 65 20 61 75 74 68 |or, nor |the auth|
|00000510| 6f 72 73 20 65 6d 70 6c | 6f 79 65 65 73 20 61 74 |ors empl|oyees at|
|00000520| 20 74 68 65 0a 2f 2a 09 | 09 09 74 69 6d 65 20 6f | the./*.|..time o|
|00000530| 66 20 64 65 76 65 6c 6f | 70 69 6e 67 20 74 68 69 |f develo|ping thi|
|00000540| 73 20 63 6f 64 65 2c 20 | 61 63 63 65 70 74 20 61 |s code, |accept a|
|00000550| 6e 79 20 6c 69 61 62 69 | 6c 69 74 79 20 6f 72 0a |ny liabi|lity or.|
|00000560| 2f 2a 09 09 09 72 65 73 | 70 6f 6e 73 69 62 69 6c |/*...res|ponsibil|
|00000570| 69 74 79 20 66 6f 72 20 | 74 68 65 20 75 73 65 2c |ity for |the use,|
|00000580| 20 61 62 75 73 65 20 6f | 72 20 6d 69 73 75 73 65 | abuse o|r misuse|
|00000590| 20 6f 66 20 74 68 69 73 | 0a 2f 2a 09 09 09 63 6f | of this|./*...co|
|000005a0| 64 65 2e 0a 2f 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |de../***|********|
|000005b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005e0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000005f0| 2a 2a 2f 0a 0a 09 57 69 | 64 67 65 74 6c 69 62 20 |**/...Wi|dgetlib |
|00000600| 69 73 20 61 20 73 74 61 | 6e 64 61 72 64 20 43 20 |is a sta|ndard C |
|00000610| 6c 69 62 72 61 72 79 20 | 77 68 69 63 68 20 61 6c |library |which al|
|00000620| 6c 6f 77 73 20 74 68 65 | 20 75 73 65 72 20 74 6f |lows the| user to|
|00000630| 20 64 65 66 69 6e 65 0a | 61 6e 64 20 69 6e 74 65 | define.|and inte|
|00000640| 72 61 63 74 20 77 69 74 | 68 20 77 69 64 67 65 74 |ract wit|h widget|
|00000650| 73 20 28 77 69 6e 64 6f | 77 20 67 61 64 67 65 74 |s (windo|w gadget|
|00000660| 29 2e 20 54 68 65 20 66 | 69 6c 65 73 20 70 72 6f |). The f|iles pro|
|00000670| 76 69 64 65 64 20 61 72 | 65 3a 0a 0a 2d 72 77 2d |vided ar|e:..-rw-|
|00000680| 72 2d 2d 72 2d 2d 20 20 | 20 31 20 70 6a 73 20 20 |r--r-- | 1 pjs |
|00000690| 20 20 20 20 6e 65 74 20 | 20 20 20 20 20 20 20 20 | net | |
|000006a0| 31 39 36 30 20 4f 63 74 | 20 31 34 20 31 33 3a 32 |1960 Oct| 14 13:2|
|000006b0| 35 20 52 45 41 44 4d 45 | 0a 2d 72 77 2d 72 2d 2d |5 README|.-rw-r--|
|000006c0| 72 2d 2d 20 20 20 31 20 | 70 6a 73 20 20 20 20 20 |r-- 1 |pjs |
|000006d0| 20 6e 65 74 20 20 20 20 | 20 20 20 20 20 31 31 34 | net | 114|
|000006e0| 34 20 4f 63 74 20 31 34 | 20 31 33 3a 32 33 20 6d |4 Oct 14| 13:23 m|
|000006f0| 61 6b 65 66 69 6c 65 0a | 2d 72 77 2d 72 2d 2d 72 |akefile.|-rw-r--r|
|00000700| 2d 2d 20 20 20 31 20 70 | 6a 73 20 20 20 20 20 20 |-- 1 p|js |
|00000710| 6e 65 74 20 20 20 20 20 | 20 20 20 20 32 37 35 32 |net | 2752|
|00000720| 20 4f 63 74 20 31 34 20 | 31 33 3a 31 35 20 77 69 | Oct 14 |13:15 wi|
|00000730| 64 67 65 74 2e 68 0a 2d | 72 77 2d 72 2d 2d 72 2d |dget.h.-|rw-r--r-|
|00000740| 2d 20 20 20 31 20 70 6a | 73 20 20 20 20 20 20 6e |- 1 pj|s n|
|00000750| 65 74 20 20 20 20 20 20 | 20 20 31 30 39 34 36 20 |et | 10946 |
|00000760| 4f 63 74 20 31 34 20 31 | 32 3a 31 38 20 77 69 64 |Oct 14 1|2:18 wid|
|00000770| 67 65 74 2e 6d 73 0a 2d | 72 77 2d 72 2d 2d 72 2d |get.ms.-|rw-r--r-|
|00000780| 2d 20 20 20 31 20 70 6a | 73 20 20 20 20 20 20 6e |- 1 pj|s n|
|00000790| 65 74 20 20 20 20 20 20 | 20 20 33 34 38 31 37 20 |et | 34817 |
|000007a0| 4f 63 74 20 31 34 20 31 | 33 3a 31 35 20 77 69 64 |Oct 14 1|3:15 wid|
|000007b0| 67 65 74 6c 69 62 2e 63 | 0a 2d 72 77 2d 72 2d 2d |getlib.c|.-rw-r--|
|000007c0| 72 2d 2d 20 20 20 31 20 | 70 6a 73 20 20 20 20 20 |r-- 1 |pjs |
|000007d0| 20 6e 65 74 20 20 20 20 | 20 20 20 20 20 33 32 31 | net | 321|
|000007e0| 38 20 4f 63 74 20 31 34 | 20 31 33 3a 31 34 20 77 |8 Oct 14| 13:14 w|
|000007f0| 70 61 67 65 2e 63 0a 0a | 31 29 20 77 69 64 67 65 |page.c..|1) widge|
|00000800| 74 6c 69 62 2e 63 20 20 | 20 20 20 20 20 28 74 68 |tlib.c | (th|
|00000810| 65 20 61 63 74 75 61 6c | 20 63 6f 64 65 29 0a 32 |e actual| code).2|
|00000820| 29 20 77 69 64 67 65 74 | 2e 68 09 20 20 20 20 20 |) widget|.h. |
|00000830| 28 74 68 65 20 68 65 61 | 64 65 72 20 66 69 6c 65 |(the hea|der file|
|00000840| 20 77 68 69 63 68 20 69 | 73 20 6e 65 65 64 65 64 | which i|s needed|
|00000850| 20 69 6e 20 70 72 6f 67 | 72 61 6d 73 20 69 6e 74 | in prog|rams int|
|00000860| 65 6e 64 69 6e 67 0a 09 | 09 20 20 20 20 20 20 74 |ending..|. t|
|00000870| 6f 20 69 6e 63 6f 72 70 | 6f 72 61 74 65 20 74 68 |o incorp|orate th|
|00000880| 65 20 6c 69 62 72 61 72 | 79 29 0a 33 29 20 77 69 |e librar|y).3) wi|
|00000890| 64 67 65 74 2e 6d 73 09 | 20 20 20 20 20 28 61 6e |dget.ms.| (an|
|000008a0| 20 65 78 70 6c 61 6e 61 | 74 69 6f 6e 20 6f 66 20 | explana|tion of |
|000008b0| 74 68 65 20 6c 69 62 72 | 61 72 79 20 61 6e 64 20 |the libr|ary and |
|000008c0| 68 6f 77 20 74 6f 20 75 | 73 65 20 69 74 29 0a 34 |how to u|se it).4|
|000008d0| 29 20 77 70 61 67 65 2e | 63 09 20 20 20 20 20 28 |) wpage.|c. (|
|000008e0| 61 20 6c 69 74 74 6c 65 | 20 65 78 61 6d 70 6c 65 |a little| example|
|000008f0| 20 6f 66 20 74 68 65 20 | 6c 69 62 72 61 72 79 20 | of the |library |
|00000900| 69 6e 20 75 73 65 29 0a | 35 29 20 6d 61 6b 65 66 |in use).|5) makef|
|00000910| 69 6c 65 20 20 20 20 20 | 20 20 20 20 20 28 63 6f |ile | (co|
|00000920| 6d 70 69 6c 65 73 20 65 | 76 65 72 79 74 68 69 6e |mpiles e|verythin|
|00000930| 67 20 74 6f 67 65 74 68 | 65 72 29 0a 0a 43 6f 6d |g togeth|er)..Com|
|00000940| 70 69 6c 69 6e 67 20 74 | 68 69 6e 67 73 0a 3d 3d |piling t|hings.==|
|00000950| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 0a 0a |========|======..|
|00000960| 54 79 70 65 20 27 6d 61 | 6b 65 27 20 77 69 74 68 |Type 'ma|ke' with|
|00000970| 69 6e 20 74 68 65 20 64 | 69 72 65 63 74 6f 72 79 |in the d|irectory|
|00000980| 20 77 68 69 63 68 20 63 | 6f 6e 74 61 69 6e 73 20 | which c|ontains |
|00000990| 74 68 65 20 66 69 6c 65 | 73 2e 0a 54 68 69 73 20 |the file|s..This |
|000009a0| 63 72 65 61 74 65 73 20 | 61 20 6c 6f 63 61 6c 20 |creates |a local |
|000009b0| 6c 69 62 72 61 72 79 20 | 77 69 74 68 69 6e 20 74 |library |within t|
|000009c0| 68 65 20 64 69 72 65 63 | 74 6f 72 79 2c 20 61 6e |he direc|tory, an|
|000009d0| 64 20 63 72 65 61 74 65 | 73 20 74 68 65 20 0a 65 |d create|s the .e|
|000009e0| 78 65 63 75 74 61 62 6c | 65 20 27 77 70 61 67 65 |xecutabl|e 'wpage|
|000009f0| 27 20 28 61 20 64 65 6d | 6f 20 66 6f 72 20 79 6f |' (a dem|o for yo|
|00000a00| 75 20 74 6f 20 70 6c 61 | 79 20 77 69 74 68 29 2e |u to pla|y with).|
|00000a10| 0a 0a 46 6f 72 20 67 65 | 6e 65 72 61 6c 20 75 73 |..For ge|neral us|
|00000a20| 65 20 27 77 69 64 67 65 | 74 2e 68 27 20 6d 75 73 |e 'widge|t.h' mus|
|00000a30| 74 20 62 65 20 70 6c 61 | 63 65 64 20 69 6e 20 74 |t be pla|ced in t|
|00000a40| 68 65 20 73 74 61 6e 64 | 61 72 64 20 69 6e 63 6c |he stand|ard incl|
|00000a50| 75 64 65 20 64 69 72 65 | 63 74 6f 72 79 0a 61 6e |ude dire|ctory.an|
|00000a60| 64 20 74 68 65 20 6c 69 | 62 72 61 72 79 20 27 77 |d the li|brary 'w|
|00000a70| 69 64 67 65 74 6c 69 62 | 2e 61 27 20 6d 75 73 74 |idgetlib|.a' must|
|00000a80| 20 67 6f 20 69 6e 20 61 | 20 67 6c 6f 62 61 6c 6c | go in a| globall|
|00000a90| 79 20 61 63 63 65 73 73 | 61 62 6c 65 20 70 6c 61 |y access|able pla|
|00000aa0| 63 65 20 73 75 63 68 0a | 61 73 20 2f 75 73 72 2f |ce such.|as /usr/|
|00000ab0| 6c 69 62 2e 0a 0a 50 72 | 69 6e 74 69 6e 67 20 64 |lib...Pr|inting d|
|00000ac0| 6f 63 0a 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 0a |oc.=====|=======.|
|00000ad0| 0a 27 77 69 64 67 65 74 | 2e 6d 73 27 20 77 61 73 |.'widget|.ms' was|
|00000ae0| 20 63 72 65 61 74 65 64 | 20 75 73 69 6e 67 20 74 | created| using t|
|00000af0| 68 65 20 6d 73 20 6d 61 | 63 72 6f 73 20 61 6e 64 |he ms ma|cros and|
|00000b00| 20 63 61 6e 20 70 72 69 | 6e 74 65 64 20 75 73 69 | can pri|nted usi|
|00000b10| 6e 67 20 73 6f 6d 65 74 | 68 69 6e 67 20 6c 69 6b |ng somet|hing lik|
|00000b20| 65 0a 27 6e 72 6f 66 66 | 20 2d 6d 73 20 77 69 64 |e.'nroff| -ms wid|
|00000b30| 67 65 74 2e 6d 73 27 0a | 0a 0a 48 61 76 65 20 66 |get.ms'.|..Have f|
|00000b40| 75 6e 2e 20 52 69 63 68 | 61 72 64 20 43 2e 0a 53 |un. Rich|ard C..S|
|00000b50| 48 41 52 5f 45 4f 46 0a | 69 66 20 74 65 73 74 20 |HAR_EOF.|if test |
|00000b60| 31 39 37 34 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |1974 -ne| `wc -c |
|00000b70| 3c 20 27 52 45 41 44 4d | 45 27 60 0a 74 68 65 6e |< 'READM|E'`.then|
|00000b80| 0a 20 20 20 20 65 63 68 | 6f 20 27 53 68 61 72 3a |. ech|o 'Shar:|
|00000b90| 20 65 72 72 6f 72 20 74 | 72 61 6e 73 6d 69 74 74 | error t|ransmitt|
|00000ba0| 69 6e 67 20 27 52 45 41 | 44 4d 45 27 20 28 73 68 |ing 'REA|DME' (sh|
|00000bb0| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 20 |ould hav|e been |
|00000bc0| 31 39 37 34 20 63 68 61 | 72 63 61 74 65 72 73 29 |1974 cha|rcaters)|
|00000bd0| 27 0a 66 69 0a 66 69 0a | 65 63 68 6f 20 27 53 68 |'.fi.fi.|echo 'Sh|
|00000be0| 61 72 3a 20 65 78 74 72 | 61 63 74 69 6e 67 20 27 |ar: extr|acting '|
|00000bf0| 6d 61 6b 65 66 69 6c 65 | 27 20 28 20 31 31 34 34 |makefile|' ( 1144|
|00000c00| 20 63 68 61 72 61 63 74 | 65 72 73 29 27 0a 69 66 | charact|ers)'.if|
|00000c10| 20 74 65 73 74 20 2d 66 | 20 27 6d 61 6b 65 66 69 | test -f| 'makefi|
|00000c20| 6c 65 27 0a 74 68 65 6e | 0a 20 20 20 20 65 63 68 |le'.then|. ech|
|00000c30| 6f 20 22 53 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |o "Shar:| will no|
|00000c40| 74 20 6f 76 65 72 77 72 | 69 74 65 20 65 78 69 73 |t overwr|ite exis|
|00000c50| 74 69 6e 67 20 66 69 6c | 65 20 27 6d 61 6b 65 66 |ting fil|e 'makef|
|00000c60| 69 6c 65 27 22 0a 65 6c | 73 65 0a 20 20 20 20 63 |ile'".el|se. c|
|00000c70| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|00000c80| 3e 20 27 6d 61 6b 65 66 | 69 6c 65 27 0a 2f 2a 2a |> 'makef|ile'./**|
|00000c90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ca0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cd0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 0a 2f 2a 20 20 |********|***./* |
|00000ce0| 46 49 4c 45 3a 09 09 6d | 61 6b 65 66 69 6c 65 0a |FILE:..m|akefile.|
|00000cf0| 2f 2a 20 20 44 41 54 45 | 3a 09 09 41 75 67 75 73 |/* DATE|:..Augus|
|00000d00| 74 20 31 39 38 38 2e 0a | 2f 2a 20 20 41 55 54 48 |t 1988..|/* AUTH|
|00000d10| 4f 52 3a 09 09 52 69 63 | 68 61 72 64 20 41 2e 20 |OR:..Ric|hard A. |
|00000d20| 43 75 6c 73 68 61 77 2e | 0a 2f 2a 20 44 49 53 43 |Culshaw.|./* DISC|
|00000d30| 4c 41 49 4d 45 52 3a 09 | 09 54 68 69 73 20 66 69 |LAIMER:.|.This fi|
|00000d40| 6c 65 20 69 73 20 64 65 | 65 6d 65 64 20 74 6f 20 |le is de|emed to |
|00000d50| 62 65 20 70 75 62 6c 69 | 63 2d 64 6f 6d 61 69 6e |be publi|c-domain|
|00000d60| 2c 20 6f 6e 20 74 68 65 | 20 73 69 6d 70 6c 65 0a |, on the| simple.|
|00000d70| 2f 2a 09 09 09 70 72 6f | 76 69 73 6f 73 20 74 68 |/*...pro|visos th|
|00000d80| 61 74 20 74 68 69 73 20 | 73 65 63 74 69 6f 6e 20 |at this |section |
|00000d90| 72 65 6d 61 69 6e 73 20 | 69 6e 20 74 68 69 73 20 |remains |in this |
|00000da0| 66 69 6c 65 20 61 6e 64 | 0a 2f 2a 09 09 09 74 68 |file and|./*...th|
|00000db0| 61 74 20 63 6f 64 65 20 | 75 73 69 6e 67 20 69 74 |at code |using it|
|00000dc0| 20 64 6f 20 6e 6f 74 20 | 64 6f 20 73 6f 20 66 6f | do not |do so fo|
|00000dd0| 72 20 6d 6f 6e 65 74 61 | 72 79 20 67 61 69 6e 2e |r moneta|ry gain.|
|00000de0| 0a 2f 2a 09 09 09 4e 65 | 69 74 68 65 72 20 74 68 |./*...Ne|ither th|
|00000df0| 65 20 61 75 74 68 6f 72 | 2c 20 6e 6f 72 20 74 68 |e author|, nor th|
|00000e00| 65 20 61 75 74 68 6f 72 | 73 20 65 6d 70 6c 6f 79 |e author|s employ|
|00000e10| 65 65 73 20 61 74 20 74 | 68 65 0a 2f 2a 09 09 09 |ees at t|he./*...|
|00000e20| 74 69 6d 65 20 6f 66 20 | 64 65 76 65 6c 6f 70 69 |time of |developi|
|00000e30| 6e 67 20 74 68 69 73 20 | 63 6f 64 65 2c 20 61 63 |ng this |code, ac|
|00000e40| 63 65 70 74 20 61 6e 79 | 20 6c 69 61 62 69 6c 69 |cept any| liabili|
|00000e50| 74 79 20 6f 72 0a 2f 2a | 09 09 09 72 65 73 70 6f |ty or./*|...respo|
|00000e60| 6e 73 69 62 69 6c 69 74 | 79 20 66 6f 72 20 74 68 |nsibilit|y for th|
|00000e70| 65 20 75 73 65 2c 20 61 | 62 75 73 65 20 6f 72 20 |e use, a|buse or |
|00000e80| 6d 69 73 75 73 65 20 6f | 66 20 74 68 69 73 0a 2f |misuse o|f this./|
|00000e90| 2a 09 09 09 63 6f 64 65 | 2e 0a 2f 2a 2a 2a 2a 2a |*...code|../*****|
|00000ea0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000eb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ec0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ed0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ee0| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0a 0a 23 20 55 73 65 |********|/..# Use|
|00000ef0| 20 2d 67 20 69 66 20 79 | 6f 75 20 77 61 6e 74 20 | -g if y|ou want |
|00000f00| 6c 61 72 67 65 2c 20 62 | 75 74 20 73 64 62 2d 2c |large, b|ut sdb-,|
|00000f10| 67 64 62 2d 2c 64 62 78 | 2d 61 62 6c 65 20 6f 62 |gdb-,dbx|-able ob|
|00000f20| 6a 65 63 74 73 2e 0a 4f | 50 54 49 4f 4e 53 3d 20 |jects..O|PTIONS= |
|00000f30| 2d 4f 0a 0a 23 20 42 53 | 44 20 73 79 73 74 65 6d |-O..# BS|D system|
|00000f40| 73 2c 20 69 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |s, in pa|rticular|
|00000f50| 2c 20 77 69 6c 6c 20 77 | 61 6e 74 20 2d 6c 63 75 |, will w|ant -lcu|
|00000f60| 72 73 65 73 20 2d 6c 74 | 65 72 6d 63 61 70 2e 0a |rses -lt|ermcap..|
|00000f70| 43 55 52 53 45 53 3d 20 | 20 2d 6c 63 75 72 73 65 |CURSES= | -lcurse|
|00000f80| 73 0a 0a 23 20 53 59 53 | 35 20 73 79 73 74 65 6d |s..# SYS|5 system|
|00000f90| 73 2c 20 69 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |s, in pa|rticular|
|00000fa0| 2c 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 72 61 |, do not| have ra|
|00000fb0| 6e 6c 69 62 28 31 29 20 | 66 6f 72 20 74 68 65 69 |nlib(1) |for thei|
|00000fc0| 72 20 6c 69 62 72 61 72 | 69 65 73 2e 0a 23 20 53 |r librar|ies..# S|
|00000fd0| 6f 20 64 65 66 69 6e 65 | 20 74 68 69 73 20 61 73 |o define| this as|
|00000fe0| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 74 |, for ex|ample, t|
|00000ff0| 6f 75 63 68 2c 20 69 66 | 20 79 6f 75 20 64 6f 6e |ouch, if| you don|
|00001000| 27 74 20 68 61 76 65 20 | 72 61 6e 6c 69 62 2e 0a |'t have |ranlib..|
|00001010| 52 41 4e 4c 49 42 3d 20 | 74 6f 75 63 68 0a 0a 57 |RANLIB= |touch..W|
|00001020| 44 47 54 4c 49 42 3d 20 | 77 69 64 67 65 74 6c 69 |DGTLIB= |widgetli|
|00001030| 62 2e 61 0a 0a 61 6c 6c | 3a 20 77 70 61 67 65 0a |b.a..all|: wpage.|
|00001040| 0a 77 69 64 67 65 74 6c | 69 62 2e 61 3a 20 77 69 |.widgetl|ib.a: wi|
|00001050| 64 67 65 74 6c 69 62 2e | 6f 20 77 69 64 67 65 74 |dgetlib.|o widget|
|00001060| 2e 68 0a 09 61 72 20 63 | 72 76 20 24 40 20 77 69 |.h..ar c|rv $@ wi|
|00001070| 64 67 65 74 6c 69 62 2e | 6f 0a 09 24 7b 52 41 4e |dgetlib.|o..${RAN|
|00001080| 4c 49 42 7d 20 24 40 0a | 09 72 6d 20 2d 66 20 77 |LIB} $@.|.rm -f w|
|00001090| 69 64 67 65 74 6c 69 62 | 2e 6f 0a 0a 77 70 61 67 |idgetlib|.o..wpag|
|000010a0| 65 3a 20 77 69 64 67 65 | 74 6c 69 62 2e 61 20 77 |e: widge|tlib.a w|
|000010b0| 70 61 67 65 2e 6f 0a 09 | 63 63 20 24 7b 4f 50 54 |page.o..|cc ${OPT|
|000010c0| 49 4f 4e 7d 20 2d 6f 20 | 24 40 20 77 70 61 67 65 |ION} -o |$@ wpage|
|000010d0| 2e 6f 20 24 7b 57 44 47 | 54 4c 49 42 7d 20 24 7b |.o ${WDG|TLIB} ${|
|000010e0| 43 55 52 53 45 53 7d 0a | 0a 63 6c 65 61 6e 3a 0a |CURSES}.|.clean:.|
|000010f0| 09 72 6d 20 2d 66 20 77 | 70 61 67 65 20 2a 2e 6f |.rm -f w|page *.o|
|00001100| 20 2a 2e 61 0a 53 48 41 | 52 5f 45 4f 46 0a 69 66 | *.a.SHA|R_EOF.if|
|00001110| 20 74 65 73 74 20 31 31 | 34 34 20 2d 6e 65 20 60 | test 11|44 -ne `|
|00001120| 77 63 20 2d 63 20 3c 20 | 27 6d 61 6b 65 66 69 6c |wc -c < |'makefil|
|00001130| 65 27 60 0a 74 68 65 6e | 0a 20 20 20 20 65 63 68 |e'`.then|. ech|
|00001140| 6f 20 27 53 68 61 72 3a | 20 65 72 72 6f 72 20 74 |o 'Shar:| error t|
|00001150| 72 61 6e 73 6d 69 74 74 | 69 6e 67 20 27 6d 61 6b |ransmitt|ing 'mak|
|00001160| 65 66 69 6c 65 27 20 28 | 73 68 6f 75 6c 64 20 68 |efile' (|should h|
|00001170| 61 76 65 20 62 65 65 6e | 20 20 31 31 34 34 20 63 |ave been| 1144 c|
|00001180| 68 61 72 63 61 74 65 72 | 73 29 27 0a 66 69 0a 66 |harcater|s)'.fi.f|
|00001190| 69 0a 65 63 68 6f 20 27 | 53 68 61 72 3a 20 65 78 |i.echo '|Shar: ex|
|000011a0| 74 72 61 63 74 69 6e 67 | 20 27 77 69 64 67 65 74 |tracting| 'widget|
|000011b0| 2e 68 27 20 28 20 32 37 | 35 32 20 63 68 61 72 61 |.h' ( 27|52 chara|
|000011c0| 63 74 65 72 73 29 27 0a | 69 66 20 74 65 73 74 20 |cters)'.|if test |
|000011d0| 2d 66 20 27 77 69 64 67 | 65 74 2e 68 27 0a 74 68 |-f 'widg|et.h'.th|
|000011e0| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 22 53 68 61 |en. e|cho "Sha|
|000011f0| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00001200| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 20 66 |write ex|isting f|
|00001210| 69 6c 65 20 27 77 69 64 | 67 65 74 2e 68 27 22 0a |ile 'wid|get.h'".|
|00001220| 65 6c 73 65 0a 20 20 20 | 20 63 61 74 20 3c 3c 20 |else. | cat << |
|00001230| 5c 53 48 41 52 5f 45 4f | 46 20 3e 20 27 77 69 64 |\SHAR_EO|F > 'wid|
|00001240| 67 65 74 2e 68 27 0a 2f | 2a 2a 2a 2a 2a 2a 2a 2a |get.h'./|********|
|00001250| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001260| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001270| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001280| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001290| 2a 2a 2a 2a 2a 0a 2f 2a | 20 20 46 49 4c 45 3a 09 |*****./*| FILE:.|
|000012a0| 09 77 69 64 67 65 74 2e | 68 0a 2f 2a 20 20 44 41 |.widget.|h./* DA|
|000012b0| 54 45 3a 09 09 41 75 67 | 75 73 74 20 31 39 38 38 |TE:..Aug|ust 1988|
|000012c0| 2e 0a 2f 2a 20 20 41 55 | 54 48 4f 52 3a 09 09 52 |../* AU|THOR:..R|
|000012d0| 69 63 68 61 72 64 20 41 | 2e 20 43 75 6c 73 68 61 |ichard A|. Culsha|
|000012e0| 77 2e 0a 2f 2a 20 20 44 | 45 53 43 52 49 50 54 49 |w../* D|ESCRIPTI|
|000012f0| 4f 4e 3a 09 43 6f 6e 74 | 61 69 6e 73 20 74 68 65 |ON:.Cont|ains the|
|00001300| 20 64 65 66 69 6e 69 74 | 69 6f 6e 73 20 6f 66 20 | definit|ions of |
|00001310| 74 68 65 20 77 69 64 67 | 65 74 20 73 74 72 75 63 |the widg|et struc|
|00001320| 74 75 72 65 73 2e 0a 2f | 2a 09 09 09 49 74 20 73 |tures../|*...It s|
|00001330| 68 6f 75 6c 64 20 62 65 | 20 69 6e 63 6c 75 64 65 |hould be| include|
|00001340| 64 20 62 79 20 61 6c 6c | 20 70 72 6f 67 72 61 6d |d by all| program|
|00001350| 73 20 74 68 61 74 20 77 | 61 6e 74 20 74 6f 0a 2f |s that w|ant to./|
|00001360| 2a 09 09 09 75 73 65 20 | 74 68 65 20 77 69 64 67 |*...use |the widg|
|00001370| 65 74 20 6c 69 62 72 61 | 72 79 2e 0a 2f 2a 20 44 |et libra|ry../* D|
|00001380| 49 53 43 4c 41 49 4d 45 | 52 3a 09 09 54 68 69 73 |ISCLAIME|R:..This|
|00001390| 20 66 69 6c 65 20 69 73 | 20 64 65 65 6d 65 64 20 | file is| deemed |
|000013a0| 74 6f 20 62 65 20 70 75 | 62 6c 69 63 2d 64 6f 6d |to be pu|blic-dom|
|000013b0| 61 69 6e 2c 20 6f 6e 20 | 74 68 65 20 73 69 6d 70 |ain, on |the simp|
|000013c0| 6c 65 0a 2f 2a 09 09 09 | 70 72 6f 76 69 73 6f 73 |le./*...|provisos|
|000013d0| 20 74 68 61 74 20 74 68 | 69 73 20 73 65 63 74 69 | that th|is secti|
|000013e0| 6f 6e 20 72 65 6d 61 69 | 6e 73 20 69 6e 20 74 68 |on remai|ns in th|
|000013f0| 69 73 20 66 69 6c 65 20 | 61 6e 64 0a 2f 2a 09 09 |is file |and./*..|
|00001400| 09 74 68 61 74 20 63 6f | 64 65 20 75 73 69 6e 67 |.that co|de using|
|00001410| 20 69 74 20 64 6f 20 6e | 6f 74 20 64 6f 20 73 6f | it do n|ot do so|
|00001420| 20 66 6f 72 20 6d 6f 6e | 65 74 61 72 79 20 67 61 | for mon|etary ga|
|00001430| 69 6e 2e 0a 2f 2a 09 09 | 09 4e 65 69 74 68 65 72 |in../*..|.Neither|
|00001440| 20 74 68 65 20 61 75 74 | 68 6f 72 2c 20 6e 6f 72 | the aut|hor, nor|
|00001450| 20 74 68 65 20 61 75 74 | 68 6f 72 73 20 65 6d 70 | the aut|hors emp|
|00001460| 6c 6f 79 65 65 73 20 61 | 74 20 74 68 65 0a 2f 2a |loyees a|t the./*|
|00001470| 09 09 09 74 69 6d 65 20 | 6f 66 20 64 65 76 65 6c |...time |of devel|
|00001480| 6f 70 69 6e 67 20 74 68 | 69 73 20 63 6f 64 65 2c |oping th|is code,|
|00001490| 20 61 63 63 65 70 74 20 | 61 6e 79 20 6c 69 61 62 | accept |any liab|
|000014a0| 69 6c 69 74 79 20 6f 72 | 0a 2f 2a 09 09 09 72 65 |ility or|./*...re|
|000014b0| 73 70 6f 6e 73 69 62 69 | 6c 69 74 79 20 66 6f 72 |sponsibi|lity for|
|000014c0| 20 74 68 65 20 75 73 65 | 2c 20 61 62 75 73 65 20 | the use|, abuse |
|000014d0| 6f 72 20 6d 69 73 75 73 | 65 20 6f 66 20 74 68 69 |or misus|e of thi|
|000014e0| 73 0a 2f 2a 09 09 09 63 | 6f 64 65 2e 0a 2f 2a 2a |s./*...c|ode../**|
|000014f0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001500| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001510| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001520| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001530| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0a 0a 23 69 |********|***/..#i|
|00001540| 6e 63 6c 75 64 65 20 3c | 63 75 72 73 65 73 2e 68 |nclude <|curses.h|
|00001550| 3e 0a 0a 2f 2a 20 64 65 | 66 69 6e 69 74 69 6f 6e |>../* de|finition|
|00001560| 20 66 6f 72 20 63 6f 6d | 6d 61 6e 64 20 77 69 64 | for com|mand wid|
|00001570| 67 65 74 20 65 6e 74 72 | 79 20 69 6e 20 6c 69 6e |get entr|y in lin|
|00001580| 6b 65 64 20 6c 69 73 74 | 20 2a 2f 0a 73 74 72 75 |ked list| */.stru|
|00001590| 63 74 20 20 20 20 63 6d | 64 77 69 64 7b 0a 20 20 |ct cm|dwid{. |
|000015a0| 20 20 09 09 57 49 4e 44 | 4f 57 09 09 2a 77 69 64 | ..WIND|OW..*wid|
|000015b0| 67 65 74 3b 0a 20 20 20 | 20 09 09 69 6e 74 09 09 |get;. | ..int..|
|000015c0| 69 64 3b 0a 20 20 20 20 | 09 09 63 68 61 72 09 09 |id;. |..char..|
|000015d0| 6d 73 67 5b 31 30 30 5d | 3b 0a 20 20 20 20 09 09 |msg[100]|;. ..|
|000015e0| 63 68 61 72 09 09 61 63 | 70 74 3b 0a 20 20 20 20 |char..ac|pt;. |
|000015f0| 09 09 69 6e 74 09 09 28 | 2a 66 75 6e 63 29 28 29 |..int..(|*func)()|
|00001600| 3b 0a 20 20 20 20 09 09 | 69 6e 74 09 09 6c 65 6e |;. ..|int..len|
|00001610| 67 74 68 3b 09 0a 20 20 | 20 20 09 09 69 6e 74 09 |gth;.. | ..int.|
|00001620| 09 78 2c 79 3b 0a 09 09 | 69 6e 74 09 09 61 63 74 |.x,y;...|int..act|
|00001630| 69 76 65 3b 0a 20 20 20 | 20 09 09 73 74 72 75 63 |ive;. | ..struc|
|00001640| 74 20 63 6d 64 77 69 64 | 09 2a 6e 65 78 74 3b 0a |t cmdwid|.*next;.|
|00001650| 20 20 20 20 09 7d 20 2a | 63 6d 64 6c 69 73 74 3b | .} *|cmdlist;|
|00001660| 0a 0a 2f 2a 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 |../* def|inition |
|00001670| 66 6f 72 20 6c 61 62 65 | 6c 20 77 69 64 67 65 74 |for labe|l widget|
|00001680| 20 65 6e 74 72 79 20 69 | 6e 20 6c 69 6e 6b 65 64 | entry i|n linked|
|00001690| 20 6c 69 73 74 20 2a 2f | 0a 73 74 72 75 63 74 20 | list */|.struct |
|000016a0| 20 20 20 6c 62 6c 77 69 | 64 7b 0a 20 20 20 20 09 | lblwi|d{. .|
|000016b0| 09 57 49 4e 44 4f 57 09 | 09 2a 77 69 64 67 65 74 |.WINDOW.|.*widget|
|000016c0| 3b 0a 20 20 20 20 09 09 | 69 6e 74 09 09 69 64 3b |;. ..|int..id;|
|000016d0| 0a 20 20 20 20 09 09 63 | 68 61 72 09 09 6d 73 67 |. ..c|har..msg|
|000016e0| 5b 31 30 30 5d 3b 0a 20 | 20 20 20 09 09 63 68 61 |[100];. | ..cha|
|000016f0| 72 09 09 70 6f 73 3b 0a | 20 20 20 20 09 09 69 6e |r..pos;.| ..in|
|00001700| 74 09 09 6c 65 6e 67 74 | 68 3b 09 0a 09 09 69 6e |t..lengt|h;....in|
|00001710| 74 09 09 64 69 66 66 65 | 72 65 6e 63 65 3b 0a 20 |t..diffe|rence;. |
|00001720| 20 20 20 09 09 69 6e 74 | 09 09 78 2c 79 3b 0a 20 | ..int|..x,y;. |
|00001730| 20 20 20 09 09 73 74 72 | 75 63 74 20 6c 62 6c 77 | ..str|uct lblw|
|00001740| 69 64 09 2a 6e 65 78 74 | 3b 0a 20 20 20 20 09 7d |id.*next|;. .}|
|00001750| 20 2a 6c 62 6c 6c 69 73 | 74 3b 0a 0a 2f 2a 20 64 | *lbllis|t;../* d|
|00001760| 65 66 69 6e 69 74 69 6f | 6e 20 66 6f 72 20 74 6f |efinitio|n for to|
|00001770| 67 6c 65 20 77 69 64 67 | 65 74 20 65 6e 74 72 79 |gle widg|et entry|
|00001780| 20 69 6e 20 6c 69 6e 6b | 65 64 20 6c 69 73 74 20 | in link|ed list |
|00001790| 2a 2f 0a 73 74 72 75 63 | 74 20 20 20 20 20 74 67 |*/.struc|t tg|
|000017a0| 6c 77 69 64 7b 0a 20 20 | 20 20 09 09 57 49 4e 44 |lwid{. | ..WIND|
|000017b0| 4f 57 09 09 2a 77 69 64 | 67 65 74 3b 0a 20 20 20 |OW..*wid|get;. |
|000017c0| 20 09 09 69 6e 74 09 09 | 69 64 3b 0a 20 20 20 20 | ..int..|id;. |
|000017d0| 09 09 63 68 61 72 09 09 | 6d 73 67 5b 31 30 30 5d |..char..|msg[100]|
|000017e0| 3b 0a 20 20 20 20 09 09 | 63 68 61 72 09 09 74 67 |;. ..|char..tg|
|000017f0| 6c 5b 31 30 5d 5b 32 30 | 5d 3b 0a 20 20 20 20 09 |l[10][20|];. .|
|00001800| 09 63 68 61 72 09 09 74 | 6f 67 67 6c 65 3b 0a 20 |.char..t|oggle;. |
|00001810| 20 20 20 09 09 69 6e 74 | 09 09 63 75 72 3b 0a 09 | ..int|..cur;..|
|00001820| 20 09 69 6e 74 20 09 09 | 74 6f 74 61 6c 3b 0a 20 | .int ..|total;. |
|00001830| 20 20 20 09 09 69 6e 74 | 09 09 6c 65 6e 67 74 68 | ..int|..length|
|00001840| 3b 0a 20 20 20 20 09 09 | 69 6e 74 20 09 09 78 74 |;. ..|int ..xt|
|00001850| 67 6c 3b 0a 20 20 20 20 | 09 09 69 6e 74 09 09 78 |gl;. |..int..x|
|00001860| 2c 79 3b 0a 09 09 69 6e | 74 09 09 61 63 74 69 76 |,y;...in|t..activ|
|00001870| 65 3b 0a 20 20 20 20 09 | 09 73 74 72 75 63 74 20 |e;. .|.struct |
|00001880| 74 67 6c 77 69 64 09 2a | 6e 65 78 74 3b 0a 20 20 |tglwid.*|next;. |
|00001890| 20 20 09 7d 20 2a 74 67 | 6c 6c 69 73 74 3b 0a 0a | .} *tg|llist;..|
|000018a0| 2f 2a 20 64 65 66 69 6e | 69 74 69 6f 6e 20 66 6f |/* defin|ition fo|
|000018b0| 72 20 69 6e 70 75 74 20 | 77 69 64 67 65 74 20 65 |r input |widget e|
|000018c0| 6e 74 72 79 20 69 6e 20 | 6c 69 6e 6b 65 64 20 6c |ntry in |linked l|
|000018d0| 69 73 74 20 2a 2f 0a 73 | 74 72 75 63 74 20 69 6e |ist */.s|truct in|
|000018e0| 70 77 69 64 7b 0a 20 20 | 20 20 09 09 57 49 4e 44 |pwid{. | ..WIND|
|000018f0| 4f 57 09 09 2a 77 69 64 | 67 65 74 3b 0a 20 20 20 |OW..*wid|get;. |
|00001900| 20 09 09 69 6e 74 20 09 | 09 69 64 3b 0a 09 09 63 | ..int .|.id;...c|
|00001910| 68 61 72 09 09 6d 73 67 | 5b 31 30 30 5d 3b 0a 20 |har..msg|[100];. |
|00001920| 20 20 20 09 09 63 68 61 | 72 09 09 61 63 70 74 3b | ..cha|r..acpt;|
|00001930| 0a 20 20 20 20 09 09 63 | 68 61 72 09 09 2a 69 6e |. ..c|har..*in|
|00001940| 70 75 74 3b 0a 09 09 69 | 6e 74 09 09 73 6f 66 69 |put;...i|nt..sofi|
|00001950| 3b 0a 09 09 69 6e 74 09 | 09 65 78 65 63 3b 0a 20 |;...int.|.exec;. |
|00001960| 20 20 20 09 09 69 6e 74 | 09 09 6c 6f 66 73 3b 0a | ..int|..lofs;.|
|00001970| 20 20 20 20 09 09 69 6e | 74 09 09 6c 65 6e 67 74 | ..in|t..lengt|
|00001980| 68 3b 0a 20 20 20 20 09 | 09 69 6e 74 09 09 78 2c |h;. .|.int..x,|
|00001990| 79 3b 0a 09 09 69 6e 74 | 09 09 61 63 74 69 76 65 |y;...int|..active|
|000019a0| 3b 0a 20 20 20 20 09 09 | 73 74 72 75 63 74 20 69 |;. ..|struct i|
|000019b0| 6e 70 77 69 64 09 2a 6e | 65 78 74 3b 0a 20 20 20 |npwid.*n|ext;. |
|000019c0| 20 09 7d 20 2a 69 6e 70 | 6c 69 73 74 3b 0a 20 20 | .} *inp|list;. |
|000019d0| 20 20 0a 2f 2a 20 6c 69 | 6e 6b 65 64 20 6c 69 73 | ./* li|nked lis|
|000019e0| 74 20 6f 66 20 63 68 61 | 72 61 63 74 65 72 73 20 |t of cha|racters |
|000019f0| 75 73 65 64 20 66 6f 72 | 20 61 63 74 69 76 61 74 |used for| activat|
|00001a00| 69 6e 67 20 77 69 64 67 | 65 74 73 20 2a 2f 09 0a |ing widg|ets */..|
|00001a10| 73 74 72 75 63 74 20 63 | 68 65 6e 74 72 79 20 7b |struct c|hentry {|
|00001a20| 0a 20 20 20 20 09 09 63 | 68 61 72 09 09 20 20 63 |. ..c|har.. c|
|00001a30| 68 3b 0a 20 20 20 20 09 | 09 69 6e 74 09 20 09 20 |h;. .|.int. . |
|00001a40| 20 74 79 70 65 3b 0a 20 | 20 20 20 09 09 69 6e 74 | type;. | ..int|
|00001a50| 09 09 20 20 69 64 3b 0a | 09 09 73 74 72 75 63 74 |.. id;.|..struct|
|00001a60| 20 63 68 65 6e 74 72 79 | 20 20 20 20 2a 6e 65 78 | chentry| *nex|
|00001a70| 74 3b 0a 20 20 20 20 09 | 7d 20 2a 61 63 74 6c 69 |t;. .|} *actli|
|00001a80| 73 74 3b 0a 0a 2f 2a 20 | 6e 75 6c 6c 20 65 6e 74 |st;../* |null ent|
|00001a90| 72 69 65 73 20 69 6e 20 | 74 68 65 20 76 61 72 69 |ries in |the vari|
|00001aa0| 6f 75 73 20 6c 69 6e 6b | 65 64 20 6c 69 73 74 20 |ous link|ed list |
|00001ab0| 2a 2f 0a 23 64 65 66 69 | 6e 65 20 4e 55 4c 4c 43 |*/.#defi|ne NULLC|
|00001ac0| 4d 44 09 09 28 73 74 72 | 75 63 74 20 63 6d 64 77 |MD..(str|uct cmdw|
|00001ad0| 69 64 20 2a 29 4e 55 4c | 4c 0a 23 64 65 66 69 6e |id *)NUL|L.#defin|
|00001ae0| 65 20 4e 55 4c 4c 4c 42 | 4c 20 09 28 73 74 72 75 |e NULLLB|L .(stru|
|00001af0| 63 74 20 6c 62 6c 77 69 | 64 20 2a 29 4e 55 4c 4c |ct lblwi|d *)NULL|
|00001b00| 0a 23 64 65 66 69 6e 65 | 20 4e 55 4c 4c 54 47 4c |.#define| NULLTGL|
|00001b10| 20 09 28 73 74 72 75 63 | 74 20 74 67 6c 77 69 64 | .(struc|t tglwid|
|00001b20| 20 2a 29 4e 55 4c 4c 0a | 23 64 65 66 69 6e 65 20 | *)NULL.|#define |
|00001b30| 4e 55 4c 4c 49 4e 50 20 | 09 28 73 74 72 75 63 74 |NULLINP |.(struct|
|00001b40| 20 69 6e 70 77 69 64 20 | 2a 29 4e 55 4c 4c 0a 23 | inpwid |*)NULL.#|
|00001b50| 64 65 66 69 6e 65 20 4e | 55 4c 4c 43 48 20 09 09 |define N|ULLCH ..|
|00001b60| 28 73 74 72 75 63 74 20 | 63 68 65 6e 74 72 79 20 |(struct |chentry |
|00001b70| 2a 29 4e 55 4c 4c 0a 0a | 2f 2a 20 70 61 72 74 20 |*)NULL..|/* part |
|00001b80| 6f 66 20 74 68 65 20 73 | 70 65 63 69 66 69 63 61 |of the s|pecifica|
|00001b90| 74 69 6f 6e 73 20 66 6f | 72 20 6c 61 62 65 6c 20 |tions fo|r label |
|00001ba0| 77 69 64 67 65 74 73 20 | 2a 2f 0a 23 64 65 66 69 |widgets |*/.#defi|
|00001bb0| 6e 65 20 43 45 4e 54 52 | 45 09 09 31 0a 23 64 65 |ne CENTR|E..1.#de|
|00001bc0| 66 69 6e 65 09 4c 45 46 | 54 4a 55 53 54 09 32 0a |fine.LEF|TJUST.2.|
|00001bd0| 23 64 65 66 69 6e 65 20 | 52 49 47 48 54 4a 55 53 |#define |RIGHTJUS|
|00001be0| 54 09 34 0a 23 64 65 66 | 69 6e 65 20 4e 4f 48 49 |T.4.#def|ine NOHI|
|00001bf0| 47 48 09 09 38 0a 0a 2f | 2a 20 74 68 65 20 74 79 |GH..8../|* the ty|
|00001c00| 70 65 73 20 6f 66 20 74 | 68 65 20 77 69 64 67 65 |pes of t|he widge|
|00001c10| 74 73 20 2a 2f 0a 23 64 | 65 66 69 6e 65 20 43 4d |ts */.#d|efine CM|
|00001c20| 44 09 09 31 0a 23 64 65 | 66 69 6e 65 20 54 47 4c |D..1.#de|fine TGL|
|00001c30| 09 09 32 0a 23 64 65 66 | 69 6e 65 20 4c 42 4c 09 |..2.#def|ine LBL.|
|00001c40| 09 33 0a 23 64 65 66 69 | 6e 65 20 49 4e 50 09 09 |.3.#defi|ne INP..|
|00001c50| 34 0a 0a 23 64 65 66 69 | 6e 65 20 42 4c 41 4e 4b |4..#defi|ne BLANK|
|00001c60| 09 09 31 0a 23 64 65 66 | 69 6e 65 20 4e 4f 42 4c |..1.#def|ine NOBL|
|00001c70| 41 4e 4b 09 09 30 0a 0a | 23 64 65 66 69 6e 65 20 |ANK..0..|#define |
|00001c80| 4e 55 4c 4c 57 49 44 47 | 45 54 09 30 0a 0a 23 64 |NULLWIDG|ET.0..#d|
|00001c90| 65 66 69 6e 65 20 45 58 | 45 43 09 09 31 0a 23 64 |efine EX|EC..1.#d|
|00001ca0| 65 66 69 6e 65 20 4e 4f | 45 58 45 43 09 09 30 0a |efine NO|EXEC..0.|
|00001cb0| 0a 23 64 65 66 69 6e 65 | 20 56 45 52 54 49 43 41 |.#define| VERTICA|
|00001cc0| 4c 09 31 0a 23 64 65 66 | 69 6e 65 20 48 4f 52 49 |L.1.#def|ine HORI|
|00001cd0| 5a 4f 4e 54 41 4c 09 32 | 0a 0a 74 79 70 65 64 65 |ZONTAL.2|..typede|
|00001ce0| 66 20 69 6e 74 20 57 49 | 44 47 45 54 3b 0a 74 79 |f int WI|DGET;.ty|
|00001cf0| 70 65 64 65 66 20 69 6e | 74 20 57 49 44 47 45 54 |pedef in|t WIDGET|
|00001d00| 54 59 50 45 3b 0a 0a 53 | 48 41 52 5f 45 4f 46 0a |TYPE;..S|HAR_EOF.|
|00001d10| 69 66 20 74 65 73 74 20 | 32 37 35 32 20 2d 6e 65 |if test |2752 -ne|
|00001d20| 20 60 77 63 20 2d 63 20 | 3c 20 27 77 69 64 67 65 | `wc -c |< 'widge|
|00001d30| 74 2e 68 27 60 0a 74 68 | 65 6e 0a 20 20 20 20 65 |t.h'`.th|en. e|
|00001d40| 63 68 6f 20 27 53 68 61 | 72 3a 20 65 72 72 6f 72 |cho 'Sha|r: error|
|00001d50| 20 74 72 61 6e 73 6d 69 | 74 74 69 6e 67 20 27 77 | transmi|tting 'w|
|00001d60| 69 64 67 65 74 2e 68 27 | 20 28 73 68 6f 75 6c 64 |idget.h'| (should|
|00001d70| 20 68 61 76 65 20 62 65 | 65 6e 20 20 32 37 35 32 | have be|en 2752|
|00001d80| 20 63 68 61 72 63 61 74 | 65 72 73 29 27 0a 66 69 | charcat|ers)'.fi|
|00001d90| 0a 66 69 0a 65 63 68 6f | 20 27 53 68 61 72 3a 20 |.fi.echo| 'Shar: |
|00001da0| 65 78 74 72 61 63 74 69 | 6e 67 20 27 77 69 64 67 |extracti|ng 'widg|
|00001db0| 65 74 2e 6d 73 27 20 28 | 20 31 30 39 34 36 20 63 |et.ms' (| 10946 c|
|00001dc0| 68 61 72 61 63 74 65 72 | 73 29 27 0a 69 66 20 74 |haracter|s)'.if t|
|00001dd0| 65 73 74 20 2d 66 20 27 | 77 69 64 67 65 74 2e 6d |est -f '|widget.m|
|00001de0| 73 27 0a 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |s'.then.| echo|
|00001df0| 20 22 53 68 61 72 3a 20 | 77 69 6c 6c 20 6e 6f 74 | "Shar: |will not|
|00001e00| 20 6f 76 65 72 77 72 69 | 74 65 20 65 78 69 73 74 | overwri|te exist|
|00001e10| 69 6e 67 20 66 69 6c 65 | 20 27 77 69 64 67 65 74 |ing file| 'widget|
|00001e20| 2e 6d 73 27 22 0a 65 6c | 73 65 0a 20 20 20 20 63 |.ms'".el|se. c|
|00001e30| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|00001e40| 3e 20 27 77 69 64 67 65 | 74 2e 6d 73 27 0a 2e 4e |> 'widge|t.ms'..N|
|00001e50| 44 0a 2e 4c 50 0a 2e 6e | 72 20 50 53 20 31 32 0a |D..LP..n|r PS 12.|
|00001e60| 2e 6e 72 20 56 53 20 31 | 33 0a 2e 4c 50 0a 2e 6e |.nr VS 1|3..LP..n|
|00001e70| 68 0a 2e 52 50 0a 2e 54 | 4c 0a 41 20 57 69 6e 64 |h..RP..T|L.A Wind|
|00001e80| 6f 77 20 62 61 73 65 64 | 20 49 6e 74 65 72 61 63 |ow based| Interac|
|00001e90| 74 69 76 65 20 50 72 6f | 67 72 61 6d 6d 69 6e 67 |tive Pro|gramming|
|00001ea0| 20 55 74 69 6c 69 74 79 | 20 4f 6e 20 55 6e 69 78 | Utility| On Unix|
|00001eb0| 3a 0a 41 20 4c 69 62 72 | 61 72 79 20 50 61 63 6b |:.A Libr|ary Pack|
|00001ec0| 61 67 65 20 66 6f 72 20 | 43 20 70 72 6f 67 72 61 |age for |C progra|
|00001ed0| 6d 6d 65 72 73 0a 2e 41 | 55 0a 52 69 63 68 61 72 |mmers..A|U.Richar|
|00001ee0| 64 20 41 2e 20 43 75 6c | 73 68 61 77 0a 2e 41 49 |d A. Cul|shaw..AI|
|00001ef0| 0a 47 45 43 20 48 69 72 | 73 74 20 52 65 73 65 61 |.GEC Hir|st Resea|
|00001f00| 72 63 68 20 43 65 6e 74 | 72 65 0a 44 61 74 61 20 |rch Cent|re.Data |
|00001f10| 53 79 73 74 65 6d 73 20 | 44 69 76 69 73 69 6f 6e |Systems |Division|
|00001f20| 0a 45 61 73 74 20 4c 61 | 6e 65 0a 57 65 6d 62 6c |.East La|ne.Wembl|
|00001f30| 65 79 0a 4d 69 64 64 6c | 65 73 65 78 20 48 41 39 |ey.Middl|esex HA9|
|00001f40| 20 37 50 50 0a 2e 4e 44 | 0a 2e 4b 53 0a 2e 53 48 | 7PP..ND|..KS..SH|
|00001f50| 0a 49 4e 54 52 4f 44 55 | 43 54 49 4f 4e 0a 0a 2e |.INTRODU|CTION...|
|00001f60| 50 50 0a 41 20 57 69 64 | 67 65 74 20 69 73 20 61 |PP.A Wid|get is a|
|00001f70| 20 75 73 65 72 20 64 65 | 66 69 6e 61 62 6c 65 20 | user de|finable |
|00001f80| 0a 2e 42 20 22 77 69 6e | 64 6f 77 20 67 61 64 67 |..B "win|dow gadg|
|00001f90| 65 74 2e 22 0a 20 54 68 | 65 79 20 61 6c 6c 6f 77 |et.". Th|ey allow|
|00001fa0| 20 74 68 65 20 75 73 65 | 72 20 74 6f 20 69 6e 74 | the use|r to int|
|00001fb0| 65 72 61 63 74 20 77 69 | 74 68 20 74 68 65 20 70 |eract wi|th the p|
|00001fc0| 72 6f 67 72 61 6d 20 69 | 6e 20 73 70 65 63 69 66 |rogram i|n specif|
|00001fd0| 79 69 6e 67 20 6f 70 65 | 72 61 74 69 6f 6e 73 20 |ying ope|rations |
|00001fe0| 74 6f 20 62 65 20 63 61 | 72 72 69 65 64 20 6f 75 |to be ca|rried ou|
|00001ff0| 74 2e 20 57 69 64 67 65 | 74 6c 69 62 20 69 73 20 |t. Widge|tlib is |
|00002000| 61 20 73 65 74 20 6f 66 | 20 6c 69 62 72 61 72 79 |a set of| library|
|00002010| 20 66 75 6e 63 74 69 6f | 6e 73 20 77 68 69 63 68 | functio|ns which|
|00002020| 20 61 6c 6c 6f 77 73 20 | 74 68 65 20 75 73 65 72 | allows |the user|
|00002030| 20 74 6f 20 63 72 65 61 | 74 65 20 61 6e 64 20 69 | to crea|te and i|
|00002040| 6e 74 65 72 61 63 74 20 | 77 69 74 68 20 0a 2e 42 |nteract |with ..B|
|00002050| 20 77 69 64 67 65 74 73 | 2e 0a 41 20 77 69 64 67 | widgets|..A widg|
|00002060| 65 74 20 63 61 6e 20 62 | 65 20 6f 6e 65 20 6f 66 |et can b|e one of|
|00002070| 20 66 6f 75 72 20 74 79 | 70 65 73 20 3a 0a 2e 4c | four ty|pes :..L|
|00002080| 50 0a 20 20 20 20 20 20 | 31 29 20 0a 2e 42 20 43 |P. |1) ..B C|
|00002090| 6f 6d 6d 61 6e 64 20 0a | 57 69 64 67 65 74 20 0a |ommand .|Widget .|
|000020a0| 20 20 20 20 20 20 32 29 | 20 0a 2e 42 20 4c 61 62 | 2)| ..B Lab|
|000020b0| 65 6c 20 0a 57 69 64 67 | 65 74 0a 20 20 20 20 20 |el .Widg|et. |
|000020c0| 20 33 29 20 0a 2e 42 20 | 54 6f 67 67 6c 65 20 0a | 3) ..B |Toggle .|
|000020d0| 57 69 64 67 65 74 0a 20 | 20 20 20 20 20 34 29 20 |Widget. | 4) |
|000020e0| 0a 2e 42 20 49 6e 70 75 | 74 20 0a 57 69 64 67 65 |..B Inpu|t .Widge|
|000020f0| 74 0a 0a 2e 53 48 0a 43 | 6f 6d 6d 61 6e 64 20 57 |t...SH.C|ommand W|
|00002100| 69 64 67 65 74 73 0a 2e | 50 50 0a 41 20 63 6f 6d |idgets..|PP.A com|
|00002110| 6d 61 6e 64 20 77 69 64 | 67 65 74 20 61 6c 6c 6f |mand wid|get allo|
|00002120| 77 73 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 73 |ws the u|ser to s|
|00002130| 65 6c 65 63 74 20 61 20 | 66 75 6e 63 74 69 6f 6e |elect a |function|
|00002140| 20 74 6f 20 62 65 20 63 | 61 72 72 69 65 64 20 6f | to be c|arried o|
|00002150| 75 74 2c 20 65 2e 67 20 | 69 6e 20 61 20 70 61 67 |ut, e.g |in a pag|
|00002160| 69 6e 67 20 70 72 6f 67 | 72 61 6d 20 6f 6e 65 20 |ing prog|ram one |
|00002170| 73 75 63 68 20 63 6f 6d | 6d 61 6e 64 20 63 6f 75 |such com|mand cou|
|00002180| 6c 64 20 62 65 20 27 4e | 65 78 74 20 50 61 67 65 |ld be 'N|ext Page|
|00002190| 27 2e 20 49 6e 20 63 72 | 65 61 74 69 6e 67 20 61 |'. In cr|eating a|
|000021a0| 20 63 6f 6d 6d 61 6e 64 | 20 77 69 64 67 65 74 20 | command| widget |
|000021b0| 74 68 65 20 70 72 6f 67 | 72 61 6d 6d 65 72 20 6d |the prog|rammer m|
|000021c0| 75 73 74 20 70 61 73 73 | 20 69 74 20 74 68 65 20 |ust pass| it the |
|000021d0| 66 75 6e 63 74 69 6f 6e | 20 74 6f 20 62 65 20 63 |function| to be c|
|000021e0| 61 72 72 69 65 64 20 6f | 75 74 20 77 68 65 6e 20 |arried o|ut when |
|000021f0| 74 68 65 20 77 69 64 67 | 65 74 20 69 73 20 73 65 |the widg|et is se|
|00002200| 6c 65 63 74 65 64 20 28 | 61 63 74 69 76 61 74 65 |lected (|activate|
|00002210| 64 29 2e 20 54 68 65 20 | 77 69 64 67 65 74 20 69 |d). The |widget i|
|00002220| 73 20 61 63 74 69 76 61 | 74 65 64 20 75 73 69 6e |s activa|ted usin|
|00002230| 67 20 61 20 75 6e 69 71 | 75 65 20 27 61 63 74 69 |g a uniq|ue 'acti|
|00002240| 76 61 74 69 6f 6e 27 20 | 63 68 61 72 61 63 74 65 |vation' |characte|
|00002250| 72 20 77 68 69 63 68 20 | 69 73 20 64 69 73 70 6c |r which |is displ|
|00002260| 61 79 65 64 20 69 6e 20 | 74 68 65 20 77 69 64 67 |ayed in |the widg|
|00002270| 65 74 20 66 6f 72 20 65 | 61 73 79 20 72 65 66 65 |et for e|asy refe|
|00002280| 72 65 6e 63 65 2e 0a 0a | 2e 53 48 0a 4c 61 62 65 |rence...|.SH.Labe|
|00002290| 6c 20 57 69 64 67 65 74 | 73 0a 2e 50 50 0a 41 20 |l Widget|s..PP.A |
|000022a0| 6c 61 62 65 6c 20 77 69 | 64 67 65 74 20 69 73 20 |label wi|dget is |
|000022b0| 73 69 6d 70 6c 79 20 61 | 20 77 69 64 67 65 74 20 |simply a| widget |
|000022c0| 77 68 69 63 68 20 68 6f | 6c 64 73 20 61 20 63 68 |which ho|lds a ch|
|000022d0| 61 72 61 63 74 65 72 20 | 73 74 72 69 6e 67 20 73 |aracter |string s|
|000022e0| 75 63 68 20 61 73 20 61 | 20 68 65 61 64 69 6e 67 |uch as a| heading|
|000022f0| 2c 20 77 68 69 63 68 20 | 63 61 6e 20 62 65 20 63 |, which |can be c|
|00002300| 68 61 6e 67 65 64 20 61 | 74 20 77 69 6c 6c 20 6c |hanged a|t will l|
|00002310| 61 74 65 72 2e 20 54 68 | 65 20 70 72 6f 67 72 61 |ater. Th|e progra|
|00002320| 6d 6d 65 72 20 63 61 6e | 20 73 75 70 70 6c 79 20 |mmer can| supply |
|00002330| 70 61 72 61 6d 65 74 65 | 72 73 20 77 68 69 63 68 |paramete|rs which|
|00002340| 20 63 61 6e 20 65 69 74 | 68 65 72 20 6c 65 66 74 | can eit|her left|
|00002350| 20 6a 75 73 74 69 66 79 | 20 28 64 65 66 61 75 6c | justify| (defaul|
|00002360| 74 29 2c 20 72 69 67 68 | 74 20 6a 75 73 74 69 66 |t), righ|t justif|
|00002370| 79 2c 20 6f 72 20 63 65 | 6e 74 72 65 20 74 68 65 |y, or ce|ntre the|
|00002380| 20 6d 65 73 73 61 67 65 | 20 77 69 74 68 69 6e 20 | message| within |
|00002390| 74 68 65 20 77 69 64 67 | 65 74 20 28 77 68 69 63 |the widg|et (whic|
|000023a0| 68 20 68 61 73 20 61 20 | 75 73 65 72 20 64 65 66 |h has a |user def|
|000023b0| 69 6e 61 62 6c 65 20 77 | 69 64 74 68 29 20 61 73 |inable w|idth) as|
|000023c0| 20 77 65 6c 6c 20 61 73 | 20 68 69 67 68 6c 69 67 | well as| highlig|
|000023d0| 68 74 20 28 64 65 66 61 | 75 6c 74 29 20 6f 72 20 |ht (defa|ult) or |
|000023e0| 64 65 68 69 67 68 6c 69 | 67 68 74 20 69 74 2e 0a |dehighli|ght it..|
|000023f0| 0a 2e 53 48 0a 54 6f 67 | 67 6c 65 20 57 69 64 67 |..SH.Tog|gle Widg|
|00002400| 65 74 73 0a 2e 50 50 0a | 41 20 74 6f 67 67 6c 65 |ets..PP.|A toggle|
|00002410| 20 77 69 64 67 65 74 20 | 63 6f 6e 74 61 69 6e 73 | widget |contains|
|00002420| 20 61 20 6d 65 73 73 61 | 67 65 20 77 68 69 63 68 | a messa|ge which|
|00002430| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 65 20 63 | indicat|es the c|
|00002440| 75 72 72 65 6e 74 20 76 | 61 6c 75 65 20 6f 66 20 |urrent v|alue of |
|00002450| 61 6e 20 65 6e 74 69 74 | 79 20 77 68 69 63 68 20 |an entit|y which |
|00002460| 63 61 6e 20 62 65 20 6d | 6f 72 65 20 74 68 61 6e |can be m|ore than|
|00002470| 20 6f 6e 65 20 76 61 6c | 75 65 20 65 2e 67 2c 20 | one val|ue e.g, |
|00002480| 59 65 73 2f 4e 6f 2f 44 | 6f 6e 27 74 2d 4b 6e 6f |Yes/No/D|on't-Kno|
|00002490| 77 2e 20 54 68 65 20 76 | 61 6c 75 65 20 69 73 20 |w. The v|alue is |
|000024a0| 74 6f 67 67 6c 65 64 20 | 77 68 65 6e 20 61 20 67 |toggled |when a g|
|000024b0| 69 76 65 6e 20 63 68 61 | 72 61 63 74 65 72 20 69 |iven cha|racter i|
|000024c0| 73 20 70 72 65 73 73 65 | 64 2e 20 54 68 65 20 61 |s presse|d. The a|
|000024d0| 63 74 69 76 61 74 69 6f | 6e 20 63 68 61 72 61 63 |ctivatio|n charac|
|000024e0| 74 65 72 20 69 73 20 61 | 6c 73 6f 20 64 69 73 70 |ter is a|lso disp|
|000024f0| 6c 61 79 65 64 20 69 6e | 20 74 68 65 20 77 69 64 |layed in| the wid|
|00002500| 67 65 74 2e 20 41 74 20 | 61 6e 79 20 70 6f 69 6e |get. At |any poin|
|00002510| 74 20 74 68 65 20 70 72 | 6f 67 72 61 6d 6d 65 72 |t the pr|ogrammer|
|00002520| 20 63 61 6e 20 65 6e 71 | 75 69 72 65 20 61 73 20 | can enq|uire as |
|00002530| 74 6f 20 74 68 65 20 74 | 68 65 20 63 75 72 72 65 |to the t|he curre|
|00002540| 6e 74 20 74 6f 67 67 6c | 65 20 76 61 6c 75 65 2e |nt toggl|e value.|
|00002550| 0a 0a 2e 53 48 0a 49 6e | 70 75 74 20 57 69 64 67 |...SH.In|put Widg|
|00002560| 65 74 73 0a 2e 50 50 0a | 41 6e 20 69 6e 70 75 74 |ets..PP.|An input|
|00002570| 20 77 69 64 67 65 74 20 | 61 6c 6c 6f 77 73 20 74 | widget |allows t|
|00002580| 68 65 20 75 73 65 72 20 | 74 6f 20 65 6e 74 65 72 |he user |to enter|
|00002590| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 69 6e 74 | informa|tion int|
|000025a0| 6f 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 69 6e |o the pr|ogram in|
|000025b0| 20 74 68 65 20 66 6f 72 | 6d 20 6f 66 20 61 20 73 | the for|m of a s|
|000025c0| 74 72 69 6e 67 2c 20 65 | 2e 67 20 69 6e 20 61 20 |tring, e|.g in a |
|000025d0| 70 61 67 69 6e 67 20 70 | 72 6f 67 72 61 6d 20 6f |paging p|rogram o|
|000025e0| 6e 65 20 6d 69 67 68 74 | 20 77 61 6e 74 20 74 6f |ne might| want to|
|000025f0| 20 73 75 70 70 6c 79 20 | 61 20 66 69 6c 65 20 6e | supply |a file n|
|00002600| 61 6d 65 2e 20 54 68 65 | 72 65 20 61 72 65 20 74 |ame. The|re are t|
|00002610| 77 6f 20 74 79 70 65 73 | 20 6f 66 20 69 6e 70 75 |wo types| of inpu|
|00002620| 74 20 77 69 64 67 65 74 | 73 20 3a 0a 0a 61 29 20 |t widget|s :..a) |
|00002630| 54 68 65 20 77 69 64 67 | 65 74 20 69 73 20 61 63 |The widg|et is ac|
|00002640| 74 69 76 61 74 65 64 20 | 69 6d 6d 65 64 69 61 74 |tivated |immediat|
|00002650| 65 6c 79 20 6f 6e 20 63 | 72 65 61 74 69 6f 6e 20 |ely on c|reation |
|00002660| 74 68 65 72 65 66 6f 72 | 65 20 61 6e 20 61 63 74 |therefor|e an act|
|00002670| 69 76 61 74 69 6f 6e 20 | 63 68 61 72 61 63 74 65 |ivation |characte|
|00002680| 72 20 69 73 20 6e 6f 74 | 20 72 65 71 75 69 72 65 |r is not| require|
|00002690| 64 2e 20 45 2e 67 20 69 | 6e 20 61 20 70 61 67 69 |d. E.g i|n a pagi|
|000026a0| 6e 67 20 70 72 6f 67 72 | 61 6d 20 6f 6e 65 20 6d |ng progr|am one m|
|000026b0| 69 67 68 74 20 68 61 76 | 65 20 61 20 63 6f 6d 6d |ight hav|e a comm|
|000026c0| 61 6e 64 20 77 69 64 67 | 65 74 20 77 68 69 63 68 |and widg|et which|
|000026d0| 20 61 63 74 69 76 61 74 | 65 73 20 74 68 69 73 20 | activat|es this |
|000026e0| 74 79 70 65 20 6f 66 20 | 69 6e 70 75 74 20 77 69 |type of |input wi|
|000026f0| 64 67 65 74 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |dget in |order to|
|00002700| 20 67 65 74 20 61 20 66 | 69 6c 65 20 6e 61 6d 65 | get a f|ile name|
|00002710| 2e 0a 2e 4c 50 0a 62 29 | 20 54 68 65 20 77 69 64 |...LP.b)| The wid|
|00002720| 67 65 74 20 68 61 73 20 | 61 6e 20 61 73 73 6f 63 |get has |an assoc|
|00002730| 69 61 74 65 64 20 61 63 | 74 69 76 61 74 69 6f 6e |iated ac|tivation|
|00002740| 20 63 68 61 72 61 63 74 | 65 72 20 73 6f 20 74 68 | charact|er so th|
|00002750| 65 72 65 66 6f 72 65 20 | 69 74 20 6d 61 79 20 62 |erefore |it may b|
|00002760| 65 20 61 63 74 69 76 61 | 74 65 64 20 61 74 20 61 |e activa|ted at a|
|00002770| 6e 79 20 70 6f 69 6e 74 | 20 61 66 74 65 72 20 63 |ny point| after c|
|00002780| 72 65 61 74 69 6f 6e 2e | 20 54 68 65 20 63 68 61 |reation.| The cha|
|00002790| 72 61 63 74 65 72 20 69 | 73 20 64 69 73 70 6c 61 |racter i|s displa|
|000027a0| 79 65 64 20 69 6e 20 74 | 68 65 20 77 69 64 67 65 |yed in t|he widge|
|000027b0| 74 2e 0a 0a 46 6f 72 20 | 65 61 73 65 20 6f 66 20 |t...For |ease of |
|000027c0| 75 73 65 20 74 68 65 20 | 69 6e 70 75 74 20 77 69 |use the |input wi|
|000027d0| 64 67 65 74 73 20 63 6f | 6e 74 61 69 6e 20 63 68 |dgets co|ntain ch|
|000027e0| 61 72 61 63 74 65 72 20 | 73 74 72 69 6e 67 73 20 |aracter |strings |
|000027f0| 77 68 69 63 68 20 63 61 | 6e 20 65 78 70 6c 61 69 |which ca|n explai|
|00002800| 6e 0a 74 68 65 72 65 20 | 75 73 65 20 77 69 74 68 |n.there |use with|
|00002810| 69 6e 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2e 0a |in the p|rogram..|
|00002820| 2e 4b 45 0a 2e 62 70 0a | 2e 53 48 0a 54 65 78 74 |.KE..bp.|.SH.Text|
|00002830| 20 57 69 6e 64 6f 77 0a | 2e 50 50 0a 54 68 65 20 | Window.|.PP.The |
|00002840| 6c 69 62 72 61 72 79 20 | 61 6c 73 6f 20 61 6c 6c |library |also all|
|00002850| 6f 77 73 20 74 68 65 20 | 75 73 65 72 20 74 6f 20 |ows the |user to |
|00002860| 64 65 66 69 6e 65 20 61 | 20 74 65 78 74 20 77 69 |define a| text wi|
|00002870| 6e 64 6f 77 20 69 6e 74 | 6f 20 77 68 69 63 68 20 |ndow int|o which |
|00002880| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 6d 61 79 20 |the prog|ram may |
|00002890| 72 65 70 6f 72 74 20 69 | 6e 66 6f 72 6d 61 74 69 |report i|nformati|
|000028a0| 6f 6e 2e 20 4f 6e 20 63 | 72 65 61 74 69 6f 6e 20 |on. On c|reation |
|000028b0| 74 68 65 20 70 72 6f 67 | 72 61 6d 20 68 61 73 20 |the prog|ram has |
|000028c0| 74 6f 20 70 61 73 73 20 | 61 20 70 61 72 61 6d 65 |to pass |a parame|
|000028d0| 74 65 72 20 77 68 69 63 | 68 20 73 70 65 63 69 66 |ter whic|h specif|
|000028e0| 69 65 73 20 68 6f 77 20 | 6d 75 63 68 20 72 6f 6f |ies how |much roo|
|000028f0| 6d 20 74 6f 20 6c 65 61 | 76 65 20 62 65 66 6f 72 |m to lea|ve befor|
|00002900| 65 20 74 68 65 20 74 6f | 70 20 6f 66 20 74 68 65 |e the to|p of the|
|00002910| 20 74 65 78 74 20 77 69 | 6e 64 6f 77 2e 20 45 2e | text wi|ndow. E.|
|00002920| 67 20 30 20 6d 65 61 6e | 73 20 70 6c 61 63 65 20 |g 0 mean|s place |
|00002930| 74 68 65 20 77 69 6e 64 | 6f 77 20 69 6d 6d 65 64 |the wind|ow immed|
|00002940| 69 61 74 65 6c 79 20 62 | 65 6c 6f 77 20 74 68 65 |iately b|elow the|
|00002950| 20 6c 6f 77 65 73 74 20 | 77 69 64 67 65 74 2c 20 | lowest |widget, |
|00002960| 31 20 6d 65 61 6e 73 20 | 61 6c 6c 6f 77 20 72 6f |1 means |allow ro|
|00002970| 6f 6d 20 66 6f 72 20 6f | 6e 65 20 6d 6f 72 65 20 |om for o|ne more |
|00002980| 72 6f 77 20 6f 66 20 77 | 69 64 67 65 74 73 20 62 |row of w|idgets b|
|00002990| 65 66 6f 72 65 20 70 6c | 61 63 69 6e 67 20 74 68 |efore pl|acing th|
|000029a0| 65 20 77 69 6e 64 6f 77 | 2e 20 54 68 65 20 74 65 |e window|. The te|
|000029b0| 78 74 20 77 69 6e 64 6f | 77 20 61 6c 77 61 79 73 |xt windo|w always|
|000029c0| 20 73 74 72 65 74 63 68 | 65 73 20 74 6f 20 74 68 | stretch|es to th|
|000029d0| 65 20 62 6f 74 74 6f 6d | 20 6f 66 20 74 68 65 20 |e bottom| of the |
|000029e0| 73 63 72 65 65 6e 2e 20 | 54 68 65 20 77 69 6e 64 |screen. |The wind|
|000029f0| 6f 77 20 63 61 6e 20 62 | 65 20 62 6f 72 64 65 72 |ow can b|e border|
|00002a00| 65 64 20 6f 6e 20 61 6e | 79 20 32 20 6f 70 70 6f |ed on an|y 2 oppo|
|00002a10| 73 69 74 65 20 73 69 64 | 65 73 20 6f 72 20 6f 6e |site sid|es or on|
|00002a20| 20 61 6c 6c 20 34 20 28 | 65 66 66 65 63 74 69 76 | all 4 (|effectiv|
|00002a30| 65 6c 79 20 62 6f 78 69 | 6e 67 20 0a 0a 69 74 29 |ely boxi|ng ..it)|
|00002a40| 2e 0a 0a 2e 53 48 0a 57 | 69 64 67 65 74 20 50 6c |....SH.W|idget Pl|
|00002a50| 61 63 65 6d 65 6e 74 0a | 2e 50 50 0a 54 68 65 20 |acement.|.PP.The |
|00002a60| 6c 69 62 72 61 72 79 20 | 6d 61 69 6e 74 61 69 6e |library |maintain|
|00002a70| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 58 2c |s the cu|rrent X,|
|00002a80| 59 20 63 6f 6f 72 64 69 | 6e 61 74 65 20 6f 66 20 |Y coordi|nate of |
|00002a90| 74 68 65 20 6c 61 73 74 | 20 77 69 64 67 65 74 20 |the last| widget |
|00002aa0| 63 72 65 61 74 65 64 2e | 20 57 68 65 6e 20 61 20 |created.| When a |
|00002ab0| 6e 65 77 20 77 69 64 67 | 65 74 20 69 73 20 63 72 |new widg|et is cr|
|00002ac0| 65 61 74 65 64 20 74 68 | 65 20 70 72 6f 67 72 61 |eated th|e progra|
|00002ad0| 6d 20 6d 75 73 74 20 70 | 61 73 73 20 61 20 70 61 |m must p|ass a pa|
|00002ae0| 72 61 6d 65 74 65 72 20 | 30 20 6f 72 20 31 2e 20 |rameter |0 or 1. |
|00002af0| 41 20 30 20 6d 65 61 6e | 73 20 70 75 74 20 74 68 |A 0 mean|s put th|
|00002b00| 65 20 6e 65 77 20 77 69 | 64 67 65 74 20 6f 6e 20 |e new wi|dget on |
|00002b10| 74 68 65 20 63 75 72 72 | 65 6e 74 20 72 6f 77 20 |the curr|ent row |
|00002b20| 69 66 20 70 6f 73 73 69 | 62 6c 65 2c 20 65 6c 73 |if possi|ble, els|
|00002b30| 65 20 67 6f 20 6f 6e 74 | 6f 20 74 68 65 20 6e 65 |e go ont|o the ne|
|00002b40| 78 74 20 72 6f 77 2e 20 | 41 20 31 20 66 6f 72 63 |xt row. |A 1 forc|
|00002b50| 65 73 20 74 68 65 20 6e | 65 77 20 77 69 64 67 65 |es the n|ew widge|
|00002b60| 74 20 6f 6e 74 6f 20 74 | 68 65 20 6e 65 78 74 20 |t onto t|he next |
|00002b70| 72 6f 77 2e 20 54 68 69 | 73 20 6d 65 61 6e 73 20 |row. Thi|s means |
|00002b80| 74 68 61 74 20 77 69 64 | 67 65 74 73 20 63 61 6e |that wid|gets can|
|00002b90| 20 6f 6e 6c 79 20 67 6f | 20 61 66 74 65 72 20 70 | only go| after p|
|00002ba0| 72 65 63 65 64 69 6e 67 | 20 6f 6e 65 73 20 61 6e |receding| ones an|
|00002bb0| 64 20 6e 6f 74 20 62 65 | 66 6f 72 65 2e 20 42 75 |d not be|fore. Bu|
|00002bc0| 74 20 68 6f 77 65 76 65 | 72 20 77 69 64 67 65 74 |t howeve|r widget|
|00002bd0| 73 20 63 61 6e 20 62 65 | 20 70 6c 61 63 65 64 20 |s can be| placed |
|00002be0| 6f 76 65 72 20 77 69 64 | 67 65 74 73 20 77 68 69 |over wid|gets whi|
|00002bf0| 63 68 20 68 61 76 65 20 | 70 72 65 76 69 6f 75 73 |ch have |previous|
|00002c00| 6c 79 20 62 65 65 6e 20 | 64 65 73 74 72 6f 79 65 |ly been |destroye|
|00002c10| 64 2e 0a 0a 2e 53 48 0a | 43 6f 6d 70 69 6c 69 6e |d....SH.|Compilin|
|00002c20| 67 20 54 68 69 6e 67 73 | 0a 2e 50 50 0a 49 6e 20 |g Things|..PP.In |
|00002c30| 6f 72 64 65 72 20 74 6f | 20 75 73 65 20 74 68 65 |order to| use the|
|00002c40| 20 6c 69 62 72 61 72 79 | 2c 20 69 74 20 69 73 20 | library|, it is |
|00002c50| 6e 65 63 65 73 73 61 72 | 79 20 74 6f 20 68 61 76 |necessar|y to hav|
|00002c60| 65 20 63 65 72 74 61 69 | 6e 20 74 79 70 65 73 20 |e certai|n types |
|00002c70| 61 6e 64 20 76 61 72 69 | 61 62 6c 65 73 20 64 65 |and vari|ables de|
|00002c80| 66 69 6e 65 64 2e 20 54 | 68 65 72 65 66 6f 72 65 |fined. T|herefore|
|00002c90| 2c 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 6d 75 |, the pr|ogram mu|
|00002ca0| 73 74 20 68 61 76 65 20 | 74 68 65 20 6c 69 6e 65 |st have |the line|
|00002cb0| 3a 0a 2e 50 50 0a 2e 42 | 20 22 23 69 6e 63 6c 75 |:..PP..B| "#inclu|
|00002cc0| 64 65 20 3c 77 69 64 67 | 65 74 73 2e 68 3e 22 0a |de <widg|ets.h>".|
|00002cd0| 2e 4c 50 0a 61 74 20 74 | 68 65 20 74 6f 70 20 6f |.LP.at t|he top o|
|00002ce0| 66 20 74 68 65 20 73 6f | 75 72 63 65 2e 20 54 68 |f the so|urce. Th|
|00002cf0| 65 20 68 65 61 64 65 72 | 20 66 69 6c 65 20 69 6e |e header| file in|
|00002d00| 63 6c 75 64 65 73 20 3c | 63 75 72 73 65 73 2e 68 |cludes <|curses.h|
|00002d10| 3e 2c 20 3c 73 67 65 74 | 74 79 2e 68 3e 2c 20 3c |>, <sget|ty.h>, <|
|00002d20| 73 74 64 69 6f 2e 68 3e | 20 73 6f 20 79 6f 75 20 |stdio.h>| so you |
|00002d30| 64 6f 6e 27 74 20 68 61 | 76 65 20 74 6f 20 69 6e |don't ha|ve to in|
|00002d40| 63 6c 75 64 65 20 74 68 | 65 6d 20 61 6c 73 6f 2e |clude th|em also.|
|00002d50| 20 41 6c 73 6f 20 63 6f | 6d 70 69 6c 61 74 69 6f | Also co|mpilatio|
|00002d60| 6e 73 20 73 68 6f 75 6c | 64 20 68 61 76 65 20 74 |ns shoul|d have t|
|00002d70| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 66 6f 72 |he follo|wing for|
|00002d80| 6d 3a 0a 2e 50 50 0a 2e | 42 20 22 63 63 20 5b 66 |m:..PP..|B "cc [f|
|00002d90| 6c 61 67 73 5d 20 66 69 | 6c 65 20 2e 2e 2e 20 2d |lags] fi|le ... -|
|00002da0| 6c 77 69 64 67 65 74 73 | 20 2d 6c 63 75 72 73 65 |lwidgets| -lcurse|
|00002db0| 73 22 0a 0a 2e 53 48 0a | 54 79 70 65 20 44 65 66 |s"...SH.|Type Def|
|00002dc0| 69 6e 69 74 69 6f 6e 73 | 0a 2e 4c 50 0a 54 68 65 |initions|..LP.The|
|00002dd0| 20 66 75 6e 63 74 69 6f | 6e 73 20 77 68 69 63 68 | functio|ns which|
|00002de0| 20 63 72 65 61 74 65 20 | 77 69 64 67 65 74 73 20 | create |widgets |
|00002df0| 72 65 74 75 72 6e 20 61 | 20 74 79 70 65 20 0a 2e |return a| type ..|
|00002e00| 42 20 57 49 44 47 45 54 | 0a 77 68 69 63 68 20 69 |B WIDGET|.which i|
|00002e10| 73 20 75 73 65 64 20 66 | 6f 72 20 6c 61 74 65 72 |s used f|or later|
|00002e20| 20 69 64 65 6e 74 69 66 | 69 63 61 74 69 6f 6e 20 | identif|ication |
|00002e30| 6f 66 20 74 68 65 20 77 | 69 64 67 65 74 2e 0a 2e |of the w|idget...|
|00002e40| 4c 50 0a 49 66 20 61 20 | 66 75 6e 63 74 69 6f 6e |LP.If a |function|
|00002e50| 20 69 73 20 72 65 71 75 | 69 72 65 64 20 74 6f 20 | is requ|ired to |
|00002e60| 72 65 74 75 72 6e 20 61 | 20 77 69 64 67 65 74 20 |return a| widget |
|00002e70| 69 64 65 6e 74 69 66 69 | 65 72 2c 20 74 68 65 6e |identifi|er, then|
|00002e80| 20 69 74 20 77 69 6c 6c | 20 72 65 74 75 72 6e 20 | it will| return |
|00002e90| 0a 2e 42 20 4e 55 4c 4c | 57 49 44 47 45 54 0a 75 |..B NULL|WIDGET.u|
|00002ea0| 70 6f 6e 20 65 72 72 6f | 72 2e 0a 0a 2e 53 48 0a |pon erro|r....SH.|
|00002eb0| 53 63 72 65 65 6e 20 52 | 65 66 72 65 73 68 0a 2e |Screen R|efresh..|
|00002ec0| 4c 50 0a 54 68 65 20 6c | 69 62 72 61 72 79 20 73 |LP.The l|ibrary s|
|00002ed0| 75 70 70 6f 72 74 73 20 | 61 20 73 74 61 6e 64 61 |upports |a standa|
|00002ee0| 72 64 20 73 63 72 65 65 | 6e 20 72 65 66 72 65 73 |rd scree|n refres|
|00002ef0| 68 20 69 6e 76 6f 6b 65 | 64 20 62 79 20 5e 4c 2e |h invoke|d by ^L.|
|00002f00| 0a 2e 4b 45 0a 2e 62 70 | 0a 2e 4b 53 0a 2e 53 48 |..KE..bp|..KS..SH|
|00002f10| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 55 | | U|
|00002f40| 53 41 47 45 0a 2e 53 48 | 0a 47 65 74 74 69 6e 67 |SAGE..SH|.Getting|
|00002f50| 20 53 74 61 72 74 65 64 | 0a 2e 4c 50 0a 54 68 65 | Started|..LP.The|
|00002f60| 20 66 69 72 73 74 20 74 | 68 69 6e 67 20 74 6f 20 | first t|hing to |
|00002f70| 64 6f 20 77 68 65 6e 20 | 75 73 69 6e 67 20 74 68 |do when |using th|
|00002f80| 65 20 6c 69 62 72 61 72 | 79 20 69 73 20 73 65 74 |e librar|y is set|
|00002f90| 20 75 70 20 74 68 65 20 | 77 69 6e 64 6f 77 69 6e | up the |windowin|
|00002fa0| 67 20 73 79 73 74 65 6d | 20 62 79 20 63 61 6c 6c |g system| by call|
|00002fb0| 69 6e 67 20 0a 2e 4c 50 | 0a 2e 69 6e 20 30 2e 35 |ing ..LP|..in 0.5|
|00002fc0| 69 0a 69 6e 69 74 69 61 | 6c 69 73 65 77 69 64 67 |i.initia|lisewidg|
|00002fd0| 65 74 73 28 29 0a 2e 69 | 6e 20 30 0a 0a 2e 53 48 |ets()..i|n 0...SH|
|00002fe0| 0a 43 72 65 61 74 69 6e | 67 20 57 69 64 67 65 74 |.Creatin|g Widget|
|00002ff0| 73 0a 2e 4c 50 0a 2e 62 | 72 0a 0a 2e 69 6e 20 30 |s..LP..b|r...in 0|
|00003000| 2e 35 69 0a 57 49 44 47 | 45 54 20 6d 6b 63 6d 64 |.5i.WIDG|ET mkcmd|
|00003010| 77 69 64 67 65 74 20 28 | 6d 65 73 73 61 67 65 2c |widget (|message,|
|00003020| 20 63 68 2c 20 66 75 6e | 63 74 69 6f 6e 2c 20 72 | ch, fun|ction, r|
|00003030| 6f 77 29 0a 2e 62 72 20 | 0a 63 68 61 72 20 6d 65 |ow)..br |.char me|
|00003040| 73 73 61 67 65 5b 5d 3b | 0a 2e 62 72 20 0a 63 68 |ssage[];|..br .ch|
|00003050| 61 72 20 63 68 3b 0a 2e | 62 72 20 0a 69 6e 74 20 |ar ch;..|br .int |
|00003060| 0a 28 2a 66 75 6e 63 29 | 28 29 3b 0a 2e 62 72 20 |.(*func)|();..br |
|00003070| 0a 69 6e 74 20 6c 69 6e | 65 3b 0a 2e 69 6e 20 30 |.int lin|e;..in 0|
|00003080| 0a 2e 4c 50 0a 43 72 65 | 61 74 65 73 20 61 20 6e |..LP.Cre|ates a n|
|00003090| 65 77 20 63 6f 6d 6d 61 | 6e 64 20 77 69 64 67 65 |ew comma|nd widge|
|000030a0| 74 2e 20 6d 65 73 73 61 | 67 65 20 68 6f 6c 64 73 |t. messa|ge holds|
|000030b0| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 74 6f 20 | the mes|sage to |
|000030c0| 62 65 20 64 69 73 70 6c | 61 79 65 64 20 69 6e 20 |be displ|ayed in |
|000030d0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 77 69 64 67 |the comm|and widg|
|000030e0| 65 74 2e 20 63 68 20 69 | 73 20 74 68 65 20 61 63 |et. ch i|s the ac|
|000030f0| 74 69 76 61 74 69 6f 6e | 20 63 68 61 72 61 63 74 |tivation| charact|
|00003100| 65 72 20 6f 6e 20 77 68 | 69 63 68 20 66 75 6e 63 |er on wh|ich func|
|00003110| 74 69 6f 6e 20 69 73 20 | 65 78 65 63 75 74 65 64 |tion is |executed|
|00003120| 2e 20 72 6f 77 20 73 70 | 65 63 69 66 69 65 73 20 |. row sp|ecifies |
|00003130| 77 68 65 72 65 20 74 6f | 20 70 6c 61 63 65 20 74 |where to| place t|
|00003140| 68 65 20 77 69 64 67 65 | 74 20 28 61 73 20 64 65 |he widge|t (as de|
|00003150| 73 63 72 69 62 65 64 20 | 61 62 6f 76 65 29 2e 20 |scribed |above). |
|00003160| 54 68 65 20 72 65 74 75 | 72 6e 65 64 20 76 61 6c |The retu|rned val|
|00003170| 75 65 20 69 73 20 74 68 | 65 20 77 69 64 67 65 74 |ue is th|e widget|
|00003180| 20 69 64 65 6e 74 69 66 | 69 65 72 20 66 6f 72 20 | identif|ier for |
|00003190| 6c 61 74 65 72 20 75 73 | 65 2e 0a 0a 2e 4c 50 0a |later us|e....LP.|
|000031a0| 2e 69 6e 20 30 2e 35 69 | 0a 57 49 44 47 45 54 20 |.in 0.5i|.WIDGET |
|000031b0| 6d 6b 6c 62 6c 77 69 64 | 67 65 74 20 28 6d 65 73 |mklblwid|get (mes|
|000031c0| 73 61 67 65 2c 20 70 6f | 73 69 74 69 6f 6e 2c 20 |sage, po|sition, |
|000031d0| 73 70 61 63 65 2c 20 72 | 6f 77 29 0a 2e 62 72 0a |space, r|ow)..br.|
|000031e0| 63 68 61 72 20 6d 65 73 | 73 61 67 65 5b 5d 3b 0a |char mes|sage[];.|
|000031f0| 2e 62 72 0a 69 6e 74 20 | 20 70 6f 73 69 74 69 6f |.br.int | positio|
|00003200| 6e 2c 20 73 70 61 63 65 | 2c 20 72 6f 77 3b 0a 2e |n, space|, row;..|
|00003210| 69 6e 20 30 0a 2e 4c 50 | 0a 43 72 65 61 74 65 73 |in 0..LP|.Creates|
|00003220| 20 61 20 6e 65 77 20 6c | 61 62 65 6c 20 77 69 64 | a new l|abel wid|
|00003230| 67 65 74 2e 20 4d 65 73 | 73 61 67 65 20 68 6f 6c |get. Mes|sage hol|
|00003240| 64 73 20 74 68 65 20 63 | 6f 6e 74 65 6e 74 73 20 |ds the c|ontents |
|00003250| 6f 66 20 74 68 65 20 6c | 61 62 65 6c 2c 20 70 6f |of the l|abel, po|
|00003260| 73 69 74 69 6f 6e 20 73 | 70 65 63 69 66 69 65 73 |sition s|pecifies|
|00003270| 20 68 6f 77 20 74 68 65 | 20 6d 65 73 73 61 67 65 | how the| message|
|00003280| 20 69 73 20 74 6f 20 61 | 70 70 65 61 72 2e 20 55 | is to a|ppear. U|
|00003290| 73 69 6e 67 20 74 68 65 | 20 63 6f 6e 73 74 61 6e |sing the| constan|
|000032a0| 74 73 20 43 45 4e 54 52 | 45 2c 20 4c 45 46 54 4a |ts CENTR|E, LEFTJ|
|000032b0| 55 53 54 2c 20 52 49 47 | 48 54 4a 55 53 54 2c 20 |UST, RIG|HTJUST, |
|000032c0| 4e 4f 48 49 47 48 2c 20 | 70 61 73 73 20 61 20 63 |NOHIGH, |pass a c|
|000032d0| 6f 6d 62 69 6e 61 74 69 | 6f 6e 20 74 6f 20 70 6f |ombinati|on to po|
|000032e0| 73 69 74 69 6f 6e 20 65 | 2e 67 20 43 45 4e 54 52 |sition e|.g CENTR|
|000032f0| 45 20 6f 72 20 4c 45 46 | 54 4a 55 53 54 7c 4e 4f |E or LEF|TJUST|NO|
|00003300| 48 49 47 48 20 65 74 63 | 2e 73 70 61 63 65 20 69 |HIGH etc|.space i|
|00003310| 6e 64 69 63 61 74 65 73 | 20 68 6f 77 20 6c 61 72 |ndicates| how lar|
|00003320| 67 65 20 74 68 65 20 6c | 61 62 65 6c 20 77 69 64 |ge the l|abel wid|
|00003330| 67 65 74 20 69 73 20 74 | 6f 20 62 65 2e 20 41 20 |get is t|o be. A |
|00003340| 70 6f 73 69 74 69 76 65 | 20 76 61 6c 75 65 20 69 |positive| value i|
|00003350| 73 20 74 68 65 20 61 62 | 73 6f 6c 75 74 65 20 6c |s the ab|solute l|
|00003360| 65 6e 67 74 68 20 6f 66 | 20 74 68 65 20 77 69 64 |ength of| the wid|
|00003370| 67 65 74 2c 20 77 68 65 | 72 65 61 73 20 76 61 6c |get, whe|reas val|
|00003380| 75 65 20 3c 3d 20 30 20 | 73 70 65 63 69 66 69 65 |ue <= 0 |specifie|
|00003390| 73 20 68 6f 77 20 66 61 | 72 20 74 68 65 20 77 69 |s how fa|r the wi|
|000033a0| 64 67 65 74 20 69 73 20 | 74 6f 20 62 65 20 66 72 |dget is |to be fr|
|000033b0| 6f 6d 20 74 68 65 20 72 | 69 67 68 74 68 61 6e 64 |om the r|ighthand|
|000033c0| 20 65 64 67 65 20 6f 66 | 20 74 68 65 20 73 63 72 | edge of| the scr|
|000033d0| 65 65 6e 2e 20 72 6f 77 | 20 73 70 65 63 69 66 69 |een. row| specifi|
|000033e0| 65 73 20 77 68 65 72 65 | 20 74 6f 20 70 6c 61 63 |es where| to plac|
|000033f0| 65 20 74 68 65 20 77 69 | 64 67 65 74 20 28 61 73 |e the wi|dget (as|
|00003400| 20 64 65 73 63 72 69 62 | 65 64 20 61 62 6f 76 65 | describ|ed above|
|00003410| 29 2e 20 54 68 65 20 72 | 0a 0a 65 74 75 72 6e 65 |). The r|..eturne|
|00003420| 64 20 76 61 6c 75 65 20 | 69 73 20 74 68 65 20 77 |d value |is the w|
|00003430| 69 64 67 65 74 20 69 64 | 65 6e 74 69 66 69 65 72 |idget id|entifier|
|00003440| 20 66 6f 72 20 6c 61 74 | 65 72 20 75 73 65 2e 0a | for lat|er use..|
|00003450| 0a 2e 4c 50 0a 2e 69 6e | 20 30 2e 35 69 0a 57 49 |..LP..in| 0.5i.WI|
|00003460| 44 47 45 54 20 6d 6b 74 | 67 6c 77 69 64 67 65 74 |DGET mkt|glwidget|
|00003470| 20 28 6d 65 73 73 61 67 | 65 2c 20 6e 75 6d 62 65 | (messag|e, numbe|
|00003480| 72 2c 20 74 67 6c 2c 20 | 74 67 6c 63 68 2c 20 72 |r, tgl, |tglch, r|
|00003490| 6f 77 29 0a 2e 62 72 0a | 63 68 61 72 20 6d 65 73 |ow)..br.|char mes|
|000034a0| 73 61 67 65 5b 5d 3b 0a | 2e 62 72 0a 69 6e 74 20 |sage[];.|.br.int |
|000034b0| 20 6e 75 6d 62 65 72 3b | 0a 2e 62 72 0a 63 68 61 | number;|..br.cha|
|000034c0| 72 20 74 67 6c 5b 31 30 | 5d 5b 32 30 5d 3b 0a 2e |r tgl[10|][20];..|
|000034d0| 62 72 0a 63 68 61 72 20 | 74 67 6c 63 68 3b 0a 2e |br.char |tglch;..|
|000034e0| 62 72 0a 69 6e 74 20 20 | 72 6f 77 3b 0a 2e 69 6e |br.int |row;..in|
|000034f0| 20 30 0a 2e 4c 50 0a 43 | 72 65 61 74 65 73 20 61 | 0..LP.C|reates a|
|00003500| 20 6e 65 77 20 74 6f 67 | 67 6c 65 20 77 69 64 67 | new tog|gle widg|
|00003510| 65 74 2e 20 6d 65 73 73 | 61 67 65 20 63 6f 6e 74 |et. mess|age cont|
|00003520| 61 69 6e 73 20 61 20 6c | 61 62 65 6c 20 66 6f 72 |ains a l|abel for|
|00003530| 20 74 68 65 20 77 69 64 | 67 65 74 2c 20 61 6e 64 | the wid|get, and|
|00003540| 20 6e 75 6d 62 65 72 20 | 68 6f 6c 64 73 20 74 68 | number |holds th|
|00003550| 65 20 6e 75 6d 62 65 72 | 20 6f 66 20 74 6f 67 67 |e number| of togg|
|00003560| 6c 65 20 76 61 6c 75 65 | 73 2e 20 74 67 6c 20 69 |le value|s. tgl i|
|00003570| 73 20 75 73 65 64 20 66 | 6f 72 20 68 6f 6c 64 69 |s used f|or holdi|
|00003580| 6e 67 20 61 63 74 75 61 | 6c 20 74 6f 67 67 6c 65 |ng actua|l toggle|
|00003590| 20 76 61 6c 75 65 73 20 | 77 68 69 63 68 20 61 72 | values |which ar|
|000035a0| 65 20 74 6f 67 67 6c 65 | 64 20 62 65 74 77 65 65 |e toggle|d betwee|
|000035b0| 6e 20 75 73 69 6e 67 20 | 74 68 65 20 61 63 74 69 |n using |the acti|
|000035c0| 76 61 74 69 6f 6e 20 63 | 68 61 72 61 63 74 65 72 |vation c|haracter|
|000035d0| 20 74 67 6c 63 68 2e 20 | 41 74 20 70 72 65 73 65 | tglch. |At prese|
|000035e0| 6e 74 20 74 68 65 72 65 | 20 69 73 20 61 20 6c 69 |nt there| is a li|
|000035f0| 6d 69 74 20 6f 66 20 31 | 30 20 74 6f 67 67 6c 65 |mit of 1|0 toggle|
|00003600| 20 76 61 6c 75 65 73 2c | 20 65 61 63 68 20 62 65 | values,| each be|
|00003610| 69 6e 67 20 61 20 6d 61 | 78 69 6d 75 6d 20 6c 65 |ing a ma|ximum le|
|00003620| 6e 67 74 68 20 6f 66 20 | 32 30 20 63 68 61 72 61 |ngth of |20 chara|
|00003630| 63 74 65 72 73 2e 20 72 | 6f 77 20 73 70 65 63 69 |cters. r|ow speci|
|00003640| 66 69 65 73 20 77 68 65 | 72 65 20 74 6f 20 70 6c |fies whe|re to pl|
|00003650| 61 63 65 20 74 68 65 20 | 77 69 64 67 65 74 20 28 |ace the |widget (|
|00003660| 61 73 20 64 65 73 63 72 | 69 62 65 64 20 61 62 6f |as descr|ibed abo|
|00003670| 76 65 29 2e 20 54 68 65 | 20 72 65 74 75 72 6e 65 |ve). The| returne|
|00003680| 64 20 76 61 6c 75 65 20 | 69 73 20 74 68 65 20 77 |d value |is the w|
|00003690| 69 64 67 65 74 20 69 64 | 65 6e 74 69 66 69 65 72 |idget id|entifier|
|000036a0| 20 66 6f 72 20 6c 61 74 | 65 72 20 75 73 65 2e 0a | for lat|er use..|
|000036b0| 2e 4c 50 0a 2e 4b 45 0a | 2e 62 70 0a 2e 4b 53 0a |.LP..KE.|.bp..KS.|
|000036c0| 2e 69 6e 20 30 2e 35 69 | 0a 57 49 44 47 45 54 20 |.in 0.5i|.WIDGET |
|000036d0| 6d 6b 69 6e 70 77 69 64 | 67 65 74 20 28 6d 65 73 |mkinpwid|get (mes|
|000036e0| 73 61 67 65 2c 20 63 68 | 61 72 61 63 74 65 72 2c |sage, ch|aracter,|
|000036f0| 20 69 6e 70 75 74 2c 20 | 6c 65 6e 67 74 68 73 74 | input, |lengthst|
|00003700| 72 2c 20 6c 65 6e 67 74 | 68 77 69 64 2c 20 72 6f |r, lengt|hwid, ro|
|00003710| 77 2c 20 65 78 65 63 29 | 0a 2e 62 72 0a 63 68 61 |w, exec)|..br.cha|
|00003720| 72 20 6d 65 73 73 61 67 | 65 5b 5d 2c 20 63 68 61 |r messag|e[], cha|
|00003730| 72 61 63 74 65 72 2c 20 | 69 6e 70 75 74 5b 5d 3b |racter, |input[];|
|00003740| 0a 2e 62 72 0a 69 6e 74 | 20 20 6c 65 6e 67 74 68 |..br.int| length|
|00003750| 73 74 72 2c 20 6c 65 6e | 67 74 68 77 69 64 2c 20 |str, len|gthwid, |
|00003760| 72 6f 77 2c 20 65 78 65 | 63 3b 20 0a 2e 69 6e 20 |row, exe|c; ..in |
|00003770| 30 0a 2e 4c 50 0a 43 72 | 65 61 74 65 73 20 61 20 |0..LP.Cr|eates a |
|00003780| 6e 65 77 20 69 6e 70 75 | 74 20 77 69 64 67 65 74 |new inpu|t widget|
|00003790| 2e 20 6d 65 73 73 61 67 | 65 20 63 6f 6e 74 61 69 |. messag|e contai|
|000037a0| 6e 73 20 74 68 65 20 6c | 61 62 65 6c 20 66 6f 72 |ns the l|abel for|
|000037b0| 20 74 68 65 20 77 69 64 | 67 65 74 2c 20 61 6e 64 | the wid|get, and|
|000037c0| 20 63 68 61 72 61 63 74 | 65 72 20 69 73 20 74 68 | charact|er is th|
|000037d0| 65 20 61 63 74 69 76 61 | 74 69 6f 6e 20 63 68 61 |e activa|tion cha|
|000037e0| 72 61 63 74 65 72 20 66 | 6f 72 20 74 68 65 20 77 |racter f|or the w|
|000037f0| 69 64 67 65 74 2e 20 69 | 6e 70 75 74 20 69 73 20 |idget. i|nput is |
|00003800| 74 68 65 20 76 61 72 69 | 61 62 6c 65 20 69 6e 20 |the vari|able in |
|00003810| 77 68 69 63 68 20 74 68 | 65 20 75 73 65 72 20 77 |which th|e user w|
|00003820| 69 73 68 65 73 20 74 68 | 65 20 64 61 74 61 20 6f |ishes th|e data o|
|00003830| 62 74 61 69 6e 65 64 20 | 66 72 6f 6d 20 74 68 65 |btained |from the|
|00003840| 20 69 6e 70 75 74 20 77 | 69 64 67 65 74 20 74 6f | input w|idget to|
|00003850| 20 62 65 20 70 6c 61 63 | 65 64 2c 20 6c 65 6e 67 | be plac|ed, leng|
|00003860| 74 68 73 74 72 20 69 73 | 20 74 68 65 20 6c 65 6e |thstr is| the len|
|00003870| 67 74 68 20 6f 66 20 69 | 6e 70 75 74 2e 20 6c 65 |gth of i|nput. le|
|00003880| 6e 67 74 68 77 69 64 20 | 73 70 65 63 69 66 69 65 |ngthwid |specifie|
|00003890| 73 20 68 6f 77 20 62 69 | 67 20 74 6f 20 6d 61 6b |s how bi|g to mak|
|000038a0| 65 20 74 68 65 20 77 69 | 64 67 65 74 2e 20 41 20 |e the wi|dget. A |
|000038b0| 70 6f 73 69 74 69 76 65 | 20 76 61 6c 75 65 20 69 |positive| value i|
|000038c0| 6e 64 69 63 61 74 65 73 | 20 74 68 65 20 61 62 73 |ndicates| the abs|
|000038d0| 6f 6c 75 74 65 20 6c 65 | 6e 67 74 68 20 6f 66 20 |olute le|ngth of |
|000038e0| 74 68 65 20 77 69 64 67 | 65 74 2c 20 77 68 65 72 |the widg|et, wher|
|000038f0| 65 20 61 73 20 61 20 76 | 61 6c 75 65 20 3c 3d 20 |e as a v|alue <= |
|00003900| 30 20 69 6e 64 69 63 61 | 74 65 73 20 68 6f 77 20 |0 indica|tes how |
|00003910| 66 61 72 20 66 72 6f 6d | 20 74 68 65 20 72 69 67 |far from| the rig|
|00003920| 68 74 68 61 6e 64 20 65 | 64 67 65 20 74 68 65 20 |hthand e|dge the |
|00003930| 77 69 64 67 65 74 20 69 | 73 20 74 6f 20 62 65 2e |widget i|s to be.|
|00003940| 20 65 78 65 63 20 69 73 | 20 75 73 65 64 20 74 6f | exec is| used to|
|00003950| 20 69 6e 64 69 63 61 74 | 65 20 77 68 65 74 68 65 | indicat|e whethe|
|00003960| 72 20 74 68 65 20 77 69 | 64 67 65 74 20 73 68 6f |r the wi|dget sho|
|00003970| 75 6c 64 20 62 0a 0a 65 | 20 61 63 74 69 76 61 74 |uld b..e| activat|
|00003980| 65 64 20 6f 6e 20 63 72 | 65 61 74 69 6f 6e 20 62 |ed on cr|eation b|
|00003990| 79 20 28 70 61 73 73 69 | 6e 67 20 45 58 45 43 29 |y (passi|ng EXEC)|
|000039a0| 2c 20 6f 72 20 73 68 6f | 75 6c 64 20 72 65 6d 61 |, or sho|uld rema|
|000039b0| 69 6e 20 64 6f 72 6d 61 | 6e 74 20 75 6e 74 69 6c |in dorma|nt until|
|000039c0| 20 74 68 65 20 61 63 74 | 69 76 61 74 69 6f 6e 20 | the act|ivation |
|000039d0| 63 68 61 72 61 63 74 65 | 72 20 69 73 20 75 73 65 |characte|r is use|
|000039e0| 64 20 28 70 61 73 73 69 | 6e 67 20 4e 4f 45 58 45 |d (passi|ng NOEXE|
|000039f0| 43 29 2e 20 28 6e 2e 62 | 20 77 68 65 6e 20 70 61 |C). (n.b| when pa|
|00003a00| 73 73 69 6e 67 20 45 58 | 45 43 20 61 6e 20 61 63 |ssing EX|EC an ac|
|00003a10| 74 69 76 61 74 69 6f 6e | 20 63 68 61 72 61 63 74 |tivation| charact|
|00003a20| 65 72 20 69 73 20 6e 6f | 74 20 6e 65 65 64 65 64 |er is no|t needed|
|00003a30| 20 74 68 65 72 65 66 6f | 72 65 20 6f 6e 65 20 63 | therefo|re one c|
|00003a40| 6f 75 6c 64 20 70 61 73 | 73 20 4e 55 4c 4c 20 66 |ould pas|s NULL f|
|00003a50| 6f 72 20 63 68 61 72 61 | 63 74 65 72 2e 29 0a 0a |or chara|cter.)..|
|00003a60| 2e 53 48 0a 54 65 78 74 | 20 57 69 6e 64 6f 77 20 |.SH.Text| Window |
|00003a70| 4d 61 6e 61 67 65 6d 65 | 6e 74 0a 2e 4c 50 0a 2e |Manageme|nt..LP..|
|00003a80| 62 72 0a 0a 2e 69 6e 20 | 30 2e 35 69 0a 69 6e 74 |br...in |0.5i.int|
|00003a90| 20 6f 70 65 6e 74 65 78 | 74 77 69 6e 64 6f 77 20 | opentex|twindow |
|00003aa0| 28 70 6f 73 69 74 69 6f | 6e 2c 20 62 6f 72 64 65 |(positio|n, borde|
|00003ab0| 72 29 0a 2e 62 72 0a 69 | 6e 74 20 70 6f 73 69 74 |r)..br.i|nt posit|
|00003ac0| 69 6f 6e 2c 20 62 6f 72 | 64 65 72 3b 0a 2e 69 6e |ion, bor|der;..in|
|00003ad0| 20 30 0a 2e 4c 50 0a 4f | 70 65 6e 73 20 61 6e 64 | 0..LP.O|pens and|
|00003ae0| 20 64 69 73 70 6c 61 79 | 73 20 74 68 65 20 74 65 | display|s the te|
|00003af0| 78 74 20 77 69 6e 64 6f | 77 2e 20 70 6f 73 69 74 |xt windo|w. posit|
|00003b00| 69 6f 6e 20 73 70 65 63 | 69 66 69 65 73 20 77 68 |ion spec|ifies wh|
|00003b10| 65 72 65 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 |ere the |window i|
|00003b20| 73 20 74 6f 20 67 6f 2e | 20 69 2e 65 20 70 6f 73 |s to go.| i.e pos|
|00003b30| 69 74 69 6f 6e 20 3d 20 | 30 20 77 69 6c 6c 20 70 |ition = |0 will p|
|00003b40| 6c 61 63 65 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |lace the| window |
|00003b50| 69 6d 6d 65 64 69 61 74 | 65 6c 79 20 62 65 6c 6f |immediat|ely belo|
|00003b60| 77 20 74 68 65 20 6c 6f | 77 65 73 74 20 77 69 64 |w the lo|west wid|
|00003b70| 67 65 74 2c 20 70 6f 73 | 69 74 69 6f 6e 20 3d 20 |get, pos|ition = |
|00003b80| 31 20 77 69 6c 6c 20 61 | 6c 6c 6f 77 20 72 6f 6f |1 will a|llow roo|
|00003b90| 6d 20 66 6f 72 20 31 20 | 6d 6f 72 65 20 72 6f 77 |m for 1 |more row|
|00003ba0| 20 6f 66 20 77 69 64 67 | 65 74 73 20 62 65 6c 6f | of widg|ets belo|
|00003bb0| 77 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 6c 6f |w the cu|rrent lo|
|00003bc0| 77 65 73 74 20 62 65 66 | 6f 72 65 20 70 6c 61 63 |west bef|ore plac|
|00003bd0| 69 6e 67 20 74 68 65 20 | 77 69 6e 64 6f 77 20 65 |ing the |window e|
|00003be0| 74 63 2e 20 62 6f 72 64 | 65 72 20 69 73 20 75 73 |tc. bord|er is us|
|00003bf0| 65 64 20 74 6f 20 69 6e | 64 69 63 61 74 65 20 77 |ed to in|dicate w|
|00003c00| 68 65 74 68 65 72 20 74 | 68 65 20 77 69 6e 64 6f |hether t|he windo|
|00003c10| 77 20 73 68 6f 75 6c 64 | 20 62 65 20 62 6f 72 64 |w should| be bord|
|00003c20| 65 72 65 64 2e 20 69 2e | 65 20 75 73 69 6e 67 20 |ered. i.|e using |
|00003c30| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 56 |the para|meters V|
|00003c40| 45 52 54 49 43 41 4c 20 | 26 20 48 4f 52 49 5a 4f |ERTICAL |& HORIZO|
|00003c50| 4e 54 41 4c 2c 20 6f 6e | 65 20 63 61 6e 20 73 70 |NTAL, on|e can sp|
|00003c60| 65 63 69 66 79 20 77 68 | 65 74 68 65 72 20 74 68 |ecify wh|ether th|
|00003c70| 65 20 77 69 6e 64 6f 77 | 20 73 68 6f 75 6c 64 20 |e window| should |
|00003c80| 62 65 20 62 6f 72 64 65 | 72 65 64 20 76 65 72 74 |be borde|red vert|
|00003c90| 69 63 61 6c 6c 79 20 28 | 70 61 73 73 69 6e 67 20 |ically (|passing |
|00003ca0| 56 45 52 54 49 43 41 4c | 29 2c 20 68 6f 72 69 7a |VERTICAL|), horiz|
|00003cb0| 6f 6e 74 61 6c 6c 79 20 | 28 70 61 73 73 69 6e 67 |ontally |(passing|
|00003cc0| 20 48 4f 52 49 5a 4f 4e | 54 41 4c 29 2c 20 62 6f | HORIZON|TAL), bo|
|00003cd0| 74 68 20 28 70 61 0a 0a | 73 73 69 6e 67 20 56 45 |th (pa..|ssing VE|
|00003ce0| 52 54 49 43 41 4c 7c 48 | 4f 52 49 5a 4f 4e 54 41 |RTICAL|H|ORIZONTA|
|00003cf0| 4c 29 2c 20 6f 72 20 6e | 65 69 74 68 65 72 20 28 |L), or n|either (|
|00003d00| 70 61 73 73 69 6e 67 20 | 30 29 2e 20 54 68 65 20 |passing |0). The |
|00003d10| 66 75 6e 63 74 69 6f 6e | 20 72 65 74 75 72 6e 73 |function| returns|
|00003d20| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 6c | the num|ber of l|
|00003d30| 69 6e 65 73 20 77 69 74 | 68 69 6e 20 74 68 65 20 |ines wit|hin the |
|00003d40| 77 69 6e 64 6f 77 2e 0a | 0a 2e 69 6e 20 30 2e 35 |window..|..in 0.5|
|00003d50| 69 0a 72 65 70 6f 72 74 | 20 28 6d 65 73 73 61 67 |i.report| (messag|
|00003d60| 65 29 0a 2e 62 72 0a 63 | 68 61 72 20 2a 6d 65 73 |e)..br.c|har *mes|
|00003d70| 73 61 67 65 3b 0a 2e 69 | 6e 20 30 0a 2e 4c 50 0a |sage;..i|n 0..LP.|
|00003d80| 44 69 73 70 6c 61 79 73 | 20 74 68 65 20 67 69 76 |Displays| the giv|
|00003d90| 65 6e 20 6d 65 73 73 61 | 67 65 20 69 6e 20 74 68 |en messa|ge in th|
|00003da0| 65 20 74 65 78 74 20 77 | 69 6e 64 6f 77 2e 20 53 |e text w|indow. S|
|00003db0| 63 72 6f 6c 6c 69 6e 67 | 20 69 73 20 64 6f 6e 65 |crolling| is done|
|00003dc0| 20 61 75 74 6f 6d 61 74 | 69 63 61 6c 6c 79 20 77 | automat|ically w|
|00003dd0| 68 65 6e 20 74 68 65 20 | 62 6f 74 74 6f 6d 20 6f |hen the |bottom o|
|00003de0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 69 73 20 |f the wi|ndow is |
|00003df0| 72 65 61 63 68 65 64 20 | 61 6e 64 20 69 73 20 74 |reached |and is t|
|00003e00| 68 65 72 65 66 6f 72 65 | 20 6f 66 20 6e 6f 20 63 |herefore| of no c|
|00003e10| 6f 6e 63 65 72 6e 20 66 | 6f 72 20 74 68 65 20 75 |oncern f|or the u|
|00003e20| 73 65 72 2e 0a 0a 2e 69 | 6e 20 30 2e 35 69 0a 63 |ser....i|n 0.5i.c|
|00003e30| 6c 65 61 72 74 65 78 74 | 77 69 6e 64 6f 77 20 28 |leartext|window (|
|00003e40| 29 0a 2e 69 6e 20 30 0a | 2e 4c 50 0a 43 6c 65 61 |)..in 0.|.LP.Clea|
|00003e50| 72 73 20 74 68 65 20 74 | 65 78 74 20 77 69 6e 64 |rs the t|ext wind|
|00003e60| 6f 77 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 69 |ow and r|eturns i|
|00003e70| 74 73 20 63 75 72 73 6f | 72 20 74 6f 20 74 68 65 |ts curso|r to the|
|00003e80| 20 74 6f 70 20 6c 65 66 | 74 68 61 6e 64 20 63 6f | top lef|thand co|
|00003e90| 72 6e 65 72 2e 20 0a 0a | 2e 69 6e 20 30 2e 35 69 |rner. ..|.in 0.5i|
|00003ea0| 0a 6b 69 6c 6c 74 65 78 | 74 77 69 6e 64 6f 77 20 |.killtex|twindow |
|00003eb0| 28 29 0a 2e 69 6e 20 30 | 0a 2e 4c 50 0a 44 65 73 |()..in 0|..LP.Des|
|00003ec0| 74 72 6f 79 73 20 74 68 | 65 20 74 65 78 74 20 77 |troys th|e text w|
|00003ed0| 69 6e 64 6f 77 2e 20 54 | 68 65 20 74 65 78 74 20 |indow. T|he text |
|00003ee0| 77 69 6e 64 6f 77 20 63 | 61 6e 20 62 65 20 72 65 |window c|an be re|
|00003ef0| 64 65 66 69 6e 65 64 20 | 61 74 20 61 20 6c 61 74 |defined |at a lat|
|00003f00| 65 72 20 64 61 74 65 2e | 0a 0a 2e 53 48 0a 4b 69 |er date.|...SH.Ki|
|00003f10| 6c 6c 69 6e 67 20 57 69 | 64 67 65 74 73 0a 0a 2e |lling Wi|dgets...|
|00003f20| 4c 50 0a 2e 62 72 0a 2e | 69 6e 20 30 2e 35 69 0a |LP..br..|in 0.5i.|
|00003f30| 69 6e 74 20 6b 69 6c 6c | 77 69 64 67 65 74 20 28 |int kill|widget (|
|00003f40| 70 74 72 29 0a 2e 62 72 | 0a 57 49 44 47 45 54 20 |ptr)..br|.WIDGET |
|00003f50| 70 74 72 3b 0a 2e 69 6e | 20 30 0a 2e 4c 50 0a 4b |ptr;..in| 0..LP.K|
|00003f60| 69 6c 6c 73 20 74 68 65 | 20 67 69 76 65 6e 20 77 |ills the| given w|
|00003f70| 69 64 67 65 74 2e 20 74 | 68 65 20 66 75 6e 63 74 |idget. t|he funct|
|00003f80| 69 6f 6e 20 72 65 74 75 | 72 6e 73 20 54 52 55 45 |ion retu|rns TRUE|
|00003f90| 20 69 66 20 73 75 63 63 | 65 73 73 66 75 6c 6c 20 | if succ|essfull |
|00003fa0| 6f 72 20 46 41 4c 53 45 | 20 69 66 20 74 68 65 20 |or FALSE| if the |
|00003fb0| 77 69 64 67 65 74 20 64 | 6f 65 73 6e 27 74 20 65 |widget d|oesn't e|
|00003fc0| 78 69 73 74 2e 0a 2e 4b | 45 0a 2e 62 70 0a 2e 4b |xist...K|E..bp..K|
|00003fd0| 53 0a 2e 53 48 0a 49 6e | 74 65 72 61 63 74 69 6f |S..SH.In|teractio|
|00003fe0| 6e 0a 0a 2e 4c 50 0a 2e | 62 72 0a 2e 69 6e 20 30 |n...LP..|br..in 0|
|00003ff0| 2e 35 69 0a 57 49 44 47 | 45 54 20 77 69 64 67 65 |.5i.WIDG|ET widge|
|00004000| 74 69 6e 70 75 74 20 28 | 29 0a 2e 69 6e 20 30 0a |tinput (|)..in 0.|
|00004010| 2e 4c 50 0a 57 61 69 74 | 20 66 6f 72 20 69 6e 70 |.LP.Wait| for inp|
|00004020| 75 74 20 66 72 6f 6d 20 | 77 69 64 67 65 74 73 2e |ut from |widgets.|
|00004030| 20 50 72 6f 67 72 61 6d | 20 63 6f 6e 74 72 6f 6c | Program| control|
|00004040| 20 69 73 20 70 61 73 73 | 65 64 20 62 61 63 6b 20 | is pass|ed back |
|00004050| 77 68 65 6e 20 3a 2d 0a | 2e 62 72 0a 61 29 20 41 |when :-.|.br.a) A|
|00004060| 20 43 6f 6d 6d 61 6e 64 | 20 77 69 64 67 65 74 20 | Command| widget |
|00004070| 69 73 20 61 63 74 69 76 | 61 74 65 64 20 61 6e 64 |is activ|ated and|
|00004080| 20 63 6f 6e 74 72 6f 6c | 20 69 73 20 70 61 73 73 | control| is pass|
|00004090| 65 64 20 74 6f 20 69 74 | 73 20 61 73 73 6f 63 69 |ed to it|s associ|
|000040a0| 61 74 65 64 20 66 75 6e | 63 74 69 6f 6e 2e 0a 2e |ated fun|ction...|
|000040b0| 62 72 0a 62 29 20 41 6e | 20 69 6e 70 75 74 20 77 |br.b) An| input w|
|000040c0| 69 64 67 65 74 20 69 73 | 20 61 63 74 69 76 61 74 |idget is| activat|
|000040d0| 65 64 20 61 6e 64 20 61 | 66 74 65 72 20 73 75 62 |ed and a|fter sub|
|000040e0| 73 65 71 75 65 6e 74 20 | 69 6e 70 75 74 2c 20 63 |sequent |input, c|
|000040f0| 6f 6e 74 72 6f 6c 20 69 | 73 20 70 61 73 73 65 64 |ontrol i|s passed|
|00004100| 20 74 6f 20 74 68 65 20 | 63 61 6c 6c 69 6e 67 20 | to the |calling |
|00004110| 66 75 6e 63 74 69 6f 6e | 20 77 69 74 68 20 74 68 |function| with th|
|00004120| 65 20 77 69 64 67 65 74 | 20 70 6f 69 6e 74 65 72 |e widget| pointer|
|00004130| 20 6f 66 20 74 68 65 20 | 61 63 74 69 76 61 74 65 | of the |activate|
|00004140| 64 20 69 6e 70 75 74 20 | 77 69 64 67 65 74 2e 0a |d input |widget..|
|00004150| 2e 62 72 0a 41 63 74 69 | 76 61 74 69 6e 67 20 61 |.br.Acti|vating a|
|00004160| 20 74 6f 67 67 6c 65 20 | 77 69 64 67 65 74 20 6a | toggle |widget j|
|00004170| 75 73 74 20 74 6f 67 67 | 6c 65 73 20 74 68 65 20 |ust togg|les the |
|00004180| 77 69 64 67 65 74 2c 20 | 63 6f 6e 74 72 6f 6c 20 |widget, |control |
|00004190| 69 73 20 6f 6e 6c 79 20 | 70 61 73 73 65 64 20 62 |is only |passed b|
|000041a0| 61 63 6b 20 75 70 6f 6e | 20 6f 6e 65 20 6f 66 20 |ack upon| one of |
|000041b0| 74 68 65 20 61 62 6f 76 | 65 20 63 6f 6e 64 69 74 |the abov|e condit|
|000041c0| 69 6f 6e 73 2e 0a 0a 2e | 4c 50 0a 2e 62 72 0a 2e |ions....|LP..br..|
|000041d0| 69 6e 20 30 2e 35 69 0a | 69 6e 74 20 74 73 74 74 |in 0.5i.|int tstt|
|000041e0| 67 6c 77 69 64 67 65 74 | 20 28 70 74 72 29 0a 2e |glwidget| (ptr)..|
|000041f0| 62 72 0a 57 49 44 47 45 | 54 20 70 74 72 3b 0a 2e |br.WIDGE|T ptr;..|
|00004200| 69 6e 20 30 0a 2e 4c 50 | 0a 52 65 74 75 72 6e 73 |in 0..LP|.Returns|
|00004210| 20 74 68 65 20 69 6e 64 | 65 78 20 76 61 6c 75 65 | the ind|ex value|
|00004220| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00004230| 73 74 61 74 65 20 6f 66 | 20 74 68 65 20 67 69 76 |state of| the giv|
|00004240| 65 6e 20 74 6f 67 67 6c | 65 20 77 69 64 67 65 74 |en toggl|e widget|
|00004250| 20 28 30 20 3c 20 69 6e | 64 65 78 20 3c 20 6e 75 | (0 < in|dex < nu|
|00004260| 6d 62 65 72 20 74 6f 67 | 67 6c 65 20 76 61 6c 75 |mber tog|gle valu|
|00004270| 65 73 20 2d 20 31 29 2e | 20 52 65 74 75 72 6e 73 |es - 1).| Returns|
|00004280| 20 46 41 4c 53 45 20 69 | 66 20 74 68 65 20 67 69 | FALSE i|f the gi|
|00004290| 76 65 6e 20 77 69 64 67 | 65 74 20 64 6f 65 73 20 |ven widg|et does |
|000042a0| 6e 6f 74 20 65 78 69 73 | 74 2e 0a 0a 2e 4c 50 0a |not exis|t....LP.|
|000042b0| 2e 62 72 0a 2e 69 6e 20 | 30 2e 35 69 0a 69 6e 74 |.br..in |0.5i.int|
|000042c0| 20 61 63 74 69 76 61 74 | 65 20 28 70 74 72 29 0a | activat|e (ptr).|
|000042d0| 2e 62 72 0a 57 49 44 47 | 45 54 20 70 74 72 3b 0a |.br.WIDG|ET ptr;.|
|000042e0| 2e 69 6e 20 30 0a 2e 4c | 50 0a 52 65 61 63 74 69 |.in 0..L|P.Reacti|
|000042f0| 76 61 74 65 73 20 61 20 | 77 69 64 67 65 74 20 77 |vates a |widget w|
|00004300| 68 69 63 68 20 77 61 73 | 20 70 72 65 76 69 6f 75 |hich was| previou|
|00004310| 73 6c 79 20 64 65 61 63 | 74 69 76 61 74 65 64 2e |sly deac|tivated.|
|00004320| 20 52 65 74 75 72 6e 73 | 20 54 52 55 45 20 69 66 | Returns| TRUE if|
|00004330| 20 73 75 63 63 65 73 73 | 66 75 6c 20 6f 74 68 65 | success|ful othe|
|00004340| 72 77 69 73 65 20 46 41 | 4c 53 45 2e 0a 0a 2e 4c |rwise FA|LSE....L|
|00004350| 50 0a 2e 62 72 0a 2e 69 | 6e 20 30 2e 35 69 0a 69 |P..br..i|n 0.5i.i|
|00004360| 6e 74 20 64 65 61 63 74 | 69 76 61 74 65 20 28 70 |nt deact|ivate (p|
|00004370| 74 72 2c 20 62 6c 61 6e | 6b 29 0a 2e 62 72 0a 57 |tr, blan|k)..br.W|
|00004380| 49 44 47 45 54 20 70 74 | 72 3b 0a 2e 62 72 0a 69 |IDGET pt|r;..br.i|
|00004390| 6e 74 20 20 20 20 62 6c | 61 6e 6b 3b 0a 2e 69 6e |nt bl|ank;..in|
|000043a0| 20 30 0a 2e 4c 50 0a 44 | 65 61 63 74 69 76 61 74 | 0..LP.D|eactivat|
|000043b0| 65 73 20 74 68 65 20 67 | 69 76 65 6e 20 61 63 74 |es the g|iven act|
|000043c0| 69 76 65 20 77 69 64 67 | 65 74 2e 20 54 68 65 20 |ive widg|et. The |
|000043d0| 77 69 64 67 65 74 20 72 | 65 6d 61 69 6e 73 20 6f |widget r|emains o|
|000043e0| 6e 20 73 63 72 65 65 6e | 20 62 75 74 20 69 74 20 |n screen| but it |
|000043f0| 63 61 6e 6e 6f 74 20 62 | 65 20 61 63 74 69 76 61 |cannot b|e activa|
|00004400| 74 65 64 2e 20 62 6c 61 | 6e 6b 20 63 61 6e 20 62 |ted. bla|nk can b|
|00004410| 65 20 42 4c 41 4e 4b 20 | 6f 72 20 4e 4f 42 4c 41 |e BLANK |or NOBLA|
|00004420| 4e 4b 20 77 68 69 63 68 | 20 69 6e 64 69 63 61 74 |NK which| indicat|
|00004430| 65 73 20 77 68 65 74 68 | 65 72 20 74 68 65 20 63 |es wheth|er the c|
|00004440| 6f 6e 74 65 6e 74 73 20 | 6f 66 20 74 68 65 20 77 |ontents |of the w|
|00004450| 69 64 67 65 74 20 73 68 | 6f 75 6c 64 20 62 65 20 |idget sh|ould be |
|00004460| 62 6c 61 6e 6b 65 64 20 | 6f 75 74 20 6f 72 20 6e |blanked |out or n|
|00004470| 6f 74 20 77 68 69 6c 65 | 20 69 74 20 69 73 20 69 |ot while| it is i|
|00004480| 6e 61 63 74 69 76 65 2e | 20 54 68 65 20 66 75 6e |nactive.| The fun|
|00004490| 63 74 69 6f 6e 20 72 65 | 74 75 72 6e 73 20 54 52 |ction re|turns TR|
|000044a0| 55 45 20 69 66 20 73 75 | 63 63 65 73 73 66 75 6c |UE if su|ccessful|
|000044b0| 20 6f 72 20 46 41 4c 53 | 45 20 69 66 20 74 68 65 | or FALS|E if the|
|000044c0| 20 67 69 76 65 6e 20 77 | 69 64 67 65 74 20 64 6f | given w|idget do|
|000044d0| 65 73 20 6e 6f 74 20 65 | 78 69 73 74 2e 0a 0a 2e |es not e|xist....|
|000044e0| 4c 50 0a 2e 62 72 0a 2e | 69 6e 20 30 2e 35 69 0a |LP..br..|in 0.5i.|
|000044f0| 69 6e 74 20 68 69 67 68 | 6c 69 67 68 74 20 28 70 |int high|light (p|
|00004500| 74 72 29 0a 2e 62 72 0a | 57 49 44 47 45 54 20 70 |tr)..br.|WIDGET p|
|00004510| 74 72 3b 0a 2e 69 6e 20 | 30 0a 2e 4c 50 0a 48 69 |tr;..in |0..LP.Hi|
|00004520| 67 68 6c 69 67 68 74 73 | 20 74 68 65 20 67 69 76 |ghlights| the giv|
|00004530| 65 6e 20 77 69 64 67 65 | 74 2e 20 52 65 74 75 72 |en widge|t. Retur|
|00004540| 6e 73 20 54 52 55 45 20 | 69 66 20 73 75 63 63 65 |ns TRUE |if succe|
|00004550| 73 73 66 75 6c 20 65 6c | 73 65 20 46 41 4c 53 45 |ssful el|se FALSE|
|00004560| 20 69 66 20 74 68 65 20 | 77 69 64 67 65 74 20 64 | if the |widget d|
|00004570| 6f 65 73 20 6e 6f 74 20 | 65 78 69 73 74 2e 0a 0a |oes not |exist...|
|00004580| 2e 4c 50 0a 2e 62 72 0a | 2e 69 6e 20 30 2e 35 69 |.LP..br.|.in 0.5i|
|00004590| 0a 69 6e 74 20 64 65 68 | 69 67 68 6c 69 67 68 74 |.int deh|ighlight|
|000045a0| 20 28 70 74 72 29 0a 2e | 62 72 0a 57 49 44 47 45 | (ptr)..|br.WIDGE|
|000045b0| 54 20 70 74 72 3b 0a 2e | 69 6e 20 30 0a 2e 4c 50 |T ptr;..|in 0..LP|
|000045c0| 0a 54 75 72 6e 73 20 6f | 66 66 20 74 68 65 20 68 |.Turns o|ff the h|
|000045d0| 69 67 68 6c 69 67 68 74 | 69 6e 67 20 6f 66 20 74 |ighlight|ing of t|
|000045e0| 68 65 20 67 69 76 65 6e | 20 77 69 64 67 65 74 2e |he given| widget.|
|000045f0| 20 52 65 74 75 72 6e 73 | 20 54 52 55 45 20 69 66 | Returns| TRUE if|
|00004600| 20 73 75 63 63 65 73 73 | 66 75 6c 20 65 6c 73 65 | success|ful else|
|00004610| 20 46 41 4c 53 45 20 69 | 66 20 74 68 65 20 77 69 | FALSE i|f the wi|
|00004620| 64 67 65 74 20 64 6f 65 | 73 20 6e 6f 74 20 65 78 |dget doe|s not ex|
|00004630| 69 73 74 2e 0a 0a 2e 4c | 50 0a 2e 62 72 0a 2e 69 |ist....L|P..br..i|
|00004640| 6e 20 30 2e 35 69 0a 69 | 6e 74 20 63 68 61 6e 67 |n 0.5i.i|nt chang|
|00004650| 65 6c 62 6c 77 69 64 67 | 65 74 20 28 70 74 72 2c |elblwidg|et (ptr,|
|00004660| 20 6d 65 73 73 61 67 65 | 2c 20 70 6f 73 69 74 69 | message|, positi|
|00004670| 6f 6e 29 0a 2e 62 72 0a | 57 49 44 47 45 54 20 70 |on)..br.|WIDGET p|
|00004680| 74 72 3b 0a 2e 62 72 0a | 63 68 61 72 20 20 20 6d |tr;..br.|char m|
|00004690| 65 73 73 61 67 65 5b 5d | 3b 0a 2e 62 72 0a 69 6e |essage[]|;..br.in|
|000046a0| 74 20 20 20 20 70 6f 73 | 69 74 69 6f 6e 3b 0a 2e |t pos|ition;..|
|000046b0| 69 6e 20 30 0a 2e 4c 50 | 0a 43 68 61 6e 67 65 73 |in 0..LP|.Changes|
|000046c0| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | the con|tents of|
|000046d0| 20 74 68 65 20 67 69 76 | 65 6e 20 6c 61 62 65 6c | the giv|en label|
|000046e0| 20 77 69 64 67 65 74 20 | 74 6f 20 74 68 61 74 20 | widget |to that |
|000046f0| 67 69 76 65 6e 20 69 6e | 20 6d 65 73 73 61 67 65 |given in| message|
|00004700| 2e 20 70 6f 73 69 74 69 | 6f 6e 20 73 70 65 63 69 |. positi|on speci|
|00004710| 66 69 65 73 20 68 6f 77 | 20 74 68 65 20 6d 65 73 |fies how| the mes|
|00004720| 73 61 67 65 20 69 73 20 | 74 6f 20 61 70 70 65 61 |sage is |to appea|
|00004730| 72 20 28 73 65 65 20 6d | 6b 6c 62 6c 77 69 64 67 |r (see m|klblwidg|
|00004740| 65 74 29 2e 20 54 68 65 | 20 66 75 6e 63 74 69 6f |et). The| functio|
|00004750| 6e 20 72 65 74 75 72 6e | 73 20 54 52 55 45 20 69 |n return|s TRUE i|
|00004760| 66 20 73 75 63 63 65 73 | 73 66 75 6c 20 65 6c 73 |f succes|sful els|
|00004770| 65 20 46 41 4c 53 45 2e | 0a 2e 4b 45 0a 2e 4b 53 |e FALSE.|..KE..KS|
|00004780| 0a 2e 4c 50 0a 2e 62 72 | 0a 2e 69 6e 20 30 2e 35 |..LP..br|..in 0.5|
|00004790| 69 0a 57 49 44 47 45 54 | 54 59 50 45 20 77 69 64 |i.WIDGET|TYPE wid|
|000047a0| 67 65 74 74 79 70 65 20 | 28 70 74 72 29 0a 2e 62 |gettype |(ptr)..b|
|000047b0| 72 0a 57 49 44 47 45 54 | 20 70 74 72 3b 0a 2e 69 |r.WIDGET| ptr;..i|
|000047c0| 6e 20 30 0a 2e 4c 50 0a | 52 65 74 75 72 6e 73 20 |n 0..LP.|Returns |
|000047d0| 74 68 65 20 74 79 70 65 | 20 6f 66 20 77 69 64 67 |the type| of widg|
|000047e0| 65 74 20 70 6f 69 6e 74 | 65 64 20 74 6f 6f 20 62 |et point|ed too b|
|000047f0| 79 20 70 74 72 2e 20 54 | 68 65 20 72 65 74 75 72 |y ptr. T|he retur|
|00004800| 6e 65 64 20 74 79 70 65 | 20 76 61 6c 75 65 20 69 |ned type| value i|
|00004810| 73 20 6f 6e 65 20 6f 66 | 20 43 4d 44 2c 20 4c 42 |s one of| CMD, LB|
|00004820| 4c 2c 20 54 47 4c 2c 20 | 49 4e 50 20 6f 72 20 46 |L, TGL, |INP or F|
|00004830| 41 4c 53 45 20 69 66 20 | 74 68 65 20 77 69 64 67 |ALSE if |the widg|
|00004840| 65 74 20 64 6f 65 73 20 | 6e 6f 74 20 65 78 69 73 |et does |not exis|
|00004850| 74 2e 0a 0a 2e 53 48 0a | 46 69 6e 69 73 68 69 6e |t....SH.|Finishin|
|00004860| 67 20 55 70 0a 0a 2e 4c | 50 0a 2e 62 72 0a 2e 69 |g Up...L|P..br..i|
|00004870| 6e 20 30 2e 35 69 0a 65 | 6e 64 77 69 64 67 65 74 |n 0.5i.e|ndwidget|
|00004880| 73 20 28 29 0a 2e 69 6e | 20 30 0a 2e 4c 50 0a 43 |s ()..in| 0..LP.C|
|00004890| 6c 6f 73 65 73 20 64 6f | 77 6e 20 74 68 65 20 77 |loses do|wn the w|
|000048a0| 69 6e 64 6f 77 69 6e 67 | 20 73 79 73 74 65 6d 20 |indowing| system |
|000048b0| 61 6e 64 20 73 68 6f 75 | 6c 64 20 62 65 20 75 73 |and shou|ld be us|
|000048c0| 65 64 20 61 74 20 74 68 | 65 20 65 6e 64 2e 20 54 |ed at th|e end. T|
|000048d0| 68 69 73 20 66 75 6e 63 | 74 69 6f 6e 20 69 73 20 |his func|tion is |
|000048e0| 61 6c 73 6f 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |also aut|omatical|
|000048f0| 6c 79 20 63 61 6c 6c 65 | 64 20 6f 6e 20 61 6e 20 |ly calle|d on an |
|00004900| 69 6e 74 65 72 72 75 70 | 74 20 28 65 2e 67 20 5e |interrup|t (e.g ^|
|00004910| 43 29 2e 0a 2e 4b 45 0a | 53 48 41 52 5f 45 4f 46 |C)...KE.|SHAR_EOF|
|00004920| 0a 69 66 20 74 65 73 74 | 20 31 30 39 34 36 20 2d |.if test| 10946 -|
|00004930| 6e 65 20 60 77 63 20 2d | 63 20 3c 20 27 77 69 64 |ne `wc -|c < 'wid|
|00004940| 67 65 74 2e 6d 73 27 60 | 0a 74 68 65 6e 0a 20 20 |get.ms'`|.then. |
|00004950| 20 20 65 63 68 6f 20 27 | 53 68 61 72 3a 20 65 72 | echo '|Shar: er|
|00004960| 72 6f 72 20 74 72 61 6e | 73 6d 69 74 74 69 6e 67 |ror tran|smitting|
|00004970| 20 27 77 69 64 67 65 74 | 2e 6d 73 27 20 28 73 68 | 'widget|.ms' (sh|
|00004980| 6f 75 6c 64 20 68 61 76 | 65 20 62 65 65 6e 20 20 |ould hav|e been |
|00004990| 31 30 39 34 36 20 63 68 | 61 72 63 61 74 65 72 73 |10946 ch|arcaters|
|000049a0| 29 27 0a 66 69 0a 66 69 | 0a 65 63 68 6f 20 27 53 |)'.fi.fi|.echo 'S|
|000049b0| 68 61 72 3a 20 65 78 74 | 72 61 63 74 69 6e 67 20 |har: ext|racting |
|000049c0| 27 77 69 64 67 65 74 6c | 69 62 2e 63 27 20 28 20 |'widgetl|ib.c' ( |
|000049d0| 33 34 38 31 37 20 63 68 | 61 72 61 63 74 65 72 73 |34817 ch|aracters|
|000049e0| 29 27 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 77 |)'.if te|st -f 'w|
|000049f0| 69 64 67 65 74 6c 69 62 | 2e 63 27 0a 74 68 65 6e |idgetlib|.c'.then|
|00004a00| 0a 20 20 20 20 65 63 68 | 6f 20 22 53 68 61 72 3a |. ech|o "Shar:|
|00004a10| 20 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 77 72 | will no|t overwr|
|00004a20| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|00004a30| 65 20 27 77 69 64 67 65 | 74 6c 69 62 2e 63 27 22 |e 'widge|tlib.c'"|
|00004a40| 0a 65 6c 73 65 0a 20 20 | 20 20 63 61 74 20 3c 3c |.else. | cat <<|
|00004a50| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 77 69 | \SHAR_E|OF > 'wi|
|00004a60| 64 67 65 74 6c 69 62 2e | 63 27 0a 2f 2a 2a 2a 2a |dgetlib.|c'./****|
|00004a70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004a80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004a90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004aa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004ab0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 0a 2f 2a 20 20 46 49 |********|*./* FI|
|00004ac0| 4c 45 3a 09 09 77 69 64 | 67 65 74 6c 69 62 2e 63 |LE:..wid|getlib.c|
|00004ad0| 0a 2f 2a 20 20 44 41 54 | 45 3a 09 09 41 75 67 75 |./* DAT|E:..Augu|
|00004ae0| 73 74 20 31 39 38 38 2e | 0a 2f 2a 20 20 41 55 54 |st 1988.|./* AUT|
|00004af0| 48 4f 52 3a 09 09 52 69 | 63 68 61 72 64 20 41 2e |HOR:..Ri|chard A.|
|00004b00| 20 43 75 6c 73 68 61 77 | 2e 0a 2f 2a 20 20 44 45 | Culshaw|../* DE|
|00004b10| 53 43 52 49 50 54 49 4f | 4e 3a 09 43 6f 6e 74 61 |SCRIPTIO|N:.Conta|
|00004b20| 69 6e 73 20 74 68 65 20 | 63 6f 64 65 20 74 6f 20 |ins the |code to |
|00004b30| 6d 61 6e 69 70 75 6c 61 | 74 65 20 74 68 65 20 77 |manipula|te the w|
|00004b40| 69 64 67 65 74 20 73 74 | 72 75 63 74 75 72 65 73 |idget st|ructures|
|00004b50| 0a 2f 2a 09 09 09 61 6e | 64 20 74 68 65 20 69 2f |./*...an|d the i/|
|00004b60| 6f 2e 20 49 74 20 66 6f | 72 6d 73 20 61 20 73 69 |o. It fo|rms a si|
|00004b70| 6e 67 6c 65 20 6c 69 62 | 72 61 72 79 20 74 68 61 |ngle lib|rary tha|
|00004b80| 74 20 73 68 6f 75 6c 64 | 0a 2f 2a 09 09 09 62 65 |t should|./*...be|
|00004b90| 20 6c 69 6e 6b 65 64 20 | 69 6e 20 77 69 74 68 20 | linked |in with |
|00004ba0| 61 6c 6c 20 63 6f 64 65 | 20 75 73 69 6e 67 20 74 |all code| using t|
|00004bb0| 68 65 73 65 20 77 69 64 | 67 65 74 73 2e 0a 2f 2a |hese wid|gets../*|
|00004bc0| 20 44 49 53 43 4c 41 49 | 4d 45 52 3a 09 09 54 68 | DISCLAI|MER:..Th|
|00004bd0| 69 73 20 66 69 6c 65 20 | 69 73 20 64 65 65 6d 65 |is file |is deeme|
|00004be0| 64 20 74 6f 20 62 65 20 | 70 75 62 6c 69 63 2d 64 |d to be |public-d|
|00004bf0| 6f 6d 61 69 6e 2c 20 6f | 6e 20 74 68 65 20 73 69 |omain, o|n the si|
|00004c00| 6d 70 6c 65 0a 2f 2a 09 | 09 09 70 72 6f 76 69 73 |mple./*.|..provis|
|00004c10| 6f 73 20 74 68 61 74 20 | 74 68 69 73 20 73 65 63 |os that |this sec|
|00004c20| 74 69 6f 6e 20 72 65 6d | 61 69 6e 73 20 69 6e 20 |tion rem|ains in |
|00004c30| 74 68 69 73 20 66 69 6c | 65 20 61 6e 64 0a 2f 2a |this fil|e and./*|
|00004c40| 09 09 09 74 68 61 74 20 | 63 6f 64 65 20 75 73 69 |...that |code usi|
|00004c50| 6e 67 20 69 74 20 64 6f | 20 6e 6f 74 20 64 6f 20 |ng it do| not do |
|00004c60| 73 6f 20 66 6f 72 20 6d | 6f 6e 65 74 61 72 79 20 |so for m|onetary |
|00004c70| 67 61 69 6e 2e 0a 2f 2a | 09 09 09 4e 65 69 74 68 |gain../*|...Neith|
|00004c80| 65 72 20 74 68 65 20 61 | 75 74 68 6f 72 2c 20 6e |er the a|uthor, n|
|00004c90| 6f 72 20 74 68 65 20 61 | 75 74 68 6f 72 73 20 65 |or the a|uthors e|
|00004ca0| 6d 70 6c 6f 79 65 65 73 | 20 61 74 20 74 68 65 0a |mployees| at the.|
|00004cb0| 2f 2a 09 09 09 74 69 6d | 65 20 6f 66 20 64 65 76 |/*...tim|e of dev|
|00004cc0| 65 6c 6f 70 69 6e 67 20 | 74 68 69 73 20 63 6f 64 |eloping |this cod|
|00004cd0| 65 2c 20 61 63 63 65 70 | 74 20 61 6e 79 20 6c 69 |e, accep|t any li|
|00004ce0| 61 62 69 6c 69 74 79 20 | 6f 72 0a 2f 2a 09 09 09 |ability |or./*...|
|00004cf0| 72 65 73 70 6f 6e 73 69 | 62 69 6c 69 74 79 20 66 |responsi|bility f|
|00004d00| 6f 72 20 74 68 65 20 75 | 73 65 2c 20 61 62 75 73 |or the u|se, abus|
|00004d10| 65 20 6f 72 20 6d 69 73 | 75 73 65 20 6f 66 20 74 |e or mis|use of t|
|00004d20| 68 69 73 0a 2f 2a 09 09 | 09 63 6f 64 65 2e 0a 2f |his./*..|.code../|
|00004d30| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004d40| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004d50| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004d60| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00004d70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2f 0a 0a |********|*****/..|
|00004d80| 23 69 6e 63 6c 75 64 65 | 20 3c 77 69 64 67 65 74 |#include| <widget|
|00004d90| 2e 68 3e 0a 0a 65 78 74 | 65 72 6e 20 63 68 61 72 |.h>..ext|ern char|
|00004da0| 20 20 20 20 20 2a 6d 61 | 6c 6c 6f 63 28 29 3b 0a | *ma|lloc();.|
|00004db0| 69 6e 74 09 09 74 65 78 | 74 77 69 6e 64 6f 77 64 |int..tex|twindowd|
|00004dc0| 65 66 69 6e 65 64 20 3d | 20 46 41 4c 53 45 3b 0a |efined =| FALSE;.|
|00004dd0| 69 6e 74 20 20 20 20 09 | 09 77 69 64 78 2c 20 77 |int .|.widx, w|
|00004de0| 69 64 79 3b 09 0a 69 6e | 74 09 09 6d 61 78 77 69 |idy;..in|t..maxwi|
|00004df0| 64 79 3b 0a 69 6e 74 20 | 20 20 20 09 09 73 63 72 |dy;.int | ..scr|
|00004e00| 79 3b 0a 69 6e 74 20 20 | 20 20 09 09 63 75 72 69 |y;.int | ..curi|
|00004e10| 64 3b 0a 69 6e 74 09 09 | 73 69 7a 65 73 63 72 65 |d;.int..|sizescre|
|00004e20| 67 3b 0a 69 6e 74 09 09 | 73 63 72 65 65 6e 62 6f |g;.int..|screenbo|
|00004e30| 72 64 65 72 20 3d 20 30 | 3b 0a 0a 57 49 4e 44 4f |rder = 0|;..WINDO|
|00004e40| 57 20 20 20 20 2a 73 63 | 72 65 65 6e 3b 0a 57 49 |W *sc|reen;.WI|
|00004e50| 4e 44 4f 57 20 20 20 20 | 2a 73 63 72 65 65 6e 62 |NDOW |*screenb|
|00004e60| 6f 78 3b 0a 57 49 4e 44 | 4f 57 20 20 20 20 2a 65 |ox;.WIND|OW *e|
|00004e70| 64 67 65 31 3b 0a 57 49 | 4e 44 4f 57 09 20 20 2a |dge1;.WI|NDOW. *|
|00004e80| 65 64 67 65 32 3b 0a 0a | 0a 69 6e 69 74 69 61 6c |edge2;..|.initial|
|00004e90| 69 73 65 77 69 64 67 65 | 74 73 20 28 29 0a 2f 2a |isewidge|ts ()./*|
|00004ea0| 20 73 65 74 73 20 75 70 | 20 73 63 72 65 65 6e 20 | sets up| screen |
|00004eb0| 61 6e 64 20 69 6e 69 74 | 69 61 6c 69 73 65 73 20 |and init|ialises |
|00004ec0| 67 6c 6f 62 61 6c 20 76 | 61 72 69 61 62 6c 65 73 |global v|ariables|
|00004ed0| 20 2a 2f 0a 7b 0a 20 20 | 20 20 69 6e 74 20 69 2c | */.{. | int i,|
|00004ee0| 20 65 6e 64 77 69 64 67 | 65 74 73 28 29 3b 0a 0a | endwidg|ets();..|
|00004ef0| 20 20 20 20 77 69 64 78 | 20 3d 20 77 69 64 79 20 | widx| = widy |
|00004f00| 3d 20 73 63 72 79 20 3d | 20 30 3b 0a 20 20 20 20 |= scry =| 0;. |
|00004f10| 63 75 72 69 64 20 3d 20 | 31 3b 0a 20 20 20 20 6d |curid = |1;. m|
|00004f20| 61 78 77 69 64 79 20 3d | 20 4c 49 4e 45 53 20 2d |axwidy =| LINES -|
|00004f30| 20 33 3b 0a 20 20 20 20 | 69 6e 69 74 73 63 72 20 | 3;. |initscr |
|00004f40| 28 29 3b 0a 20 20 20 20 | 63 72 6d 6f 64 65 20 28 |();. |crmode (|
|00004f50| 29 3b 0a 20 20 20 20 6e | 6f 65 63 68 6f 20 28 29 |);. n|oecho ()|
|00004f60| 3b 0a 20 20 20 20 63 6d | 64 6c 69 73 74 20 3d 20 |;. cm|dlist = |
|00004f70| 4e 55 4c 4c 43 4d 44 3b | 0a 20 20 20 20 6c 62 6c |NULLCMD;|. lbl|
|00004f80| 6c 69 73 74 20 3d 20 4e | 55 4c 4c 4c 42 4c 3b 0a |list = N|ULLLBL;.|
|00004f90| 20 20 20 20 74 67 6c 6c | 69 73 74 20 3d 20 4e 55 | tgll|ist = NU|
|00004fa0| 4c 4c 54 47 4c 3b 0a 20 | 20 20 20 69 6e 70 6c 69 |LLTGL;. | inpli|
|00004fb0| 73 74 20 3d 20 4e 55 4c | 4c 49 4e 50 3b 0a 20 20 |st = NUL|LINP;. |
|00004fc0| 20 20 61 63 74 6c 69 73 | 74 20 3d 20 4e 55 4c 4c | actlis|t = NULL|
|00004fd0| 43 48 3b 0a 20 20 20 20 | 66 6f 72 20 28 69 3d 30 |CH;. |for (i=0|
|00004fe0| 3b 20 69 3c 31 38 3b 20 | 69 2b 2b 29 0a 09 73 69 |; i<18; |i++)..si|
|00004ff0| 67 6e 61 6c 20 28 69 2c | 20 65 6e 64 77 69 64 67 |gnal (i,| endwidg|
|00005000| 65 74 73 29 3b 0a 7d 0a | 0a 64 72 61 77 74 65 78 |ets);.}.|.drawtex|
|00005010| 74 77 69 6e 64 6f 77 20 | 28 79 29 0a 2f 2a 20 64 |twindow |(y)./* d|
|00005020| 72 61 77 73 20 74 68 65 | 20 74 65 78 74 20 77 69 |raws the| text wi|
|00005030| 6e 64 6f 77 20 61 6e 64 | 20 64 72 61 77 73 20 61 |ndow and| draws a|
|00005040| 20 62 6f 78 20 61 72 6f | 75 6e 64 20 69 74 20 2a | box aro|und it *|
|00005050| 2f 0a 69 6e 74 20 79 3b | 0a 7b 0a 20 20 20 20 69 |/.int y;|.{. i|
|00005060| 6e 74 20 69 3b 0a 0a 20 | 20 20 20 69 66 20 28 28 |nt i;.. | if ((|
|00005070| 73 63 72 65 65 6e 62 6f | 72 64 65 72 20 26 20 56 |screenbo|rder & V|
|00005080| 45 52 54 49 43 41 4c 29 | 20 26 26 20 28 73 63 72 |ERTICAL)| && (scr|
|00005090| 65 65 6e 62 6f 72 64 65 | 72 20 26 20 48 4f 52 49 |eenborde|r & HORI|
|000050a0| 5a 4f 4e 54 41 4c 29 29 | 20 7b 0a 20 20 20 20 20 |ZONTAL))| {. |
|000050b0| 20 20 20 62 6f 78 20 28 | 73 63 72 65 65 6e 62 6f | box (|screenbo|
|000050c0| 78 2c 20 27 7c 27 2c 20 | 27 2d 27 29 3b 0a 20 20 |x, '|', |'-');. |
|000050d0| 20 20 09 6d 76 77 61 64 | 64 63 68 20 28 73 63 72 | .mvwad|dch (scr|
|000050e0| 65 65 6e 62 6f 78 2c 20 | 30 2c 20 30 2c 20 27 2e |eenbox, |0, 0, '.|
|000050f0| 27 29 3b 0a 20 20 20 20 | 09 6d 76 77 61 64 64 63 |');. |.mvwaddc|
|00005100| 68 20 28 73 63 72 65 65 | 6e 62 6f 78 2c 20 30 2c |h (scree|nbox, 0,|
|00005110| 20 43 4f 4c 53 2d 32 2c | 20 27 2e 27 29 3b 0a 20 | COLS-2,| '.');. |
|00005120| 20 20 20 09 6d 76 77 61 | 64 64 63 68 20 28 73 63 | .mvwa|ddch (sc|
|00005130| 72 65 65 6e 62 6f 78 2c | 20 4c 49 4e 45 53 2d 79 |reenbox,| LINES-y|
|00005140| 2d 31 2c 20 30 2c 20 27 | 60 27 29 3b 0a 20 20 20 |-1, 0, '|`');. |
|00005150| 20 09 6d 76 77 61 64 64 | 63 68 20 28 73 63 72 65 | .mvwadd|ch (scre|
|00005160| 65 6e 62 6f 78 2c 20 4c | 49 4e 45 53 2d 79 2d 31 |enbox, L|INES-y-1|
|00005170| 2c 20 43 4f 4c 53 2d 32 | 2c 20 27 5c 27 27 29 3b |, COLS-2|, '\'');|
|00005180| 0a 20 20 20 20 09 74 6f | 75 63 68 77 69 6e 20 28 |. .to|uchwin (|
|00005190| 73 63 72 65 65 6e 62 6f | 78 29 3b 0a 20 20 20 20 |screenbo|x);. |
|000051a0| 20 20 20 20 77 72 65 66 | 72 65 73 68 20 28 73 63 | wref|resh (sc|
|000051b0| 72 65 65 6e 62 6f 78 29 | 3b 0a 20 20 20 20 7d 0a |reenbox)|;. }.|
|000051c0| 20 20 20 20 65 6c 73 65 | 20 69 66 20 28 73 63 72 | else| if (scr|
|000051d0| 65 65 6e 62 6f 72 64 65 | 72 20 26 20 48 4f 52 49 |eenborde|r & HORI|
|000051e0| 5a 4f 4e 54 41 4c 29 20 | 7b 0a 09 77 61 64 64 73 |ZONTAL) |{..wadds|
|000051f0| 74 72 20 28 65 64 67 65 | 31 2c 20 22 2d 2d 2d 2d |tr (edge|1, "----|
|00005200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005240| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 22 29 3b 0a 20 |--------|---");. |
|00005250| 20 20 20 20 20 20 20 77 | 61 64 64 73 74 72 20 28 | w|addstr (|
|00005260| 65 64 67 65 32 2c 20 22 | 2d 2d 2d 2d 2d 2d 2d 2d |edge2, "|--------|
|00005270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000052b0| 2d 2d 2d 2d 2d 2d 2d 22 | 29 3b 0a 09 77 72 65 66 |-------"|);..wref|
|000052c0| 72 65 73 68 20 28 65 64 | 67 65 31 29 3b 0a 09 77 |resh (ed|ge1);..w|
|000052d0| 72 65 66 72 65 73 68 20 | 28 65 64 67 65 32 29 3b |refresh |(edge2);|
|000052e0| 0a 20 20 20 20 7d 0a 20 | 20 20 20 65 6c 73 65 20 |. }. | else |
|000052f0| 69 66 20 28 73 63 72 65 | 65 6e 62 6f 72 64 65 72 |if (scre|enborder|
|00005300| 20 26 20 56 45 52 54 49 | 43 41 4c 29 20 7b 0a 09 | & VERTI|CAL) {..|
|00005310| 66 6f 72 20 28 69 3d 30 | 3b 20 69 3c 3d 73 69 7a |for (i=0|; i<=siz|
|00005320| 65 73 63 72 65 67 3b 20 | 69 2b 2b 29 20 7b 0a 09 |escreg; |i++) {..|
|00005330| 20 20 20 20 6d 76 77 61 | 64 64 63 68 20 28 65 64 | mvwa|ddch (ed|
|00005340| 67 65 31 2c 20 69 2c 20 | 30 2c 20 27 7c 27 29 3b |ge1, i, |0, '|');|
|00005350| 0a 09 20 20 20 20 6d 76 | 77 61 64 64 63 68 20 28 |.. mv|waddch (|
|00005360| 65 64 67 65 32 2c 20 69 | 2c 20 30 2c 20 27 7c 27 |edge2, i|, 0, '|'|
|00005370| 29 3b 0a 20 20 20 09 7d | 0a 09 77 72 65 66 72 65 |);. .}|..wrefre|
|00005380| 73 68 20 28 65 64 67 65 | 31 29 3b 0a 09 77 72 65 |sh (edge|1);..wre|
|00005390| 66 72 65 73 68 20 28 65 | 64 67 65 32 29 3b 0a 20 |fresh (e|dge2);. |
|000053a0| 20 20 20 7d 0a 20 20 20 | 20 74 6f 75 63 68 77 69 | }. | touchwi|
|000053b0| 6e 20 28 73 63 72 65 65 | 6e 29 3b 0a 20 20 20 20 |n (scree|n);. |
|000053c0| 77 72 65 66 72 65 73 68 | 20 28 73 63 72 65 65 6e |wrefresh| (screen|
|000053d0| 29 3b 0a 7d 0a 0a 69 6e | 74 20 6f 70 65 6e 74 65 |);.}..in|t opente|
|000053e0| 78 74 77 69 6e 64 6f 77 | 20 28 70 6f 73 69 74 69 |xtwindow| (positi|
|000053f0| 6f 6e 2c 20 62 6f 72 64 | 65 72 29 0a 2f 2a 20 64 |on, bord|er)./* d|
|00005400| 65 66 69 6e 65 20 74 68 | 65 20 74 65 78 74 20 77 |efine th|e text w|
|00005410| 69 6e 64 6f 77 20 66 72 | 6f 6d 20 63 75 72 72 65 |indow fr|om curre|
|00005420| 6e 74 20 70 6f 73 69 74 | 69 6f 6e 20 64 6f 77 6e |nt posit|ion down|
|00005430| 20 2b 20 70 6f 73 69 74 | 69 6f 6e 20 2a 20 77 69 | + posit|ion * wi|
|00005440| 64 67 65 74 20 64 65 70 | 74 68 2a 2f 0a 69 6e 74 |dget dep|th*/.int|
|00005450| 20 20 20 20 70 6f 73 69 | 74 69 6f 6e 3b 0a 69 6e | posi|tion;.in|
|00005460| 74 20 20 20 20 62 6f 72 | 64 65 72 3b 0a 7b 0a 20 |t bor|der;.{. |
|00005470| 20 20 20 69 66 20 28 28 | 70 6f 73 69 74 69 6f 6e | if ((|position|
|00005480| 20 3e 3d 20 30 29 20 26 | 26 20 28 21 74 65 78 74 | >= 0) &|& (!text|
|00005490| 77 69 6e 64 6f 77 64 65 | 66 69 6e 65 64 29 20 26 |windowde|fined) &|
|000054a0| 26 20 28 77 69 64 79 20 | 2b 20 33 2a 70 6f 73 69 |& (widy |+ 3*posi|
|000054b0| 74 69 6f 6e 20 3c 20 32 | 31 29 29 20 7b 0a 20 20 |tion < 2|1)) {. |
|000054c0| 20 20 09 6d 61 78 77 69 | 64 79 20 3d 20 77 69 64 | .maxwi|dy = wid|
|000054d0| 79 20 2b 20 70 6f 73 69 | 74 69 6f 6e 20 2a 20 33 |y + posi|tion * 3|
|000054e0| 20 2b 20 33 3b 0a 09 69 | 66 20 28 28 62 6f 72 64 | + 3;..i|f ((bord|
|000054f0| 65 72 20 26 20 56 45 52 | 54 49 43 41 4c 29 20 26 |er & VER|TICAL) &|
|00005500| 26 20 28 62 6f 72 64 65 | 72 20 26 20 48 4f 52 49 |& (borde|r & HORI|
|00005510| 5a 4f 4e 54 41 4c 29 29 | 20 7b 0a 20 20 20 20 20 |ZONTAL))| {. |
|00005520| 20 20 20 20 20 20 20 73 | 63 72 65 65 6e 62 6f 78 | s|creenbox|
|00005530| 20 3d 20 6e 65 77 77 69 | 6e 20 28 4c 49 4e 45 53 | = newwi|n (LINES|
|00005540| 2d 6d 61 78 77 69 64 79 | 2c 20 43 4f 4c 53 2d 31 |-maxwidy|, COLS-1|
|00005550| 2c 20 6d 61 78 77 69 64 | 79 2c 20 30 29 3b 0a 09 |, maxwid|y, 0);..|
|00005560| 20 20 20 20 73 63 72 65 | 65 6e 20 3d 20 6e 65 77 | scre|en = new|
|00005570| 77 69 6e 20 28 4c 49 4e | 45 53 2d 32 2d 6d 61 78 |win (LIN|ES-2-max|
|00005580| 77 69 64 79 2c 20 43 4f | 4c 53 2d 33 2c 20 6d 61 |widy, CO|LS-3, ma|
|00005590| 78 77 69 64 79 2b 31 2c | 20 31 29 3b 0a 09 20 20 |xwidy+1,| 1);.. |
|000055a0| 20 20 73 69 7a 65 73 63 | 72 65 67 20 3d 20 4c 49 | sizesc|reg = LI|
|000055b0| 4e 45 53 2d 32 2d 6d 61 | 78 77 69 64 79 3b 0a 20 |NES-2-ma|xwidy;. |
|000055c0| 20 20 20 20 20 20 20 7d | 0a 09 65 6c 73 65 20 69 | }|..else i|
|000055d0| 66 20 28 62 6f 72 64 65 | 72 20 26 20 48 4f 52 49 |f (borde|r & HORI|
|000055e0| 5a 4f 4e 54 41 4c 29 20 | 7b 0a 09 20 20 20 20 73 |ZONTAL) |{.. s|
|000055f0| 63 72 65 65 6e 20 3d 20 | 6e 65 77 77 69 6e 20 28 |creen = |newwin (|
|00005600| 4c 49 4e 45 53 2d 32 2d | 6d 61 78 77 69 64 79 2c |LINES-2-|maxwidy,|
|00005610| 20 43 4f 4c 53 2d 31 2c | 20 6d 61 78 77 69 64 79 | COLS-1,| maxwidy|
|00005620| 2b 31 2c 20 30 29 3b 0a | 20 20 20 20 09 20 20 20 |+1, 0);.| . |
|00005630| 20 65 64 67 65 31 20 3d | 20 6e 65 77 77 69 6e 20 | edge1 =| newwin |
|00005640| 28 31 2c 20 43 4f 4c 53 | 2d 31 2c 20 6d 61 78 77 |(1, COLS|-1, maxw|
|00005650| 69 64 79 2c 20 30 29 3b | 0a 20 20 20 20 20 20 20 |idy, 0);|. |
|00005660| 20 20 20 20 20 65 64 67 | 65 32 20 3d 20 6e 65 77 | edg|e2 = new|
|00005670| 77 69 6e 20 28 31 2c 20 | 43 4f 4c 53 2d 31 2c 20 |win (1, |COLS-1, |
|00005680| 4c 49 4e 45 53 2d 31 2c | 20 30 29 3b 0a 09 20 20 |LINES-1,| 0);.. |
|00005690| 20 20 73 69 7a 65 73 63 | 72 65 67 20 3d 20 4c 49 | sizesc|reg = LI|
|000056a0| 4e 45 53 2d 32 2d 6d 61 | 78 77 69 64 79 3b 0a 20 |NES-2-ma|xwidy;. |
|000056b0| 20 20 20 20 20 20 20 7d | 0a 09 65 6c 73 65 20 69 | }|..else i|
|000056c0| 66 20 28 62 6f 72 64 65 | 72 20 26 20 56 45 52 54 |f (borde|r & VERT|
|000056d0| 49 43 41 4c 29 20 7b 0a | 09 20 20 20 20 73 63 72 |ICAL) {.|. scr|
|000056e0| 65 65 6e 20 3d 20 6e 65 | 77 77 69 6e 20 28 4c 49 |een = ne|wwin (LI|
|000056f0| 4e 45 53 2d 6d 61 78 77 | 69 64 79 2c 20 43 4f 4c |NES-maxw|idy, COL|
|00005700| 53 2d 33 2c 20 6d 61 78 | 77 69 64 79 2c 20 31 29 |S-3, max|widy, 1)|
|00005710| 3b 0a 09 20 20 20 20 65 | 64 67 65 31 20 3d 20 6e |;.. e|dge1 = n|
|00005720| 65 77 77 69 6e 20 28 4c | 49 4e 45 53 2d 6d 61 78 |ewwin (L|INES-max|
|00005730| 77 69 64 79 2c 20 31 2c | 20 6d 61 78 77 69 64 79 |widy, 1,| maxwidy|
|00005740| 2c 20 30 29 3b 0a 09 20 | 20 20 20 65 64 67 65 32 |, 0);.. | edge2|
|00005750| 20 3d 20 6e 65 77 77 69 | 6e 20 28 4c 49 4e 45 53 | = newwi|n (LINES|
|00005760| 2d 6d 61 78 77 69 64 79 | 2c 20 31 2c 20 6d 61 78 |-maxwidy|, 1, max|
|00005770| 77 69 64 79 2c 20 43 4f | 4c 53 2d 32 29 3b 0a 09 |widy, CO|LS-2);..|
|00005780| 20 20 20 20 73 69 7a 65 | 73 63 72 65 67 20 3d 20 | size|screg = |
|00005790| 4c 49 4e 45 53 2d 6d 61 | 78 77 69 64 79 3b 0a 20 |LINES-ma|xwidy;. |
|000057a0| 20 20 20 20 20 20 20 7d | 0a 09 65 6c 73 65 20 7b | }|..else {|
|000057b0| 0a 09 20 20 20 20 73 63 | 72 65 65 6e 20 3d 20 6e |.. sc|reen = n|
|000057c0| 65 77 77 69 6e 20 28 4c | 49 4e 45 53 2d 6d 61 78 |ewwin (L|INES-max|
|000057d0| 77 69 64 79 2c 20 43 4f | 4c 53 2d 31 2c 20 6d 61 |widy, CO|LS-1, ma|
|000057e0| 78 77 69 64 79 2c 20 30 | 29 3b 0a 09 20 20 20 20 |xwidy, 0|);.. |
|000057f0| 73 69 7a 65 73 63 72 65 | 67 20 3d 20 4c 49 4e 45 |sizescre|g = LINE|
|00005800| 53 2d 6d 61 78 77 69 64 | 79 3b 0a 20 20 20 20 20 |S-maxwid|y;. |
|00005810| 20 20 20 7d 0a 20 20 20 | 20 20 20 20 20 73 63 72 | }. | scr|
|00005820| 65 65 6e 62 6f 72 64 65 | 72 20 3d 20 62 6f 72 64 |eenborde|r = bord|
|00005830| 65 72 3b 0a 20 20 20 20 | 20 20 20 20 73 63 72 6f |er;. | scro|
|00005840| 6c 6c 6f 6b 20 28 73 63 | 72 65 65 6e 2c 20 54 52 |llok (sc|reen, TR|
|00005850| 55 45 29 3b 0a 09 64 72 | 61 77 74 65 78 74 77 69 |UE);..dr|awtextwi|
|00005860| 6e 64 6f 77 20 28 6d 61 | 78 77 69 64 79 29 3b 0a |ndow (ma|xwidy);.|
|00005870| 20 20 20 20 20 20 20 20 | 77 6d 6f 76 65 20 28 73 | |wmove (s|
|00005880| 63 72 65 65 6e 2c 20 73 | 63 72 79 2c 20 30 29 3b |creen, s|cry, 0);|
|00005890| 0a 09 77 72 65 66 72 65 | 73 68 20 28 73 63 72 65 |..wrefre|sh (scre|
|000058a0| 65 6e 29 3b 0a 09 74 65 | 78 74 77 69 6e 64 6f 77 |en);..te|xtwindow|
|000058b0| 64 65 66 69 6e 65 64 20 | 3d 20 31 3b 0a 09 72 65 |defined |= 1;..re|
|000058c0| 74 75 72 6e 20 73 69 7a | 65 73 63 72 65 67 3b 0a |turn siz|escreg;.|
|000058d0| 20 20 20 20 7d 0a 7d 0a | 0a 69 6e 74 20 61 64 64 | }.}.|.int add|
|000058e0| 74 6f 63 68 6c 69 73 74 | 20 28 63 68 2c 20 69 64 |tochlist| (ch, id|
|000058f0| 2c 20 74 79 70 65 29 0a | 2f 2a 20 61 64 64 20 61 |, type).|/* add a|
|00005900| 20 6e 65 77 20 63 68 61 | 72 61 63 74 65 72 20 74 | new cha|racter t|
|00005910| 6f 20 61 72 72 61 79 20 | 6f 66 20 61 63 74 69 76 |o array |of activ|
|00005920| 61 74 69 6f 6e 20 63 68 | 61 72 73 2e 0a 20 2a 20 |ation ch|ars.. * |
|00005930| 72 65 74 75 72 6e 73 20 | 54 52 55 45 20 69 66 20 |returns |TRUE if |
|00005940| 73 75 63 63 65 73 73 66 | 75 6c 20 28 63 68 61 72 |successf|ul (char|
|00005950| 20 6e 6f 74 20 61 6c 72 | 65 61 64 79 20 69 6e 20 | not alr|eady in |
|00005960| 6c 69 73 74 29 20 65 6c | 73 65 20 46 41 4c 53 45 |list) el|se FALSE|
|00005970| 0a 20 2a 2f 0a 63 68 61 | 72 20 20 20 09 20 20 20 |. */.cha|r . |
|00005980| 20 63 68 3b 0a 69 6e 74 | 20 20 20 20 09 20 20 20 | ch;.int| . |
|00005990| 20 69 64 3b 0a 57 49 44 | 47 45 54 54 59 50 45 20 | id;.WID|GETTYPE |
|000059a0| 20 74 79 70 65 3b 09 0a | 7b 0a 20 20 20 20 73 74 | type;..|{. st|
|000059b0| 72 75 63 74 20 63 68 65 | 6e 74 72 79 20 20 2a 63 |ruct che|ntry *c|
|000059c0| 68 6c 69 73 74 3b 0a 20 | 20 20 20 73 74 72 75 63 |hlist;. | struc|
|000059d0| 74 20 63 68 65 6e 74 72 | 79 20 20 2a 6e 65 77 65 |t chentr|y *newe|
|000059e0| 6e 74 72 79 3b 0a 20 20 | 20 20 2f 2a 20 73 65 61 |ntry;. | /* sea|
|000059f0| 72 63 68 20 6c 69 73 74 | 20 74 6f 20 73 65 65 20 |rch list| to see |
|00005a00| 63 68 61 72 20 61 6c 72 | 65 61 64 79 20 65 6e 74 |char alr|eady ent|
|00005a10| 65 72 65 64 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |ered in |the list|
|00005a20| 20 2a 2f 09 0a 20 20 20 | 20 63 68 6c 69 73 74 20 | */.. | chlist |
|00005a30| 3d 20 61 63 74 6c 69 73 | 74 3b 0a 20 20 20 20 69 |= actlis|t;. i|
|00005a40| 66 20 28 63 68 6c 69 73 | 74 20 21 3d 20 4e 55 4c |f (chlis|t != NUL|
|00005a50| 4c 43 48 29 20 7b 0a 09 | 77 68 69 6c 65 20 28 63 |LCH) {..|while (c|
|00005a60| 68 6c 69 73 74 20 2d 3e | 20 6e 65 78 74 20 21 3d |hlist ->| next !=|
|00005a70| 20 4e 55 4c 4c 43 48 29 | 20 0a 09 20 20 20 69 66 | NULLCH)| .. if|
|00005a80| 20 28 63 68 6c 69 73 74 | 20 2d 3e 20 63 68 20 3d | (chlist| -> ch =|
|00005a90| 3d 20 63 68 29 0a 09 09 | 72 65 74 75 72 6e 20 46 |= ch)...|return F|
|00005aa0| 41 4c 53 45 3b 20 20 20 | 20 20 20 20 20 20 20 20 |ALSE; | |
|00005ab0| 2f 2a 20 63 68 61 72 20 | 65 78 69 73 74 73 20 3d |/* char |exists =|
|00005ac0| 3e 20 65 72 72 6f 72 20 | 2a 2f 0a 09 20 20 20 20 |> error |*/.. |
|00005ad0| 65 6c 73 65 0a 09 09 63 | 68 6c 69 73 74 20 3d 20 |else...c|hlist = |
|00005ae0| 63 68 6c 69 73 74 20 2d | 3e 20 6e 65 78 74 3b 0a |chlist -|> next;.|
|00005af0| 20 20 20 20 09 6e 65 77 | 65 6e 74 72 79 20 3d 20 | .new|entry = |
|00005b00| 28 73 74 72 75 63 74 20 | 63 68 65 6e 74 72 79 2a |(struct |chentry*|
|00005b10| 29 6d 61 6c 6c 6f 63 28 | 28 75 6e 73 69 67 6e 65 |)malloc(|(unsigne|
|00005b20| 64 29 73 69 7a 65 6f 66 | 28 73 74 72 75 63 74 20 |d)sizeof|(struct |
|00005b30| 63 68 65 6e 74 72 79 29 | 29 3b 0a 09 63 68 6c 69 |chentry)|);..chli|
|00005b40| 73 74 20 2d 3e 20 6e 65 | 78 74 20 3d 20 6e 65 77 |st -> ne|xt = new|
|00005b50| 65 6e 74 72 79 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |entry;. | }. |
|00005b60| 20 65 6c 73 65 20 7b 0a | 20 20 20 20 09 6e 65 77 | else {.| .new|
|00005b70| 65 6e 74 72 79 20 3d 20 | 28 73 74 72 75 63 74 20 |entry = |(struct |
|00005b80| 63 68 65 6e 74 72 79 2a | 29 6d 61 6c 6c 6f 63 28 |chentry*|)malloc(|
|00005b90| 28 75 6e 73 69 67 6e 65 | 64 29 73 69 7a 65 6f 66 |(unsigne|d)sizeof|
|00005ba0| 28 73 74 72 75 63 74 20 | 63 68 65 6e 74 72 79 29 |(struct |chentry)|
|00005bb0| 29 3b 0a 09 61 63 74 6c | 69 73 74 20 3d 20 6e 65 |);..actl|ist = ne|
|00005bc0| 77 65 6e 74 72 79 3b 0a | 20 20 20 20 7d 0a 20 20 |wentry;.| }. |
|00005bd0| 20 20 2f 2a 20 63 68 61 | 72 20 6e 6f 74 20 74 68 | /* cha|r not th|
|00005be0| 65 72 65 20 73 6f 20 61 | 64 64 20 74 6f 20 6c 69 |ere so a|dd to li|
|00005bf0| 73 74 20 2a 2f 0a 20 20 | 20 20 6e 65 77 65 6e 74 |st */. | newent|
|00005c00| 72 79 20 2d 3e 20 63 68 | 20 3d 20 63 68 3b 0a 20 |ry -> ch| = ch;. |
|00005c10| 20 20 20 6e 65 77 65 6e | 74 72 79 20 2d 3e 20 69 | newen|try -> i|
|00005c20| 64 20 3d 20 69 64 3b 0a | 20 20 20 20 6e 65 77 65 |d = id;.| newe|
|00005c30| 6e 74 72 79 20 2d 3e 20 | 74 79 70 65 20 3d 20 74 |ntry -> |type = t|
|00005c40| 79 70 65 3b 0a 20 20 20 | 20 6e 65 77 65 6e 74 72 |ype;. | newentr|
|00005c50| 79 20 2d 3e 20 6e 65 78 | 74 20 3d 20 4e 55 4c 4c |y -> nex|t = NULL|
|00005c60| 43 48 3b 0a 20 20 20 20 | 72 65 74 75 72 6e 20 54 |CH;. |return T|
|00005c70| 52 55 45 3b 0a 7d 0a 0a | 0a 57 49 44 47 45 54 54 |RUE;.}..|.WIDGETT|
|00005c80| 59 50 45 20 77 69 64 67 | 65 74 74 79 70 65 20 28 |YPE widg|ettype (|
|00005c90| 70 74 72 29 0a 2f 2a 20 | 67 69 76 65 6e 20 61 20 |ptr)./* |given a |
|00005ca0| 77 69 64 67 65 74 20 70 | 6f 69 6e 74 65 72 20 72 |widget p|ointer r|
|00005cb0| 65 74 75 72 6e 73 20 74 | 68 65 20 74 79 70 65 20 |eturns t|he type |
|00005cc0| 6f 66 20 77 69 64 67 65 | 74 2e 0a 20 2a 2f 0a 57 |of widge|t.. */.W|
|00005cd0| 49 44 47 45 54 20 20 20 | 20 70 74 72 3b 0a 7b 0a |IDGET | ptr;.{.|
|00005ce0| 20 20 20 20 73 74 72 75 | 63 74 20 63 6d 64 77 69 | stru|ct cmdwi|
|00005cf0| 64 20 20 20 20 2a 63 6c | 69 73 74 3b 0a 20 20 20 |d *cl|ist;. |
|00005d00| 20 73 74 72 75 63 74 20 | 74 67 6c 77 69 64 20 20 | struct |tglwid |
|00005d10| 20 20 2a 74 6c 69 73 74 | 3b 0a 20 20 20 20 73 74 | *tlist|;. st|
|00005d20| 72 75 63 74 20 6c 62 6c | 77 69 64 20 20 20 20 2a |ruct lbl|wid *|
|00005d30| 6c 6c 69 73 74 3b 0a 20 | 20 20 20 73 74 72 75 63 |llist;. | struc|
|00005d40| 74 20 69 6e 70 77 69 64 | 20 20 20 20 2a 69 6c 69 |t inpwid| *ili|
|00005d50| 73 74 3b 0a 0a 20 20 20 | 20 2f 2a 20 69 73 20 69 |st;.. | /* is i|
|00005d60| 74 20 61 20 63 6f 6d 6d | 61 6e 64 20 77 69 64 67 |t a comm|and widg|
|00005d70| 65 74 20 3f 20 2a 2f 0a | 20 20 20 20 66 6f 72 20 |et ? */.| for |
|00005d80| 28 63 6c 69 73 74 20 3d | 20 63 6d 64 6c 69 73 74 |(clist =| cmdlist|
|00005d90| 3b 20 63 6c 69 73 74 20 | 21 3d 20 4e 55 4c 4c 43 |; clist |!= NULLC|
|00005da0| 4d 44 3b 20 63 6c 69 73 | 74 20 3d 20 63 6c 69 73 |MD; clis|t = clis|
|00005db0| 74 20 2d 3e 20 6e 65 78 | 74 29 20 20 20 20 20 20 |t -> nex|t) |
|00005dc0| 20 0a 20 20 20 20 09 69 | 66 20 28 28 63 6c 69 73 | . .i|f ((clis|
|00005dd0| 74 20 21 3d 20 4e 55 4c | 4c 43 4d 44 29 20 26 26 |t != NUL|LCMD) &&|
|00005de0| 20 28 63 6c 69 73 74 20 | 2d 3e 20 69 64 20 3d 3d | (clist |-> id ==|
|00005df0| 20 70 74 72 29 29 0a 20 | 20 20 20 09 09 72 65 74 | ptr)). | ..ret|
|00005e00| 75 72 6e 20 43 4d 44 3b | 0a 0a 20 20 20 20 2f 2a |urn CMD;|.. /*|
|00005e10| 20 69 73 20 69 74 20 61 | 20 74 6f 67 67 6c 65 20 | is it a| toggle |
|00005e20| 77 69 64 67 65 74 20 3f | 20 2a 2f 0a 20 20 20 20 |widget ?| */. |
|00005e30| 66 6f 72 20 28 74 6c 69 | 73 74 20 3d 20 74 67 6c |for (tli|st = tgl|
|00005e40| 6c 69 73 74 3b 20 74 6c | 69 73 74 20 21 3d 20 4e |list; tl|ist != N|
|00005e50| 55 4c 4c 54 47 4c 3b 20 | 74 6c 69 73 74 20 3d 20 |ULLTGL; |tlist = |
|00005e60| 74 6c 69 73 74 20 2d 3e | 20 6e 65 78 74 29 20 20 |tlist ->| next) |
|00005e70| 20 20 20 20 20 0a 20 20 | 20 20 09 69 66 20 28 28 | . | .if ((|
|00005e80| 74 6c 69 73 74 20 21 3d | 20 4e 55 4c 4c 54 47 4c |tlist !=| NULLTGL|
|00005e90| 29 20 26 26 20 28 74 6c | 69 73 74 20 2d 3e 20 69 |) && (tl|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 | 54 47 4c 3b 0a 0a 20 20 |.return |TGL;.. |
|00005ec0| 20 20 2f 2a 20 69 73 20 | 69 74 20 61 20 6c 61 62 | /* is |it a lab|
|00005ed0| 65 6c 20 77 69 64 67 65 | 74 20 3f 20 2a 2f 0a 20 |el widge|t ? */. |
|00005ee0| 20 20 20 66 6f 72 20 28 | 6c 6c 69 73 74 20 3d 20 | for (|llist = |
|00005ef0| 6c 62 6c 6c 69 73 74 3b | 20 6c 6c 69 73 74 20 21 |lbllist;| llist !|
|00005f00| 3d 20 4e 55 4c 4c 4c 42 | 4c 3b 20 6c 6c 69 73 74 |= NULLLB|L; llist|
|00005f10| 20 3d 20 6c 6c 69 73 74 | 20 2d 3e 20 6e 65 78 74 | = llist| -> next|
|00005f20| 29 20 20 20 20 20 20 20 | 0a 20 20 20 20 09 69 66 |) |. .if|
|00005f30| 20 28 28 6c 6c 69 73 74 | 20 21 3d 20 4e 55 4c 4c | ((llist| != NULL|
|00005f40| 4c 42 4c 29 20 26 26 20 | 28 6c 6c 69 73 74 20 2d |LBL) && |(llist -|
|00005f50| 3e 20 69 64 20 3d 3d 20 | 70 74 72 29 29 0a 20 20 |> id == |ptr)). |
|00005f60| 20 20 09 09 72 65 74 75 | 72 6e 20 4c 42 4c 3b 0a | ..retu|rn LBL;.|
|00005f70| 0a 20 20 20 20 2f 2a 20 | 69 73 20 69 6e 20 61 6e |. /* |is in an|
|00005f80| 20 69 6e 70 75 74 20 77 | 69 64 67 65 74 20 3f 20 | input w|idget ? |
|00005f90| 2a 2f 0a 20 20 20 20 66 | 6f 72 20 28 69 6c 69 73 |*/. f|or (ilis|
|00005fa0| 74 20 3d 20 69 6e 70 6c | 69 73 74 3b 20 69 6c 69 |t = inpl|ist; ili|
|00005fb0| 73 74 20 21 3d 20 4e 55 | 4c 4c 49 4e 50 3b 20 69 |st != NU|LLINP; i|
|00005fc0| 6c 69 73 74 20 3d 20 69 | 6c 69 73 74 20 2d 3e 20 |list = i|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 69 | 6c 69 73 74 20 21 3d 20 | .if ((i|list != |
|00005ff0| 4e 55 4c 4c 49 4e 50 29 | 20 26 26 20 28 69 6c 69 |NULLINP)| && (ili|
|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 49 |). ..|return I|
|00006020| 4e 50 3b 0a 0a 20 20 20 | 20 2f 2a 20 64 6f 65 73 |NP;.. | /* does|
|00006030| 6e 27 74 20 65 78 69 73 | 74 2c 20 72 65 74 75 72 |n't exis|t, retur|
|00006040| 6e 20 65 72 72 6f 72 20 | 2a 2f 0a 20 20 20 20 72 |n error |*/. r|
|00006050| 65 74 75 72 6e 20 46 41 | 4c 53 45 3b 20 20 20 20 |eturn FA|LSE; |
|00006060| 20 20 20 20 20 20 20 20 | 20 0a 7d 0a 0a 62 6f 78 | | .}..box|
|00006070| 77 69 64 67 65 74 20 28 | 77 69 64 67 65 74 2c 20 |widget (|widget, |
|00006080| 6c 65 6e 67 74 68 29 0a | 57 49 4e 44 4f 57 09 2a |length).|WINDOW.*|
|00006090| 77 69 64 67 65 74 3b 0a | 69 6e 74 09 6c 65 6e 67 |widget;.|int.leng|
|000060a0| 74 68 3b 0a 7b 0a 20 20 | 20 20 69 6e 74 20 69 3b |th;.{. | int i;|
|000060b0| 0a 0a 20 20 20 20 77 6d | 6f 76 65 20 28 77 69 64 |.. wm|ove (wid|
|000060c0| 67 65 74 2c 20 30 2c 20 | 31 29 3b 0a 20 20 20 20 |get, 0, |1);. |
|000060d0| 66 6f 72 20 28 69 3d 31 | 3b 20 69 20 3c 20 6c 65 |for (i=1|; i < le|
|000060e0| 6e 67 74 68 3b 20 69 2b | 2b 29 0a 20 20 20 20 20 |ngth; i+|+). |
|000060f0| 20 20 09 77 61 64 64 63 | 68 20 28 77 69 64 67 65 | .waddc|h (widge|
|00006100| 74 2c 20 27 2d 27 29 3b | 0a 20 20 20 20 77 6d 6f |t, '-');|. wmo|
|00006110| 76 65 20 28 77 69 64 67 | 65 74 2c 20 32 2c 20 31 |ve (widg|et, 2, 1|
|00006120| 29 3b 0a 20 20 20 20 66 | 6f 72 20 28 69 3d 31 3b |);. f|or (i=1;|
|00006130| 20 69 20 3c 20 6c 65 6e | 67 74 68 3b 20 69 2b 2b | i < len|gth; i++|
|00006140| 29 0a 20 20 20 20 20 20 | 20 09 77 61 64 64 63 68 |). | .waddch|
|00006150| 20 28 77 69 64 67 65 74 | 2c 20 27 2d 27 29 3b 0a | (widget|, '-');.|
|00006160| 20 20 20 20 6d 76 77 61 | 64 64 63 68 20 28 77 69 | mvwa|ddch (wi|
|00006170| 64 67 65 74 2c 20 31 2c | 20 30 2c 20 27 7c 27 29 |dget, 1,| 0, '|')|
|00006180| 3b 0a 20 20 20 20 6d 76 | 77 61 64 64 63 68 20 28 |;. mv|waddch (|
|00006190| 77 69 64 67 65 74 2c 20 | 31 2c 20 6c 65 6e 67 74 |widget, |1, lengt|
|000061a0| 68 2c 20 27 7c 27 29 3b | 0a 20 20 20 20 6d 76 77 |h, '|');|. mvw|
|000061b0| 61 64 64 63 68 20 28 77 | 69 64 67 65 74 2c 20 30 |addch (w|idget, 0|
|000061c0| 2c 20 30 2c 20 27 2e 27 | 29 3b 0a 20 20 20 20 6d |, 0, '.'|);. m|
|000061d0| 76 77 61 64 64 63 68 20 | 28 77 69 64 67 65 74 2c |vwaddch |(widget,|
|000061e0| 20 30 2c 20 6c 65 6e 67 | 74 68 2c 20 27 2e 27 29 | 0, leng|th, '.')|
|000061f0| 3b 0a 20 20 20 20 6d 76 | 77 61 64 64 63 68 20 28 |;. mv|waddch (|
|00006200| 77 69 64 67 65 74 2c 20 | 32 2c 20 30 2c 20 27 60 |widget, |2, 0, '`|
|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 32 2c 20 6c 65 6e | (widget|, 2, len|
|00006230| 67 74 68 2c 20 27 5c 27 | 27 29 3b 0a 7d 0a 0a 64 |gth, '\'|');.}..d|
|00006240| 72 61 77 63 6d 64 77 69 | 64 67 65 74 20 28 77 69 |rawcmdwi|dget (wi|
|00006250| 64 67 65 74 2c 20 69 6e | 66 6f 2c 20 63 68 2c 20 |dget, in|fo, ch, |
|00006260| 6c 65 6e 67 74 68 2c 20 | 62 6f 6f 6c 65 61 6e 29 |length, |boolean)|
|00006270| 0a 57 49 4e 44 4f 57 09 | 2a 77 69 64 67 65 74 3b |.WINDOW.|*widget;|
|00006280| 0a 63 68 61 72 09 69 6e | 66 6f 5b 5d 3b 0a 63 68 |.char.in|fo[];.ch|
|00006290| 61 72 09 63 68 3b 0a 69 | 6e 74 09 6c 65 6e 67 74 |ar.ch;.i|nt.lengt|
|000062a0| 68 3b 0a 69 6e 74 09 62 | 6f 6f 6c 65 61 6e 3b 0a |h;.int.b|oolean;.|
|000062b0| 7b 0a 20 20 20 20 62 6f | 78 77 69 64 67 65 74 20 |{. bo|xwidget |
|000062c0| 28 77 69 64 67 65 74 2c | 20 6c 65 6e 67 74 68 2d |(widget,| length-|
|000062d0| 31 29 3b 0a 20 20 20 20 | 77 6d 6f 76 65 20 28 77 |1);. |wmove (w|
|000062e0| 69 64 67 65 74 2c 20 31 | 2c 20 31 29 3b 0a 20 20 |idget, 1|, 1);. |
|000062f0| 20 20 77 73 74 61 6e 64 | 6f 75 74 20 28 77 69 64 | wstand|out (wid|
|00006300| 67 65 74 29 3b 0a 20 20 | 20 20 77 61 64 64 63 68 |get);. | waddch|
|00006310| 20 28 77 69 64 67 65 74 | 2c 20 63 68 29 3b 0a 20 | (widget|, ch);. |
|00006320| 20 20 20 69 66 20 28 21 | 62 6f 6f 6c 65 61 6e 29 | if (!|boolean)|
|00006330| 0a 20 20 20 20 20 20 20 | 20 77 73 74 61 6e 64 65 |. | wstande|
|00006340| 6e 64 20 28 77 69 64 67 | 65 74 29 3b 0a 20 20 20 |nd (widg|et);. |
|00006350| 20 77 70 72 69 6e 74 77 | 20 28 77 69 64 67 65 74 | wprintw| (widget|
|00006360| 2c 20 22 3a 25 73 22 2c | 20 69 6e 66 6f 29 3b 0a |, ":%s",| info);.|
|00006370| 20 20 20 20 69 66 20 28 | 62 6f 6f 6c 65 61 6e 29 | if (|boolean)|
|00006380| 0a 20 20 20 20 20 20 20 | 20 77 73 74 61 6e 64 65 |. | wstande|
|00006390| 6e 64 20 28 77 69 64 67 | 65 74 29 3b 0a 20 20 20 |nd (widg|et);. |
|000063a0| 20 77 72 65 66 72 65 73 | 68 20 28 77 69 64 67 65 | wrefres|h (widge|
|000063b0| 74 29 3b 0a 7d 0a 0a 64 | 72 61 77 6c 62 6c 77 69 |t);.}..d|rawlblwi|
|000063c0| 64 67 65 74 20 28 77 69 | 64 67 65 74 2c 20 69 6e |dget (wi|dget, in|
|000063d0| 66 6f 2c 20 70 6f 73 2c | 20 64 69 66 66 65 72 65 |fo, pos,| differe|
|000063e0| 6e 63 65 2c 20 73 70 61 | 63 65 2c 20 62 6f 6f 6c |nce, spa|ce, bool|
|000063f0| 65 61 6e 29 0a 57 49 4e | 44 4f 57 09 2a 77 69 64 |ean).WIN|DOW.*wid|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.