home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: part01
Confidence | Program | Detection | Match Type | Support
|
---|
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
| C source, ASCII text
| 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 75 75 | 6e 65 74 21 64 65 63 77 |Path: uu|net!decw|
|00000010| 72 6c 21 73 75 6e 2d 62 | 61 72 72 21 6e 65 77 73 |rl!sun-b|arr!news|
|00000020| 74 6f 70 21 73 75 6e 21 | 75 6b 63 2e 61 63 2e 75 |top!sun!|ukc.ac.u|
|00000030| 6b 0a 46 72 6f 6d 3a 20 | 72 6c 68 32 40 75 6b 63 |k.From: |rlh2@ukc|
|00000040| 2e 61 63 2e 75 6b 20 28 | 52 69 63 68 61 72 64 20 |.ac.uk (|Richard |
|00000050| 48 65 73 6b 65 74 68 29 | 0a 4e 65 77 73 67 72 6f |Hesketh)|.Newsgro|
|00000060| 75 70 73 3a 20 63 6f 6d | 70 2e 73 6f 75 72 63 65 |ups: com|p.source|
|00000070| 73 2e 78 0a 53 75 62 6a | 65 63 74 3a 20 76 30 38 |s.x.Subj|ect: v08|
|00000080| 69 30 30 38 3a 20 20 78 | 6d 65 6e 75 20 2d 20 70 |i008: x|menu - p|
|00000090| 6f 70 75 70 20 6d 65 6e | 75 73 20 66 72 6f 6d 20 |opup men|us from |
|000000a0| 73 68 65 6c 6c 20 73 63 | 72 69 70 74 73 2c 20 50 |shell sc|ripts, P|
|000000b0| 61 72 74 30 31 2f 30 31 | 0a 4d 65 73 73 61 67 65 |art01/01|.Message|
|000000c0| 2d 49 44 3a 20 3c 31 33 | 37 39 32 32 40 73 75 6e |-ID: <13|7922@sun|
|000000d0| 2e 45 6e 67 2e 53 75 6e | 2e 43 4f 4d 3e 0a 44 61 |.Eng.Sun|.COM>.Da|
|000000e0| 74 65 3a 20 32 37 20 4a | 75 6e 20 39 30 20 30 36 |te: 27 J|un 90 06|
|000000f0| 3a 35 31 3a 33 38 20 47 | 4d 54 0a 53 65 6e 64 65 |:51:38 G|MT.Sende|
|00000100| 72 3a 20 6e 65 77 73 40 | 73 75 6e 2e 45 6e 67 2e |r: news@|sun.Eng.|
|00000110| 53 75 6e 2e 43 4f 4d 0a | 4c 69 6e 65 73 3a 20 33 |Sun.COM.|Lines: 3|
|00000120| 33 33 0a 41 70 70 72 6f | 76 65 64 3a 20 61 72 67 |33.Appro|ved: arg|
|00000130| 76 40 73 75 6e 2e 63 6f | 6d 0a 0a 53 75 62 6d 69 |v@sun.co|m..Submi|
|00000140| 74 74 65 64 2d 62 79 3a | 20 52 69 63 68 61 72 64 |tted-by:| Richard|
|00000150| 20 48 65 73 6b 65 74 68 | 20 3c 72 6c 68 32 40 75 | Hesketh| <rlh2@u|
|00000160| 6b 63 2e 61 63 2e 75 6b | 3e 0a 50 6f 73 74 69 6e |kc.ac.uk|>.Postin|
|00000170| 67 2d 6e 75 6d 62 65 72 | 3a 20 56 6f 6c 75 6d 65 |g-number|: Volume|
|00000180| 20 38 2c 20 49 73 73 75 | 65 20 38 0a 41 72 63 68 | 8, Issu|e 8.Arch|
|00000190| 69 76 65 2d 6e 61 6d 65 | 3a 20 78 6d 65 6e 75 2f |ive-name|: xmenu/|
|000001a0| 70 61 72 74 30 31 0a 0a | 53 6f 6d 65 6f 6e 65 20 |part01..|Someone |
|000001b0| 61 73 6b 65 64 20 66 6f | 72 20 74 68 69 73 20 66 |asked fo|r this f|
|000001c0| 61 63 69 6c 69 74 79 20 | 6f 6e 20 63 6f 6d 70 2e |acility |on comp.|
|000001d0| 77 69 6e 64 6f 77 73 2e | 78 20 61 6e 64 20 61 73 |windows.|x and as|
|000001e0| 20 49 20 63 6f 75 6c 64 | 20 77 69 74 68 20 6f 6e | I could| with on|
|000001f0| 65 0a 61 73 20 77 65 6c | 6c 20 2e 2e 20 68 65 72 |e.as wel|l .. her|
|00000200| 65 20 69 73 20 6f 6e 65 | 2e 20 20 49 74 20 69 73 |e is one|. It is|
|00000210| 20 61 6c 73 6f 20 61 6e | 20 65 78 61 6d 70 6c 65 | also an| example|
|00000220| 20 75 73 65 20 6f 66 20 | 74 68 65 20 41 74 68 65 | use of |the Athe|
|00000230| 6e 61 0a 53 69 6d 70 6c | 65 20 4d 65 6e 75 20 77 |na.Simpl|e Menu w|
|00000240| 69 64 67 65 74 2e 0a 0a | 52 69 63 68 61 72 64 20 |idget...|Richard |
|00000250| 48 65 73 6b 65 74 68 20 | 20 20 3a 20 20 20 40 6e |Hesketh | : @n|
|00000260| 73 66 6e 65 74 2d 72 65 | 6c 61 79 2e 61 63 2e 75 |sfnet-re|lay.ac.u|
|00000270| 6b 3a 72 6c 68 32 40 75 | 6b 63 2e 61 63 2e 75 6b |k:rlh2@u|kc.ac.uk|
|00000280| 0a 09 09 20 20 3a 20 20 | 20 72 6c 68 32 40 75 6b |... : | rlh2@uk|
|00000290| 63 2e 61 63 2e 75 6b 20 | 20 20 20 2e 2e 21 6d 63 |c.ac.uk | ..!mc|
|000002a0| 76 61 78 21 75 6b 63 21 | 72 6c 68 32 0a 2d 2d 2d |vax!ukc!|rlh2.---|
|000002b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000002d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 0a | | .|
|000002e0| 43 6f 6d 70 75 74 69 6e | 67 20 4c 61 62 2e 2c 20 |Computin|g Lab., |
|000002f0| 55 6e 69 76 65 72 73 69 | 74 79 20 6f 66 20 4b 65 |Universi|ty of Ke|
|00000300| 6e 74 20 61 74 20 43 61 | 6e 74 65 72 62 75 72 79 |nt at Ca|nterbury|
|00000310| 2c 0a 43 61 6e 74 65 72 | 62 75 72 79 2c 20 4b 65 |,.Canter|bury, Ke|
|00000320| 6e 74 2c 20 43 54 32 20 | 37 4e 46 2c 20 55 6e 69 |nt, CT2 |7NF, Uni|
|00000330| 74 65 64 20 4b 69 6e 67 | 64 6f 6d 2e 20 20 20 20 |ted King|dom. |
|00000340| 54 65 6c 3a 20 2b 34 34 | 20 32 32 37 20 37 36 34 |Tel: +44| 227 764|
|00000350| 30 30 30 20 65 78 74 20 | 33 36 38 32 2f 37 36 32 |000 ext |3682/762|
|00000360| 30 0a 0a 23 21 20 2f 62 | 69 6e 2f 73 68 0a 23 20 |0..#! /b|in/sh.# |
|00000370| 54 68 69 73 20 69 73 20 | 61 20 73 68 65 6c 6c 20 |This is |a shell |
|00000380| 61 72 63 68 69 76 65 2c | 20 6d 65 61 6e 69 6e 67 |archive,| meaning|
|00000390| 3a 0a 23 20 31 2e 20 52 | 65 6d 6f 76 65 20 65 76 |:.# 1. R|emove ev|
|000003a0| 65 72 79 74 68 69 6e 67 | 20 61 62 6f 76 65 20 74 |erything| above t|
|000003b0| 68 65 20 23 21 20 2f 62 | 69 6e 2f 73 68 20 6c 69 |he #! /b|in/sh li|
|000003c0| 6e 65 2e 0a 23 20 32 2e | 20 53 61 76 65 20 74 68 |ne..# 2.| Save th|
|000003d0| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 74 65 78 74 |e result|ing text|
|000003e0| 20 69 6e 20 61 20 66 69 | 6c 65 2e 0a 23 20 33 2e | in a fi|le..# 3.|
|000003f0| 20 45 78 65 63 75 74 65 | 20 74 68 65 20 66 69 6c | Execute| the fil|
|00000400| 65 20 77 69 74 68 20 2f | 62 69 6e 2f 73 68 20 28 |e with /|bin/sh (|
|00000410| 6e 6f 74 20 63 73 68 29 | 20 74 6f 20 63 72 65 61 |not csh)| to crea|
|00000420| 74 65 20 74 68 65 20 66 | 69 6c 65 73 3a 0a 23 09 |te the f|iles:.#.|
|00000430| 52 45 41 44 4d 45 0a 23 | 09 49 6d 61 6b 65 66 69 |README.#|.Imakefi|
|00000440| 6c 65 0a 23 09 70 61 74 | 63 68 6c 65 76 65 6c 2e |le.#.pat|chlevel.|
|00000450| 68 0a 23 09 78 6d 65 6e | 75 2e 6d 61 6e 0a 23 09 |h.#.xmen|u.man.#.|
|00000460| 78 6d 65 6e 75 2e 63 0a | 23 20 54 68 69 73 20 61 |xmenu.c.|# This a|
|00000470| 72 63 68 69 76 65 20 63 | 72 65 61 74 65 64 3a 20 |rchive c|reated: |
|00000480| 54 75 65 20 4a 75 6e 20 | 31 39 20 31 37 3a 30 32 |Tue Jun |19 17:02|
|00000490| 3a 35 32 20 31 39 39 30 | 0a 23 20 42 79 3a 09 52 |:52 1990|.# By:.R|
|000004a0| 69 63 68 61 72 64 20 48 | 65 73 6b 65 74 68 20 28 |ichard H|esketh (|
|000004b0| 29 0a 65 78 70 6f 72 74 | 20 50 41 54 48 3b 20 50 |).export| PATH; P|
|000004c0| 41 54 48 3d 2f 62 69 6e | 3a 24 50 41 54 48 0a 69 |ATH=/bin|:$PATH.i|
|000004d0| 66 20 74 65 73 74 20 2d | 66 20 27 52 45 41 44 4d |f test -|f 'READM|
|000004e0| 45 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |E'.then.|.echo sh|
|000004f0| 61 72 3a 20 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |ar: will| not ove|
|00000500| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00000510| 20 66 69 6c 65 20 22 27 | 52 45 41 44 4d 45 27 22 | file "'|README'"|
|00000520| 0a 65 6c 73 65 0a 63 61 | 74 20 3c 3c 20 5c 53 48 |.else.ca|t << \SH|
|00000530| 41 52 5f 45 4f 46 20 3e | 20 27 52 45 41 44 4d 45 |AR_EOF >| 'README|
|00000540| 27 0a 58 4d 65 6e 75 20 | 2d 20 70 72 6f 76 69 64 |'.XMenu |- provid|
|00000550| 65 20 61 20 70 6f 70 75 | 70 20 6d 65 6e 75 20 66 |e a popu|p menu f|
|00000560| 72 6f 6d 20 61 20 73 68 | 65 6c 6c 20 73 63 72 69 |rom a sh|ell scri|
|00000570| 70 74 20 65 74 63 2e 0a | 0a 54 68 69 73 20 6c 69 |pt etc..|.This li|
|00000580| 74 74 6c 65 20 74 6f 6f | 6c 6b 69 74 20 70 72 6f |ttle too|lkit pro|
|00000590| 67 72 61 6d 20 70 72 6f | 64 75 63 65 73 20 61 20 |gram pro|duces a |
|000005a0| 70 6f 70 75 70 20 6d 65 | 6e 75 20 6f 6e 20 74 68 |popup me|nu on th|
|000005b0| 65 20 73 63 72 65 65 6e | 20 74 61 6b 69 6e 67 0a |e screen| taking.|
|000005c0| 74 68 65 20 63 6f 6d 6d | 61 6e 64 20 6c 69 6e 65 |the comm|and line|
|000005d0| 20 61 72 67 75 6d 65 6e | 74 73 20 61 73 20 6d 65 | argumen|ts as me|
|000005e0| 6e 75 20 65 6e 74 72 69 | 65 73 2e 20 20 49 66 20 |nu entri|es. If |
|000005f0| 61 6e 20 61 72 67 75 6d | 65 6e 74 20 63 6f 6e 74 |an argum|ent cont|
|00000600| 61 69 6e 73 0a 61 20 6e | 6f 6e 2d 65 73 63 61 70 |ains.a n|on-escap|
|00000610| 65 64 20 27 3d 27 20 28 | 65 71 75 61 6c 73 20 73 |ed '=' (|equals s|
|00000620| 69 67 6e 29 20 74 68 65 | 20 73 74 72 69 6e 67 20 |ign) the| string |
|00000630| 74 6f 20 74 68 65 20 6c | 65 66 74 20 69 73 20 74 |to the l|eft is t|
|00000640| 68 65 20 6e 61 6d 65 0a | 64 69 73 70 6c 61 79 65 |he name.|displaye|
|00000650| 64 20 69 6e 20 74 68 65 | 20 6d 65 6e 75 20 61 6e |d in the| menu an|
|00000660| 64 20 74 68 65 20 73 74 | 72 69 6e 67 20 74 6f 20 |d the st|ring to |
|00000670| 74 68 65 20 72 69 67 68 | 74 20 69 73 20 74 68 65 |the righ|t is the|
|00000680| 20 74 65 78 74 20 6f 75 | 74 70 75 74 0a 77 68 65 | text ou|tput.whe|
|00000690| 6e 20 74 68 69 73 20 6d | 65 6e 75 20 62 75 74 74 |n this m|enu butt|
|000006a0| 6f 6e 20 69 73 20 70 72 | 65 73 73 65 64 2e 0a 0a |on is pr|essed...|
|000006b0| 41 20 73 70 65 63 69 61 | 6c 20 61 72 67 75 6d 65 |A specia|l argume|
|000006c0| 6e 74 20 22 6c 69 6e 65 | 22 20 63 61 6e 20 62 65 |nt "line|" can be|
|000006d0| 20 75 73 65 64 20 74 6f | 20 64 72 61 77 20 61 20 | used to| draw a |
|000006e0| 64 69 76 69 64 69 6e 67 | 20 6c 69 6e 65 20 62 65 |dividing| line be|
|000006f0| 74 77 65 65 6e 0a 73 75 | 63 63 65 73 73 69 76 65 |tween.su|ccessive|
|00000700| 20 6d 65 6e 75 20 65 6e | 74 72 69 65 73 2e 0a 0a | menu en|tries...|
|00000710| 41 20 6d 65 6e 75 20 74 | 69 74 6c 65 20 63 61 6e |A menu t|itle can|
|00000720| 20 62 65 20 67 69 76 65 | 6e 20 61 73 20 61 6e 20 | be give|n as an |
|00000730| 61 72 67 75 6d 65 6e 74 | 20 61 66 74 65 72 20 61 |argument| after a|
|00000740| 20 22 2d 68 65 61 64 69 | 6e 67 22 20 66 6c 61 67 | "-headi|ng" flag|
|00000750| 2e 0a 0a 54 68 65 20 6d | 65 6e 75 20 69 73 20 6f |...The m|enu is o|
|00000760| 6e 6c 79 20 70 6f 70 70 | 65 64 20 64 6f 77 6e 20 |nly popp|ed down |
|00000770| 77 68 65 6e 20 61 20 6d | 65 6e 75 20 62 75 74 74 |when a m|enu butt|
|00000780| 6f 6e 20 69 73 20 70 72 | 65 73 73 65 64 2e 0a 42 |on is pr|essed..B|
|00000790| 79 20 64 65 66 61 75 6c | 74 20 74 68 65 20 6d 65 |y defaul|t the me|
|000007a0| 6e 75 20 69 73 20 70 6f | 70 70 65 64 20 75 70 20 |nu is po|pped up |
|000007b0| 62 65 6c 6f 77 20 61 6e | 64 20 74 6f 20 74 68 65 |below an|d to the|
|000007c0| 20 72 69 67 68 74 20 6f | 66 20 74 68 65 20 63 75 | right o|f the cu|
|000007d0| 72 72 65 6e 74 0a 70 6f | 69 6e 74 65 72 20 70 6f |rrent.po|inter po|
|000007e0| 73 69 74 69 6f 6e 2c 20 | 75 73 65 20 22 2d 67 65 |sition, |use "-ge|
|000007f0| 6f 6d 65 74 72 79 22 20 | 74 6f 20 70 6f 73 69 74 |ometry" |to posit|
|00000800| 69 6f 6e 20 74 68 65 20 | 6d 65 6e 75 20 61 74 20 |ion the |menu at |
|00000810| 61 20 70 61 72 74 69 63 | 75 6c 61 72 0a 70 6f 69 |a partic|ular.poi|
|00000820| 6e 74 20 28 61 6e 64 20 | 69 6e 20 61 20 70 61 72 |nt (and |in a par|
|00000830| 74 69 63 75 6c 61 72 20 | 73 69 7a 65 29 2e 20 0a |ticular |size). .|
|00000840| 0a 45 78 61 6d 70 6c 65 | 73 3a 0a 0a 78 6d 65 6e |.Example|s:..xmen|
|00000850| 75 20 2d 68 65 61 64 69 | 6e 67 20 22 43 68 6f 6f |u -headi|ng "Choo|
|00000860| 73 65 20 46 69 6c 65 73 | 20 62 79 20 53 75 66 66 |se Files| by Suff|
|00000870| 69 78 22 20 43 6f 6d 70 | 72 65 73 73 65 64 3d 22 |ix" Comp|ressed="|
|00000880| 2a 2e 5a 22 20 5c 0a 09 | 09 22 43 20 73 6f 75 72 |*.Z" \..|."C sour|
|00000890| 63 65 73 22 3d 22 2a 2e | 63 22 20 22 48 65 61 64 |ces"="*.|c" "Head|
|000008a0| 65 72 73 22 3d 22 2a 2e | 68 22 20 5c 0a 09 09 6c |ers"="*.|h" \...l|
|000008b0| 69 6e 65 20 6c 69 6e 65 | 20 22 20 20 20 20 20 20 |ine line| " |
|000008c0| 20 20 43 61 6e 63 65 6c | 22 0a 20 0a 78 6d 65 6e | Cancel|". .xmen|
|000008d0| 75 20 48 65 6c 6c 6f 3d | 22 48 65 6c 6c 6f 20 57 |u Hello=|"Hello W|
|000008e0| 6f 72 6c 64 22 20 6c 69 | 6e 65 20 22 20 22 20 22 |orld" li|ne " " "|
|000008f0| 20 22 20 6c 69 6e 65 20 | 47 6f 6f 64 62 79 65 3d | " line |Goodbye=|
|00000900| 22 47 6f 6f 64 62 79 65 | 20 57 6f 72 6c 64 22 0a |"Goodbye| World".|
|00000910| 0a 0a 45 6e 6a 6f 79 2c | 0a 0a 52 69 63 68 61 72 |..Enjoy,|..Richar|
|00000920| 64 20 48 65 73 6b 65 74 | 68 20 20 20 3a 20 20 20 |d Hesket|h : |
|00000930| 40 6e 73 66 6e 65 74 2d | 72 65 6c 61 79 2e 61 63 |@nsfnet-|relay.ac|
|00000940| 2e 75 6b 3a 72 6c 68 32 | 40 75 6b 63 2e 61 63 2e |.uk:rlh2|@ukc.ac.|
|00000950| 75 6b 0a 09 09 20 20 3a | 20 20 20 72 6c 68 32 40 |uk... :| rlh2@|
|00000960| 75 6b 63 2e 61 63 2e 75 | 6b 20 20 20 20 2e 2e 21 |ukc.ac.u|k ..!|
|00000970| 6d 63 73 75 6e 21 75 6b | 63 21 72 6c 68 32 0a 2d |mcsun!uk|c!rlh2.-|
|00000980| 2d 2d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |-- | |
|00000990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009b0| 20 0a 43 6f 6d 70 75 74 | 69 6e 67 20 4c 61 62 2e | .Comput|ing Lab.|
|000009c0| 2c 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |, Univer|sity of |
|000009d0| 4b 65 6e 74 20 61 74 20 | 43 61 6e 74 65 72 62 75 |Kent at |Canterbu|
|000009e0| 72 79 2c 0a 43 61 6e 74 | 65 72 62 75 72 79 2c 20 |ry,.Cant|erbury, |
|000009f0| 4b 65 6e 74 2c 20 43 54 | 32 20 37 4e 46 2c 20 55 |Kent, CT|2 7NF, U|
|00000a00| 6e 69 74 65 64 20 4b 69 | 6e 67 64 6f 6d 2e 20 20 |nited Ki|ngdom. |
|00000a10| 20 20 54 65 6c 3a 20 2b | 34 34 20 32 32 37 20 37 | Tel: +|44 227 7|
|00000a20| 36 34 30 30 30 20 65 78 | 74 20 33 36 38 32 2f 37 |64000 ex|t 3682/7|
|00000a30| 36 32 30 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 20 |620.SHAR|_EOF.fi |
|00000a40| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00000a50| 74 69 6e 67 20 63 68 65 | 63 6b 0a 69 66 20 74 65 |ting che|ck.if te|
|00000a60| 73 74 20 2d 66 20 27 49 | 6d 61 6b 65 66 69 6c 65 |st -f 'I|makefile|
|00000a70| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00000a80| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00000a90| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00000aa0| 66 69 6c 65 20 22 27 49 | 6d 61 6b 65 66 69 6c 65 |file "'I|makefile|
|00000ab0| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00000ac0| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 49 6d 61 6b |SHAR_EOF| > 'Imak|
|00000ad0| 65 66 69 6c 65 27 0a 20 | 20 20 20 20 20 20 49 4e |efile'. | IN|
|00000ae0| 43 4c 55 44 45 53 20 3d | 20 2d 49 24 28 54 4f 50 |CLUDES =| -I$(TOP|
|00000af0| 29 0a 20 20 20 20 20 20 | 20 20 44 45 50 4c 49 42 |). | DEPLIB|
|00000b00| 53 20 3d 20 58 61 77 43 | 6c 69 65 6e 74 44 65 70 |S = XawC|lientDep|
|00000b10| 4c 69 62 73 0a 4c 4f 43 | 41 4c 5f 4c 49 42 52 41 |Libs.LOC|AL_LIBRA|
|00000b20| 52 49 45 53 20 3d 20 58 | 61 77 43 6c 69 65 6e 74 |RIES = X|awClient|
|00000b30| 4c 69 62 73 0a 20 20 20 | 20 20 20 20 20 20 20 20 |Libs. | |
|00000b40| 53 52 43 53 20 3d 20 78 | 6d 65 6e 75 2e 63 0a 20 |SRCS = x|menu.c. |
|00000b50| 20 20 20 20 20 20 20 20 | 20 20 4f 42 4a 53 20 3d | | OBJS =|
|00000b60| 20 78 6d 65 6e 75 2e 6f | 0a 0a 53 69 6d 70 6c 65 | xmenu.o|..Simple|
|00000b70| 50 72 6f 67 72 61 6d 54 | 61 72 67 65 74 28 78 6d |ProgramT|arget(xm|
|00000b80| 65 6e 75 29 0a 53 48 41 | 52 5f 45 4f 46 0a 66 69 |enu).SHA|R_EOF.fi|
|00000b90| 20 23 20 65 6e 64 20 6f | 66 20 6f 76 65 72 77 72 | # end o|f overwr|
|00000ba0| 69 74 69 6e 67 20 63 68 | 65 63 6b 0a 69 66 20 74 |iting ch|eck.if t|
|00000bb0| 65 73 74 20 2d 66 20 27 | 70 61 74 63 68 6c 65 76 |est -f '|patchlev|
|00000bc0| 65 6c 2e 68 27 0a 74 68 | 65 6e 0a 09 65 63 68 6f |el.h'.th|en..echo|
|00000bd0| 20 73 68 61 72 3a 20 77 | 69 6c 6c 20 6e 6f 74 20 | shar: w|ill not |
|00000be0| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00000bf0| 69 6e 67 20 66 69 6c 65 | 20 22 27 70 61 74 63 68 |ing file| "'patch|
|00000c00| 6c 65 76 65 6c 2e 68 27 | 22 0a 65 6c 73 65 0a 63 |level.h'|".else.c|
|00000c10| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|00000c20| 3e 20 27 70 61 74 63 68 | 6c 65 76 65 6c 2e 68 27 |> 'patch|level.h'|
|00000c30| 0a 23 64 65 66 69 6e 65 | 20 70 61 74 63 68 6c 65 |.#define| patchle|
|00000c40| 76 65 6c 20 30 0a 53 48 | 41 52 5f 45 4f 46 0a 66 |vel 0.SH|AR_EOF.f|
|00000c50| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00000c60| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 69 66 20 |riting c|heck.if |
|00000c70| 74 65 73 74 20 2d 66 20 | 27 78 6d 65 6e 75 2e 6d |test -f |'xmenu.m|
|00000c80| 61 6e 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |an'.then|..echo s|
|00000c90| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|00000ca0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00000cb0| 67 20 66 69 6c 65 20 22 | 27 78 6d 65 6e 75 2e 6d |g file "|'xmenu.m|
|00000cc0| 61 6e 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |an'".els|e.cat <<|
|00000cd0| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 78 6d | \SHAR_E|OF > 'xm|
|00000ce0| 65 6e 75 2e 6d 61 6e 27 | 0a 2e 54 48 20 58 4d 45 |enu.man'|..TH XME|
|00000cf0| 4e 55 20 6c 20 22 31 39 | 20 4a 75 6e 65 20 31 39 |NU l "19| June 19|
|00000d00| 39 30 22 0a 2e 53 48 20 | 4e 41 4d 45 0a 78 6d 65 |90"..SH |NAME.xme|
|00000d10| 6e 75 20 5c 2d 20 70 72 | 6f 76 69 64 65 20 73 69 |nu \- pr|ovide si|
|00000d20| 6d 70 6c 65 20 70 6f 70 | 75 70 20 6d 65 6e 75 73 |mple pop|up menus|
|00000d30| 20 74 6f 20 73 68 65 6c | 6c 20 73 63 72 69 70 74 | to shel|l script|
|00000d40| 73 0a 2e 53 48 20 53 59 | 4e 4f 50 53 49 53 0a 5c |s..SH SY|NOPSIS.\|
|00000d50| 66 42 78 6d 65 6e 75 5c | 66 50 20 5b 2d 68 65 61 |fBxmenu\|fP [-hea|
|00000d60| 64 69 6e 67 20 22 6d 65 | 6e 75 20 74 69 74 6c 65 |ding "me|nu title|
|00000d70| 22 5d 20 5b 6d 65 6e 75 | 5f 65 6e 74 72 79 5b 3d |"] [menu|_entry[=|
|00000d80| 6f 75 74 70 75 74 5f 76 | 61 6c 75 65 5d 20 7c 20 |output_v|alue] | |
|00000d90| 6c 69 6e 65 5d 2e 2e 2e | 0a 2e 53 48 20 44 45 53 |line]...|..SH DES|
|00000da0| 43 52 49 50 54 49 4f 4e | 0a 5c 66 49 78 6d 65 6e |CRIPTION|.\fIxmen|
|00000db0| 75 5c 66 50 20 70 72 6f | 76 69 64 65 73 20 61 20 |u\fP pro|vides a |
|00000dc0| 71 75 69 63 6b 20 61 6e | 64 20 65 61 73 79 20 77 |quick an|d easy w|
|00000dd0| 61 79 20 6f 66 20 70 72 | 6f 64 75 63 69 6e 67 20 |ay of pr|oducing |
|00000de0| 61 20 73 69 6e 67 6c 65 | 20 70 6f 70 75 70 0a 6d |a single| popup.m|
|00000df0| 65 6e 75 20 66 6f 72 20 | 75 73 65 20 62 79 20 73 |enu for |use by s|
|00000e00| 68 65 6c 6c 20 73 63 72 | 69 70 74 73 2e 20 20 54 |hell scr|ipts. T|
|00000e10| 68 65 20 5c 66 49 2d 68 | 65 61 64 69 6e 67 5c 66 |he \fI-h|eading\f|
|00000e20| 50 20 69 73 20 75 73 65 | 64 20 74 6f 20 73 65 74 |P is use|d to set|
|00000e30| 20 74 68 65 20 6d 65 6e | 75 27 73 0a 74 69 74 6c | the men|u's.titl|
|00000e40| 65 2c 20 61 6c 6c 20 6f | 74 68 65 72 20 61 72 67 |e, all o|ther arg|
|00000e50| 75 6d 65 6e 74 73 20 61 | 72 65 20 75 73 65 64 20 |uments a|re used |
|00000e60| 61 73 20 69 74 65 6d 73 | 20 69 6e 20 74 68 65 20 |as items| in the |
|00000e70| 6d 65 6e 75 2e 20 20 49 | 66 20 61 6e 20 61 72 67 |menu. I|f an arg|
|00000e80| 75 6d 65 6e 74 0a 63 6f | 6e 74 61 69 6e 73 20 61 |ument.co|ntains a|
|00000e90| 6e 20 65 71 75 61 6c 73 | 20 73 69 67 6e 20 74 68 |n equals| sign th|
|00000ea0| 65 6e 20 74 68 65 20 73 | 74 72 69 6e 67 20 74 6f |en the s|tring to|
|00000eb0| 20 74 68 65 20 6c 65 66 | 74 20 6f 66 20 74 68 65 | the lef|t of the|
|00000ec0| 20 65 71 75 61 6c 73 20 | 69 73 20 75 73 65 64 20 | equals |is used |
|00000ed0| 61 73 0a 74 68 65 20 64 | 69 73 70 6c 61 79 65 64 |as.the d|isplayed|
|00000ee0| 20 6d 65 6e 75 20 69 74 | 65 6d 20 61 6e 64 20 74 | menu it|em and t|
|00000ef0| 68 65 20 74 68 65 20 73 | 74 72 69 6e 67 20 74 6f |he the s|tring to|
|00000f00| 20 74 68 65 20 72 69 67 | 68 74 20 69 73 20 75 73 | the rig|ht is us|
|00000f10| 65 64 20 61 73 20 74 68 | 65 20 74 65 78 74 0a 6f |ed as th|e text.o|
|00000f20| 75 74 70 75 74 20 77 68 | 65 6e 20 74 68 65 20 69 |utput wh|en the i|
|00000f30| 74 65 6d 20 69 73 20 70 | 72 65 73 73 65 64 2e 20 |tem is p|ressed. |
|00000f40| 20 54 68 65 20 61 72 67 | 75 6d 65 6e 74 20 22 6c | The arg|ument "l|
|00000f50| 69 6e 65 22 20 69 73 20 | 72 65 63 6f 67 6e 69 73 |ine" is |recognis|
|00000f60| 65 64 20 61 73 0a 64 65 | 6e 6f 74 69 6e 67 20 61 |ed as.de|noting a|
|00000f70| 20 6c 69 6e 65 20 73 65 | 70 61 72 61 74 69 6e 67 | line se|parating|
|00000f80| 20 6d 65 6e 75 20 69 74 | 65 6d 73 2e 0a 0a 42 79 | menu it|ems...By|
|00000f90| 20 64 65 66 61 75 6c 74 | 20 74 68 65 20 6d 65 6e | default| the men|
|00000fa0| 75 20 69 73 20 70 6f 70 | 70 65 64 20 75 70 20 74 |u is pop|ped up t|
|00000fb0| 6f 20 74 68 65 20 72 69 | 67 68 74 20 61 6e 64 20 |o the ri|ght and |
|00000fc0| 62 65 6c 6f 77 20 6f 66 | 20 74 68 65 20 63 75 72 |below of| the cur|
|00000fd0| 72 65 6e 74 20 70 6f 69 | 6e 74 65 72 0a 70 6f 73 |rent poi|nter.pos|
|00000fe0| 69 74 69 6f 6e 20 62 75 | 74 20 74 68 69 73 20 63 |ition bu|t this c|
|00000ff0| 61 6e 20 62 65 20 6f 76 | 65 72 72 69 64 64 65 6e |an be ov|erridden|
|00001000| 20 75 73 69 6e 67 20 74 | 68 65 20 73 74 61 6e 64 | using t|he stand|
|00001010| 61 72 64 20 74 6f 6f 6c | 6b 69 74 20 22 2d 67 65 |ard tool|kit "-ge|
|00001020| 6f 6d 65 74 72 79 22 2e | 20 0a 2e 53 48 20 45 58 |ometry".| ..SH EX|
|00001030| 41 4d 50 4c 45 53 0a 2e | 44 53 0a 78 6d 65 6e 75 |AMPLES..|DS.xmenu|
|00001040| 20 2d 68 65 61 64 69 6e | 67 20 22 43 68 6f 6f 73 | -headin|g "Choos|
|00001050| 65 20 46 69 6c 65 73 20 | 62 79 20 53 75 66 66 69 |e Files |by Suffi|
|00001060| 78 22 20 43 6f 6d 70 72 | 65 73 73 65 64 3d 22 2a |x" Compr|essed="*|
|00001070| 2e 5a 22 20 5c 5c 0a 20 | 20 20 20 20 20 20 20 20 |.Z" \\. | |
|00001080| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 22 43 | | "C|
|00001090| 20 73 6f 75 72 63 65 73 | 22 3d 22 2a 2e 63 22 20 | sources|"="*.c" |
|000010a0| 22 48 65 61 64 65 72 73 | 22 3d 22 2a 2e 68 22 20 |"Headers|"="*.h" |
|000010b0| 5c 5c 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |\\. | |
|000010c0| 20 20 20 20 20 20 20 20 | 20 20 6c 69 6e 65 20 6c | | line l|
|000010d0| 69 6e 65 20 22 20 20 20 | 20 20 20 20 20 43 61 6e |ine " | Can|
|000010e0| 63 65 6c 22 0a 0a 78 6d | 65 6e 75 20 48 65 6c 6c |cel"..xm|enu Hell|
|000010f0| 6f 3d 22 48 65 6c 6c 6f | 20 57 6f 72 6c 64 22 20 |o="Hello| World" |
|00001100| 6c 69 6e 65 20 22 20 22 | 20 22 20 22 20 6c 69 6e |line " "| " " lin|
|00001110| 65 20 47 6f 6f 64 62 79 | 65 3d 22 47 6f 6f 64 62 |e Goodby|e="Goodb|
|00001120| 79 65 20 57 6f 72 6c 64 | 22 0a 2e 44 45 0a 2e 53 |ye World|"..DE..S|
|00001130| 48 20 41 55 54 48 4f 52 | 0a 52 69 63 68 61 72 64 |H AUTHOR|.Richard|
|00001140| 20 48 65 73 6b 65 74 68 | 2c 20 55 6e 69 76 65 72 | Hesketh|, Univer|
|00001150| 73 69 74 79 20 6f 66 20 | 4b 65 6e 74 20 61 74 20 |sity of |Kent at |
|00001160| 43 61 6e 74 65 72 62 75 | 72 79 2c 20 4a 75 6e 65 |Canterbu|ry, June|
|00001170| 20 31 39 39 30 0a 2e 62 | 72 0a 40 6e 73 66 6e 65 | 1990..b|r.@nsfne|
|00001180| 74 2d 72 65 6c 61 79 2e | 61 63 2e 75 6b 3a 72 6c |t-relay.|ac.uk:rl|
|00001190| 68 32 40 75 6b 63 2e 61 | 63 2e 75 6b 0a 53 48 41 |h2@ukc.a|c.uk.SHA|
|000011a0| 52 5f 45 4f 46 0a 66 69 | 20 23 20 65 6e 64 20 6f |R_EOF.fi| # end o|
|000011b0| 66 20 6f 76 65 72 77 72 | 69 74 69 6e 67 20 63 68 |f overwr|iting ch|
|000011c0| 65 63 6b 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |eck.if t|est -f '|
|000011d0| 78 6d 65 6e 75 2e 63 27 | 0a 74 68 65 6e 0a 09 65 |xmenu.c'|.then..e|
|000011e0| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|000011f0| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|00001200| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 78 6d |isting f|ile "'xm|
|00001210| 65 6e 75 2e 63 27 22 0a | 65 6c 73 65 0a 63 61 74 |enu.c'".|else.cat|
|00001220| 20 3c 3c 20 5c 53 48 41 | 52 5f 45 4f 46 20 3e 20 | << \SHA|R_EOF > |
|00001230| 27 78 6d 65 6e 75 2e 63 | 27 0a 23 69 66 6e 64 65 |'xmenu.c|'.#ifnde|
|00001240| 66 20 6c 69 6e 74 0a 73 | 74 61 74 69 63 20 63 68 |f lint.s|tatic ch|
|00001250| 61 72 20 72 63 73 69 64 | 5b 5d 20 3d 20 22 24 48 |ar rcsid|[] = "$H|
|00001260| 65 61 64 65 72 3a 20 78 | 6d 65 6e 75 2e 63 2c 76 |eader: x|menu.c,v|
|00001270| 20 31 2e 31 20 39 30 2f | 30 36 2f 31 39 20 31 36 | 1.1 90/|06/19 16|
|00001280| 3a 35 39 3a 33 36 20 72 | 6c 68 32 20 52 65 6c 20 |:59:36 r|lh2 Rel |
|00001290| 24 22 3b 0a 23 65 6e 64 | 69 66 20 21 6c 69 6e 74 |$";.#end|if !lint|
|000012a0| 0a 0a 2f 2a 20 0a 20 2a | 20 43 6f 70 79 72 69 67 |../* . *| Copyrig|
|000012b0| 68 74 20 31 39 39 30 20 | 52 69 63 68 61 72 64 20 |ht 1990 |Richard |
|000012c0| 48 65 73 6b 65 74 68 20 | 2f 20 72 6c 68 32 40 75 |Hesketh |/ rlh2@u|
|000012d0| 6b 63 2e 61 63 2e 75 6b | 0a 20 2a 20 20 20 20 20 |kc.ac.uk|. * |
|000012e0| 20 20 20 20 20 20 20 20 | 20 20 20 43 6f 6d 70 75 | | Compu|
|000012f0| 74 69 6e 67 20 4c 61 62 | 2e 20 55 6e 69 76 65 72 |ting Lab|. Univer|
|00001300| 73 69 74 79 20 6f 66 20 | 4b 65 6e 74 20 61 74 20 |sity of |Kent at |
|00001310| 43 61 6e 74 65 72 62 75 | 72 79 2c 20 55 4b 0a 20 |Canterbu|ry, UK. |
|00001320| 2a 0a 20 2a 20 50 65 72 | 6d 69 73 73 69 6f 6e 20 |*. * Per|mission |
|00001330| 74 6f 20 75 73 65 2c 20 | 63 6f 70 79 2c 20 6d 6f |to use, |copy, mo|
|00001340| 64 69 66 79 20 61 6e 64 | 20 64 69 73 74 72 69 62 |dify and| distrib|
|00001350| 75 74 65 20 74 68 69 73 | 20 73 6f 66 74 77 61 72 |ute this| softwar|
|00001360| 65 20 61 6e 64 20 69 74 | 73 0a 20 2a 20 64 6f 63 |e and it|s. * doc|
|00001370| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 66 6f 72 20 61 |umentati|on for a|
|00001380| 6e 79 20 70 75 72 70 6f | 73 65 20 69 73 20 68 65 |ny purpo|se is he|
|00001390| 72 65 62 79 20 67 72 61 | 6e 74 65 64 20 77 69 74 |reby gra|nted wit|
|000013a0| 68 6f 75 74 20 66 65 65 | 2c 20 70 72 6f 76 69 64 |hout fee|, provid|
|000013b0| 65 64 20 74 68 61 74 0a | 20 2a 20 74 68 65 20 61 |ed that.| * the a|
|000013c0| 62 6f 76 65 20 63 6f 70 | 79 72 69 67 68 74 20 6e |bove cop|yright n|
|000013d0| 6f 74 69 63 65 20 61 70 | 70 65 61 72 20 69 6e 20 |otice ap|pear in |
|000013e0| 61 6c 6c 20 63 6f 70 69 | 65 73 20 61 6e 64 20 74 |all copi|es and t|
|000013f0| 68 61 74 20 62 6f 74 68 | 20 74 68 61 74 0a 20 2a |hat both| that. *|
|00001400| 20 63 6f 70 79 72 69 67 | 68 74 20 6e 6f 74 69 63 | copyrig|ht notic|
|00001410| 65 20 61 6e 64 20 74 68 | 69 73 20 70 65 72 6d 69 |e and th|is permi|
|00001420| 73 73 69 6f 6e 20 6e 6f | 74 69 63 65 20 61 70 70 |ssion no|tice app|
|00001430| 65 61 72 20 69 6e 20 73 | 75 70 70 6f 72 74 69 6e |ear in s|upportin|
|00001440| 67 0a 20 2a 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |g. * doc|umentati|
|00001450| 6f 6e 2c 20 61 6e 64 20 | 74 68 61 74 20 74 68 65 |on, and |that the|
|00001460| 20 6e 61 6d 65 73 20 6f | 66 20 52 69 63 68 61 72 | names o|f Richar|
|00001470| 64 20 48 65 73 6b 65 74 | 68 20 61 6e 64 20 54 68 |d Hesket|h and Th|
|00001480| 65 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 0a |e Univer|sity of.|
|00001490| 20 2a 20 4b 65 6e 74 20 | 61 74 20 43 61 6e 74 65 | * Kent |at Cante|
|000014a0| 72 62 75 72 79 20 6e 6f | 74 20 62 65 20 75 73 65 |rbury no|t be use|
|000014b0| 64 20 69 6e 20 61 64 76 | 65 72 74 69 73 69 6e 67 |d in adv|ertising|
|000014c0| 20 6f 72 20 70 75 62 6c | 69 63 69 74 79 20 70 65 | or publ|icity pe|
|000014d0| 72 74 61 69 6e 69 6e 67 | 20 74 6f 0a 20 2a 20 64 |rtaining| to. * d|
|000014e0| 69 73 74 72 69 62 75 74 | 69 6f 6e 20 6f 66 20 74 |istribut|ion of t|
|000014f0| 68 65 20 73 6f 66 74 77 | 61 72 65 20 77 69 74 68 |he softw|are with|
|00001500| 6f 75 74 20 73 70 65 63 | 69 66 69 63 2c 20 77 72 |out spec|ific, wr|
|00001510| 69 74 74 65 6e 20 70 72 | 69 6f 72 20 70 65 72 6d |itten pr|ior perm|
|00001520| 69 73 73 69 6f 6e 2e 0a | 20 2a 20 52 69 63 68 61 |ission..| * Richa|
|00001530| 72 64 20 48 65 73 6b 65 | 74 68 20 61 6e 64 20 54 |rd Heske|th and T|
|00001540| 68 65 20 55 6e 69 76 65 | 72 73 69 74 79 20 6f 66 |he Unive|rsity of|
|00001550| 20 4b 65 6e 74 20 61 74 | 20 43 61 6e 74 65 72 62 | Kent at| Canterb|
|00001560| 75 72 79 20 6d 61 6b 65 | 20 6e 6f 0a 20 2a 20 72 |ury make| no. * r|
|00001570| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 73 20 61 |epresent|ations a|
|00001580| 62 6f 75 74 20 74 68 65 | 20 73 75 69 74 61 62 69 |bout the| suitabi|
|00001590| 6c 69 74 79 20 6f 66 20 | 74 68 69 73 20 73 6f 66 |lity of |this sof|
|000015a0| 74 77 61 72 65 20 66 6f | 72 20 61 6e 79 20 70 75 |tware fo|r any pu|
|000015b0| 72 70 6f 73 65 2e 0a 20 | 2a 20 49 74 20 69 73 20 |rpose.. |* It is |
|000015c0| 70 72 6f 76 69 64 65 64 | 20 22 61 73 20 69 73 22 |provided| "as is"|
|000015d0| 20 77 69 74 68 6f 75 74 | 20 65 78 70 72 65 73 73 | without| express|
|000015e0| 20 6f 72 20 69 6d 70 6c | 69 65 64 20 77 61 72 72 | or impl|ied warr|
|000015f0| 61 6e 74 79 2e 0a 20 2a | 0a 20 2a 20 52 69 63 68 |anty.. *|. * Rich|
|00001600| 61 72 64 20 48 65 73 6b | 65 74 68 20 41 4e 44 20 |ard Hesk|eth AND |
|00001610| 54 48 45 20 55 4e 49 56 | 45 52 53 49 54 59 20 4f |THE UNIV|ERSITY O|
|00001620| 46 20 4b 45 4e 54 20 41 | 54 20 43 41 4e 54 45 52 |F KENT A|T CANTER|
|00001630| 42 55 52 59 20 44 49 53 | 43 4c 41 49 4d 53 20 41 |BURY DIS|CLAIMS A|
|00001640| 4c 4c 0a 20 2a 20 57 41 | 52 52 41 4e 54 49 45 53 |LL. * WA|RRANTIES|
|00001650| 20 57 49 54 48 20 52 45 | 47 41 52 44 20 54 4f 20 | WITH RE|GARD TO |
|00001660| 54 48 49 53 20 53 4f 46 | 54 57 41 52 45 2c 20 49 |THIS SOF|TWARE, I|
|00001670| 4e 43 4c 55 44 49 4e 47 | 20 41 4c 4c 20 49 4d 50 |NCLUDING| ALL IMP|
|00001680| 4c 49 45 44 20 57 41 52 | 52 41 4e 54 49 45 53 0a |LIED WAR|RANTIES.|
|00001690| 20 2a 20 4f 46 20 4d 45 | 52 43 48 41 4e 54 41 42 | * OF ME|RCHANTAB|
|000016a0| 49 4c 49 54 59 20 41 4e | 44 20 46 49 54 4e 45 53 |ILITY AN|D FITNES|
|000016b0| 53 2c 20 49 4e 20 4e 4f | 20 45 56 45 4e 54 20 53 |S, IN NO| EVENT S|
|000016c0| 48 41 4c 4c 20 52 69 63 | 68 61 72 64 20 48 65 73 |HALL Ric|hard Hes|
|000016d0| 6b 65 74 68 20 4f 52 20 | 54 48 45 0a 20 2a 20 55 |keth OR |THE. * U|
|000016e0| 4e 49 56 45 52 53 49 54 | 59 20 4f 46 20 4b 45 4e |NIVERSIT|Y OF KEN|
|000016f0| 54 20 41 54 20 43 41 4e | 54 45 52 42 55 52 59 20 |T AT CAN|TERBURY |
|00001700| 42 45 20 4c 49 41 42 4c | 45 20 46 4f 52 20 41 4e |BE LIABL|E FOR AN|
|00001710| 59 20 53 50 45 43 49 41 | 4c 2c 20 49 4e 44 49 52 |Y SPECIA|L, INDIR|
|00001720| 45 43 54 20 4f 52 0a 20 | 2a 20 43 4f 4e 53 45 51 |ECT OR. |* CONSEQ|
|00001730| 55 45 4e 54 49 41 4c 20 | 44 41 4d 41 47 45 53 20 |UENTIAL |DAMAGES |
|00001740| 4f 52 20 41 4e 59 20 44 | 41 4d 41 47 45 53 20 57 |OR ANY D|AMAGES W|
|00001750| 48 41 54 53 4f 45 56 45 | 52 20 52 45 53 55 4c 54 |HATSOEVE|R RESULT|
|00001760| 49 4e 47 20 46 52 4f 4d | 20 4c 4f 53 53 20 4f 46 |ING FROM| LOSS OF|
|00001770| 20 55 53 45 2c 0a 20 2a | 20 44 41 54 41 20 4f 52 | USE,. *| DATA OR|
|00001780| 20 50 52 4f 46 49 54 53 | 2c 20 57 48 45 54 48 45 | PROFITS|, WHETHE|
|00001790| 52 20 49 4e 20 41 4e 20 | 41 43 54 49 4f 4e 20 4f |R IN AN |ACTION O|
|000017a0| 46 20 43 4f 4e 54 52 41 | 43 54 2c 20 4e 45 47 4c |F CONTRA|CT, NEGL|
|000017b0| 49 47 45 4e 43 45 20 4f | 52 20 4f 54 48 45 52 0a |IGENCE O|R OTHER.|
|000017c0| 20 2a 20 54 4f 52 54 49 | 4f 55 53 20 41 43 54 49 | * TORTI|OUS ACTI|
|000017d0| 4f 4e 2c 20 41 52 49 53 | 49 4e 47 20 4f 55 54 20 |ON, ARIS|ING OUT |
|000017e0| 4f 46 20 4f 52 20 49 4e | 20 43 4f 4e 4e 45 43 54 |OF OR IN| CONNECT|
|000017f0| 49 4f 4e 20 57 49 54 48 | 20 54 48 45 20 55 53 45 |ION WITH| THE USE|
|00001800| 20 4f 52 20 50 45 52 46 | 4f 52 4d 41 4e 43 45 0a | OR PERF|ORMANCE.|
|00001810| 20 2a 20 4f 46 20 54 48 | 49 53 20 53 4f 46 54 57 | * OF TH|IS SOFTW|
|00001820| 41 52 45 2e 0a 20 2a 0a | 20 2a 20 41 75 74 68 6f |ARE.. *.| * Autho|
|00001830| 72 3a 20 20 52 69 63 68 | 61 72 64 20 48 65 73 6b |r: Rich|ard Hesk|
|00001840| 65 74 68 20 2f 20 72 6c | 68 32 40 75 6b 63 2e 61 |eth / rl|h2@ukc.a|
|00001850| 63 2e 75 6b 2c 20 0a 20 | 2a 20 20 20 20 20 20 20 |c.uk, . |* |
|00001860| 20 20 20 20 20 20 20 20 | 20 43 6f 6d 70 75 74 69 | | Computi|
|00001870| 6e 67 20 4c 61 62 2e 20 | 55 6e 69 76 65 72 73 69 |ng Lab. |Universi|
|00001880| 74 79 20 6f 66 20 4b 65 | 6e 74 20 61 74 20 43 61 |ty of Ke|nt at Ca|
|00001890| 6e 74 65 72 62 75 72 79 | 2c 20 55 4b 0a 20 2a 2f |nterbury|, UK. */|
|000018a0| 0a 0a 2f 2a 20 58 4d 65 | 6e 75 20 2d 20 70 72 6f |../* XMe|nu - pro|
|000018b0| 76 69 64 65 20 61 20 70 | 6f 70 75 70 20 6d 65 6e |vide a p|opup men|
|000018c0| 75 20 66 72 6f 6d 20 61 | 20 73 68 65 6c 6c 20 73 |u from a| shell s|
|000018d0| 63 72 69 70 74 20 65 74 | 63 2e 0a 20 2a 0a 20 2a |cript et|c.. *. *|
|000018e0| 20 54 68 69 73 20 6c 69 | 74 74 6c 65 20 74 6f 6f | This li|ttle too|
|000018f0| 6c 6b 69 74 20 70 72 6f | 67 72 61 6d 20 70 72 6f |lkit pro|gram pro|
|00001900| 64 75 63 65 73 20 61 20 | 70 6f 70 75 70 20 6d 65 |duces a |popup me|
|00001910| 6e 75 20 6f 6e 20 74 68 | 65 20 73 63 72 65 65 6e |nu on th|e screen|
|00001920| 20 74 61 6b 69 6e 67 0a | 20 2a 20 74 68 65 20 63 | taking.| * the c|
|00001930| 6f 6d 6d 61 6e 64 20 6c | 69 6e 65 20 61 72 67 75 |ommand l|ine argu|
|00001940| 6d 65 6e 74 73 20 61 73 | 20 6d 65 6e 75 20 65 6e |ments as| menu en|
|00001950| 74 72 69 65 73 2e 20 20 | 49 66 20 61 6e 20 61 72 |tries. |If an ar|
|00001960| 67 75 6d 65 6e 74 20 63 | 6f 6e 74 61 69 6e 73 0a |gument c|ontains.|
|00001970| 20 2a 20 61 20 6e 6f 6e | 2d 65 73 63 61 70 65 64 | * a non|-escaped|
|00001980| 20 27 3d 27 20 28 65 71 | 75 61 6c 73 20 73 69 67 | '=' (eq|uals sig|
|00001990| 6e 29 20 74 68 65 20 73 | 74 72 69 6e 67 20 74 6f |n) the s|tring to|
|000019a0| 20 74 68 65 20 6c 65 66 | 74 20 69 73 20 74 68 65 | the lef|t is the|
|000019b0| 20 6e 61 6d 65 0a 20 2a | 20 64 69 73 70 6c 61 79 | name. *| display|
|000019c0| 65 64 20 69 6e 20 74 68 | 65 20 6d 65 6e 75 20 61 |ed in th|e menu a|
|000019d0| 6e 64 20 74 68 65 20 73 | 74 72 69 6e 67 20 74 6f |nd the s|tring to|
|000019e0| 20 74 68 65 20 72 69 67 | 68 74 20 69 73 20 74 68 | the rig|ht is th|
|000019f0| 65 20 74 65 78 74 20 6f | 75 74 70 75 74 0a 20 2a |e text o|utput. *|
|00001a00| 20 77 68 65 6e 20 74 68 | 69 73 20 6d 65 6e 75 20 | when th|is menu |
|00001a10| 62 75 74 74 6f 6e 20 69 | 73 20 70 72 65 73 73 65 |button i|s presse|
|00001a20| 64 2e 0a 20 2a 0a 20 2a | 20 41 20 73 70 65 63 69 |d.. *. *| A speci|
|00001a30| 61 6c 20 61 72 67 75 6d | 65 6e 74 20 22 6c 69 6e |al argum|ent "lin|
|00001a40| 65 22 20 63 61 6e 20 62 | 65 20 75 73 65 64 20 74 |e" can b|e used t|
|00001a50| 6f 20 64 72 61 77 20 61 | 20 64 69 76 69 64 69 6e |o draw a| dividin|
|00001a60| 67 20 6c 69 6e 65 20 62 | 65 74 77 65 65 6e 0a 20 |g line b|etween. |
|00001a70| 2a 20 73 75 63 63 65 73 | 73 69 76 65 20 6d 65 6e |* succes|sive men|
|00001a80| 75 20 65 6e 74 72 69 65 | 73 2e 0a 20 2a 0a 20 2a |u entrie|s.. *. *|
|00001a90| 20 41 20 6d 65 6e 75 20 | 74 69 74 6c 65 20 63 61 | A menu |title ca|
|00001aa0| 6e 20 62 65 20 67 69 76 | 65 6e 20 61 73 20 61 6e |n be giv|en as an|
|00001ab0| 20 61 72 67 75 6d 65 6e | 74 20 61 66 74 65 72 20 | argumen|t after |
|00001ac0| 61 20 22 2d 68 65 61 64 | 69 6e 67 22 20 66 6c 61 |a "-head|ing" fla|
|00001ad0| 67 2e 0a 20 2a 0a 20 2a | 20 54 68 65 20 6d 65 6e |g.. *. *| The men|
|00001ae0| 75 20 69 73 20 6f 6e 6c | 79 20 70 6f 70 70 65 64 |u is onl|y popped|
|00001af0| 20 64 6f 77 6e 20 77 68 | 65 6e 20 61 20 6d 65 6e | down wh|en a men|
|00001b00| 75 20 62 75 74 74 6f 6e | 20 69 73 20 70 72 65 73 |u button| is pres|
|00001b10| 73 65 64 2e 0a 20 2a 20 | 42 79 20 64 65 66 61 75 |sed.. * |By defau|
|00001b20| 6c 74 20 74 68 65 20 6d | 65 6e 75 20 69 73 20 70 |lt the m|enu is p|
|00001b30| 6f 70 70 65 64 20 75 70 | 20 62 65 6c 6f 77 20 61 |opped up| below a|
|00001b40| 6e 64 20 74 6f 20 74 68 | 65 20 72 69 67 68 74 20 |nd to th|e right |
|00001b50| 6f 66 20 74 68 65 20 63 | 75 72 72 65 6e 74 0a 20 |of the c|urrent. |
|00001b60| 2a 20 70 6f 69 6e 74 65 | 72 20 70 6f 73 69 74 69 |* pointe|r positi|
|00001b70| 6f 6e 2c 20 75 73 65 20 | 22 2d 67 65 6f 6d 65 74 |on, use |"-geomet|
|00001b80| 72 79 22 20 74 6f 20 70 | 6f 73 69 74 69 6f 6e 20 |ry" to p|osition |
|00001b90| 74 68 65 20 6d 65 6e 75 | 20 61 74 20 61 20 70 61 |the menu| at a pa|
|00001ba0| 72 74 69 63 75 6c 61 72 | 0a 20 2a 20 70 6f 69 6e |rticular|. * poin|
|00001bb0| 74 20 28 61 6e 64 20 69 | 6e 20 61 20 70 61 72 74 |t (and i|n a part|
|00001bc0| 69 63 75 6c 61 72 20 73 | 69 7a 65 29 2e 20 0a 20 |icular s|ize). . |
|00001bd0| 2a 0a 20 2a 20 45 78 61 | 6d 70 6c 65 73 3a 0a 20 |*. * Exa|mples:. |
|00001be0| 2a 0a 20 2a 09 78 6d 65 | 6e 75 20 2d 68 65 61 64 |*. *.xme|nu -head|
|00001bf0| 69 6e 67 20 22 43 68 6f | 6f 73 65 20 46 69 6c 65 |ing "Cho|ose File|
|00001c00| 73 20 62 79 20 53 75 66 | 66 69 78 22 20 43 6f 6d |s by Suf|fix" Com|
|00001c10| 70 72 65 73 73 65 64 3d | 22 2a 2e 5a 22 20 5c 0a |pressed=|"*.Z" \.|
|00001c20| 20 2a 09 09 09 22 43 20 | 73 6f 75 72 63 65 73 22 | *..."C |sources"|
|00001c30| 3d 22 2a 2e 63 22 20 22 | 48 65 61 64 65 72 73 22 |="*.c" "|Headers"|
|00001c40| 3d 22 2a 2e 68 22 20 5c | 0a 20 2a 09 09 09 6c 69 |="*.h" \|. *...li|
|00001c50| 6e 65 20 6c 69 6e 65 20 | 22 20 20 20 20 20 20 20 |ne line |" |
|00001c60| 20 43 61 6e 63 65 6c 22 | 0a 20 2a 0a 20 2a 09 78 | Cancel"|. *. *.x|
|00001c70| 6d 65 6e 75 20 48 65 6c | 6c 6f 3d 22 48 65 6c 6c |menu Hel|lo="Hell|
|00001c80| 6f 20 57 6f 72 6c 64 22 | 20 6c 69 6e 65 20 22 20 |o World"| line " |
|00001c90| 22 20 22 20 22 20 6c 69 | 6e 65 20 47 6f 6f 64 62 |" " " li|ne Goodb|
|00001ca0| 79 65 3d 22 47 6f 6f 64 | 62 79 65 20 57 6f 72 6c |ye="Good|bye Worl|
|00001cb0| 64 22 0a 20 2a 2f 0a 0a | 23 69 6e 63 6c 75 64 65 |d". */..|#include|
|00001cc0| 20 3c 58 31 31 2f 49 6e | 74 72 69 6e 73 69 63 2e | <X11/In|trinsic.|
|00001cd0| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 58 31 31 |h>.#incl|ude <X11|
|00001ce0| 2f 53 74 72 69 6e 67 44 | 65 66 73 2e 68 3e 0a 23 |/StringD|efs.h>.#|
|00001cf0| 69 6e 63 6c 75 64 65 20 | 3c 58 31 31 2f 58 61 77 |include |<X11/Xaw|
|00001d00| 2f 53 69 6d 70 6c 65 4d | 65 6e 75 2e 68 3e 0a 23 |/SimpleM|enu.h>.#|
|00001d10| 69 6e 63 6c 75 64 65 20 | 3c 58 31 31 2f 58 61 77 |include |<X11/Xaw|
|00001d20| 2f 53 6d 65 42 53 42 2e | 68 3e 0a 23 69 6e 63 6c |/SmeBSB.|h>.#incl|
|00001d30| 75 64 65 20 3c 58 31 31 | 2f 58 61 77 2f 53 6d 65 |ude <X11|/Xaw/Sme|
|00001d40| 4c 69 6e 65 2e 68 3e 0a | 0a 23 64 65 66 69 6e 65 |Line.h>.|.#define|
|00001d50| 20 4c 49 4e 45 20 28 53 | 74 72 69 6e 67 29 31 0a | LINE (S|tring)1.|
|00001d60| 23 64 65 66 69 6e 65 20 | 4c 49 4e 45 5f 54 4f 4b |#define |LINE_TOK|
|00001d70| 20 22 6c 69 6e 65 22 0a | 0a 73 74 61 74 69 63 20 | "line".|.static |
|00001d80| 53 74 72 69 6e 67 20 4d | 54 72 61 6e 73 20 3d 20 |String M|Trans = |
|00001d90| 22 3c 45 6e 74 65 72 57 | 69 6e 64 6f 77 3e 3a 20 |"<EnterW|indow>: |
|00001da0| 68 69 67 68 6c 69 67 68 | 74 28 29 5c 6e 5c 0a 09 |highligh|t()\n\..|
|00001db0| 09 09 3c 4c 65 61 76 65 | 57 69 6e 64 6f 77 3e 3a |..<Leave|Window>:|
|00001dc0| 20 75 6e 68 69 67 68 6c | 69 67 68 74 28 29 5c 6e | unhighl|ight()\n|
|00001dd0| 5c 0a 09 09 09 3c 4d 6f | 74 69 6f 6e 4e 6f 74 69 |\....<Mo|tionNoti|
|00001de0| 66 79 3e 3a 20 68 69 67 | 68 6c 69 67 68 74 28 29 |fy>: hig|hlight()|
|00001df0| 5c 6e 5c 0a 09 09 09 3c | 42 74 6e 55 70 3e 3a 20 |\n\....<|BtnUp>: |
|00001e00| 6e 6f 74 69 66 79 28 29 | 20 75 6e 68 69 67 68 6c |notify()| unhighl|
|00001e10| 69 67 68 74 28 29 22 3b | 0a 73 74 61 74 69 63 20 |ight()";|.static |
|00001e20| 58 74 54 72 61 6e 73 6c | 61 74 69 6f 6e 73 20 4d |XtTransl|ations M|
|00001e30| 50 54 72 61 6e 73 20 3d | 20 4e 55 4c 4c 3b 0a 0a |PTrans =| NULL;..|
|00001e40| 73 74 61 74 69 63 20 58 | 72 6d 4f 70 74 69 6f 6e |static X|rmOption|
|00001e50| 44 65 73 63 52 65 63 20 | 6f 70 74 69 6f 6e 73 5b |DescRec |options[|
|00001e60| 5d 20 3d 20 7b 0a 09 7b | 22 2d 68 65 61 64 69 6e |] = {..{|"-headin|
|00001e70| 67 22 2c 20 22 2e 68 65 | 61 64 69 6e 67 22 2c 20 |g", ".he|ading", |
|00001e80| 58 72 6d 6f 70 74 69 6f | 6e 53 65 70 41 72 67 2c |Xrmoptio|nSepArg,|
|00001e90| 20 28 58 74 50 6f 69 6e | 74 65 72 29 4e 55 4c 4c | (XtPoin|ter)NULL|
|00001ea0| 7d 2c 0a 7d 3b 0a 0a 0a | 73 74 61 74 69 63 20 76 |},.};...|static v|
|00001eb0| 6f 69 64 0a 62 75 74 74 | 6f 6e 5f 70 72 65 73 73 |oid.butt|on_press|
|00001ec0| 65 64 28 77 2c 20 63 6c | 69 65 6e 74 5f 64 61 74 |ed(w, cl|ient_dat|
|00001ed0| 61 2c 20 63 61 6c 6c 5f | 64 61 74 61 29 0a 57 69 |a, call_|data).Wi|
|00001ee0| 64 67 65 74 20 77 3b 0a | 58 74 50 6f 69 6e 74 65 |dget w;.|XtPointe|
|00001ef0| 72 20 63 6c 69 65 6e 74 | 5f 64 61 74 61 2c 20 63 |r client|_data, c|
|00001f00| 61 6c 6c 5f 64 61 74 61 | 3b 0a 7b 0a 09 69 66 20 |all_data|;.{..if |
|00001f10| 28 63 6c 69 65 6e 74 5f | 64 61 74 61 20 21 3d 20 |(client_|data != |
|00001f20| 4e 55 4c 4c 29 0a 09 09 | 70 72 69 6e 74 66 28 22 |NULL)...|printf("|
|00001f30| 25 73 5c 6e 22 2c 20 63 | 6c 69 65 6e 74 5f 64 61 |%s\n", c|lient_da|
|00001f40| 74 61 29 3b 0a 09 65 78 | 69 74 28 30 29 3b 0a 7d |ta);..ex|it(0);.}|
|00001f50| 0a 0a 53 74 72 69 6e 67 | 0a 67 65 74 5f 70 72 6f |..String|.get_pro|
|00001f60| 6d 70 74 28 73 74 72 2c | 20 6f 75 74 5f 76 61 6c |mpt(str,| out_val|
|00001f70| 29 0a 53 74 72 69 6e 67 | 20 73 74 72 3b 0a 53 74 |).String| str;.St|
|00001f80| 72 69 6e 67 20 2a 6f 75 | 74 5f 76 61 6c 3b 0a 7b |ring *ou|t_val;.{|
|00001f90| 0a 09 69 6e 74 20 73 2c | 20 74 3b 0a 09 63 68 61 |..int s,| t;..cha|
|00001fa0| 72 20 6e 61 6d 65 5b 31 | 30 30 30 5d 3b 0a 09 42 |r name[1|000];..B|
|00001fb0| 6f 6f 6c 65 61 6e 20 66 | 6f 75 6e 64 5f 65 73 63 |oolean f|ound_esc|
|00001fc0| 61 70 65 20 3d 20 46 41 | 4c 53 45 3b 0a 0a 09 2a |ape = FA|LSE;...*|
|00001fd0| 6f 75 74 5f 76 61 6c 20 | 3d 20 4e 55 4c 4c 3b 0a |out_val |= NULL;.|
|00001fe0| 0a 09 69 66 20 28 73 74 | 72 6e 63 6d 70 28 73 74 |..if (st|rncmp(st|
|00001ff0| 72 2c 20 4c 49 4e 45 5f | 54 4f 4b 2c 20 73 74 72 |r, LINE_|TOK, str|
|00002000| 6c 65 6e 28 4c 49 4e 45 | 5f 54 4f 4b 29 29 20 3d |len(LINE|_TOK)) =|
|00002010| 3d 20 30 29 0a 09 09 72 | 65 74 75 72 6e 20 28 4c |= 0)...r|eturn (L|
|00002020| 49 4e 45 29 3b 0a 0a 09 | 66 6f 72 20 28 74 20 3d |INE);...|for (t =|
|00002030| 20 73 20 3d 20 30 3b 20 | 73 74 72 5b 73 5d 20 21 | s = 0; |str[s] !|
|00002040| 3d 20 27 5c 30 27 3b 20 | 73 2b 2b 29 20 7b 0a 09 |= '\0'; |s++) {..|
|00002050| 09 69 66 20 28 73 74 72 | 5b 73 5d 20 3d 3d 20 27 |.if (str|[s] == '|
|00002060| 5c 5c 27 29 20 7b 0a 09 | 09 09 69 66 20 28 66 6f |\\') {..|..if (fo|
|00002070| 75 6e 64 5f 65 73 63 61 | 70 65 29 20 7b 0a 09 09 |und_esca|pe) {...|
|00002080| 09 09 66 6f 75 6e 64 5f | 65 73 63 61 70 65 20 3d |..found_|escape =|
|00002090| 20 46 41 4c 53 45 3b 0a | 09 09 09 09 6e 61 6d 65 | FALSE;.|....name|
|000020a0| 5b 74 2b 2b 5d 20 3d 20 | 27 5c 5c 27 3b 0a 09 09 |[t++] = |'\\';...|
|000020b0| 09 7d 20 65 6c 73 65 0a | 09 09 09 09 66 6f 75 6e |.} else.|....foun|
|000020c0| 64 5f 65 73 63 61 70 65 | 20 3d 20 54 52 55 45 3b |d_escape| = TRUE;|
|000020d0| 0a 09 09 7d 20 65 6c 73 | 65 20 69 66 20 28 73 74 |...} els|e if (st|
|000020e0| 72 5b 73 5d 20 3d 3d 20 | 27 3d 27 29 20 7b 0a 09 |r[s] == |'=') {..|
|000020f0| 09 09 69 66 20 28 66 6f | 75 6e 64 5f 65 73 63 61 |..if (fo|und_esca|
|00002100| 70 65 29 20 7b 0a 09 09 | 09 09 66 6f 75 6e 64 5f |pe) {...|..found_|
|00002110| 65 73 63 61 70 65 20 3d | 20 46 41 4c 53 45 3b 0a |escape =| FALSE;.|
|00002120| 09 09 09 09 6e 61 6d 65 | 5b 74 2b 2b 5d 20 3d 20 |....name|[t++] = |
|00002130| 27 3d 27 3b 0a 09 09 09 | 7d 20 65 6c 73 65 20 7b |'=';....|} else {|
|00002140| 0a 09 09 09 09 2a 6f 75 | 74 5f 76 61 6c 20 3d 20 |.....*ou|t_val = |
|00002150| 73 74 72 20 2b 20 73 20 | 2b 20 31 3b 0a 09 09 09 |str + s |+ 1;....|
|00002160| 09 62 72 65 61 6b 3b 0a | 09 09 09 7d 0a 09 09 7d |.break;.|...}...}|
|00002170| 20 65 6c 73 65 0a 09 09 | 09 6e 61 6d 65 5b 74 2b | else...|.name[t+|
|00002180| 2b 5d 20 3d 20 73 74 72 | 5b 73 5d 3b 0a 09 7d 0a |+] = str|[s];..}.|
|00002190| 09 6e 61 6d 65 5b 74 5d | 20 3d 20 27 5c 30 27 3b |.name[t]| = '\0';|
|000021a0| 0a 09 72 65 74 75 72 6e | 20 28 58 74 4e 65 77 53 |..return| (XtNewS|
|000021b0| 74 72 69 6e 67 28 6e 61 | 6d 65 29 29 3b 0a 7d 0a |tring(na|me));.}.|
|000021c0| 0a 0a 6d 61 69 6e 28 61 | 72 67 63 2c 20 61 72 67 |..main(a|rgc, arg|
|000021d0| 76 29 0a 69 6e 74 20 61 | 72 67 63 3b 0a 63 68 61 |v).int a|rgc;.cha|
|000021e0| 72 20 2a 61 72 67 76 5b | 5d 3b 0a 7b 0a 09 57 69 |r *argv[|];.{..Wi|
|000021f0| 64 67 65 74 20 73 68 65 | 6c 6c 2c 20 62 75 74 74 |dget she|ll, butt|
|00002200| 6f 6e 3b 0a 09 43 61 72 | 64 69 6e 61 6c 20 69 3b |on;..Car|dinal i;|
|00002210| 0a 09 50 6f 73 69 74 69 | 6f 6e 20 78 2c 20 79 3b |..Positi|on x, y;|
|00002220| 0a 09 69 6e 74 20 69 6e | 74 5f 78 2c 20 69 6e 74 |..int in|t_x, int|
|00002230| 5f 79 3b 0a 09 57 69 6e | 64 6f 77 20 6a 75 6e 6b |_y;..Win|dow junk|
|00002240| 31 3b 0a 09 69 6e 74 20 | 6a 75 6e 6b 32 3b 0a 09 |1;..int |junk2;..|
|00002250| 75 6e 73 69 67 6e 65 64 | 20 69 6e 74 20 6a 75 6e |unsigned| int jun|
|00002260| 6b 33 3b 0a 09 44 69 73 | 70 6c 61 79 20 2a 64 70 |k3;..Dis|play *dp|
|00002270| 79 3b 0a 09 53 74 72 69 | 6e 67 20 6f 75 74 5f 76 |y;..Stri|ng out_v|
|00002280| 61 6c 3b 0a 09 53 74 72 | 69 6e 67 20 6e 61 6d 65 |al;..Str|ing name|
|00002290| 2c 20 68 65 61 64 69 6e | 67 3b 0a 09 63 68 61 72 |, headin|g;..char|
|000022a0| 20 2a 62 6c 61 6e 6b 3b | 0a 09 58 72 6d 56 61 6c | *blank;|..XrmVal|
|000022b0| 75 65 20 76 61 6c 75 65 | 3b 0a 0a 09 78 20 3d 20 |ue value|;...x = |
|000022c0| 79 20 3d 20 34 30 30 3b | 20 2f 2a 20 6a 75 73 74 |y = 400;| /* just|
|000022d0| 20 69 6e 20 63 61 73 65 | 20 58 51 75 65 72 79 50 | in case| XQueryP|
|000022e0| 6f 69 6e 74 65 72 28 29 | 20 66 61 69 6c 73 20 38 |ointer()| fails 8|
|000022f0| 2d 29 20 2a 2f 0a 0a 09 | 58 74 54 6f 6f 6c 6b 69 |-) */...|XtToolki|
|00002300| 74 49 6e 69 74 69 61 6c | 69 7a 65 28 29 3b 0a 09 |tInitial|ize();..|
|00002310| 64 70 79 20 3d 20 58 74 | 4f 70 65 6e 44 69 73 70 |dpy = Xt|OpenDisp|
|00002320| 6c 61 79 28 58 74 43 72 | 65 61 74 65 41 70 70 6c |lay(XtCr|eateAppl|
|00002330| 69 63 61 74 69 6f 6e 43 | 6f 6e 74 65 78 74 28 29 |icationC|ontext()|
|00002340| 2c 20 4e 55 4c 4c 2c 0a | 09 09 09 09 09 22 78 6d |, NULL,.|....."xm|
|00002350| 65 6e 75 22 2c 20 22 58 | 4d 65 6e 75 22 2c 0a 09 |enu", "X|Menu",..|
|00002360| 09 09 09 09 6f 70 74 69 | 6f 6e 73 2c 20 58 74 4e |....opti|ons, XtN|
|00002370| 75 6d 62 65 72 28 6f 70 | 74 69 6f 6e 73 29 2c 0a |umber(op|tions),.|
|00002380| 09 09 09 09 09 26 61 72 | 67 63 2c 20 61 72 67 76 |.....&ar|gc, argv|
|00002390| 29 3b 0a 0a 09 69 66 20 | 28 58 51 75 65 72 79 50 |);...if |(XQueryP|
|000023a0| 6f 69 6e 74 65 72 28 64 | 70 79 2c 20 44 65 66 61 |ointer(d|py, Defa|
|000023b0| 75 6c 74 52 6f 6f 74 57 | 69 6e 64 6f 77 28 64 70 |ultRootW|indow(dp|
|000023c0| 79 29 2c 20 26 6a 75 6e | 6b 31 2c 20 26 6a 75 6e |y), &jun|k1, &jun|
|000023d0| 6b 31 2c 0a 09 20 20 20 | 20 26 69 6e 74 5f 78 2c |k1,.. | &int_x,|
|000023e0| 20 26 69 6e 74 5f 79 2c | 20 26 6a 75 6e 6b 32 2c | &int_y,| &junk2,|
|000023f0| 20 26 6a 75 6e 6b 32 2c | 20 26 6a 75 6e 6b 33 29 | &junk2,| &junk3)|
|00002400| 29 20 7b 0a 09 09 78 20 | 3d 20 69 6e 74 5f 78 3b |) {...x |= int_x;|
|00002410| 0a 09 09 79 20 3d 20 69 | 6e 74 5f 79 3b 0a 09 7d |...y = i|nt_y;..}|
|00002420| 0a 0a 09 69 66 20 28 58 | 72 6d 47 65 74 52 65 73 |...if (X|rmGetRes|
|00002430| 6f 75 72 63 65 28 64 70 | 79 2d 3e 64 62 2c 20 22 |ource(dp|y->db, "|
|00002440| 78 6d 65 6e 75 2e 68 65 | 61 64 69 6e 67 22 2c 20 |xmenu.he|ading", |
|00002450| 22 22 2c 20 26 62 6c 61 | 6e 6b 2c 20 26 76 61 6c |"", &bla|nk, &val|
|00002460| 75 65 29 29 0a 09 09 68 | 65 61 64 69 6e 67 20 3d |ue))...h|eading =|
|00002470| 20 28 63 68 61 72 20 2a | 29 76 61 6c 75 65 2e 61 | (char *|)value.a|
|00002480| 64 64 72 3b 0a 09 65 6c | 73 65 0a 09 09 68 65 61 |ddr;..el|se...hea|
|00002490| 64 69 6e 67 20 3d 20 4e | 55 4c 4c 3b 0a 0a 09 4d |ding = N|ULL;...M|
|000024a0| 50 54 72 61 6e 73 20 3d | 20 58 74 50 61 72 73 65 |PTrans =| XtParse|
|000024b0| 54 72 61 6e 73 6c 61 74 | 69 6f 6e 54 61 62 6c 65 |Translat|ionTable|
|000024c0| 28 4d 54 72 61 6e 73 29 | 3b 0a 09 73 68 65 6c 6c |(MTrans)|;..shell|
|000024d0| 20 3d 20 58 74 56 61 41 | 70 70 43 72 65 61 74 65 | = XtVaA|ppCreate|
|000024e0| 53 68 65 6c 6c 28 22 78 | 6d 65 6e 75 22 2c 20 22 |Shell("x|menu", "|
|000024f0| 58 4d 65 6e 75 22 2c 20 | 73 69 6d 70 6c 65 4d 65 |XMenu", |simpleMe|
|00002500| 6e 75 57 69 64 67 65 74 | 43 6c 61 73 73 2c 0a 09 |nuWidget|Class,..|
|00002510| 09 09 09 09 64 70 79 2c | 20 58 74 4e 78 2c 20 78 |....dpy,| XtNx, x|
|00002520| 2c 20 58 74 4e 79 2c 20 | 79 2c 0a 09 09 09 09 09 |, XtNy, |y,......|
|00002530| 58 74 4e 6c 61 62 65 6c | 2c 20 68 65 61 64 69 6e |XtNlabel|, headin|
|00002540| 67 2c 0a 09 09 09 09 09 | 58 74 4e 74 72 61 6e 73 |g,......|XtNtrans|
|00002550| 6c 61 74 69 6f 6e 73 2c | 20 4d 50 54 72 61 6e 73 |lations,| MPTrans|
|00002560| 2c 0a 09 09 09 09 09 4e | 55 4c 4c 29 3b 0a 09 69 |,......N|ULL);..i|
|00002570| 66 20 28 68 65 61 64 69 | 6e 67 20 21 3d 20 4e 55 |f (headi|ng != NU|
|00002580| 4c 4c 29 0a 09 09 62 75 | 74 74 6f 6e 20 3d 20 58 |LL)...bu|tton = X|
|00002590| 74 56 61 43 72 65 61 74 | 65 4d 61 6e 61 67 65 64 |tVaCreat|eManaged|
|000025a0| 57 69 64 67 65 74 28 22 | 6d 65 6e 75 4c 69 6e 65 |Widget("|menuLine|
|000025b0| 22 2c 20 0a 09 09 09 09 | 09 73 6d 65 4c 69 6e 65 |", .....|.smeLine|
|000025c0| 4f 62 6a 65 63 74 43 6c | 61 73 73 2c 20 73 68 65 |ObjectCl|ass, she|
|000025d0| 6c 6c 2c 0a 09 09 09 09 | 09 58 74 4e 6c 69 6e 65 |ll,.....|.XtNline|
|000025e0| 57 69 64 74 68 2c 20 33 | 2c 0a 09 09 09 09 09 4e |Width, 3|,......N|
|000025f0| 55 4c 4c 29 3b 0a 0a 09 | 66 6f 72 20 28 69 20 3d |ULL);...|for (i =|
|00002600| 20 31 3b 20 69 20 3c 20 | 61 72 67 63 3b 20 69 2b | 1; i < |argc; i+|
|00002610| 2b 29 20 7b 0a 09 09 6e | 61 6d 65 20 3d 20 67 65 |+) {...n|ame = ge|
|00002620| 74 5f 70 72 6f 6d 70 74 | 28 61 72 67 76 5b 69 5d |t_prompt|(argv[i]|
|00002630| 2c 20 26 6f 75 74 5f 76 | 61 6c 29 3b 0a 0a 09 09 |, &out_v|al);....|
|00002640| 69 66 20 28 6e 61 6d 65 | 20 3d 3d 20 4c 49 4e 45 |if (name| == LINE|
|00002650| 29 0a 09 09 09 62 75 74 | 74 6f 6e 20 3d 20 58 74 |)....but|ton = Xt|
|00002660| 56 61 43 72 65 61 74 65 | 4d 61 6e 61 67 65 64 57 |VaCreate|ManagedW|
|00002670| 69 64 67 65 74 28 22 6d | 65 6e 75 4c 69 6e 65 22 |idget("m|enuLine"|
|00002680| 2c 0a 09 09 09 09 09 73 | 6d 65 4c 69 6e 65 4f 62 |,......s|meLineOb|
|00002690| 6a 65 63 74 43 6c 61 73 | 73 2c 20 73 68 65 6c 6c |jectClas|s, shell|
|000026a0| 2c 0a 09 09 09 09 09 4e | 55 4c 4c 29 3b 0a 09 09 |,......N|ULL);...|
|000026b0| 65 6c 73 65 20 7b 0a 09 | 09 09 62 75 74 74 6f 6e |else {..|..button|
|000026c0| 20 3d 20 58 74 56 61 43 | 72 65 61 74 65 4d 61 6e | = XtVaC|reateMan|
|000026d0| 61 67 65 64 57 69 64 67 | 65 74 28 22 6d 65 6e 75 |agedWidg|et("menu|
|000026e0| 42 75 74 74 6f 6e 22 2c | 0a 09 09 09 09 09 73 6d |Button",|......sm|
|000026f0| 65 42 53 42 4f 62 6a 65 | 63 74 43 6c 61 73 73 2c |eBSBObje|ctClass,|
|00002700| 20 73 68 65 6c 6c 2c 0a | 09 09 09 09 09 58 74 4e | shell,.|.....XtN|
|00002710| 6c 61 62 65 6c 2c 20 6e | 61 6d 65 2c 0a 09 09 09 |label, n|ame,....|
|00002720| 09 09 4e 55 4c 4c 29 3b | 0a 09 09 09 58 74 41 64 |..NULL);|....XtAd|
|00002730| 64 43 61 6c 6c 62 61 63 | 6b 28 62 75 74 74 6f 6e |dCallbac|k(button|
|00002740| 2c 20 58 74 4e 63 61 6c | 6c 62 61 63 6b 2c 20 62 |, XtNcal|lback, b|
|00002750| 75 74 74 6f 6e 5f 70 72 | 65 73 73 65 64 2c 0a 09 |utton_pr|essed,..|
|00002760| 09 09 09 09 28 58 74 50 | 6f 69 6e 74 65 72 29 6f |....(XtP|ointer)o|
|00002770| 75 74 5f 76 61 6c 29 3b | 0a 09 09 7d 0a 09 7d 0a |ut_val);|...}..}.|
|00002780| 0a 09 58 74 52 65 61 6c | 69 7a 65 57 69 64 67 65 |..XtReal|izeWidge|
|00002790| 74 28 73 68 65 6c 6c 29 | 3b 0a 09 58 74 41 70 70 |t(shell)|;..XtApp|
|000027a0| 4d 61 69 6e 4c 6f 6f 70 | 28 58 74 57 69 64 67 65 |MainLoop|(XtWidge|
|000027b0| 74 54 6f 41 70 70 6c 69 | 63 61 74 69 6f 6e 43 6f |tToAppli|cationCo|
|000027c0| 6e 74 65 78 74 28 73 68 | 65 6c 6c 29 29 3b 0a 7d |ntext(sh|ell));.}|
|000027d0| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 20 23 20 65 |.SHAR_EO|F.fi # e|
|000027e0| 6e 64 20 6f 66 20 6f 76 | 65 72 77 72 69 74 69 6e |nd of ov|erwritin|
|000027f0| 67 20 63 68 65 63 6b 0a | 23 09 45 6e 64 20 6f 66 |g check.|#.End of|
|00002800| 20 73 68 65 6c 6c 20 61 | 72 63 68 69 76 65 0a 65 | shell a|rchive.e|
|00002810| 78 69 74 20 30 0a 0a 64 | 61 6e 0a 2d 2d 2d 2d 2d |xit 0..d|an.-----|
|00002820| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002830| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002840| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|00002850| 4f 27 52 65 69 6c 6c 79 | 20 26 26 20 41 73 73 6f |O'Reilly| && Asso|
|00002860| 63 69 61 74 65 73 20 20 | 20 61 72 67 76 40 73 75 |ciates | argv@su|
|00002870| 6e 2e 63 6f 6d 20 2f 20 | 61 72 67 76 40 6f 72 61 |n.com / |argv@ora|
|00002880| 2e 63 6f 6d 0a 4f 70 69 | 6e 69 6f 6e 73 20 65 78 |.com.Opi|nions ex|
|00002890| 70 72 65 73 73 65 64 20 | 72 65 66 6c 65 63 74 20 |pressed |reflect |
|000028a0| 74 68 6f 73 65 20 6f 66 | 20 74 68 65 20 61 75 74 |those of| the aut|
|000028b0| 68 6f 72 20 6f 6e 6c 79 | 2e 0a |hor only|.. |
+--------+-------------------------+-------------------------+--------+--------+