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, with overstriking
| 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 69 73 6c 61 |Path: uu|net!isla|
|00000010| 6e 64 21 61 72 67 76 0a | 46 72 6f 6d 3a 20 61 72 |nd!argv.|From: ar|
|00000020| 67 76 40 69 73 6c 61 6e | 64 2e 75 75 2e 6e 65 74 |gv@islan|d.uu.net|
|00000030| 20 28 44 61 6e 20 48 65 | 6c 6c 65 72 29 0a 4e 65 | (Dan He|ller).Ne|
|00000040| 77 73 67 72 6f 75 70 73 | 3a 20 63 6f 6d 70 2e 73 |wsgroups|: comp.s|
|00000050| 6f 75 72 63 65 73 2e 78 | 0a 53 75 62 6a 65 63 74 |ources.x|.Subject|
|00000060| 3a 20 76 30 33 69 30 38 | 39 3a 20 20 78 77 70 73 |: v03i08|9: xwps|
|00000070| 20 2d 2d 20 64 75 6d 70 | 20 77 69 6e 64 6f 77 20 | -- dump| window |
|00000080| 69 6e 74 6f 20 61 20 66 | 69 6c 65 20 66 6f 72 20 |into a f|ile for |
|00000090| 50 6f 73 63 72 69 70 74 | 20 50 72 69 6e 74 65 72 |Poscript| Printer|
|000000a0| 73 0a 4d 65 73 73 61 67 | 65 2d 49 44 3a 20 3c 37 |s.Messag|e-ID: <7|
|000000b0| 32 31 40 69 73 6c 61 6e | 64 2e 75 75 2e 6e 65 74 |21@islan|d.uu.net|
|000000c0| 3e 0a 44 61 74 65 3a 20 | 32 38 20 41 70 72 20 38 |>.Date: |28 Apr 8|
|000000d0| 39 20 30 36 3a 31 38 3a | 32 33 20 47 4d 54 0a 53 |9 06:18:|23 GMT.S|
|000000e0| 65 6e 64 65 72 3a 20 6e | 65 77 73 40 69 73 6c 61 |ender: n|ews@isla|
|000000f0| 6e 64 2e 75 75 2e 6e 65 | 74 0a 4f 72 67 61 6e 69 |nd.uu.ne|t.Organi|
|00000100| 7a 61 74 69 6f 6e 3a 20 | 49 73 6c 61 6e 64 20 47 |zation: |Island G|
|00000110| 72 61 70 68 69 63 73 2c | 20 4d 61 72 69 6e 20 43 |raphics,| Marin C|
|00000120| 6f 75 6e 74 79 2c 20 43 | 61 6c 69 66 6f 72 6e 69 |ounty, C|aliforni|
|00000130| 61 0a 4c 69 6e 65 73 3a | 20 39 39 38 0a 41 70 70 |a.Lines:| 998.App|
|00000140| 72 6f 76 65 64 3a 20 69 | 73 6c 61 6e 64 21 61 72 |roved: i|sland!ar|
|00000150| 67 76 40 73 75 6e 2e 63 | 6f 6d 0a 0a 53 75 62 6d |gv@sun.c|om..Subm|
|00000160| 69 74 74 65 64 2d 62 79 | 3a 20 42 65 6e 6a 61 6d |itted-by|: Benjam|
|00000170| 69 6e 20 43 68 65 6e 20 | 3c 62 63 68 65 6e 40 65 |in Chen |<bchen@e|
|00000180| 73 76 61 78 2e 42 65 72 | 6b 65 6c 65 79 2e 45 44 |svax.Ber|keley.ED|
|00000190| 55 3e 0a 50 6f 73 74 69 | 6e 67 2d 6e 75 6d 62 65 |U>.Posti|ng-numbe|
|000001a0| 72 3a 20 56 6f 6c 75 6d | 65 20 33 2c 20 49 73 73 |r: Volum|e 3, Iss|
|000001b0| 75 65 20 38 39 0a 41 72 | 63 68 69 76 65 2d 6e 61 |ue 89.Ar|chive-na|
|000001c0| 6d 65 3a 20 78 77 70 73 | 2f 70 61 72 74 30 31 0a |me: xwps|/part01.|
|000001d0| 0a 41 55 54 48 4f 52 3a | 0a 42 65 6e 6a 61 6d 69 |.AUTHOR:|.Benjami|
|000001e0| 6e 20 43 68 65 6e 0a 4f | 66 66 69 63 65 3a 20 20 |n Chen.O|ffice: |
|000001f0| 20 35 35 30 2d 41 34 20 | 43 6f 72 79 20 48 61 6c | 550-A4 |Cory Hal|
|00000200| 6c 2c 20 32 2d 34 33 33 | 32 0a 55 55 43 50 3a 20 |l, 2-433|2.UUCP: |
|00000210| 20 20 20 20 21 75 63 62 | 76 61 78 21 65 73 76 61 | !ucb|vax!esva|
|00000220| 78 21 62 63 68 65 6e 20 | 20 20 20 20 20 20 20 20 |x!bchen | |
|00000230| 20 20 20 20 20 20 0a 48 | 45 50 4e 45 54 3a 20 20 | .H|EPNET: |
|00000240| 20 4c 42 4c 3a 3a 22 62 | 63 68 65 6e 40 65 73 76 | LBL::"b|chen@esv|
|00000250| 61 78 2e 42 65 72 6b 65 | 6c 65 79 2e 45 44 55 22 |ax.Berke|ley.EDU"|
|00000260| 0a 0a 0a 23 21 20 2f 62 | 69 6e 2f 73 68 0a 23 20 |...#! /b|in/sh.# |
|00000270| 54 68 69 73 20 69 73 20 | 61 20 73 68 65 6c 6c 20 |This is |a shell |
|00000280| 61 72 63 68 69 76 65 2c | 20 6d 65 61 6e 69 6e 67 |archive,| meaning|
|00000290| 3a 0a 23 20 31 2e 20 52 | 65 6d 6f 76 65 20 65 76 |:.# 1. R|emove ev|
|000002a0| 65 72 79 74 68 69 6e 67 | 20 61 62 6f 76 65 20 74 |erything| above t|
|000002b0| 68 65 20 23 21 20 2f 62 | 69 6e 2f 73 68 20 6c 69 |he #! /b|in/sh li|
|000002c0| 6e 65 2e 0a 23 20 32 2e | 20 53 61 76 65 20 74 68 |ne..# 2.| Save th|
|000002d0| 65 20 72 65 73 75 6c 74 | 69 6e 67 20 74 65 78 74 |e result|ing text|
|000002e0| 20 69 6e 20 61 20 66 69 | 6c 65 2e 0a 23 20 33 2e | in a fi|le..# 3.|
|000002f0| 20 45 78 65 63 75 74 65 | 20 74 68 65 20 66 69 6c | Execute| the fil|
|00000300| 65 20 77 69 74 68 20 2f | 62 69 6e 2f 73 68 20 28 |e with /|bin/sh (|
|00000310| 6e 6f 74 20 63 73 68 29 | 20 74 6f 20 63 72 65 61 |not csh)| to crea|
|00000320| 74 65 20 74 68 65 20 66 | 69 6c 65 73 3a 0a 23 09 |te the f|iles:.#.|
|00000330| 78 77 70 73 0a 23 20 54 | 68 69 73 20 61 72 63 68 |xwps.# T|his arch|
|00000340| 69 76 65 20 63 72 65 61 | 74 65 64 3a 20 57 65 64 |ive crea|ted: Wed|
|00000350| 20 41 70 72 20 32 36 20 | 31 35 3a 33 36 3a 33 38 | Apr 26 |15:36:38|
|00000360| 20 31 39 38 39 0a 65 78 | 70 6f 72 74 20 50 41 54 | 1989.ex|port PAT|
|00000370| 48 3b 20 50 41 54 48 3d | 2f 62 69 6e 3a 24 50 41 |H; PATH=|/bin:$PA|
|00000380| 54 48 0a 69 66 20 74 65 | 73 74 20 21 20 2d 64 20 |TH.if te|st ! -d |
|00000390| 27 78 77 70 73 27 0a 74 | 68 65 6e 0a 09 6d 6b 64 |'xwps'.t|hen..mkd|
|000003a0| 69 72 20 27 78 77 70 73 | 27 0a 66 69 0a 63 64 20 |ir 'xwps|'.fi.cd |
|000003b0| 27 78 77 70 73 27 0a 69 | 66 20 74 65 73 74 20 2d |'xwps'.i|f test -|
|000003c0| 66 20 27 78 77 70 73 2e | 63 27 0a 74 68 65 6e 0a |f 'xwps.|c'.then.|
|000003d0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 77 69 6c 6c |.echo sh|ar: will|
|000003e0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|000003f0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 22 27 |existing| file "'|
|00000400| 78 77 70 73 2e 63 27 22 | 0a 65 6c 73 65 0a 63 61 |xwps.c'"|.else.ca|
|00000410| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|00000420| 20 27 78 77 70 73 2e 63 | 27 0a 0a 2f 2a 20 78 77 | 'xwps.c|'../* xw|
|00000430| 70 73 2e 63 20 20 58 20 | 57 69 6e 64 6f 77 20 73 |ps.c X |Window s|
|00000440| 79 73 74 65 6d 20 77 69 | 6e 64 6f 77 20 72 61 73 |ystem wi|ndow ras|
|00000450| 74 65 72 20 69 6d 61 67 | 65 20 64 75 6d 70 65 72 |ter imag|e dumper|
|00000460| 2e 0a 20 2a 0a 20 2a 20 | 54 68 69 73 20 70 72 6f |.. *. * |This pro|
|00000470| 67 72 61 6d 20 77 69 6c | 6c 20 64 75 6d 70 20 61 |gram wil|l dump a|
|00000480| 20 72 61 73 74 65 72 20 | 69 6d 61 67 65 20 6f 66 | raster |image of|
|00000490| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 6f 66 | the con|tents of|
|000004a0| 20 61 20 77 69 6e 64 6f | 77 20 69 6e 74 6f 20 61 | a windo|w into a|
|000004b0| 20 0a 20 2a 20 66 69 6c | 65 20 66 6f 72 20 6f 75 | . * fil|e for ou|
|000004c0| 74 70 75 74 20 6f 6e 20 | 50 6f 73 74 53 63 72 69 |tput on |PostScri|
|000004d0| 70 74 20 70 72 69 6e 74 | 65 72 73 20 6f 72 20 66 |pt print|ers or f|
|000004e0| 6f 72 20 6f 74 68 65 72 | 20 75 73 65 73 2e 0a 20 |or other| uses.. |
|000004f0| 2a 20 20 20 20 20 0a 20 | 2a 20 20 20 20 20 41 75 |* . |* Au|
|00000500| 74 68 6f 72 3a 20 20 20 | 42 65 6e 6a 61 6d 69 6e |thor: |Benjamin|
|00000510| 20 43 68 65 6e 0a 20 2a | 20 20 20 20 20 20 20 20 | Chen. *| |
|00000520| 20 20 20 20 20 20 20 4d | 61 72 63 68 20 32 2c 20 | M|arch 2, |
|00000530| 31 39 38 39 0a 20 2a 0a | 20 2a 20 43 6f 70 79 72 |1989. *.| * Copyr|
|00000540| 69 67 68 74 20 28 43 29 | 20 31 39 38 39 20 52 65 |ight (C)| 1989 Re|
|00000550| 67 65 6e 74 73 20 6f 66 | 20 74 68 65 20 55 6e 69 |gents of| the Uni|
|00000560| 76 65 72 73 69 74 79 20 | 6f 66 20 43 61 6c 69 66 |versity |of Calif|
|00000570| 6f 72 6e 69 61 0a 20 2a | 20 41 6c 6c 20 72 69 67 |ornia. *| All rig|
|00000580| 68 74 73 20 72 65 73 65 | 72 76 65 64 2e 0a 20 2a |hts rese|rved.. *|
|00000590| 0a 20 2a 20 41 63 6b 6e | 6f 77 6c 65 64 67 65 6d |. * Ackn|owledgem|
|000005a0| 65 6e 74 73 3a 20 0a 20 | 2a 20 20 20 20 20 20 2d |ents: . |* -|
|000005b0| 20 20 54 68 65 20 64 61 | 74 61 20 72 65 74 72 69 | The da|ta retri|
|000005c0| 65 76 61 6c 20 70 6f 72 | 74 69 6f 6e 20 6f 66 20 |eval por|tion of |
|000005d0| 74 68 65 20 70 72 6f 67 | 72 61 6d 2c 20 69 2e 65 |the prog|ram, i.e|
|000005e0| 2e 0a 20 2a 20 20 20 20 | 20 20 20 20 20 72 65 61 |.. * | rea|
|000005f0| 64 69 6e 67 20 74 68 65 | 20 62 79 74 65 73 20 66 |ding the| bytes f|
|00000600| 72 6f 6d 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 |rom the |window i|
|00000610| 6e 74 6f 20 61 20 62 75 | 66 66 65 72 20 77 61 73 |nto a bu|ffer was|
|00000620| 20 65 78 74 72 61 63 74 | 65 64 0a 20 2a 20 20 20 | extract|ed. * |
|00000630| 20 20 20 20 20 20 66 72 | 6f 6d 20 78 77 64 2e 63 | fr|om xwd.c|
|00000640| 20 62 79 20 54 6f 6e 79 | 20 44 65 6c 6c 61 20 46 | by Tony| Della F|
|00000650| 65 72 61 20 6f 66 20 44 | 45 43 2e 0a 20 2a 20 20 |era of D|EC.. * |
|00000660| 20 20 20 20 0a 20 2a 2f | 0a 0a 23 69 66 6e 64 65 | . */|..#ifnde|
|00000670| 66 20 6c 69 6e 74 0a 73 | 74 61 74 69 63 20 63 68 |f lint.s|tatic ch|
|00000680| 61 72 20 2a 72 63 73 69 | 64 5f 78 77 70 73 5f 63 |ar *rcsi|d_xwps_c|
|00000690| 20 3d 20 22 24 48 65 61 | 64 65 72 3a 20 78 77 70 | = "$Hea|der: xwp|
|000006a0| 73 2e 63 2c 76 20 31 2e | 30 20 38 39 2f 30 33 2f |s.c,v 1.|0 89/03/|
|000006b0| 30 32 20 31 30 3a 30 31 | 3a 32 33 20 62 63 68 65 |02 10:01|:23 bche|
|000006c0| 6e 20 52 65 6c 24 22 3b | 0a 23 65 6e 64 69 66 0a |n Rel$";|.#endif.|
|000006d0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 58 2f 58 6c 69 |.#includ|e <X/Xli|
|000006e0| 62 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |b.h>.#in|clude <s|
|000006f0| 79 73 2f 74 79 70 65 73 | 2e 68 3e 0a 23 69 6e 63 |ys/types|.h>.#inc|
|00000700| 6c 75 64 65 20 3c 73 74 | 64 69 6f 2e 68 3e 0a 23 |lude <st|dio.h>.#|
|00000710| 69 6e 63 6c 75 64 65 20 | 3c 73 74 72 69 6e 67 73 |include |<strings|
|00000720| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 6d 61 |.h>.#inc|lude <ma|
|00000730| 74 68 2e 68 3e 0a 0a 63 | 68 61 72 20 2a 63 61 6c |th.h>..c|har *cal|
|00000740| 6c 6f 63 28 29 3b 0a 0a | 74 79 70 65 64 65 66 20 |loc();..|typedef |
|00000750| 65 6e 75 6d 20 5f 62 6f | 6f 6c 20 7b 46 41 4c 53 |enum _bo|ol {FALS|
|00000760| 45 2c 20 54 52 55 45 7d | 20 42 6f 6f 6c 3b 0a 0a |E, TRUE}| Bool;..|
|00000770| 23 69 6e 63 6c 75 64 65 | 20 22 74 61 72 67 65 74 |#include| "target|
|00000780| 2e 63 75 72 73 6f 72 22 | 0a 23 69 6e 63 6c 75 64 |.cursor"|.#includ|
|00000790| 65 20 22 74 61 72 67 65 | 74 5f 6d 61 73 6b 2e 63 |e "targe|t_mask.c|
|000007a0| 75 72 73 6f 72 22 0a 0a | 23 64 65 66 69 6e 65 20 |ursor"..|#define |
|000007b0| 46 41 49 4c 55 52 45 20 | 30 0a 0a 23 64 65 66 69 |FAILURE |0..#defi|
|000007c0| 6e 65 20 46 45 45 50 5f | 56 4f 4c 55 4d 45 20 30 |ne FEEP_|VOLUME 0|
|000007d0| 0a 0a 23 64 65 66 69 6e | 65 20 4d 41 58 43 4f 4c |..#defin|e MAXCOL|
|000007e0| 4f 52 53 20 32 35 36 0a | 23 64 65 66 69 6e 65 20 |ORS 256.|#define |
|000007f0| 50 53 5f 4e 4f 5f 43 4f | 4c 4f 52 20 32 35 35 0a |PS_NO_CO|LOR 255.|
|00000800| 0a 23 64 65 66 69 6e 65 | 20 53 43 41 4c 45 28 6e |.#define| SCALE(n|
|00000810| 29 20 28 28 69 6e 74 29 | 28 28 28 66 6c 6f 61 74 |) ((int)|(((float|
|00000820| 29 6e 2f 36 35 35 33 35 | 29 2a 32 35 35 29 29 0a |)n/65535|)*255)).|
|00000830| 0a 65 78 74 65 72 6e 20 | 69 6e 74 20 65 72 72 6e |.extern |int errn|
|00000840| 6f 3b 0a 0a 63 68 61 72 | 20 2a 50 72 6f 67 72 61 |o;..char| *Progra|
|00000850| 6d 4e 61 6d 65 20 3d 20 | 28 63 68 61 72 20 2a 29 |mName = |(char *)|
|00000860| 20 4e 55 4c 4c 3b 0a 63 | 68 61 72 20 2a 63 6f 6c | NULL;.c|har *col|
|00000870| 6f 72 4d 61 70 46 69 6c | 65 20 3d 20 28 63 68 61 |orMapFil|e = (cha|
|00000880| 72 20 2a 29 20 4e 55 4c | 4c 3b 0a 0a 64 6f 75 62 |r *) NUL|L;..doub|
|00000890| 6c 65 20 73 63 61 6c 65 | 58 20 3d 20 35 3b 20 2f |le scale|X = 5; /|
|000008a0| 2a 20 49 6e 20 69 6e 63 | 68 65 73 20 2a 2f 0a 64 |* In inc|hes */.d|
|000008b0| 6f 75 62 6c 65 20 73 63 | 61 6c 65 59 20 3d 20 35 |ouble sc|aleY = 5|
|000008c0| 3b 20 2f 2a 20 49 6e 20 | 69 6e 63 68 65 73 20 2a |; /* In |inches *|
|000008d0| 2f 0a 64 6f 75 62 6c 65 | 20 74 72 61 6e 73 6c 61 |/.double| transla|
|000008e0| 74 65 58 20 3d 20 31 3b | 20 2f 2a 20 49 6e 20 69 |teX = 1;| /* In i|
|000008f0| 6e 63 68 65 73 20 2a 2f | 0a 64 6f 75 62 6c 65 20 |nches */|.double |
|00000900| 74 72 61 6e 73 6c 61 74 | 65 59 20 3d 20 31 3b 20 |translat|eY = 1; |
|00000910| 2f 2a 20 49 6e 20 69 6e | 63 68 65 73 20 2a 2f 0a |/* In in|ches */.|
|00000920| 64 6f 75 62 6c 65 20 72 | 6f 74 61 74 69 6f 6e 20 |double r|otation |
|00000930| 3d 20 30 3b 20 2f 2a 20 | 69 6e 20 64 65 67 72 65 |= 0; /* |in degre|
|00000940| 65 73 20 63 6f 75 6e 74 | 65 72 63 6c 6f 63 6b 77 |es count|erclockw|
|00000950| 69 73 65 20 2a 2f 0a 69 | 6e 74 20 63 6f 6c 6f 72 |ise */.i|nt color|
|00000960| 4d 61 70 5b 4d 41 58 43 | 4f 4c 4f 52 53 5d 3b 0a |Map[MAXC|OLORS];.|
|00000970| 42 6f 6f 6c 20 6e 6f 62 | 64 72 73 20 3d 20 54 52 |Bool nob|drs = TR|
|00000980| 55 45 3b 0a 0a 69 6e 74 | 20 53 65 74 43 6f 6c 6f |UE;..int| SetColo|
|00000990| 72 28 6f 6c 64 43 6f 6c | 6f 72 4e 61 6d 65 2c 20 |r(oldCol|orName, |
|000009a0| 6e 65 77 43 6f 6c 6f 72 | 4e 61 6d 65 29 0a 20 20 |newColor|Name). |
|000009b0| 20 20 20 63 68 61 72 20 | 2a 6f 6c 64 43 6f 6c 6f | char |*oldColo|
|000009c0| 72 4e 61 6d 65 2c 20 2a | 6e 65 77 43 6f 6c 6f 72 |rName, *|newColor|
|000009d0| 4e 61 6d 65 3b 0a 7b 0a | 20 20 20 20 43 6f 6c 6f |Name;.{.| Colo|
|000009e0| 72 20 6f 6c 64 64 65 66 | 2c 20 6e 65 77 64 65 66 |r olddef|, newdef|
|000009f0| 3b 0a 20 20 20 20 20 20 | 20 20 0a 20 20 20 20 69 |;. | . i|
|00000a00| 66 20 28 21 58 50 61 72 | 73 65 43 6f 6c 6f 72 28 |f (!XPar|seColor(|
|00000a10| 6f 6c 64 43 6f 6c 6f 72 | 4e 61 6d 65 2c 20 26 6f |oldColor|Name, &o|
|00000a20| 6c 64 64 65 66 29 29 20 | 72 65 74 75 72 6e 20 2d |lddef)) |return -|
|00000a30| 31 3b 0a 20 20 20 20 69 | 66 20 28 21 58 47 65 74 |1;. i|f (!XGet|
|00000a40| 48 61 72 64 77 61 72 65 | 43 6f 6c 6f 72 28 26 6f |Hardware|Color(&o|
|00000a50| 6c 64 64 65 66 29 29 20 | 72 65 74 75 72 6e 20 2d |lddef)) |return -|
|00000a60| 31 3b 0a 20 20 20 20 69 | 66 20 28 73 74 72 6e 63 |1;. i|f (strnc|
|00000a70| 6d 70 28 6e 65 77 43 6f | 6c 6f 72 4e 61 6d 65 2c |mp(newCo|lorName,|
|00000a80| 20 22 4e 4f 43 4f 4c 4f | 52 22 2c 20 37 29 20 3d | "NOCOLO|R", 7) =|
|00000a90| 3d 20 30 29 20 7b 0a 09 | 63 6f 6c 6f 72 4d 61 70 |= 0) {..|colorMap|
|00000aa0| 5b 6f 6c 64 64 65 66 2e | 70 69 78 65 6c 5d 20 3d |[olddef.|pixel] =|
|00000ab0| 20 50 53 5f 4e 4f 5f 43 | 4f 4c 4f 52 3b 0a 09 72 | PS_NO_C|OLOR;..r|
|00000ac0| 65 74 75 72 6e 20 30 3b | 0a 20 20 20 20 7d 0a 20 |eturn 0;|. }. |
|00000ad0| 20 20 20 65 6c 73 65 20 | 69 66 20 28 21 58 50 61 | else |if (!XPa|
|00000ae0| 72 73 65 43 6f 6c 6f 72 | 28 6e 65 77 43 6f 6c 6f |rseColor|(newColo|
|00000af0| 72 4e 61 6d 65 2c 20 26 | 6e 65 77 64 65 66 29 29 |rName, &|newdef))|
|00000b00| 20 72 65 74 75 72 6e 20 | 2d 31 3b 0a 20 20 20 20 | return |-1;. |
|00000b10| 69 66 20 28 21 58 47 65 | 74 48 61 72 64 77 61 72 |if (!XGe|tHardwar|
|00000b20| 65 43 6f 6c 6f 72 28 26 | 6e 65 77 64 65 66 29 29 |eColor(&|newdef))|
|00000b30| 20 72 65 74 75 72 6e 20 | 2d 31 3b 0a 20 20 20 20 | return |-1;. |
|00000b40| 63 6f 6c 6f 72 4d 61 70 | 5b 6f 6c 64 64 65 66 2e |colorMap|[olddef.|
|00000b50| 70 69 78 65 6c 5d 20 3d | 20 6c 75 6d 69 6e 61 6e |pixel] =| luminan|
|00000b60| 63 65 28 6e 65 77 64 65 | 66 29 3b 0a 20 20 20 20 |ce(newde|f);. |
|00000b70| 72 65 74 75 72 6e 20 30 | 3b 0a 7d 0a 0a 69 6e 74 |return 0|;.}..int|
|00000b80| 20 6c 75 6d 69 6e 61 6e | 63 65 28 63 6f 6c 6f 72 | luminan|ce(color|
|00000b90| 53 70 65 63 29 0a 20 20 | 20 20 20 43 6f 6c 6f 72 |Spec). | Color|
|00000ba0| 20 63 6f 6c 6f 72 53 70 | 65 63 3b 0a 7b 0a 20 20 | colorSp|ec;.{. |
|00000bb0| 20 20 69 6e 74 20 72 2c | 20 67 2c 20 62 2c 20 6c | int r,| g, b, l|
|00000bc0| 3b 0a 0a 20 20 20 20 72 | 20 3d 20 53 43 41 4c 45 |;.. r| = SCALE|
|00000bd0| 28 63 6f 6c 6f 72 53 70 | 65 63 2e 72 65 64 29 3b |(colorSp|ec.red);|
|00000be0| 0a 20 20 20 20 67 20 3d | 20 53 43 41 4c 45 28 63 |. g =| SCALE(c|
|00000bf0| 6f 6c 6f 72 53 70 65 63 | 2e 67 72 65 65 6e 29 3b |olorSpec|.green);|
|00000c00| 0a 20 20 20 20 62 20 3d | 20 53 43 41 4c 45 28 63 |. b =| SCALE(c|
|00000c10| 6f 6c 6f 72 53 70 65 63 | 2e 62 6c 75 65 29 3b 0a |olorSpec|.blue);.|
|00000c20| 20 20 20 20 6c 20 3d 20 | 28 30 2e 33 30 2a 72 29 | l = |(0.30*r)|
|00000c30| 20 2b 20 28 30 2e 35 39 | 2a 67 29 20 2b 20 28 30 | + (0.59|*g) + (0|
|00000c40| 2e 31 31 2a 62 29 3b 0a | 20 20 20 20 72 65 74 75 |.11*b);.| retu|
|00000c50| 72 6e 20 6c 3b 0a 7d 0a | 0a 20 20 20 20 0a 76 6f |rn l;.}.|. .vo|
|00000c60| 69 64 20 77 72 69 74 65 | 49 6e 76 65 72 73 65 28 |id write|Inverse(|
|00000c70| 70 73 46 69 6c 65 29 0a | 20 20 20 20 20 46 49 4c |psFile).| FIL|
|00000c80| 45 20 2a 70 73 46 69 6c | 65 3b 0a 7b 0a 20 20 20 |E *psFil|e;.{. |
|00000c90| 20 66 70 72 69 6e 74 66 | 28 70 73 46 69 6c 65 2c | fprintf|(psFile,|
|00000ca0| 20 22 2f 63 6f 6e 63 61 | 74 70 72 6f 63 73 5c 6e | "/conca|tprocs\n|
|00000cb0| 22 29 3b 0a 20 20 20 20 | 66 70 72 69 6e 74 66 28 |");. |fprintf(|
|00000cc0| 70 73 46 69 6c 65 2c 20 | 22 7b 20 2f 70 72 6f 63 |psFile, |"{ /proc|
|00000cd0| 32 20 65 78 63 68 20 63 | 76 6c 69 74 20 64 65 66 |2 exch c|vlit def|
|00000ce0| 2f 6e 22 29 3b 0a 20 20 | 20 20 66 70 72 69 6e 74 |/n");. | fprint|
|00000cf0| 66 28 70 73 46 69 6c 65 | 2c 20 22 20 20 2f 70 72 |f(psFile|, " /pr|
|00000d00| 6f 63 31 20 65 78 63 68 | 20 63 76 6c 69 74 20 64 |oc1 exch| cvlit d|
|00000d10| 65 66 2f 6e 22 29 3b 0a | 20 20 20 20 66 70 72 69 |ef/n");.| fpri|
|00000d20| 6e 74 66 28 70 73 46 69 | 6c 65 2c 20 22 2f 6e 65 |ntf(psFi|le, "/ne|
|00000d30| 77 70 72 6f 63 20 70 72 | 6f 63 31 20 6c 65 6e 67 |wproc pr|oc1 leng|
|00000d40| 74 68 20 70 72 6f 63 32 | 20 6c 65 6e 67 74 68 20 |th proc2| length |
|00000d50| 61 64 64 20 61 72 72 61 | 79 20 64 65 66 5c 6e 22 |add arra|y def\n"|
|00000d60| 29 3b 0a 20 20 20 20 66 | 70 72 69 6e 74 66 28 70 |);. f|printf(p|
|00000d70| 73 46 69 6c 65 2c 20 22 | 20 6e 65 77 70 72 6f 63 |sFile, "| newproc|
|00000d80| 20 30 20 70 72 6f 63 31 | 20 70 75 74 69 6e 74 65 | 0 proc1| putinte|
|00000d90| 72 76 61 6c 5c 6e 22 29 | 3b 0a 20 20 20 20 66 70 |rval\n")|;. fp|
|00000da0| 72 69 6e 74 66 28 70 73 | 46 69 6c 65 2c 20 22 20 |rintf(ps|File, " |
|00000db0| 6e 65 77 70 72 6f 63 20 | 70 72 6f 63 31 20 6c 65 |newproc |proc1 le|
|00000dc0| 6e 67 74 68 20 70 72 6f | 63 32 20 70 75 74 69 6e |ngth pro|c2 putin|
|00000dd0| 74 65 72 76 61 6c 5c 6e | 22 29 3b 0a 20 20 20 20 |terval\n|");. |
|00000de0| 66 70 72 69 6e 74 66 28 | 70 73 46 69 6c 65 2c 20 |fprintf(|psFile, |
|00000df0| 22 20 6e 65 77 70 72 6f | 63 20 63 76 78 5c 6e 22 |" newpro|c cvx\n"|
|00000e00| 29 3b 0a 20 20 20 20 66 | 70 72 69 6e 74 66 28 70 |);. f|printf(p|
|00000e10| 73 46 69 6c 65 2c 20 22 | 7d 20 64 65 66 5c 6e 22 |sFile, "|} def\n"|
|00000e20| 29 3b 0a 7d 0a 0a 76 6f | 69 64 20 77 72 69 74 65 |);.}..vo|id write|
|00000e30| 49 6d 61 67 65 28 70 73 | 46 69 6c 65 2c 20 64 61 |Image(ps|File, da|
|00000e40| 74 61 2c 20 73 69 7a 65 | 2c 20 77 69 64 74 68 29 |ta, size|, width)|
|00000e50| 0a 20 20 20 20 20 46 49 | 4c 45 20 2a 70 73 46 69 |. FI|LE *psFi|
|00000e60| 6c 65 3b 0a 20 20 20 20 | 20 63 68 61 72 20 2a 64 |le;. | char *d|
|00000e70| 61 74 61 3b 0a 20 20 20 | 20 20 75 6e 73 69 67 6e |ata;. | unsign|
|00000e80| 65 64 20 73 69 7a 65 3b | 0a 20 20 20 20 20 69 6e |ed size;|. in|
|00000e90| 74 20 77 69 64 74 68 3b | 0a 7b 0a 20 20 20 20 69 |t width;|.{. i|
|00000ea0| 6e 74 20 69 2c 20 70 69 | 78 2c 20 63 75 72 72 65 |nt i, pi|x, curre|
|00000eb0| 6e 74 3b 0a 20 20 20 20 | 43 6f 6c 6f 72 20 63 6f |nt;. |Color co|
|00000ec0| 6c 6f 72 44 65 66 3b 0a | 0a 20 20 20 20 2f 2a 20 |lorDef;.|. /* |
|00000ed0| 4f 75 74 70 75 74 20 69 | 73 20 68 65 78 61 64 65 |Output i|s hexade|
|00000ee0| 63 69 6d 61 6c 20 2a 2f | 0a 20 20 20 20 66 70 72 |cimal */|. fpr|
|00000ef0| 69 6e 74 66 28 70 73 46 | 69 6c 65 2c 20 22 70 6c |intf(psF|ile, "pl|
|00000f00| 6f 74 69 6d 61 67 65 5c | 6e 22 29 3b 0a 20 20 20 |otimage\|n");. |
|00000f10| 20 66 6f 72 28 69 3d 30 | 3b 20 69 3c 73 69 7a 65 | for(i=0|; i<size|
|00000f20| 3b 20 69 2b 2b 29 20 7b | 0a 09 63 75 72 72 65 6e |; i++) {|..curren|
|00000f30| 74 20 3d 20 28 69 6e 74 | 29 20 64 61 74 61 5b 69 |t = (int|) data[i|
|00000f40| 5d 3b 0a 09 69 66 20 28 | 63 6f 6c 6f 72 4d 61 70 |];..if (|colorMap|
|00000f50| 5b 63 75 72 72 65 6e 74 | 5d 20 3d 3d 20 2d 31 29 |[current|] == -1)|
|00000f60| 20 7b 0a 09 20 20 20 20 | 63 6f 6c 6f 72 44 65 66 | {.. |colorDef|
|00000f70| 2e 70 69 78 65 6c 20 3d | 20 63 75 72 72 65 6e 74 |.pixel =| current|
|00000f80| 3b 0a 09 20 20 20 20 58 | 51 75 65 72 79 43 6f 6c |;.. X|QueryCol|
|00000f90| 6f 72 28 26 63 6f 6c 6f | 72 44 65 66 29 3b 0a 09 |or(&colo|rDef);..|
|00000fa0| 20 20 20 20 70 69 78 20 | 3d 20 20 6c 75 6d 69 6e | pix |= lumin|
|00000fb0| 61 6e 63 65 28 63 6f 6c | 6f 72 44 65 66 29 3b 0a |ance(col|orDef);.|
|00000fc0| 09 20 20 20 20 63 6f 6c | 6f 72 4d 61 70 5b 63 75 |. col|orMap[cu|
|00000fd0| 72 72 65 6e 74 5d 20 3d | 20 70 69 78 3b 0a 09 7d |rrent] =| pix;..}|
|00000fe0| 0a 09 65 6c 73 65 20 7b | 0a 09 20 20 20 20 70 69 |..else {|.. pi|
|00000ff0| 78 20 3d 20 63 6f 6c 6f | 72 4d 61 70 5b 63 75 72 |x = colo|rMap[cur|
|00001000| 72 65 6e 74 5d 3b 0a 09 | 7d 0a 09 66 70 72 69 6e |rent];..|}..fprin|
|00001010| 74 66 28 70 73 46 69 6c | 65 2c 20 22 25 30 32 78 |tf(psFil|e, "%02x|
|00001020| 22 2c 20 70 69 78 29 3b | 0a 09 69 66 20 28 28 69 |", pix);|..if ((i|
|00001030| 2b 31 20 25 20 77 69 64 | 74 68 29 20 3d 3d 20 30 |+1 % wid|th) == 0|
|00001040| 29 20 7b 0a 09 20 20 20 | 20 66 70 72 69 6e 74 66 |) {.. | fprintf|
|00001050| 28 70 73 46 69 6c 65 2c | 20 22 5c 6e 22 29 3b 0a |(psFile,| "\n");.|
|00001060| 09 7d 0a 20 20 20 20 7d | 0a 20 20 20 20 66 70 72 |.}. }|. fpr|
|00001070| 69 6e 74 66 28 70 73 46 | 69 6c 65 2c 20 22 5c 6e |intf(psF|ile, "\n|
|00001080| 22 29 3b 0a 7d 0a 0a 23 | 64 65 66 69 6e 65 20 42 |");.}..#|define B|
|00001090| 49 54 53 5f 50 45 52 5f | 53 41 4d 50 4c 45 20 38 |ITS_PER_|SAMPLE 8|
|000010a0| 0a 0a 76 6f 69 64 20 6f | 70 65 6e 49 6d 61 67 65 |..void o|penImage|
|000010b0| 28 70 73 46 69 6c 65 2c | 20 77 69 64 74 68 2c 20 |(psFile,| width, |
|000010c0| 68 65 69 67 68 74 29 0a | 20 20 20 20 20 46 49 4c |height).| FIL|
|000010d0| 45 20 2a 70 73 46 69 6c | 65 3b 0a 20 20 20 20 20 |E *psFil|e;. |
|000010e0| 69 6e 74 20 77 69 64 74 | 68 2c 20 68 65 69 67 68 |int widt|h, heigh|
|000010f0| 74 3b 0a 7b 0a 20 20 20 | 20 69 6e 74 20 6c 6c 78 |t;.{. | int llx|
|00001100| 2c 20 6c 6c 79 2c 20 75 | 72 78 2c 20 75 72 79 2c |, lly, u|rx, ury,|
|00001110| 20 6c 72 78 2c 20 6c 72 | 79 2c 20 75 6c 78 2c 20 | lrx, lr|y, ulx, |
|00001120| 75 6c 79 3b 0a 20 20 20 | 20 66 6c 6f 61 74 20 20 |uly;. | float |
|00001130| 75 72 79 31 2c 20 75 6c | 78 31 2c 20 6c 72 78 31 |ury1, ul|x1, lrx1|
|00001140| 3b 0a 20 20 20 20 0a 20 | 20 20 20 2f 2a 20 43 61 |;. . | /* Ca|
|00001150| 6c 63 75 6c 61 74 65 20 | 74 68 65 20 62 6f 75 6e |lculate |the boun|
|00001160| 64 69 6e 67 20 62 6f 78 | 20 62 79 20 61 70 70 6c |ding box| by appl|
|00001170| 79 69 6e 67 20 74 68 65 | 20 63 6f 72 72 65 63 74 |ying the| correct|
|00001180| 20 74 72 61 6e 73 66 6f | 72 6d 61 74 69 6f 6e 73 | transfo|rmations|
|00001190| 20 2a 2f 0a 20 20 20 20 | 6c 72 79 20 3d 20 30 3b | */. |lry = 0;|
|000011a0| 0a 20 20 20 20 75 72 78 | 20 3d 20 6c 72 78 20 3d |. urx| = lrx =|
|000011b0| 20 73 63 61 6c 65 58 20 | 2a 20 37 32 3b 0a 20 20 | scaleX |* 72;. |
|000011c0| 20 20 75 6c 78 20 3d 20 | 30 3b 0a 20 20 20 20 75 | ulx = |0;. u|
|000011d0| 72 79 20 3d 20 75 6c 79 | 20 3d 20 73 63 61 6c 65 |ry = uly| = scale|
|000011e0| 59 20 2a 20 37 32 3b 0a | 20 20 20 20 75 72 79 31 |Y * 72;.| ury1|
|000011f0| 20 3d 20 75 72 78 2a 73 | 69 6e 28 72 6f 74 61 74 | = urx*s|in(rotat|
|00001200| 69 6f 6e 29 20 2b 20 75 | 72 79 2a 63 6f 73 28 72 |ion) + u|ry*cos(r|
|00001210| 6f 74 61 74 69 6f 6e 29 | 3b 0a 20 20 20 20 75 6c |otation)|;. ul|
|00001220| 78 31 20 3d 20 75 6c 78 | 2a 63 6f 73 28 72 6f 74 |x1 = ulx|*cos(rot|
|00001230| 61 74 69 6f 6e 29 20 2d | 20 75 6c 79 2a 73 69 6e |ation) -| uly*sin|
|00001240| 28 72 6f 74 61 74 69 6f | 6e 29 3b 0a 20 20 20 20 |(rotatio|n);. |
|00001250| 6c 72 78 31 20 3d 20 6c | 72 78 2a 63 6f 73 28 72 |lrx1 = l|rx*cos(r|
|00001260| 6f 74 61 74 69 6f 6e 29 | 20 2d 20 6c 72 79 2a 73 |otation)| - lry*s|
|00001270| 69 6e 28 72 6f 74 61 74 | 69 6f 6e 29 3b 0a 20 20 |in(rotat|ion);. |
|00001280| 20 20 6c 6c 78 20 3d 20 | 75 6c 78 31 20 2b 20 74 | llx = |ulx1 + t|
|00001290| 72 61 6e 73 6c 61 74 65 | 58 20 2a 20 37 32 3b 0a |ranslate|X * 72;.|
|000012a0| 20 20 20 20 6c 6c 79 20 | 3d 20 74 72 61 6e 73 6c | lly |= transl|
|000012b0| 61 74 65 59 20 2a 20 37 | 32 3b 0a 20 20 20 20 75 |ateY * 7|2;. u|
|000012c0| 72 78 20 3d 20 6c 72 78 | 31 20 2b 20 28 74 72 61 |rx = lrx|1 + (tra|
|000012d0| 6e 73 6c 61 74 65 58 20 | 2a 20 37 32 29 3b 0a 20 |nslateX |* 72);. |
|000012e0| 20 20 20 75 72 79 20 3d | 20 75 72 79 31 20 2b 20 | ury =| ury1 + |
|000012f0| 28 74 72 61 6e 73 6c 61 | 74 65 59 20 2a 37 32 29 |(transla|teY *72)|
|00001300| 3b 0a 20 20 20 20 66 70 | 72 69 6e 74 66 28 70 73 |;. fp|rintf(ps|
|00001310| 46 69 6c 65 2c 20 22 25 | 25 21 5c 6e 22 29 3b 0a |File, "%|%!\n");.|
|00001320| 20 20 20 20 66 70 72 69 | 6e 74 66 28 70 73 46 69 | fpri|ntf(psFi|
|00001330| 6c 65 2c 20 22 25 25 25 | 25 42 6f 75 6e 64 69 6e |le, "%%%|%Boundin|
|00001340| 67 42 6f 78 3a 20 25 64 | 20 25 64 20 25 64 20 25 |gBox: %d| %d %d %|
|00001350| 64 5c 6e 22 2c 20 6c 6c | 78 2c 20 6c 6c 79 2c 20 |d\n", ll|x, lly, |
|00001360| 75 72 78 2c 20 75 72 79 | 29 3b 0a 20 20 20 20 66 |urx, ury|);. f|
|00001370| 70 72 69 6e 74 66 28 70 | 73 46 69 6c 65 2c 20 22 |printf(p|sFile, "|
|00001380| 2f 69 6e 63 68 20 7b 37 | 32 20 6d 75 6c 7d 20 64 |/inch {7|2 mul} d|
|00001390| 65 66 5c 6e 22 29 3b 0a | 20 20 20 20 66 70 72 69 |ef\n");.| fpri|
|000013a0| 6e 74 66 28 70 73 46 69 | 6c 65 2c 20 22 2f 70 69 |ntf(psFi|le, "/pi|
|000013b0| 63 73 74 72 20 25 64 20 | 73 74 72 69 6e 67 20 64 |cstr %d |string d|
|000013c0| 65 66 5c 6e 22 2c 20 77 | 69 64 74 68 29 3b 0a 20 |ef\n", w|idth);. |
|000013d0| 20 20 20 66 70 72 69 6e | 74 66 28 70 73 46 69 6c | fprin|tf(psFil|
|000013e0| 65 2c 20 22 2f 70 6c 6f | 74 69 6d 61 67 65 5c 6e |e, "/plo|timage\n|
|000013f0| 22 29 3b 0a 20 20 20 20 | 66 70 72 69 6e 74 66 28 |");. |fprintf(|
|00001400| 70 73 46 69 6c 65 2c 20 | 22 20 7b 25 64 20 25 64 |psFile, |" {%d %d|
|00001410| 20 25 64 20 5b 25 64 20 | 30 20 30 20 25 64 20 30 | %d [%d |0 0 %d 0|
|00001420| 20 25 64 5d 20 5c 6e 22 | 2c 20 77 69 64 74 68 2c | %d] \n"|, width,|
|00001430| 20 68 65 69 67 68 74 2c | 0a 09 20 20 20 20 42 49 | height,|.. BI|
|00001440| 54 53 5f 50 45 52 5f 53 | 41 4d 50 4c 45 2c 20 77 |TS_PER_S|AMPLE, w|
|00001450| 69 64 74 68 2c 20 2d 68 | 65 69 67 68 74 2c 20 68 |idth, -h|eight, h|
|00001460| 65 69 67 68 74 29 3b 0a | 20 20 20 20 66 70 72 69 |eight);.| fpri|
|00001470| 6e 74 66 28 70 73 46 69 | 6c 65 2c 22 20 20 20 7b |ntf(psFi|le," {|
|00001480| 63 75 72 72 65 6e 74 66 | 69 6c 65 20 70 69 63 73 |currentf|ile pics|
|00001490| 74 72 20 72 65 61 64 68 | 65 78 73 74 72 69 6e 67 |tr readh|exstring|
|000014a0| 20 70 6f 70 7d 20 5c 6e | 22 29 3b 0a 20 20 20 20 | pop} \n|");. |
|000014b0| 66 70 72 69 6e 74 66 28 | 70 73 46 69 6c 65 2c 22 |fprintf(|psFile,"|
|000014c0| 20 20 20 69 6d 61 67 65 | 5c 6e 20 7d 20 64 65 66 | image|\n } def|
|000014d0| 5c 6e 22 29 3b 0a 20 20 | 20 20 66 70 72 69 6e 74 |\n");. | fprint|
|000014e0| 66 28 70 73 46 69 6c 65 | 2c 20 22 67 73 61 76 65 |f(psFile|, "gsave|
|000014f0| 5c 6e 22 29 3b 0a 20 20 | 20 20 66 70 72 69 6e 74 |\n");. | fprint|
|00001500| 66 28 70 73 46 69 6c 65 | 2c 20 22 25 2e 32 66 20 |f(psFile|, "%.2f |
|00001510| 69 6e 63 68 20 25 2e 32 | 66 20 69 6e 63 68 20 74 |inch %.2|f inch t|
|00001520| 72 61 6e 73 6c 61 74 65 | 5c 6e 22 2c 20 74 72 61 |ranslate|\n", tra|
|00001530| 6e 73 6c 61 74 65 58 2c | 20 74 72 61 6e 73 6c 61 |nslateX,| transla|
|00001540| 74 65 59 29 3b 0a 20 20 | 20 20 66 70 72 69 6e 74 |teY);. | fprint|
|00001550| 66 28 70 73 46 69 6c 65 | 2c 20 22 25 2e 32 66 20 |f(psFile|, "%.2f |
|00001560| 69 6e 63 68 20 25 2e 32 | 66 20 69 6e 63 68 20 73 |inch %.2|f inch s|
|00001570| 63 61 6c 65 5c 6e 22 2c | 20 73 63 61 6c 65 58 2c |cale\n",| scaleX,|
|00001580| 20 73 63 61 6c 65 59 29 | 3b 0a 20 20 20 20 66 70 | scaleY)|;. fp|
|00001590| 72 69 6e 74 66 28 70 73 | 46 69 6c 65 2c 20 22 25 |rintf(ps|File, "%|
|000015a0| 2e 32 66 20 72 6f 74 61 | 74 65 5c 6e 22 2c 20 72 |.2f rota|te\n", r|
|000015b0| 6f 74 61 74 69 6f 6e 29 | 3b 0a 7d 0a 0a 76 6f 69 |otation)|;.}..voi|
|000015c0| 64 20 63 6c 6f 73 65 49 | 6d 61 67 65 28 70 73 46 |d closeI|mage(psF|
|000015d0| 69 6c 65 29 0a 20 20 20 | 20 20 46 49 4c 45 20 2a |ile). | FILE *|
|000015e0| 70 73 46 69 6c 65 3b 0a | 7b 0a 20 20 20 20 66 70 |psFile;.|{. fp|
|000015f0| 72 69 6e 74 66 28 70 73 | 46 69 6c 65 2c 20 22 67 |rintf(ps|File, "g|
|00001600| 72 65 73 74 6f 72 65 5c | 6e 22 29 3b 0a 20 20 20 |restore\|n");. |
|00001610| 20 66 70 72 69 6e 74 66 | 28 70 73 46 69 6c 65 2c | fprintf|(psFile,|
|00001620| 20 22 73 68 6f 77 70 61 | 67 65 5c 6e 22 29 3b 0a | "showpa|ge\n");.|
|00001630| 20 20 20 20 66 66 6c 75 | 73 68 28 70 73 46 69 6c | fflu|sh(psFil|
|00001640| 65 29 3b 0a 7d 0a 0a 69 | 6e 74 20 47 65 74 44 65 |e);.}..i|nt GetDe|
|00001650| 66 61 75 6c 74 73 28 29 | 0a 7b 0a 20 20 20 20 63 |faults()|.{. c|
|00001660| 68 61 72 20 2a 63 70 3b | 0a 20 20 20 20 69 66 20 |har *cp;|. if |
|00001670| 28 63 70 20 3d 20 58 47 | 65 74 44 65 66 61 75 6c |(cp = XG|etDefaul|
|00001680| 74 28 50 72 6f 67 72 61 | 6d 4e 61 6d 65 2c 20 22 |t(Progra|mName, "|
|00001690| 53 63 61 6c 65 58 22 29 | 29 0a 09 09 73 63 61 6c |ScaleX")|)...scal|
|000016a0| 65 58 20 3d 20 61 74 6f | 66 20 28 63 70 29 3b 0a |eX = ato|f (cp);.|
|000016b0| 20 20 20 20 69 66 20 28 | 63 70 20 3d 20 58 47 65 | if (|cp = XGe|
|000016c0| 74 44 65 66 61 75 6c 74 | 28 50 72 6f 67 72 61 6d |tDefault|(Program|
|000016d0| 4e 61 6d 65 2c 20 22 53 | 63 61 6c 65 59 22 29 29 |Name, "S|caleY"))|
|000016e0| 0a 09 09 73 63 61 6c 65 | 59 20 3d 20 61 74 6f 66 |...scale|Y = atof|
|000016f0| 20 28 63 70 29 3b 0a 20 | 20 20 20 69 66 20 28 63 | (cp);. | if (c|
|00001700| 70 20 3d 20 58 47 65 74 | 44 65 66 61 75 6c 74 28 |p = XGet|Default(|
|00001710| 50 72 6f 67 72 61 6d 4e | 61 6d 65 2c 20 22 54 72 |ProgramN|ame, "Tr|
|00001720| 61 6e 73 6c 61 74 65 58 | 22 29 29 0a 09 09 74 72 |anslateX|"))...tr|
|00001730| 61 6e 73 6c 61 74 65 58 | 20 3d 20 61 74 6f 66 20 |anslateX| = atof |
|00001740| 28 63 70 29 3b 0a 20 20 | 20 20 69 66 20 28 63 70 |(cp);. | if (cp|
|00001750| 20 3d 20 58 47 65 74 44 | 65 66 61 75 6c 74 28 50 | = XGetD|efault(P|
|00001760| 72 6f 67 72 61 6d 4e 61 | 6d 65 2c 20 22 54 72 61 |rogramNa|me, "Tra|
|00001770| 6e 73 6c 61 74 65 59 22 | 29 29 0a 09 09 74 72 61 |nslateY"|))...tra|
|00001780| 6e 73 6c 61 74 65 59 20 | 3d 20 61 74 6f 66 20 28 |nslateY |= atof (|
|00001790| 63 70 29 3b 0a 20 20 20 | 20 69 66 20 28 63 70 20 |cp);. | if (cp |
|000017a0| 3d 20 58 47 65 74 44 65 | 66 61 75 6c 74 28 50 72 |= XGetDe|fault(Pr|
|000017b0| 6f 67 72 61 6d 4e 61 6d | 65 2c 20 20 22 52 6f 74 |ogramNam|e, "Rot|
|000017c0| 61 74 69 6f 6e 22 29 29 | 0a 09 09 72 6f 74 61 74 |ation"))|...rotat|
|000017d0| 69 6f 6e 20 3d 20 61 74 | 6f 66 20 28 63 70 29 3b |ion = at|of (cp);|
|000017e0| 0a 20 20 20 20 69 66 20 | 28 63 70 20 3d 20 58 47 |. if |(cp = XG|
|000017f0| 65 74 44 65 66 61 75 6c | 74 28 50 72 6f 67 72 61 |etDefaul|t(Progra|
|00001800| 6d 4e 61 6d 65 2c 20 22 | 43 6f 6c 6f 72 6d 61 70 |mName, "|Colormap|
|00001810| 46 69 6c 65 22 29 29 0a | 09 09 63 6f 6c 6f 72 4d |File")).|..colorM|
|00001820| 61 70 46 69 6c 65 20 3d | 20 63 70 3b 0a 20 20 20 |apFile =| cp;. |
|00001830| 20 69 66 20 28 63 70 20 | 3d 20 58 47 65 74 44 65 | if (cp |= XGetDe|
|00001840| 66 61 75 6c 74 28 50 72 | 6f 67 72 61 6d 4e 61 6d |fault(Pr|ogramNam|
|00001850| 65 2c 20 22 42 6f 72 64 | 65 72 73 22 29 29 20 7b |e, "Bord|ers")) {|
|00001860| 0a 09 69 66 20 28 73 74 | 72 63 6d 70 28 63 70 2c |..if (st|rcmp(cp,|
|00001870| 20 22 6f 66 66 22 29 20 | 3d 3d 20 30 29 20 7b 0a | "off") |== 0) {.|
|00001880| 09 20 20 20 20 6e 6f 62 | 64 72 73 20 3d 20 54 52 |. nob|drs = TR|
|00001890| 55 45 3b 0a 09 7d 0a 09 | 65 6c 73 65 20 69 66 20 |UE;..}..|else if |
|000018a0| 28 73 74 72 63 6d 70 28 | 63 70 2c 20 22 6f 6e 22 |(strcmp(|cp, "on"|
|000018b0| 29 20 3d 3d 20 30 29 20 | 7b 0a 09 20 20 20 20 6e |) == 0) |{.. n|
|000018c0| 6f 62 64 72 73 20 3d 20 | 46 41 4c 53 45 3b 0a 09 |obdrs = |FALSE;..|
|000018d0| 7d 0a 20 20 20 20 7d 0a | 7d 0a 0a 69 6e 74 20 72 |}. }.|}..int r|
|000018e0| 65 61 64 43 6f 6c 6f 72 | 4d 61 70 46 69 6c 65 28 |eadColor|MapFile(|
|000018f0| 66 69 6c 65 4e 61 6d 65 | 29 0a 20 20 20 20 20 63 |fileName|). c|
|00001900| 68 61 72 20 2a 66 69 6c | 65 4e 61 6d 65 3b 0a 7b |har *fil|eName;.{|
|00001910| 0a 20 20 20 20 46 49 4c | 45 20 2a 74 68 65 46 69 |. FIL|E *theFi|
|00001920| 6c 65 3b 0a 20 20 20 20 | 63 68 61 72 20 6f 6c 64 |le;. |char old|
|00001930| 43 6f 6c 6f 72 4e 61 6d | 65 5b 34 30 5d 2c 20 6e |ColorNam|e[40], n|
|00001940| 65 77 43 6f 6c 6f 72 4e | 61 6d 65 5b 34 30 5d 3b |ewColorN|ame[40];|
|00001950| 0a 0a 20 20 20 20 74 68 | 65 46 69 6c 65 20 3d 20 |.. th|eFile = |
|00001960| 66 6f 70 65 6e 28 66 69 | 6c 65 4e 61 6d 65 2c 20 |fopen(fi|leName, |
|00001970| 22 72 22 29 3b 0a 20 20 | 20 20 69 66 20 28 74 68 |"r");. | if (th|
|00001980| 65 46 69 6c 65 20 3d 3d | 20 28 46 49 4c 45 20 2a |eFile ==| (FILE *|
|00001990| 29 20 4e 55 4c 4c 29 20 | 7b 0a 09 72 65 74 75 72 |) NULL) |{..retur|
|000019a0| 6e 20 2d 31 3b 0a 20 20 | 20 20 7d 0a 20 20 20 20 |n -1;. | }. |
|000019b0| 77 68 69 6c 65 20 28 66 | 73 63 61 6e 66 28 74 68 |while (f|scanf(th|
|000019c0| 65 46 69 6c 65 2c 20 22 | 25 73 20 25 73 22 2c 20 |eFile, "|%s %s", |
|000019d0| 6f 6c 64 43 6f 6c 6f 72 | 4e 61 6d 65 2c 20 6e 65 |oldColor|Name, ne|
|000019e0| 77 43 6f 6c 6f 72 4e 61 | 6d 65 29 20 21 3d 20 45 |wColorNa|me) != E|
|000019f0| 4f 46 29 20 7b 0a 09 53 | 65 74 43 6f 6c 6f 72 28 |OF) {..S|etColor(|
|00001a00| 6f 6c 64 43 6f 6c 6f 72 | 4e 61 6d 65 2c 20 6e 65 |oldColor|Name, ne|
|00001a10| 77 43 6f 6c 6f 72 4e 61 | 6d 65 29 3b 0a 20 20 20 |wColorNa|me);. |
|00001a20| 20 7d 0a 20 20 20 20 66 | 63 6c 6f 73 65 28 74 68 | }. f|close(th|
|00001a30| 65 46 69 6c 65 29 3b 0a | 20 20 20 20 72 65 74 75 |eFile);.| retu|
|00001a40| 72 6e 20 30 3b 0a 7d 0a | 0a 6d 61 69 6e 28 61 72 |rn 0;.}.|.main(ar|
|00001a50| 67 63 2c 20 61 72 67 76 | 29 0a 20 20 20 20 69 6e |gc, argv|). in|
|00001a60| 74 20 61 72 67 63 3b 0a | 20 20 20 20 63 68 61 72 |t argc;.| char|
|00001a70| 20 2a 2a 61 72 67 76 3b | 0a 7b 0a 20 20 20 20 72 | **argv;|.{. r|
|00001a80| 65 67 69 73 74 65 72 20 | 69 6e 74 20 69 3b 0a 20 |egister |int i;. |
|00001a90| 20 20 20 72 65 67 69 73 | 74 65 72 20 63 68 61 72 | regis|ter char|
|00001aa0| 20 2a 62 75 66 66 65 72 | 3b 0a 0a 20 20 20 20 75 | *buffer|;.. u|
|00001ab0| 6e 73 69 67 6e 65 64 20 | 62 75 66 66 65 72 5f 73 |nsigned |buffer_s|
|00001ac0| 69 7a 65 3b 0a 20 20 20 | 20 69 6e 74 20 76 69 72 |ize;. | int vir|
|00001ad0| 74 5f 78 2c 20 76 69 72 | 74 5f 79 3b 0a 20 20 20 |t_x, vir|t_y;. |
|00001ae0| 20 69 6e 74 20 76 69 72 | 74 5f 77 69 64 74 68 2c | int vir|t_width,|
|00001af0| 20 76 69 72 74 5f 68 65 | 69 67 68 74 3b 0a 20 20 | virt_he|ight;. |
|00001b00| 20 20 63 68 61 72 20 2a | 73 74 72 5f 69 6e 64 65 | char *|str_inde|
|00001b10| 78 3b 0a 20 20 20 20 63 | 68 61 72 20 2a 66 69 6c |x;. c|har *fil|
|00001b20| 65 5f 6e 61 6d 65 3b 0a | 20 20 20 20 63 68 61 72 |e_name;.| char|
|00001b30| 20 2a 64 69 73 70 6c 61 | 79 3b 0a 20 20 20 20 63 | *displa|y;. c|
|00001b40| 68 61 72 20 2a 77 69 6e | 5f 6e 61 6d 65 3b 0a 20 |har *win|_name;. |
|00001b50| 20 20 20 63 68 61 72 20 | 2a 67 65 74 65 6e 76 28 | char |*getenv(|
|00001b60| 29 3b 0a 20 20 20 20 42 | 6f 6f 6c 20 64 65 62 75 |);. B|ool debu|
|00001b70| 67 20 3d 20 46 41 4c 53 | 45 3b 0a 20 20 20 20 42 |g = FALS|E;. B|
|00001b80| 6f 6f 6c 20 73 74 61 6e | 64 61 72 64 5f 6f 75 74 |ool stan|dard_out|
|00001b90| 20 3d 20 54 52 55 45 3b | 0a 0a 20 20 20 20 44 69 | = TRUE;|.. Di|
|00001ba0| 73 70 6c 61 79 20 2a 64 | 70 79 3b 0a 20 20 20 20 |splay *d|py;. |
|00001bb0| 57 69 6e 64 6f 77 20 74 | 61 72 67 65 74 5f 77 69 |Window t|arget_wi|
|00001bc0| 6e 3b 0a 20 20 20 20 57 | 69 6e 64 6f 77 20 69 6d |n;. W|indow im|
|00001bd0| 61 67 65 5f 77 69 6e 3b | 0a 20 20 20 20 57 69 6e |age_win;|. Win|
|00001be0| 64 6f 77 49 6e 66 6f 20 | 77 69 6e 5f 69 6e 66 6f |dowInfo |win_info|
|00001bf0| 3b 0a 20 20 20 20 43 75 | 72 73 6f 72 20 63 75 72 |;. Cu|rsor cur|
|00001c00| 73 6f 72 3b 0a 20 20 20 | 20 58 42 75 74 74 6f 6e |sor;. | XButton|
|00001c10| 45 76 65 6e 74 20 72 65 | 70 3b 0a 0a 20 20 20 20 |Event re|p;.. |
|00001c20| 46 49 4c 45 20 2a 6f 75 | 74 5f 66 69 6c 65 20 3d |FILE *ou|t_file =|
|00001c30| 20 73 74 64 6f 75 74 3b | 0a 0a 20 20 20 20 2f 2a | stdout;|.. /*|
|00001c40| 0a 20 20 20 20 20 2a 20 | 53 65 74 20 70 72 6f 67 |. * |Set prog|
|00001c50| 72 61 6d 20 6e 61 6d 65 | 20 66 6f 72 20 65 72 72 |ram name| for err|
|00001c60| 6f 72 73 20 61 6e 64 20 | 67 65 74 74 69 6e 67 20 |ors and |getting |
|00001c70| 64 65 66 61 75 6c 74 73 | 2e 0a 20 20 20 20 20 2a |defaults|.. *|
|00001c80| 20 50 72 6f 67 72 61 6d | 4e 61 6d 65 20 69 73 20 | Program|Name is |
|00001c90| 73 69 6d 70 6c 79 20 6f | 75 72 20 30 74 68 20 61 |simply o|ur 0th a|
|00001ca0| 72 67 75 6d 65 6e 74 20 | 77 69 74 68 20 61 6e 79 |rgument |with any|
|00001cb0| 20 6c 65 61 64 69 6e 67 | 20 70 61 74 68 0a 20 20 | leading| path. |
|00001cc0| 20 20 20 2a 20 73 74 72 | 69 70 70 65 64 20 6f 66 | * str|ipped of|
|00001cd0| 66 2e 0a 20 20 20 20 20 | 2a 2f 0a 20 20 20 20 50 |f.. |*/. P|
|00001ce0| 72 6f 67 72 61 6d 4e 61 | 6d 65 20 3d 20 72 69 6e |rogramNa|me = rin|
|00001cf0| 64 65 78 20 28 61 72 67 | 76 5b 30 5d 2c 20 27 2f |dex (arg|v[0], '/|
|00001d00| 27 29 3b 0a 20 20 20 20 | 69 66 20 28 50 72 6f 67 |');. |if (Prog|
|00001d10| 72 61 6d 4e 61 6d 65 2b | 2b 20 3d 3d 20 28 63 68 |ramName+|+ == (ch|
|00001d20| 61 72 20 2a 29 20 4e 55 | 4c 4c 29 20 7b 0a 09 50 |ar *) NU|LL) {..P|
|00001d30| 72 6f 67 72 61 6d 4e 61 | 6d 65 20 3d 20 61 72 67 |rogramNa|me = arg|
|00001d40| 76 5b 30 5d 3b 0a 20 20 | 20 20 7d 0a 0a 20 20 20 |v[0];. | }.. |
|00001d50| 20 2f 2a 0a 20 20 20 20 | 20 2a 20 4f 70 65 6e 20 | /*. | * Open |
|00001d60| 74 68 65 20 64 69 73 70 | 6c 61 79 2e 0a 20 20 20 |the disp|lay.. |
|00001d70| 20 20 2a 2f 0a 20 20 20 | 20 64 69 73 70 6c 61 79 | */. | display|
|00001d80| 20 3d 20 67 65 74 65 6e | 76 28 22 44 49 53 50 4c | = geten|v("DISPL|
|00001d90| 41 59 22 29 3b 0a 20 20 | 20 20 69 66 20 28 28 64 |AY");. | if ((d|
|00001da0| 70 79 20 3d 20 58 4f 70 | 65 6e 44 69 73 70 6c 61 |py = XOp|enDispla|
|00001db0| 79 28 64 69 73 70 6c 61 | 79 29 29 20 3d 3d 20 4e |y(displa|y)) == N|
|00001dc0| 55 4c 4c 29 20 7b 0a 20 | 20 20 20 20 20 20 20 66 |ULL) {. | f|
|00001dd0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 20 22 |printf(s|tderr, "|
|00001de0| 25 73 3a 20 43 61 6e 27 | 74 20 6f 70 65 6e 20 64 |%s: Can'|t open d|
|00001df0| 69 73 70 6c 61 79 20 27 | 25 73 27 5c 6e 22 2c 0a |isplay '|%s'\n",.|
|00001e00| 09 09 61 72 67 76 5b 30 | 5d 2c 20 58 44 69 73 70 |..argv[0|], XDisp|
|00001e10| 6c 61 79 4e 61 6d 65 28 | 64 69 73 70 6c 61 79 29 |layName(|display)|
|00001e20| 29 3b 0a 09 65 78 69 74 | 28 31 29 3b 0a 20 20 20 |);..exit|(1);. |
|00001e30| 20 7d 0a 0a 20 20 20 20 | 2f 2a 20 49 6e 69 74 69 | }.. |/* Initi|
|00001e40| 61 6c 69 7a 65 20 63 6f | 6c 6f 72 6d 61 70 20 2a |alize co|lormap *|
|00001e50| 2f 0a 20 20 20 20 66 6f | 72 20 28 69 3d 30 3b 20 |/. fo|r (i=0; |
|00001e60| 69 3c 20 32 35 36 3b 20 | 69 2b 2b 29 20 7b 0a 09 |i< 256; |i++) {..|
|00001e70| 63 6f 6c 6f 72 4d 61 70 | 5b 69 5d 20 3d 20 2d 31 |colorMap|[i] = -1|
|00001e80| 3b 0a 20 20 20 20 7d 20 | 20 20 0a 20 20 20 20 47 |;. } | . G|
|00001e90| 65 74 44 65 66 61 75 6c | 74 73 28 29 3b 0a 20 20 |etDefaul|ts();. |
|00001ea0| 20 20 69 66 20 28 63 6f | 6c 6f 72 4d 61 70 46 69 | if (co|lorMapFi|
|00001eb0| 6c 65 20 21 3d 20 28 63 | 68 61 72 20 2a 29 20 4e |le != (c|har *) N|
|00001ec0| 55 4c 4c 29 20 7b 0a 09 | 69 66 20 28 72 65 61 64 |ULL) {..|if (read|
|00001ed0| 43 6f 6c 6f 72 4d 61 70 | 46 69 6c 65 28 63 6f 6c |ColorMap|File(col|
|00001ee0| 6f 72 4d 61 70 46 69 6c | 65 29 20 3d 3d 20 2d 31 |orMapFil|e) == -1|
|00001ef0| 29 20 7b 0a 09 20 20 20 | 20 66 70 72 69 6e 74 66 |) {.. | fprintf|
|00001f00| 28 73 74 64 65 72 72 2c | 20 22 25 73 3a 20 43 61 |(stderr,| "%s: Ca|
|00001f10| 6e 27 74 20 72 65 61 64 | 20 63 6f 6c 6f 72 6d 61 |n't read| colorma|
|00001f20| 70 20 66 69 6c 65 20 27 | 25 73 27 5c 6e 22 2c 0a |p file '|%s'\n",.|
|00001f30| 09 09 20 20 20 20 61 72 | 67 76 5b 30 5d 2c 20 63 |.. ar|gv[0], c|
|00001f40| 6f 6c 6f 72 4d 61 70 46 | 69 6c 65 29 3b 0a 09 20 |olorMapF|ile);.. |
|00001f50| 20 20 20 66 70 72 69 6e | 74 66 28 73 74 64 65 72 | fprin|tf(stder|
|00001f60| 72 2c 20 22 44 75 6d 70 | 69 6e 67 20 77 69 74 68 |r, "Dump|ing with|
|00001f70| 20 64 65 66 61 75 6c 74 | 20 63 6f 6c 6f 72 6d 61 | default| colorma|
|00001f80| 70 2e 5c 6e 22 29 3b 0a | 09 7d 0a 20 20 20 20 7d |p.\n");.|.}. }|
|00001f90| 0a 0a 20 20 20 20 66 6f | 72 20 28 69 20 3d 20 31 |.. fo|r (i = 1|
|00001fa0| 3b 20 69 20 3c 20 61 72 | 67 63 3b 20 69 2b 2b 29 |; i < ar|gc; i++)|
|00001fb0| 20 7b 0a 09 73 74 72 5f | 69 6e 64 65 78 20 3d 20 | {..str_|index = |
|00001fc0| 28 63 68 61 72 20 2a 29 | 69 6e 64 65 78 20 28 61 |(char *)|index (a|
|00001fd0| 72 67 76 5b 69 5d 2c 20 | 27 3a 27 29 3b 0a 09 69 |rgv[i], |':');..i|
|00001fe0| 66 28 73 74 72 5f 69 6e | 64 65 78 20 21 3d 20 28 |f(str_in|dex != (|
|00001ff0| 63 68 61 72 20 2a 29 4e | 55 4c 4c 29 20 7b 0a 09 |char *)N|ULL) {..|
|00002000| 20 20 20 20 58 43 6c 6f | 73 65 44 69 73 70 6c 61 | XClo|seDispla|
|00002010| 79 28 64 70 79 29 3b 0a | 09 20 20 20 20 69 66 20 |y(dpy);.|. if |
|00002020| 28 28 64 70 79 20 3d 20 | 58 4f 70 65 6e 44 69 73 |((dpy = |XOpenDis|
|00002030| 70 6c 61 79 28 61 72 67 | 76 5b 69 5d 29 29 20 3d |play(arg|v[i])) =|
|00002040| 3d 20 4e 55 4c 4c 29 20 | 7b 0a 09 09 66 70 72 69 |= NULL) |{...fpri|
|00002050| 6e 74 66 28 73 74 64 65 | 72 72 2c 20 22 25 73 3a |ntf(stde|rr, "%s:|
|00002060| 20 43 61 6e 27 74 20 6f | 70 65 6e 20 64 69 73 70 | Can't o|pen disp|
|00002070| 6c 61 79 20 27 25 73 27 | 5c 6e 22 2c 0a 09 09 09 |lay '%s'|\n",....|
|00002080| 61 72 67 76 5b 30 5d 2c | 20 58 44 69 73 70 6c 61 |argv[0],| XDispla|
|00002090| 79 4e 61 6d 65 28 64 69 | 73 70 6c 61 79 29 29 3b |yName(di|splay));|
|000020a0| 0a 09 09 65 78 69 74 28 | 31 29 3b 0a 09 20 20 20 |...exit(|1);.. |
|000020b0| 20 7d 0a 09 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 | }.. |continue|
|000020c0| 3b 0a 20 20 20 20 20 20 | 20 20 7d 0a 09 73 74 72 |;. | }..str|
|000020d0| 5f 69 6e 64 65 78 20 3d | 20 28 63 68 61 72 20 2a |_index =| (char *|
|000020e0| 29 20 69 6e 64 65 78 20 | 28 61 72 67 76 20 5b 69 |) index |(argv [i|
|000020f0| 5d 2c 20 27 2d 27 29 3b | 0a 09 69 66 20 28 73 74 |], '-');|..if (st|
|00002100| 72 5f 69 6e 64 65 78 20 | 3d 3d 20 28 63 68 61 72 |r_index |== (char|
|00002110| 20 2a 29 4e 55 4c 4c 29 | 20 53 79 6e 74 61 78 28 | *)NULL)| Syntax(|
|00002120| 61 72 67 76 5b 30 5d 29 | 3b 0a 09 69 66 20 28 73 |argv[0])|;..if (s|
|00002130| 74 72 6e 63 6d 70 28 61 | 72 67 76 5b 69 5d 2c 20 |trncmp(a|rgv[i], |
|00002140| 22 2d 6e 6f 62 64 72 73 | 22 2c 20 37 29 20 3d 3d |"-nobdrs|", 7) ==|
|00002150| 20 30 29 20 7b 0a 09 20 | 20 20 20 6e 6f 62 64 72 | 0) {.. | nobdr|
|00002160| 73 20 3d 20 54 52 55 45 | 3b 0a 09 20 20 20 20 63 |s = TRUE|;.. c|
|00002170| 6f 6e 74 69 6e 75 65 3b | 0a 09 7d 0a 09 69 66 20 |ontinue;|..}..if |
|00002180| 28 73 74 72 6e 63 6d 70 | 28 61 72 67 76 5b 69 5d |(strncmp|(argv[i]|
|00002190| 2c 20 22 2d 64 65 62 75 | 67 22 2c 20 36 29 20 3d |, "-debu|g", 6) =|
|000021a0| 3d 20 30 29 20 7b 0a 09 | 20 20 20 20 64 65 62 75 |= 0) {..| debu|
|000021b0| 67 20 3d 20 54 52 55 45 | 3b 0a 09 20 20 20 20 63 |g = TRUE|;.. c|
|000021c0| 6f 6e 74 69 6e 75 65 3b | 0a 09 7d 0a 09 69 66 20 |ontinue;|..}..if |
|000021d0| 28 73 74 72 6e 63 6d 70 | 28 61 72 67 76 5b 69 5d |(strncmp|(argv[i]|
|000021e0| 2c 20 22 2d 68 65 6c 70 | 22 2c 20 35 29 20 3d 3d |, "-help|", 5) ==|
|000021f0| 20 30 29 20 7b 0a 09 20 | 20 20 20 53 79 6e 74 61 | 0) {.. | Synta|
|00002200| 78 28 61 72 67 76 5b 30 | 5d 29 3b 0a 09 7d 0a 09 |x(argv[0|]);..}..|
|00002210| 69 66 20 28 73 74 72 6e | 63 6d 70 28 61 72 67 76 |if (strn|cmp(argv|
|00002220| 5b 69 5d 2c 20 22 2d 6f | 75 74 22 2c 20 34 29 20 |[i], "-o|ut", 4) |
|00002230| 3d 3d 20 30 29 20 7b 0a | 09 20 20 20 20 69 66 20 |== 0) {.|. if |
|00002240| 28 2b 2b 69 20 3e 3d 20 | 61 72 67 63 29 20 53 79 |(++i >= |argc) Sy|
|00002250| 6e 74 61 78 28 61 72 67 | 76 5b 30 5d 29 3b 0a 09 |ntax(arg|v[0]);..|
|00002260| 20 20 20 20 66 69 6c 65 | 5f 6e 61 6d 65 20 3d 20 | file|_name = |
|00002270| 61 72 67 76 5b 69 5d 3b | 0a 09 20 20 20 20 73 74 |argv[i];|.. st|
|00002280| 61 6e 64 61 72 64 5f 6f | 75 74 20 3d 20 46 41 4c |andard_o|ut = FAL|
|00002290| 53 45 3b 0a 09 20 20 20 | 20 63 6f 6e 74 69 6e 75 |SE;.. | continu|
|000022a0| 65 3b 0a 09 7d 0a 20 20 | 20 20 09 69 66 20 28 73 |e;..}. | .if (s|
|000022b0| 74 72 6e 63 6d 70 28 61 | 72 67 76 5b 69 5d 2c 20 |trncmp(a|rgv[i], |
|000022c0| 22 2d 72 6f 74 22 2c 20 | 34 29 20 3d 3d 20 30 29 |"-rot", |4) == 0)|
|000022d0| 20 7b 0a 09 20 20 20 20 | 72 6f 74 61 74 69 6f 6e | {.. |rotation|
|000022e0| 20 3d 20 61 74 6f 66 28 | 61 72 67 76 5b 2b 2b 69 | = atof(|argv[++i|
|000022f0| 5d 29 3b 0a 09 20 20 20 | 20 63 6f 6e 74 69 6e 75 |]);.. | continu|
|00002300| 65 3b 0a 09 7d 0a 09 69 | 66 20 28 73 74 72 6e 63 |e;..}..i|f (strnc|
|00002310| 6d 70 28 61 72 67 76 5b | 69 5d 2c 20 22 2d 73 78 |mp(argv[|i], "-sx|
|00002320| 22 2c 20 34 29 20 3d 3d | 20 30 29 20 7b 0a 09 20 |", 4) ==| 0) {.. |
|00002330| 20 20 20 73 63 61 6c 65 | 58 20 3d 20 61 74 6f 66 | scale|X = atof|
|00002340| 28 61 72 67 76 5b 2b 2b | 69 5d 29 3b 0a 09 20 20 |(argv[++|i]);.. |
|00002350| 20 20 63 6f 6e 74 69 6e | 75 65 3b 0a 09 7d 0a 09 | contin|ue;..}..|
|00002360| 69 66 20 28 73 74 72 6e | 63 6d 70 28 61 72 67 76 |if (strn|cmp(argv|
|00002370| 5b 69 5d 2c 20 22 2d 73 | 79 22 2c 20 34 29 20 3d |[i], "-s|y", 4) =|
|00002380| 3d 20 30 29 20 7b 0a 09 | 20 20 20 20 73 63 61 6c |= 0) {..| scal|
|00002390| 65 59 20 3d 20 61 74 6f | 66 28 61 72 67 76 5b 2b |eY = ato|f(argv[+|
|000023a0| 2b 69 5d 29 3b 0a 09 20 | 20 20 20 63 6f 6e 74 69 |+i]);.. | conti|
|000023b0| 6e 75 65 3b 0a 09 7d 09 | 0a 09 69 66 20 28 73 74 |nue;..}.|..if (st|
|000023c0| 72 6e 63 6d 70 28 61 72 | 67 76 5b 69 5d 2c 20 22 |rncmp(ar|gv[i], "|
|000023d0| 2d 74 78 22 2c 20 34 29 | 20 3d 3d 20 30 29 20 7b |-tx", 4)| == 0) {|
|000023e0| 0a 09 20 20 20 20 74 72 | 61 6e 73 6c 61 74 65 58 |.. tr|anslateX|
|000023f0| 20 3d 20 61 74 6f 66 28 | 61 72 67 76 5b 2b 2b 69 | = atof(|argv[++i|
|00002400| 5d 29 3b 0a 09 20 20 20 | 20 63 6f 6e 74 69 6e 75 |]);.. | continu|
|00002410| 65 3b 0a 09 7d 0a 09 69 | 66 20 28 73 74 72 6e 63 |e;..}..i|f (strnc|
|00002420| 6d 70 28 61 72 67 76 5b | 69 5d 2c 20 22 2d 74 79 |mp(argv[|i], "-ty|
|00002430| 22 2c 20 34 29 20 3d 3d | 20 30 29 20 7b 0a 09 20 |", 4) ==| 0) {.. |
|00002440| 20 20 20 74 72 61 6e 73 | 6c 61 74 65 59 20 3d 20 | trans|lateY = |
|00002450| 61 74 6f 66 28 61 72 67 | 76 5b 2b 2b 69 5d 29 3b |atof(arg|v[++i]);|
|00002460| 0a 09 20 20 20 20 63 6f | 6e 74 69 6e 75 65 3b 0a |.. co|ntinue;.|
|00002470| 09 7d 0a 09 69 66 20 28 | 73 74 72 6e 63 6d 70 28 |.}..if (|strncmp(|
|00002480| 61 72 67 76 5b 69 5d 2c | 20 22 2d 6e 6f 62 64 72 |argv[i],| "-nobdr|
|00002490| 73 22 2c 20 37 29 20 3d | 3d 20 30 29 20 7b 0a 09 |s", 7) =|= 0) {..|
|000024a0| 20 20 20 20 6e 6f 62 64 | 72 73 20 3d 20 54 52 55 | nobd|rs = TRU|
|000024b0| 45 3b 0a 09 20 20 20 20 | 63 6f 6e 74 69 6e 75 65 |E;.. |continue|
|000024c0| 3b 0a 09 7d 0a 09 53 79 | 6e 74 61 78 28 61 72 67 |;..}..Sy|ntax(arg|
|000024d0| 76 5b 30 5d 29 3b 0a 20 | 20 20 20 7d 0a 20 20 20 |v[0]);. | }. |
|000024e0| 20 0a 20 20 20 20 69 66 | 20 28 21 73 74 61 6e 64 | . if| (!stand|
|000024f0| 61 72 64 5f 6f 75 74 29 | 20 7b 0a 09 2f 2a 0a 09 |ard_out)| {../*..|
|00002500| 20 2a 20 4f 70 65 6e 20 | 74 68 65 20 6f 75 74 70 | * Open |the outp|
|00002510| 75 74 20 66 69 6c 65 2e | 0a 09 20 2a 2f 0a 09 69 |ut file.|.. */..i|
|00002520| 66 28 28 6f 75 74 5f 66 | 69 6c 65 20 3d 20 66 6f |f((out_f|ile = fo|
|00002530| 70 65 6e 28 66 69 6c 65 | 5f 6e 61 6d 65 2c 20 22 |pen(file|_name, "|
|00002540| 77 22 29 29 20 3d 3d 20 | 4e 55 4c 4c 29 0a 09 20 |w")) == |NULL).. |
|00002550| 20 45 72 72 6f 72 28 22 | 43 61 6e 27 74 20 6f 70 | Error("|Can't op|
|00002560| 65 6e 20 6f 75 74 70 75 | 74 20 66 69 6c 65 20 61 |en outpu|t file a|
|00002570| 73 20 73 70 65 63 69 66 | 69 65 64 2e 22 29 3b 0a |s specif|ied.");.|
|00002580| 20 20 20 20 7d 0a 0a 20 | 20 20 20 2f 2a 0a 20 20 | }.. | /*. |
|00002590| 20 20 20 2a 20 53 74 6f | 72 65 20 74 68 65 20 63 | * Sto|re the c|
|000025a0| 75 72 73 6f 72 20 69 6e | 63 61 73 65 20 77 65 20 |ursor in|case we |
|000025b0| 6e 65 65 64 20 69 74 2e | 0a 20 20 20 20 20 2a 2f |need it.|. */|
|000025c0| 0a 20 20 20 20 69 66 20 | 28 64 65 62 75 67 29 20 |. if |(debug) |
|000025d0| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 22 |fprintf(|stderr,"|
|000025e0| 78 77 70 73 3a 20 53 74 | 6f 72 69 6e 67 20 74 61 |xwps: St|oring ta|
|000025f0| 72 67 65 74 20 63 75 72 | 73 6f 72 2e 5c 6e 22 29 |rget cur|sor.\n")|
|00002600| 3b 0a 20 20 20 20 69 66 | 28 28 63 75 72 73 6f 72 |;. if|((cursor|
|00002610| 20 3d 20 58 43 72 65 61 | 74 65 43 75 72 73 6f 72 | = XCrea|teCursor|
|00002620| 28 0a 20 20 20 20 09 74 | 61 72 67 65 74 5f 77 69 |(. .t|arget_wi|
|00002630| 64 74 68 2c 20 74 61 72 | 67 65 74 5f 68 65 69 67 |dth, tar|get_heig|
|00002640| 68 74 2c 20 0a 20 20 20 | 20 09 74 61 72 67 65 74 |ht, . | .target|
|00002650| 5f 62 69 74 73 2c 20 74 | 61 72 67 65 74 5f 6d 61 |_bits, t|arget_ma|
|00002660| 73 6b 5f 62 69 74 73 2c | 20 0a 09 38 2c 20 38 2c |sk_bits,| ..8, 8,|
|00002670| 0a 09 42 6c 61 63 6b 50 | 69 78 65 6c 2c 20 57 68 |..BlackP|ixel, Wh|
|00002680| 69 74 65 50 69 78 65 6c | 2c 0a 09 47 58 63 6f 70 |itePixel|,..GXcop|
|00002690| 79 0a 20 20 20 20 29 29 | 20 3d 3d 20 46 41 49 4c |y. ))| == FAIL|
|000026a0| 55 52 45 29 0a 09 45 72 | 72 6f 72 28 22 45 72 72 |URE)..Er|ror("Err|
|000026b0| 6f 72 20 6f 63 63 75 72 | 65 64 20 77 68 69 6c 65 |or occur|ed while|
|000026c0| 20 74 72 79 69 6e 67 20 | 74 6f 20 73 74 6f 72 65 | trying |to store|
|000026d0| 20 74 61 72 67 65 74 20 | 63 75 72 73 6f 72 2e 22 | target |cursor."|
|000026e0| 29 3b 0a 0a 20 20 20 20 | 0a 20 20 20 20 2f 2a 0a |);.. |. /*.|
|000026f0| 20 20 20 20 20 2a 20 4c | 65 74 20 74 68 65 20 75 | * L|et the u|
|00002700| 73 65 72 20 73 65 6c 65 | 63 74 20 74 68 65 20 74 |ser sele|ct the t|
|00002710| 61 72 67 65 74 20 77 69 | 6e 64 6f 77 2e 0a 20 20 |arget wi|ndow.. |
|00002720| 20 20 20 2a 2f 0a 20 20 | 20 20 69 66 28 58 47 72 | */. | if(XGr|
|00002730| 61 62 4d 6f 75 73 65 28 | 52 6f 6f 74 57 69 6e 64 |abMouse(|RootWind|
|00002740| 6f 77 2c 20 63 75 72 73 | 6f 72 2c 20 42 75 74 74 |ow, curs|or, Butt|
|00002750| 6f 6e 50 72 65 73 73 65 | 64 29 20 3d 3d 20 46 41 |onPresse|d) == FA|
|00002760| 49 4c 55 52 45 29 0a 20 | 20 20 20 20 20 45 72 72 |ILURE). | Err|
|00002770| 6f 72 28 22 43 61 6e 27 | 74 20 67 72 61 62 20 74 |or("Can'|t grab t|
|00002780| 68 65 20 6d 6f 75 73 65 | 2e 22 29 3b 0a 20 20 20 |he mouse|.");. |
|00002790| 20 58 4e 65 78 74 45 76 | 65 6e 74 28 26 72 65 70 | XNextEv|ent(&rep|
|000027a0| 29 3b 0a 20 20 20 20 58 | 55 6e 67 72 61 62 4d 6f |);. X|UngrabMo|
|000027b0| 75 73 65 28 29 3b 0a 20 | 20 20 20 74 61 72 67 65 |use();. | targe|
|000027c0| 74 5f 77 69 6e 20 3d 20 | 72 65 70 2e 73 75 62 77 |t_win = |rep.subw|
|000027d0| 69 6e 64 6f 77 3b 0a 20 | 20 20 20 69 66 20 28 74 |indow;. | if (t|
|000027e0| 61 72 67 65 74 5f 77 69 | 6e 20 3d 3d 20 30 29 20 |arget_wi|n == 0) |
|000027f0| 7b 0a 09 2f 2a 0a 09 20 | 2a 20 54 68 65 20 75 73 |{../*.. |* The us|
|00002800| 65 72 20 6d 75 73 74 20 | 68 61 76 65 20 69 6e 64 |er must |have ind|
|00002810| 69 63 61 74 65 64 20 74 | 68 65 20 72 6f 6f 74 20 |icated t|he root |
|00002820| 77 69 6e 64 6f 77 2e 0a | 09 20 2a 2f 0a 09 69 66 |window..|. */..if|
|00002830| 20 28 64 65 62 75 67 29 | 20 66 70 72 69 6e 74 66 | (debug)| fprintf|
|00002840| 28 73 74 64 65 72 72 2c | 22 78 77 70 73 3a 20 52 |(stderr,|"xwps: R|
|00002850| 6f 6f 74 20 77 69 6e 64 | 6f 77 20 73 65 6c 65 63 |oot wind|ow selec|
|00002860| 74 65 64 20 61 73 20 74 | 61 72 67 65 74 2e 5c 6e |ted as t|arget.\n|
|00002870| 22 29 3b 0a 09 74 61 72 | 67 65 74 5f 77 69 6e 20 |");..tar|get_win |
|00002880| 3d 20 52 6f 6f 74 57 69 | 6e 64 6f 77 3b 0a 20 20 |= RootWi|ndow;. |
|00002890| 20 20 7d 0a 20 20 20 20 | 65 6c 73 65 20 69 66 20 | }. |else if |
|000028a0| 28 64 65 62 75 67 29 20 | 0a 20 20 20 20 20 66 70 |(debug) |. fp|
|000028b0| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 0a 09 20 |rintf(st|derr,.. |
|000028c0| 20 20 20 20 22 78 77 70 | 73 3a 20 57 69 6e 64 6f | "xwp|s: Windo|
|000028d0| 77 20 30 78 25 78 20 73 | 65 6c 65 63 74 65 64 20 |w 0x%x s|elected |
|000028e0| 61 73 20 74 61 72 67 65 | 74 2e 5c 6e 22 2c 20 74 |as targe|t.\n", t|
|000028f0| 61 72 67 65 74 5f 77 69 | 6e 29 3b 0a 0a 20 20 20 |arget_wi|n);.. |
|00002900| 20 2f 2a 0a 20 20 20 20 | 20 2a 20 49 6e 66 6f 72 | /*. | * Infor|
|00002910| 6d 20 74 68 65 20 75 73 | 65 72 20 6e 6f 74 20 74 |m the us|er not t|
|00002920| 6f 20 61 6c 74 65 72 20 | 74 68 65 20 73 63 72 65 |o alter |the scre|
|00002930| 65 6e 2e 0a 20 20 20 20 | 20 2a 2f 0a 20 20 20 20 |en.. | */. |
|00002940| 58 46 65 65 70 28 46 45 | 45 50 5f 56 4f 4c 55 4d |XFeep(FE|EP_VOLUM|
|00002950| 45 29 3b 0a 0a 20 20 20 | 20 0a 20 20 20 20 2f 2a |E);.. | . /*|
|00002960| 0a 20 20 20 20 20 2a 20 | 47 65 74 20 74 68 65 20 |. * |Get the |
|00002970| 70 61 72 61 6d 65 74 65 | 72 73 20 6f 66 20 74 68 |paramete|rs of th|
|00002980| 65 20 77 69 6e 64 6f 77 | 20 62 65 69 6e 67 20 64 |e window| being d|
|00002990| 75 6d 70 65 64 2e 0a 20 | 20 20 20 20 2a 2f 0a 20 |umped.. | */. |
|000029a0| 20 20 20 69 66 20 28 64 | 65 62 75 67 29 20 66 70 | if (d|ebug) fp|
|000029b0| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 78 77 |rintf(st|derr,"xw|
|000029c0| 70 73 3a 20 47 65 74 74 | 69 6e 67 20 74 61 72 67 |ps: Gett|ing targ|
|000029d0| 65 74 20 77 69 6e 64 6f | 77 20 69 6e 66 6f 72 6d |et windo|w inform|
|000029e0| 61 74 69 6f 6e 2e 5c 6e | 22 29 3b 0a 0a 20 20 20 |ation.\n|");.. |
|000029f0| 20 69 66 28 58 51 75 65 | 72 79 57 69 6e 64 6f 77 | if(XQue|ryWindow|
|00002a00| 28 74 61 72 67 65 74 5f | 77 69 6e 2c 20 26 77 69 |(target_|win, &wi|
|00002a10| 6e 5f 69 6e 66 6f 29 20 | 3d 3d 20 46 41 49 4c 55 |n_info) |== FAILU|
|00002a20| 52 45 29 20 0a 20 20 20 | 20 20 45 72 72 6f 72 28 |RE) . | Error(|
|00002a30| 22 43 61 6e 27 74 20 71 | 75 65 72 79 20 74 61 72 |"Can't q|uery tar|
|00002a40| 67 65 74 20 77 69 6e 64 | 6f 77 2e 22 29 3b 0a 20 |get wind|ow.");. |
|00002a50| 20 20 20 69 66 28 58 46 | 65 74 63 68 4e 61 6d 65 | if(XF|etchName|
|00002a60| 28 74 61 72 67 65 74 5f | 77 69 6e 2c 20 26 77 69 |(target_|win, &wi|
|00002a70| 6e 5f 6e 61 6d 65 29 20 | 3d 3d 20 46 41 49 4c 55 |n_name) |== FAILU|
|00002a80| 52 45 29 0a 20 20 20 20 | 20 45 72 72 6f 72 28 22 |RE). | Error("|
|00002a90| 43 61 6e 27 74 20 66 65 | 74 63 68 20 74 61 72 67 |Can't fe|tch targ|
|00002aa0| 65 74 20 77 69 6e 64 6f | 77 20 6e 61 6d 65 2e 22 |et windo|w name."|
|00002ab0| 29 3b 0a 0a 20 20 20 20 | 2f 2a 0a 20 20 20 20 20 |);.. |/*. |
|00002ac0| 2a 20 43 61 6c 63 75 6c | 61 74 65 20 74 68 65 20 |* Calcul|ate the |
|00002ad0| 76 69 72 74 75 61 6c 20 | 78 2c 20 79 2c 20 77 69 |virtual |x, y, wi|
|00002ae0| 64 74 68 20 61 6e 64 20 | 68 65 69 67 68 74 20 6f |dth and |height o|
|00002af0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 70 61 6e |f the wi|ndow pan|
|00002b00| 65 20 69 6d 61 67 65 0a | 20 20 20 20 20 2a 20 28 |e image.| * (|
|00002b10| 74 68 69 73 20 64 65 70 | 65 6e 64 73 20 6f 6e 20 |this dep|ends on |
|00002b20| 77 65 74 68 65 72 20 6f | 72 20 6e 6f 74 20 74 68 |wether o|r not th|
|00002b30| 65 20 62 6f 72 64 65 72 | 73 20 61 72 65 20 69 6e |e border|s are in|
|00002b40| 63 6c 75 64 65 64 2e 0a | 20 20 20 20 20 2a 2f 0a |cluded..| */.|
|00002b50| 20 20 20 20 69 66 20 28 | 6e 6f 62 64 72 73 29 20 | if (|nobdrs) |
|00002b60| 7b 0a 09 69 66 20 28 64 | 65 62 75 67 29 20 66 70 |{..if (d|ebug) fp|
|00002b70| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 22 78 77 |rintf(st|derr,"xw|
|00002b80| 70 73 3a 20 49 6d 61 67 | 65 20 77 69 74 68 6f 75 |ps: Imag|e withou|
|00002b90| 74 20 62 6f 72 64 65 72 | 73 20 73 65 6c 65 63 74 |t border|s select|
|00002ba0| 65 64 2e 5c 6e 22 29 3b | 0a 09 69 6d 61 67 65 5f |ed.\n");|..image_|
|00002bb0| 77 69 6e 20 3d 20 74 61 | 72 67 65 74 5f 77 69 6e |win = ta|rget_win|
|00002bc0| 3b 0a 09 76 69 72 74 5f | 78 20 3d 20 30 3b 0a 09 |;..virt_|x = 0;..|
|00002bd0| 76 69 72 74 5f 79 20 3d | 20 30 3b 0a 09 76 69 72 |virt_y =| 0;..vir|
|00002be0| 74 5f 77 69 64 74 68 20 | 3d 20 77 69 6e 5f 69 6e |t_width |= win_in|
|00002bf0| 66 6f 2e 77 69 64 74 68 | 3b 0a 09 76 69 72 74 5f |fo.width|;..virt_|
|00002c00| 68 65 69 67 68 74 20 3d | 20 77 69 6e 5f 69 6e 66 |height =| win_inf|
|00002c10| 6f 2e 68 65 69 67 68 74 | 3b 0a 20 20 20 20 7d 0a |o.height|;. }.|
|00002c20| 20 20 20 20 65 6c 73 65 | 20 7b 0a 09 69 66 20 28 | else| {..if (|
|00002c30| 64 65 62 75 67 29 20 66 | 70 72 69 6e 74 66 28 73 |debug) f|printf(s|
|00002c40| 74 64 65 72 72 2c 22 78 | 77 70 73 3a 20 49 6d 61 |tderr,"x|wps: Ima|
|00002c50| 67 65 20 77 69 74 68 20 | 62 6f 72 64 65 72 73 20 |ge with |borders |
|00002c60| 73 65 6c 65 63 74 65 64 | 2e 5c 6e 22 29 3b 0a 09 |selected|.\n");..|
|00002c70| 69 6d 61 67 65 5f 77 69 | 6e 20 3d 20 52 6f 6f 74 |image_wi|n = Root|
|00002c80| 57 69 6e 64 6f 77 3b 0a | 09 76 69 72 74 5f 78 20 |Window;.|.virt_x |
|00002c90| 3d 20 77 69 6e 5f 69 6e | 66 6f 2e 78 3b 0a 09 76 |= win_in|fo.x;..v|
|00002ca0| 69 72 74 5f 79 20 3d 20 | 77 69 6e 5f 69 6e 66 6f |irt_y = |win_info|
|00002cb0| 2e 79 3b 0a 09 76 69 72 | 74 5f 77 69 64 74 68 20 |.y;..vir|t_width |
|00002cc0| 3d 20 77 69 6e 5f 69 6e | 66 6f 2e 77 69 64 74 68 |= win_in|fo.width|
|00002cd0| 20 2b 20 28 77 69 6e 5f | 69 6e 66 6f 2e 62 64 72 | + (win_|info.bdr|
|00002ce0| 77 69 64 74 68 20 3c 3c | 20 31 29 3b 0a 20 20 20 |width <<| 1);. |
|00002cf0| 20 09 76 69 72 74 5f 68 | 65 69 67 68 74 20 3d 20 | .virt_h|eight = |
|00002d00| 77 69 6e 5f 69 6e 66 6f | 2e 68 65 69 67 68 74 20 |win_info|.height |
|00002d10| 2b 20 28 77 69 6e 5f 69 | 6e 66 6f 2e 62 64 72 77 |+ (win_i|nfo.bdrw|
|00002d20| 69 64 74 68 20 3c 3c 20 | 31 29 3b 0a 20 20 20 20 |idth << |1);. |
|00002d30| 7d 0a 0a 20 20 20 20 2f | 2a 0a 20 20 20 20 20 2a |}.. /|*. *|
|00002d40| 20 44 65 74 65 72 6d 69 | 6e 65 20 74 68 65 20 70 | Determi|ne the p|
|00002d50| 69 78 6d 61 70 20 73 69 | 7a 65 2e 0a 20 20 20 20 |ixmap si|ze.. |
|00002d60| 20 2a 2f 0a 20 20 20 20 | 62 75 66 66 65 72 5f 73 | */. |buffer_s|
|00002d70| 69 7a 65 20 3d 20 42 5a | 50 69 78 6d 61 70 53 69 |ize = BZ|PixmapSi|
|00002d80| 7a 65 28 76 69 72 74 5f | 77 69 64 74 68 2c 20 76 |ze(virt_|width, v|
|00002d90| 69 72 74 5f 68 65 69 67 | 68 74 29 3b 0a 20 20 20 |irt_heig|ht);. |
|00002da0| 20 69 66 20 28 64 65 62 | 75 67 29 20 7b 0a 09 66 | if (deb|ug) {..f|
|00002db0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 0a 09 |printf(s|tderr,..|
|00002dc0| 09 22 78 77 70 73 3a 20 | 50 69 78 6d 61 70 20 69 |."xwps: |Pixmap i|
|00002dd0| 6e 20 62 79 74 65 20 5a | 46 6f 72 6d 61 74 2c 20 |n byte Z|Format, |
|00002de0| 73 69 7a 65 20 25 64 20 | 62 79 74 65 73 2e 5c 6e |size %d |bytes.\n|
|00002df0| 22 2c 20 62 75 66 66 65 | 72 5f 73 69 7a 65 29 3b |", buffe|r_size);|
|00002e00| 0a 20 20 20 20 7d 0a 0a | 20 20 20 20 2f 2a 0a 20 |. }..| /*. |
|00002e10| 20 20 20 20 2a 20 43 61 | 6c 6c 6f 63 20 74 68 65 | * Ca|lloc the|
|00002e20| 20 62 75 66 66 65 72 2e | 0a 20 20 20 20 20 2a 2f | buffer.|. */|
|00002e30| 0a 20 20 20 20 69 66 20 | 28 64 65 62 75 67 29 20 |. if |(debug) |
|00002e40| 66 70 72 69 6e 74 66 28 | 73 74 64 65 72 72 2c 22 |fprintf(|stderr,"|
|00002e50| 78 77 70 73 3a 20 43 61 | 6c 6c 6f 63 27 69 6e 67 |xwps: Ca|lloc'ing|
|00002e60| 20 64 61 74 61 20 62 75 | 66 66 65 72 2e 5c 6e 22 | data bu|ffer.\n"|
|00002e70| 29 3b 0a 20 20 20 20 69 | 66 28 28 62 75 66 66 65 |);. i|f((buffe|
|00002e80| 72 20 3d 20 63 61 6c 6c | 6f 63 28 62 75 66 66 65 |r = call|oc(buffe|
|00002e90| 72 5f 73 69 7a 65 20 2c | 20 31 29 29 20 3d 3d 20 |r_size ,| 1)) == |
|00002ea0| 4e 55 4c 4c 29 0a 20 20 | 20 20 20 20 20 45 72 72 |NULL). | Err|
|00002eb0| 6f 72 28 22 43 61 6e 27 | 74 20 63 61 6c 6c 6f 63 |or("Can'|t calloc|
|00002ec0| 20 64 61 74 61 20 62 75 | 66 66 65 72 2e 22 29 3b | data bu|ffer.");|
|00002ed0| 0a 0a 20 20 20 20 2f 2a | 0a 20 20 20 20 20 2a 20 |.. /*|. * |
|00002ee0| 53 6e 61 72 66 20 74 68 | 65 20 70 69 78 6d 61 70 |Snarf th|e pixmap|
|00002ef0| 20 6f 75 74 20 6f 66 20 | 74 68 65 20 66 72 61 6d | out of |the fram|
|00002f00| 65 20 62 75 66 66 65 72 | 2e 0a 20 20 20 20 20 2a |e buffer|.. *|
|00002f10| 20 43 6f 6c 6f 72 20 77 | 69 6e 64 6f 77 73 20 67 | Color w|indows g|
|00002f20| 65 74 20 73 6e 61 72 66 | 65 64 20 69 6e 20 5a 20 |et snarf|ed in Z |
|00002f30| 66 6f 72 6d 61 74 20 66 | 69 72 73 74 20 74 6f 20 |format f|irst to |
|00002f40| 63 68 65 63 6b 20 74 68 | 65 20 63 6f 6c 6f 72 0a |check th|e color.|
|00002f50| 20 20 20 20 20 2a 20 6d | 61 70 20 61 6c 6c 6f 63 | * m|ap alloc|
|00002f60| 61 74 69 6f 6e 73 20 62 | 65 66 6f 72 65 20 72 65 |ations b|efore re|
|00002f70| 73 6e 61 72 66 69 6e 67 | 20 69 66 20 58 59 20 66 |snarfing| if XY f|
|00002f80| 6f 72 6d 61 74 20 73 65 | 6c 65 63 74 65 64 2e 0a |ormat se|lected..|
|00002f90| 20 20 20 20 20 2a 2f 0a | 20 20 20 20 69 66 20 28 | */.| if (|
|00002fa0| 64 65 62 75 67 29 20 66 | 70 72 69 6e 74 66 28 73 |debug) f|printf(s|
|00002fb0| 74 64 65 72 72 2c 22 78 | 77 70 73 3a 20 47 65 74 |tderr,"x|wps: Get|
|00002fc0| 74 69 6e 67 20 70 69 78 | 6d 61 70 2e 5c 6e 22 29 |ting pix|map.\n")|
|00002fd0| 3b 0a 20 20 20 20 28 76 | 6f 69 64 29 20 58 50 69 |;. (v|oid) XPi|
|00002fe0| 78 6d 61 70 47 65 74 5a | 28 0a 09 09 20 20 20 20 |xmapGetZ|(... |
|00002ff0| 20 20 20 69 6d 61 67 65 | 5f 77 69 6e 2c 0a 09 09 | image|_win,...|
|00003000| 20 20 20 20 20 20 20 76 | 69 72 74 5f 78 2c 20 76 | v|irt_x, v|
|00003010| 69 72 74 5f 79 2c 0a 09 | 09 20 20 20 20 20 20 20 |irt_y,..|. |
|00003020| 76 69 72 74 5f 77 69 64 | 74 68 2c 20 76 69 72 74 |virt_wid|th, virt|
|00003030| 5f 68 65 69 67 68 74 2c | 0a 09 09 20 20 20 20 20 |_height,|... |
|00003040| 20 20 28 63 61 64 64 72 | 5f 74 29 62 75 66 66 65 | (caddr|_t)buffe|
|00003050| 72 0a 09 09 20 20 20 20 | 20 20 20 29 3b 0a 0a 20 |r... | );.. |
|00003060| 20 20 20 2f 2a 0a 20 20 | 20 20 20 2a 20 49 6e 66 | /*. | * Inf|
|00003070| 6f 72 6d 20 74 68 65 20 | 75 73 65 72 20 74 68 61 |orm the |user tha|
|00003080| 74 20 74 68 65 20 69 6d | 61 67 65 20 68 61 73 20 |t the im|age has |
|00003090| 62 65 65 6e 20 72 65 74 | 72 69 65 76 65 64 2e 0a |been ret|rieved..|
|000030a0| 20 20 20 20 20 2a 2f 0a | 20 20 20 20 58 46 65 65 | */.| XFee|
|000030b0| 70 28 46 45 45 50 5f 56 | 4f 4c 55 4d 45 29 3b 0a |p(FEEP_V|OLUME);.|
|000030c0| 20 20 20 20 58 46 65 65 | 70 28 46 45 45 50 5f 56 | XFee|p(FEEP_V|
|000030d0| 4f 4c 55 4d 45 29 3b 0a | 20 20 20 20 58 46 6c 75 |OLUME);.| XFlu|
|000030e0| 73 68 28 29 3b 0a 0a 20 | 20 20 20 2f 2a 20 0a 20 |sh();.. | /* . |
|000030f0| 20 20 20 20 2a 20 57 72 | 69 74 65 20 74 6f 20 70 | * Wr|ite to p|
|00003100| 6f 73 74 73 63 72 69 70 | 74 21 20 0a 20 20 20 20 |ostscrip|t! . |
|00003110| 20 2a 2f 0a 0a 20 20 20 | 20 6f 70 65 6e 49 6d 61 | */.. | openIma|
|00003120| 67 65 28 6f 75 74 5f 66 | 69 6c 65 2c 20 76 69 72 |ge(out_f|ile, vir|
|00003130| 74 5f 77 69 64 74 68 2c | 20 76 69 72 74 5f 68 65 |t_width,| virt_he|
|00003140| 69 67 68 74 29 3b 0a 20 | 20 20 20 77 72 69 74 65 |ight);. | write|
|00003150| 49 6d 61 67 65 28 6f 75 | 74 5f 66 69 6c 65 2c 20 |Image(ou|t_file, |
|00003160| 62 75 66 66 65 72 2c 20 | 62 75 66 66 65 72 5f 73 |buffer, |buffer_s|
|00003170| 69 7a 65 2c 20 76 69 72 | 74 5f 77 69 64 74 68 29 |ize, vir|t_width)|
|00003180| 3b 0a 20 20 20 20 63 6c | 6f 73 65 49 6d 61 67 65 |;. cl|oseImage|
|00003190| 28 6f 75 74 5f 66 69 6c | 65 29 3b 0a 0a 20 20 20 |(out_fil|e);.. |
|000031a0| 20 2f 2a 0a 20 20 20 20 | 20 2a 20 43 6c 6f 73 65 | /*. | * Close|
|000031b0| 20 74 68 65 20 6f 75 74 | 70 75 74 20 66 69 6c 65 | the out|put file|
|000031c0| 2e 0a 20 20 20 20 20 2a | 2f 0a 20 20 20 20 69 66 |.. *|/. if|
|000031d0| 20 28 64 65 62 75 67 29 | 20 66 70 72 69 6e 74 66 | (debug)| fprintf|
|000031e0| 28 73 74 64 65 72 72 2c | 22 78 77 70 73 3a 20 43 |(stderr,|"xwps: C|
|000031f0| 6c 6f 73 69 6e 67 20 6f | 75 74 70 75 74 20 66 69 |losing o|utput fi|
|00003200| 6c 65 2e 5c 6e 22 29 3b | 0a 20 20 20 20 28 76 6f |le.\n");|. (vo|
|00003210| 69 64 29 20 66 63 6c 6f | 73 65 28 6f 75 74 5f 66 |id) fclo|se(out_f|
|00003220| 69 6c 65 29 3b 0a 0a 20 | 20 20 20 2f 2a 0a 20 20 |ile);.. | /*. |
|00003230| 20 20 20 2a 20 46 72 65 | 65 20 74 68 65 20 70 69 | * Fre|e the pi|
|00003240| 78 6d 61 70 20 62 75 66 | 66 65 72 2e 0a 20 20 20 |xmap buf|fer.. |
|00003250| 20 20 2a 2f 0a 20 20 20 | 20 69 66 20 28 64 65 62 | */. | if (deb|
|00003260| 75 67 29 20 66 70 72 69 | 6e 74 66 28 73 74 64 65 |ug) fpri|ntf(stde|
|00003270| 72 72 2c 22 78 77 70 73 | 3a 20 46 72 65 65 69 6e |rr,"xwps|: Freein|
|00003280| 67 20 70 69 78 6d 61 70 | 20 62 75 66 66 65 72 2e |g pixmap| buffer.|
|00003290| 5c 6e 22 29 3b 0a 20 20 | 20 20 66 72 65 65 28 62 |\n");. | free(b|
|000032a0| 75 66 66 65 72 29 3b 0a | 0a 20 20 20 20 2f 2a 0a |uffer);.|. /*.|
|000032b0| 20 20 20 20 20 2a 20 46 | 72 65 65 20 77 69 6e 64 | * F|ree wind|
|000032c0| 6f 77 20 6e 61 6d 65 20 | 73 74 72 69 6e 67 2e 0a |ow name |string..|
|000032d0| 20 20 20 20 20 2a 2f 0a | 20 20 20 20 69 66 20 28 | */.| if (|
|000032e0| 64 65 62 75 67 29 20 66 | 70 72 69 6e 74 66 28 73 |debug) f|printf(s|
|000032f0| 74 64 65 72 72 2c 22 78 | 77 70 73 3a 20 46 72 65 |tderr,"x|wps: Fre|
|00003300| 65 69 6e 67 20 77 69 6e | 64 6f 77 20 6e 61 6d 65 |eing win|dow name|
|00003310| 20 73 74 72 69 6e 67 2e | 5c 6e 22 29 3b 0a 20 20 | string.|\n");. |
|00003320| 20 20 66 72 65 65 28 77 | 69 6e 5f 6e 61 6d 65 29 | free(w|in_name)|
|00003330| 3b 0a 20 20 20 20 65 78 | 69 74 28 30 29 3b 0a 7d |;. ex|it(0);.}|
|00003340| 0a 0a 2f 2a 0a 20 2a 20 | 52 65 70 6f 72 74 20 74 |../*. * |Report t|
|00003350| 68 65 20 73 79 6e 74 61 | 78 20 66 6f 72 20 63 61 |he synta|x for ca|
|00003360| 6c 6c 69 6e 67 20 78 77 | 70 73 2e 0a 20 2a 2f 0a |lling xw|ps.. */.|
|00003370| 53 79 6e 74 61 78 28 63 | 61 6c 6c 29 0a 20 20 20 |Syntax(c|all). |
|00003380| 20 63 68 61 72 20 2a 63 | 61 6c 6c 3b 0a 7b 0a 20 | char *c|all;.{. |
|00003390| 20 20 20 66 70 72 69 6e | 74 66 28 73 74 64 65 72 | fprin|tf(stder|
|000033a0| 72 2c 0a 09 20 20 20 20 | 22 25 73 3a 20 25 73 20 |r,.. |"%s: %s |
|000033b0| 5b 2d 74 78 20 3c 69 6e | 63 68 65 73 3e 5d 20 5b |[-tx <in|ches>] [|
|000033c0| 2d 74 79 20 3c 69 6e 63 | 68 65 73 3e 5d 5c 6e 22 |-ty <inc|hes>]\n"|
|000033d0| 2c 0a 09 20 20 20 20 50 | 72 6f 67 72 61 6d 4e 61 |,.. P|rogramNa|
|000033e0| 6d 65 2c 20 63 61 6c 6c | 29 3b 0a 20 20 20 20 66 |me, call|);. f|
|000033f0| 70 72 69 6e 74 66 28 73 | 74 64 65 72 72 2c 0a 09 |printf(s|tderr,..|
|00003400| 20 20 20 20 22 20 20 20 | 20 20 20 20 20 20 20 20 | " | |
|00003410| 5b 2d 73 78 20 3c 69 6e | 63 68 65 73 3e 5d 20 5b |[-sx <in|ches>] [|
|00003420| 2d 73 79 20 3c 69 6e 63 | 68 65 73 3e 5d 5c 6e 22 |-sy <inc|hes>]\n"|
|00003430| 29 3b 0a 20 20 20 20 66 | 70 72 69 6e 74 66 28 73 |);. f|printf(s|
|00003440| 74 64 65 72 72 2c 0a 09 | 20 20 20 20 22 20 20 20 |tderr,..| " |
|00003450| 20 20 20 20 20 20 20 20 | 5b 2d 72 6f 74 20 3c 64 | |[-rot <d|
|00003460| 65 67 72 65 65 73 3e 5d | 5c 6e 22 29 3b 0a 20 20 |egrees>]|\n");. |
|00003470| 20 20 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 | fprint|f(stderr|
|00003480| 2c 0a 09 20 20 20 20 22 | 20 20 20 20 20 20 20 20 |,.. "| |
|00003490| 20 20 20 5b 2d 64 65 62 | 75 67 5d 20 5b 2d 68 65 | [-deb|ug] [-he|
|000034a0| 6c 70 5d 20 5b 2d 6e 6f | 62 64 72 73 5d 5c 6e 22 |lp] [-no|bdrs]\n"|
|000034b0| 29 3b 0a 20 20 20 20 66 | 70 72 69 6e 74 66 28 73 |);. f|printf(s|
|000034c0| 74 64 65 72 72 2c 0a 09 | 20 20 20 20 22 20 20 20 |tderr,..| " |
|000034d0| 20 20 20 20 20 20 20 20 | 5b 2d 6f 75 74 20 3c 66 | |[-out <f|
|000034e0| 69 6c 65 3e 5d 20 5b 5b | 68 6f 73 74 5d 3a 76 73 |ile>] [[|host]:vs|
|000034f0| 5d 5c 6e 22 29 3b 0a 0a | 20 20 20 20 65 78 69 74 |]\n");..| exit|
|00003500| 28 31 29 3b 0a 7d 0a 0a | 0a 2f 2a 0a 20 2a 20 45 |(1);.}..|./*. * E|
|00003510| 72 72 6f 72 20 2d 20 46 | 61 74 61 6c 20 78 77 70 |rror - F|atal xwp|
|00003520| 73 20 65 72 72 6f 72 2e | 0a 20 2a 2f 0a 45 72 72 |s error.|. */.Err|
|00003530| 6f 72 28 73 74 72 69 6e | 67 29 0a 09 63 68 61 72 |or(strin|g)..char|
|00003540| 20 2a 73 74 72 69 6e 67 | 3b 09 2f 2a 20 45 72 72 | *string|;./* Err|
|00003550| 6f 72 20 64 65 73 63 72 | 69 70 74 69 6f 6e 20 73 |or descr|iption s|
|00003560| 74 72 69 6e 67 2e 20 2a | 2f 0a 7b 0a 09 66 70 72 |tring. *|/.{..fpr|
|00003570| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 5c 6e |intf(std|err, "\n|
|00003580| 25 73 3a 20 45 72 72 6f | 72 20 3d 3e 20 25 73 22 |%s: Erro|r => %s"|
|00003590| 2c 50 72 6f 67 72 61 6d | 4e 61 6d 65 2c 20 73 74 |,Program|Name, st|
|000035a0| 72 69 6e 67 29 3b 0a 09 | 69 66 20 28 65 72 72 6e |ring);..|if (errn|
|000035b0| 6f 20 21 3d 20 30 29 20 | 7b 0a 09 09 70 65 72 72 |o != 0) |{...perr|
|000035c0| 6f 72 28 50 72 6f 67 72 | 61 6d 4e 61 6d 65 29 3b |or(Progr|amName);|
|000035d0| 0a 09 09 66 70 72 69 6e | 74 66 28 73 74 64 65 72 |...fprin|tf(stder|
|000035e0| 72 2c 20 22 5c 6e 22 29 | 3b 0a 09 7d 0a 0a 09 65 |r, "\n")|;..}...e|
|000035f0| 78 69 74 28 31 29 3b 0a | 7d 0a 0a 2f 2a 20 45 6e |xit(1);.|}../* En|
|00003600| 64 20 6f 66 20 78 77 70 | 73 2e 63 20 2a 2f 0a 53 |d of xwp|s.c */.S|
|00003610| 48 41 52 5f 45 4f 46 0a | 66 69 20 23 20 65 6e 64 |HAR_EOF.|fi # end|
|00003620| 20 6f 66 20 6f 76 65 72 | 77 72 69 74 69 6e 67 20 | of over|writing |
|00003630| 63 68 65 63 6b 0a 69 66 | 20 74 65 73 74 20 2d 66 |check.if| test -f|
|00003640| 20 27 4d 61 6b 65 66 69 | 6c 65 27 0a 74 68 65 6e | 'Makefi|le'.then|
|00003650| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 77 69 6c |..echo s|har: wil|
|00003660| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|00003670| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 22 | existin|g file "|
|00003680| 27 4d 61 6b 65 66 69 6c | 65 27 22 0a 65 6c 73 65 |'Makefil|e'".else|
|00003690| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|000036a0| 46 20 3e 20 27 4d 61 6b | 65 66 69 6c 65 27 0a 23 |F > 'Mak|efile'.#|
|000036b0| 20 43 6f 70 79 72 69 67 | 68 74 2c 20 31 39 38 35 | Copyrig|ht, 1985|
|000036c0| 20 4d 61 73 73 61 63 68 | 75 73 65 74 74 73 20 49 | Massach|usetts I|
|000036d0| 6e 73 74 69 74 75 74 65 | 20 6f 66 20 54 65 63 68 |nstitute| of Tech|
|000036e0| 6e 6f 6c 6f 67 79 0a 23 | 0a 23 09 78 77 70 73 20 |nology.#|.#.xwps |
|000036f0| 2d 20 6d 61 6b 65 66 69 | 6c 65 20 66 6f 72 20 74 |- makefi|le for t|
|00003700| 68 65 20 41 74 68 65 6e | 61 20 58 20 77 69 6e 64 |he Athen|a X wind|
|00003710| 6f 77 20 73 79 73 74 65 | 6d 20 77 69 6e 64 6f 77 |ow syste|m window|
|00003720| 0a 23 09 09 20 20 20 77 | 69 6e 64 6f 77 20 72 61 |.#.. w|indow ra|
|00003730| 73 74 65 72 20 69 6d 61 | 67 65 20 64 75 6d 70 65 |ster ima|ge dumpe|
|00003740| 72 2e 0a 23 0a 23 09 09 | 57 72 69 74 74 65 6e 20 |r..#.#..|Written |
|00003750| 62 79 3a 09 42 65 6e 6a | 61 6d 69 6e 20 43 68 65 |by:.Benj|amin Che|
|00003760| 6e 0a 23 09 09 09 09 46 | 65 62 72 75 61 72 79 20 |n.#....F|ebruary |
|00003770| 32 32 2c 20 31 39 38 39 | 0a 0a 0a 44 45 53 54 44 |22, 1989|...DESTD|
|00003780| 49 52 20 3d 0a 49 4e 43 | 4c 55 44 45 53 20 3d 20 |IR =.INC|LUDES = |
|00003790| 2d 49 2f 75 73 72 2f 69 | 6e 63 6c 75 64 65 2f 58 |-I/usr/i|nclude/X|
|000037a0| 0a 0a 43 55 52 53 44 49 | 52 20 3d 20 2e 0a 43 4f |..CURSDI|R = ..CO|
|000037b0| 4e 46 44 49 52 20 3d 20 | 2f 75 73 72 2f 6e 65 77 |NFDIR = |/usr/new|
|000037c0| 0a 58 4c 49 42 20 3d 20 | 2f 75 73 72 2f 6c 69 62 |.XLIB = |/usr/lib|
|000037d0| 2f 6c 69 62 58 2e 61 0a | 58 48 20 3d 20 2f 75 73 |/libX.a.|XH = /us|
|000037e0| 72 2f 69 6e 63 6c 75 64 | 65 2f 58 2f 58 6c 69 62 |r/includ|e/X/Xlib|
|000037f0| 2e 68 0a 43 46 4c 41 47 | 53 20 3d 20 2d 4f 20 2d |.h.CFLAG|S = -O -|
|00003800| 66 36 38 38 38 31 20 24 | 28 49 4e 43 4c 55 44 45 |f68881 $|(INCLUDE|
|00003810| 53 29 20 2d 49 24 28 43 | 55 52 53 44 49 52 29 0a |S) -I$(C|URSDIR).|
|00003820| 43 4c 49 42 53 20 3d 20 | 2d 6c 6d 0a 0a 2e 53 55 |CLIBS = |-lm...SU|
|00003830| 46 46 49 58 45 53 3a 20 | 2e 6f 20 2e 68 20 2e 63 |FFIXES: |.o .h .c|
|00003840| 20 2e 61 0a 0a 4f 42 4a | 53 20 3d 20 78 77 70 73 | .a..OBJ|S = xwps|
|00003850| 2e 6f 0a 0a 61 6c 6c 3a | 20 78 77 70 73 0a 0a 78 |.o..all:| xwps..x|
|00003860| 77 70 73 3a 20 24 28 4f | 42 4a 53 29 20 24 28 58 |wps: $(O|BJS) $(X|
|00003870| 4c 49 42 29 0a 09 24 28 | 43 43 29 20 24 28 43 46 |LIB)..$(|CC) $(CF|
|00003880| 4c 41 47 53 29 20 2d 6f | 20 78 77 70 73 20 24 28 |LAGS) -o| xwps $(|
|00003890| 4f 42 4a 53 29 20 24 28 | 58 4c 49 42 29 20 24 28 |OBJS) $(|XLIB) $(|
|000038a0| 43 4c 49 42 53 29 0a 0a | 78 77 70 73 2e 6f 3a 20 |CLIBS)..|xwps.o: |
|000038b0| 20 5c 0a 09 24 28 43 55 | 52 53 44 49 52 29 2f 74 | \..$(CU|RSDIR)/t|
|000038c0| 61 72 67 65 74 2e 63 75 | 72 73 6f 72 20 24 28 43 |arget.cu|rsor $(C|
|000038d0| 55 52 53 44 49 52 29 2f | 74 61 72 67 65 74 5f 6d |URSDIR)/|target_m|
|000038e0| 61 73 6b 2e 63 75 72 73 | 6f 72 20 5c 0a 09 24 28 |ask.curs|or \..$(|
|000038f0| 58 48 29 0a 0a 6c 69 6e | 6b 3a 0a 09 24 28 43 43 |XH)..lin|k:..$(CC|
|00003900| 29 20 24 28 43 46 4c 41 | 47 53 29 20 2d 6f 20 78 |) $(CFLA|GS) -o x|
|00003910| 77 70 73 20 24 28 4f 42 | 4a 53 29 20 24 28 58 4c |wps $(OB|JS) $(XL|
|00003920| 49 42 29 20 24 28 43 4c | 49 42 53 29 0a 0a 69 6e |IB) $(CL|IBS)..in|
|00003930| 73 74 61 6c 6c 3a 20 61 | 6c 6c 0a 09 69 6e 73 74 |stall: a|ll..inst|
|00003940| 61 6c 6c 20 2d 73 20 78 | 77 70 73 20 24 28 44 45 |all -s x|wps $(DE|
|00003950| 53 54 44 49 52 29 24 28 | 43 4f 4e 46 44 49 52 29 |STDIR)$(|CONFDIR)|
|00003960| 0a 09 63 68 6d 6f 64 20 | 37 35 35 20 24 28 44 45 |..chmod |755 $(DE|
|00003970| 53 54 44 49 52 29 24 28 | 43 4f 4e 46 44 49 52 29 |STDIR)$(|CONFDIR)|
|00003980| 2f 78 77 70 73 0a 0a 63 | 6c 65 61 6e 3a 20 0a 09 |/xwps..c|lean: ..|
|00003990| 72 6d 20 2d 66 20 2a 7e | 2a 20 2a 2e 62 61 6b 20 |rm -f *~|* *.bak |
|000039a0| 63 6f 72 65 20 78 77 70 | 73 2e 6f 20 78 77 70 73 |core xwp|s.o xwps|
|000039b0| 20 5c 23 2a 0a 09 72 6d | 20 2d 66 20 78 77 70 73 | \#*..rm| -f xwps|
|000039c0| 2e 63 2e 5b 30 2d 39 5d | 2a 20 4d 61 6b 65 66 69 |.c.[0-9]|* Makefi|
|000039d0| 6c 65 2e 5b 30 2d 39 5d | 2a 20 78 77 70 73 2e 31 |le.[0-9]|* xwps.1|
|000039e0| 2e 5b 30 2d 39 5d 2a 0a | 0a 76 67 72 69 6e 64 3a |.[0-9]*.|.vgrind:|
|000039f0| 0a 09 76 67 72 69 6e 64 | 20 78 77 70 73 2e 63 0a |..vgrind| xwps.c.|
|00003a00| 53 48 41 52 5f 45 4f 46 | 0a 66 69 20 23 20 65 6e |SHAR_EOF|.fi # en|
|00003a10| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00003a20| 20 63 68 65 63 6b 0a 69 | 66 20 74 65 73 74 20 2d | check.i|f test -|
|00003a30| 66 20 27 78 77 70 73 2e | 30 27 0a 74 68 65 6e 0a |f 'xwps.|0'.then.|
|00003a40| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 77 69 6c 6c |.echo sh|ar: will|
|00003a50| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|00003a60| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 22 27 |existing| file "'|
|00003a70| 78 77 70 73 2e 30 27 22 | 0a 65 6c 73 65 0a 63 61 |xwps.0'"|.else.ca|
|00003a80| 74 20 3c 3c 20 5c 53 48 | 41 52 5f 45 4f 46 20 3e |t << \SH|AR_EOF >|
|00003a90| 20 27 78 77 70 73 2e 30 | 27 0a 0a 0a 0a 58 57 50 | 'xwps.0|'....XWP|
|00003aa0| 53 28 31 29 20 20 20 20 | 20 20 20 20 20 20 20 20 |S(1) | |
|00003ab0| 20 20 20 20 20 20 20 55 | 53 45 52 20 43 4f 4d 4d | U|SER COMM|
|00003ac0| 41 4e 44 53 20 20 20 20 | 20 20 20 20 20 20 20 20 |ANDS | |
|00003ad0| 20 20 20 20 20 20 20 58 | 57 50 53 28 31 29 0a 0a | X|WPS(1)..|
|00003ae0| 0a 0a 4e 41 4d 45 0a 20 | 20 20 20 20 78 77 70 73 |..NAME. | xwps|
|00003af0| 20 2d 20 58 20 57 69 6e | 64 6f 77 20 53 79 73 74 | - X Win|dow Syst|
|00003b00| 65 6d 2c 20 77 69 6e 64 | 6f 77 20 69 6d 61 67 65 |em, wind|ow image|
|00003b10| 20 64 75 6d 70 65 72 2e | 0a 0a 53 59 4e 4f 50 53 | dumper.|..SYNOPS|
|00003b20| 49 53 0a 20 20 20 20 20 | 78 77 70 73 20 5b 20 2d |IS. |xwps [ -|
|00003b30| 64 65 62 75 67 20 5d 20 | 5b 20 2d 68 65 6c 70 20 |debug ] |[ -help |
|00003b40| 5d 20 5b 20 2d 6e 6f 62 | 64 72 73 20 5d 20 5b 20 |] [ -nob|drs ] [ |
|00003b50| 2d 6f 75 74 20 5f 08 66 | 5f 08 69 5f 08 6c 5f 08 |-out _.f|_.i_.l_.|
|00003b60| 65 20 5d 20 5b 20 2d 78 | 79 20 20 5d 0a 20 20 20 |e ] [ -x|y ]. |
|00003b70| 20 20 5b 20 5f 08 68 5f | 08 6f 5f 08 73 5f 08 74 | [ _.h_|.o_.s_.t|
|00003b80| 3a 5f 08 64 5f 08 69 5f | 08 73 5f 08 70 5f 08 6c |:_.d_.i_|.s_.p_.l|
|00003b90| 5f 08 61 5f 08 79 20 5d | 0a 0a 44 45 53 43 52 49 |_.a_.y ]|..DESCRI|
|00003ba0| 50 54 49 4f 4e 0a 20 20 | 20 20 20 5f 08 58 5f 08 |PTION. | _.X_.|
|00003bb0| 77 5f 08 70 5f 08 73 20 | 69 73 20 61 6e 20 58 20 |w_.p_.s |is an X |
|00003bc0| 57 69 6e 64 6f 77 20 20 | 53 79 73 74 65 6d 20 20 |Window |System |
|00003bd0| 28 70 72 6f 74 6f 63 6f | 6c 20 20 76 65 72 73 69 |(protoco|l versi|
|00003be0| 6f 6e 20 20 31 30 29 20 | 20 77 69 6e 64 6f 77 0a |on 10) | window.|
|00003bf0| 20 20 20 20 20 69 6d 61 | 67 65 20 20 64 75 6d 70 | ima|ge dump|
|00003c00| 69 6e 67 20 75 74 69 6c | 69 74 79 2e 20 20 5f 08 |ing util|ity. _.|
|00003c10| 58 5f 08 77 5f 08 70 5f | 08 73 20 61 6c 6c 6f 77 |X_.w_.p_|.s allow|
|00003c20| 73 20 58 20 75 73 65 72 | 73 20 74 6f 20 73 74 6f |s X user|s to sto|
|00003c30| 72 65 20 77 69 6e 64 6f | 77 0a 20 20 20 20 20 69 |re windo|w. i|
|00003c40| 6d 61 67 65 73 20 69 6e | 20 61 20 50 6f 73 74 53 |mages in| a PostS|
|00003c50| 63 72 69 70 74 20 66 69 | 6c 65 2e 20 54 68 69 73 |cript fi|le. This|
|00003c60| 20 66 69 6c 65 20 63 61 | 6e 20 74 68 65 6e 20 20 | file ca|n then |
|00003c70| 62 65 20 20 70 72 69 6e | 74 65 64 0a 20 20 20 20 |be prin|ted. |
|00003c80| 20 6f 6e 20 20 61 20 50 | 6f 73 74 53 63 72 69 70 | on a P|ostScrip|
|00003c90| 74 20 70 72 69 6e 74 65 | 72 20 73 75 63 68 20 61 |t printe|r such a|
|00003ca0| 73 20 74 68 65 20 41 70 | 70 6c 65 20 4c 61 73 65 |s the Ap|ple Lase|
|00003cb0| 72 57 72 69 74 65 72 2e | 20 20 54 68 65 0a 20 20 |rWriter.| The. |
|00003cc0| 20 20 20 74 61 72 67 65 | 74 20 77 69 6e 64 6f 77 | targe|t window|
|00003cd0| 20 69 73 20 73 65 6c 65 | 63 74 65 64 20 20 62 79 | is sele|cted by|
|00003ce0| 20 20 63 6c 69 63 6b 69 | 6e 67 20 20 74 68 65 20 | clicki|ng the |
|00003cf0| 20 6d 6f 75 73 65 20 20 | 69 6e 20 20 74 68 65 0a | mouse |in the.|
|00003d00| 20 20 20 20 20 64 65 73 | 69 72 65 64 20 20 77 69 | des|ired wi|
|00003d10| 6e 64 6f 77 2e 20 20 20 | 54 68 65 20 20 6b 65 79 |ndow. |The key|
|00003d20| 62 6f 61 72 64 20 20 62 | 65 6c 6c 20 20 69 73 20 |board b|ell is |
|00003d30| 20 72 75 6e 67 20 6f 6e | 63 65 20 61 74 20 74 68 | rung on|ce at th|
|00003d40| 65 0a 20 20 20 20 20 62 | 65 67 69 6e 6e 69 6e 67 |e. b|eginning|
|00003d50| 20 6f 66 20 74 68 65 20 | 64 75 6d 70 20 61 6e 64 | of the |dump and|
|00003d60| 20 74 77 69 63 65 20 77 | 68 65 6e 20 74 68 65 20 | twice w|hen the |
|00003d70| 64 75 6d 70 20 69 73 20 | 20 63 6f 6d 70 6c 65 74 |dump is | complet|
|00003d80| 65 64 2e 0a 20 20 20 20 | 20 41 6e 20 20 6f 70 74 |ed.. | An opt|
|00003d90| 69 6f 6e 61 6c 20 63 6f | 6c 6f 72 20 6d 61 70 20 |ional co|lor map |
|00003da0| 63 61 6e 20 62 65 20 73 | 70 65 63 69 66 69 65 64 |can be s|pecified|
|00003db0| 20 73 6f 20 75 73 65 72 | 73 20 63 61 6e 20 63 75 | so user|s can cu|
|00003dc0| 73 74 6f 6d 2d 0a 20 20 | 20 20 20 69 7a 65 20 68 |stom-. | ize h|
|00003dd0| 6f 77 20 63 6f 6c 6f 72 | 73 20 61 72 65 20 72 65 |ow color|s are re|
|00003de0| 70 72 65 73 65 6e 74 65 | 64 20 61 74 20 74 68 65 |presente|d at the|
|00003df0| 20 6f 75 74 70 75 74 20 | 28 73 65 65 20 43 4f 4c | output |(see COL|
|00003e00| 4f 52 4d 41 50 29 2e 0a | 20 20 20 20 20 41 6c 73 |ORMAP)..| Als|
|00003e10| 6f 2c 20 20 20 78 77 70 | 73 20 20 20 69 6d 70 6c |o, xwp|s impl|
|00003e20| 65 6d 65 6e 74 73 20 20 | 20 74 68 65 20 20 20 42 |ements | the B|
|00003e30| 6f 75 6e 64 69 6e 67 42 | 6f 78 20 20 73 74 61 74 |oundingB|ox stat|
|00003e40| 65 6d 65 6e 74 20 20 69 | 6e 0a 20 20 20 20 20 50 |ement i|n. P|
|00003e50| 6f 73 74 53 63 72 69 70 | 74 20 77 68 69 63 68 20 |ostScrip|t which |
|00003e60| 64 65 66 69 6e 65 73 20 | 74 68 65 20 72 65 63 74 |defines |the rect|
|00003e70| 61 6e 67 6c 65 20 74 68 | 61 74 20 65 6e 63 6c 6f |angle th|at enclo|
|00003e80| 73 65 73 20 61 6c 6c 20 | 20 6f 66 0a 20 20 20 20 |ses all | of. |
|00003e90| 20 74 68 65 20 20 6d 61 | 72 6b 73 20 20 70 61 69 | the ma|rks pai|
|00003ea0| 6e 74 65 64 20 20 61 73 | 20 20 61 20 20 72 65 73 |nted as| a res|
|00003eb0| 75 6c 74 20 6f 66 20 65 | 78 65 63 75 74 69 6e 67 |ult of e|xecuting|
|00003ec0| 20 74 68 65 20 70 72 6f | 67 72 61 6d 2e 0a 20 20 | the pro|gram.. |
|00003ed0| 20 20 20 54 68 65 73 65 | 20 69 6d 61 67 65 73 20 | These| images |
|00003ee0| 63 61 6e 20 74 68 65 6e | 20 62 65 20 69 6e 63 6c |can then| be incl|
|00003ef0| 75 64 65 64 20 69 6e 20 | 70 72 6f 67 72 61 6d 73 |uded in |programs|
|00003f00| 20 73 75 63 68 20 61 73 | 20 20 4c 61 54 65 78 0a | such as| LaTex.|
|00003f10| 20 20 20 20 20 66 6f 72 | 20 70 72 69 6e 74 69 6e | for| printin|
|00003f20| 67 2e 0a 0a 41 52 47 55 | 4d 45 4e 54 20 53 55 4d |g...ARGU|MENT SUM|
|00003f30| 4d 41 52 59 0a 20 20 20 | 20 20 2d 68 65 6c 70 20 |MARY. | -help |
|00003f40| 20 20 50 72 69 6e 74 20 | 6f 75 74 20 74 68 65 20 | Print |out the |
|00003f50| 60 55 73 61 67 65 3a 27 | 20 63 6f 6d 6d 61 6e 64 |`Usage:'| command|
|00003f60| 20 73 79 6e 74 61 78 20 | 73 75 6d 6d 61 72 79 2e | syntax |summary.|
|00003f70| 0a 0a 20 20 20 20 20 2d | 6e 6f 62 64 72 73 20 54 |.. -|nobdrs T|
|00003f80| 68 69 73 20 61 72 67 75 | 6d 65 6e 74 20 73 70 65 |his argu|ment spe|
|00003f90| 63 69 66 69 65 73 20 74 | 68 61 74 20 74 68 65 20 |cifies t|hat the |
|00003fa0| 77 69 6e 64 6f 77 20 64 | 75 6d 70 20 20 73 68 6f |window d|ump sho|
|00003fb0| 75 6c 64 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |uld. | |
|00003fc0| 20 6e 6f 74 20 20 20 69 | 6e 63 6c 75 64 65 20 20 | not i|nclude |
|00003fd0| 20 74 68 65 20 70 69 78 | 65 6c 73 20 74 68 61 74 | the pix|els that|
|00003fe0| 20 63 6f 6d 70 6f 73 65 | 20 74 68 65 20 58 20 77 | compose| the X w|
|00003ff0| 69 6e 64 6f 77 0a 20 20 | 20 20 20 20 20 20 20 20 |indow. | |
|00004000| 20 20 20 62 6f 72 64 65 | 72 2e 20 20 54 68 69 73 | borde|r. This|
|00004010| 20 69 73 20 75 73 65 66 | 75 6c 20 69 6e 20 73 69 | is usef|ul in si|
|00004020| 74 75 61 74 69 6f 6e 73 | 20 77 68 65 72 65 20 79 |tuations| where y|
|00004030| 6f 75 20 20 6d 61 79 0a | 20 20 20 20 20 20 20 20 |ou may.| |
|00004040| 20 20 20 20 20 77 69 73 | 68 20 20 74 6f 20 69 6e | wis|h to in|
|00004050| 63 6c 75 64 65 20 74 68 | 65 20 20 77 69 6e 64 6f |clude th|e windo|
|00004060| 77 20 20 63 6f 6e 74 65 | 6e 74 73 20 69 6e 20 61 |w conte|nts in a|
|00004070| 20 64 6f 63 75 6d 65 6e | 74 0a 20 20 20 20 20 20 | documen|t. |
|00004080| 20 20 20 20 20 20 20 61 | 73 20 61 6e 20 69 6c 6c | a|s an ill|
|00004090| 75 73 74 72 61 74 69 6f | 6e 2e 0a 0a 20 20 20 20 |ustratio|n... |
|000040a0| 20 2d 6f 75 74 20 5f 08 | 66 5f 08 69 5f 08 6c 5f | -out _.|f_.i_.l_|
|000040b0| 08 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.e. | |
|000040c0| 54 68 69 73 20 61 72 67 | 75 6d 65 6e 74 20 61 6c |This arg|ument al|
|000040d0| 6c 6f 77 73 20 74 68 65 | 20 75 73 65 72 20 74 6f |lows the| user to|
|000040e0| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 20 73 70 65 | explici|tly spe|
|000040f0| 63 69 66 79 0a 20 20 20 | 20 20 20 20 20 20 20 20 |cify. | |
|00004100| 20 20 74 68 65 20 6f 75 | 74 70 75 74 20 66 69 6c | the ou|tput fil|
|00004110| 65 20 6f 6e 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |e on the| command|
|00004120| 20 6c 69 6e 65 2e 20 20 | 54 68 65 20 64 65 66 61 | line. |The defa|
|00004130| 75 6c 74 20 69 73 0a 20 | 20 20 20 20 20 20 20 20 |ult is. | |
|00004140| 20 20 20 20 74 6f 20 6f | 75 74 70 75 74 20 74 6f | to o|utput to|
|00004150| 20 73 74 61 6e 64 61 72 | 64 20 6f 75 74 2e 0a 0a | standar|d out...|
|00004160| 20 20 20 20 20 2d 74 78 | 20 5f 08 69 5f 08 6e 5f | -tx| _.i_.n_|
|00004170| 08 63 5f 08 68 5f 08 65 | 5f 08 73 2c 20 2d 74 79 |.c_.h_.e|_.s, -ty|
|00004180| 20 5f 08 69 5f 08 6e 5f | 08 63 5f 08 68 5f 08 65 | _.i_.n_|.c_.h_.e|
|00004190| 5f 08 73 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |_.s. | |
|000041a0| 20 54 68 65 73 65 20 61 | 72 67 75 6d 65 6e 74 73 | These a|rguments|
|000041b0| 20 61 6c 6c 6f 77 20 74 | 68 65 20 75 73 65 72 20 | allow t|he user |
|000041c0| 74 6f 20 6d 6f 76 65 20 | 74 68 65 20 69 6d 61 67 |to move |the imag|
|000041d0| 65 20 20 74 6f 0a 20 20 | 20 20 20 20 20 20 20 20 |e to. | |
|000041e0| 20 20 20 61 20 20 6e 65 | 77 20 20 70 6f 73 69 74 | a ne|w posit|
|000041f0| 69 6f 6e 20 77 69 74 68 | 20 72 65 73 70 65 63 74 |ion with| respect|
|00004200| 20 74 6f 20 74 68 65 20 | 70 61 67 65 20 62 79 20 | to the |page by |
|00004210| 74 68 65 20 74 68 65 0a | 20 20 20 20 20 20 20 20 |the the.| |
|00004220| 20 20 20 20 20 73 70 65 | 63 69 66 69 65 64 20 61 | spe|cified a|
|00004230| 6d 6f 75 6e 74 20 69 6e | 20 69 6e 63 68 65 73 2e |mount in| inches.|
|00004240| 20 20 54 68 65 20 6c 6f | 77 65 72 20 20 6c 65 66 | The lo|wer lef|
|00004250| 74 20 20 63 6f 72 6e 65 | 72 0a 20 20 20 20 20 20 |t corne|r. |
|00004260| 20 20 20 20 20 20 20 6f | 66 20 20 74 68 65 20 70 | o|f the p|
|00004270| 61 67 65 20 69 73 20 75 | 73 65 64 20 61 73 20 74 |age is u|sed as t|
|00004280| 68 65 20 6f 72 69 67 69 | 6e 2e 20 54 68 65 20 64 |he origi|n. The d|
|00004290| 69 73 70 6c 61 63 65 6d | 65 6e 74 0a 20 20 20 20 |isplacem|ent. |
|000042a0| 20 20 20 20 20 20 20 20 | 20 6e 65 65 64 20 6e 6f | | need no|
|000042b0| 74 20 62 65 20 61 6e 20 | 69 6e 74 65 67 65 72 2e |t be an |integer.|
|000042c0| 20 20 54 68 65 20 64 65 | 66 61 75 6c 74 20 69 73 | The de|fault is|
|000042d0| 20 2b 31 2e 30 20 20 69 | 6e 63 68 65 73 0a 20 20 | +1.0 i|nches. |
|000042e0| 20 20 20 20 20 20 20 20 | 20 20 20 69 6e 20 62 6f | | in bo|
|000042f0| 74 68 20 64 69 72 65 63 | 74 69 6f 6e 73 2e 0a 0a |th direc|tions...|
|00004300| 20 20 20 20 20 2d 73 78 | 20 5f 08 69 5f 08 6e 5f | -sx| _.i_.n_|
|00004310| 08 63 5f 08 68 5f 08 65 | 5f 08 73 2c 20 2d 73 79 |.c_.h_.e|_.s, -sy|
|00004320| 20 5f 08 69 5f 08 6e 5f | 08 63 5f 08 68 5f 08 65 | _.i_.n_|.c_.h_.e|
|00004330| 5f 08 73 0a 20 20 20 20 | 20 20 20 20 20 20 20 20 |_.s. | |
|00004340| 20 54 68 65 73 65 20 61 | 72 67 75 6d 65 6e 74 73 | These a|rguments|
|00004350| 20 61 6c 6c 6f 77 20 74 | 68 65 20 75 73 65 72 20 | allow t|he user |
|00004360| 74 6f 20 73 63 61 6c 65 | 20 74 68 65 20 69 6d 61 |to scale| the ima|
|00004370| 67 65 20 62 79 0a 20 20 | 20 20 20 20 20 20 20 20 |ge by. | |
|00004380| 20 20 20 74 68 65 20 20 | 73 70 65 63 69 66 69 65 | the |specifie|
|00004390| 64 20 20 61 6d 6f 75 6e | 74 20 20 69 6e 20 20 69 |d amoun|t in i|
|000043a0| 6e 63 68 65 73 2e 20 20 | 20 54 68 65 20 6c 6f 77 |nches. | The low|
|000043b0| 65 72 20 6c 65 66 74 0a | 20 20 20 20 20 20 20 20 |er left.| |
|000043c0| 20 20 20 20 20 70 6f 73 | 69 74 69 6f 6e 20 6f 66 | pos|ition of|
|000043d0| 20 74 68 65 20 77 69 6e | 64 6f 77 20 69 6d 61 67 | the win|dow imag|
|000043e0| 65 20 69 73 20 75 73 65 | 64 20 61 73 20 20 74 68 |e is use|d as th|
|000043f0| 65 20 20 6f 72 69 67 69 | 6e 0a 20 20 20 20 20 20 |e origi|n. |
|00004400| 20 20 20 20 20 20 20 66 | 6f 72 20 20 74 68 65 20 | f|or the |
|00004410| 20 73 63 61 6c 69 6e 67 | 2e 20 20 54 68 65 20 20 | scaling|. The |
|00004420| 73 63 61 6c 65 20 61 6d | 6f 75 6e 74 20 6e 65 65 |scale am|ount nee|
|00004430| 64 20 6e 6f 74 20 62 65 | 20 61 6e 0a 20 20 20 20 |d not be| an. |
|00004440| 20 20 20 20 20 20 20 20 | 20 69 6e 74 65 67 65 72 | | integer|
|00004450| 2e 20 20 54 68 65 20 64 | 65 66 61 75 6c 74 20 69 |. The d|efault i|
|00004460| 73 20 35 2e 30 20 69 6e | 63 68 65 73 20 75 6e 69 |s 5.0 in|ches uni|
|00004470| 66 6f 72 6d 20 73 63 61 | 6c 69 6e 67 2e 0a 0a 0a |form sca|ling....|
|00004480| 0a 0a 58 20 56 65 72 73 | 69 6f 6e 20 31 30 20 20 |..X Vers|ion 10 |
|00004490| 20 20 20 20 20 20 4c 61 | 73 74 20 63 68 61 6e 67 | La|st chang|
|000044a0| 65 3a 20 32 20 4d 61 72 | 63 68 20 31 39 38 39 20 |e: 2 Mar|ch 1989 |
|000044b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000044c0| 20 20 31 0a 0a 0a 0a 0a | 0a 0a 58 57 50 53 28 31 | 1.....|..XWPS(1|
|000044d0| 29 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |) | |
|000044e0| 20 20 20 20 55 53 45 52 | 20 43 4f 4d 4d 41 4e 44 | USER| COMMAND|
|000044f0| 53 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |S | |
|00004500| 20 20 20 20 58 57 50 53 | 28 31 29 0a 0a 0a 0a 20 | XWPS|(1).... |
|00004510| 20 20 20 20 2d 72 6f 74 | 20 5f 08 64 5f 08 65 5f | -rot| _.d_.e_|
|00004520| 08 67 5f 08 72 5f 08 65 | 5f 08 65 5f 08 73 0a 20 |.g_.r_.e|_.e_.s. |
|00004530| 20 20 20 20 20 20 20 20 | 20 20 20 20 54 68 65 73 | | Thes|
|00004540| 65 20 61 72 67 75 6d 65 | 6e 74 73 20 61 6c 6c 6f |e argume|nts allo|
|00004550| 77 20 74 68 65 20 75 73 | 65 72 20 74 6f 20 72 6f |w the us|er to ro|
|00004560| 74 61 74 65 20 20 74 68 | 65 20 20 69 6d 61 67 65 |tate th|e image|
|00004570| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 62 79 |. | by|
|00004580| 20 74 68 65 20 73 70 65 | 63 69 66 69 65 64 20 61 | the spe|cified a|
|00004590| 6d 6f 75 6e 74 20 69 6e | 20 64 65 67 72 65 65 73 |mount in| degrees|
|000045a0| 2e 20 20 52 6f 74 61 74 | 69 6f 6e 20 6f 63 63 75 |. Rotat|ion occu|
|000045b0| 72 73 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |rs. | |
|000045c0| 61 62 6f 75 74 20 74 68 | 65 20 63 75 72 72 65 6e |about th|e curren|
|000045d0| 74 20 6f 72 69 67 69 6e | 20 28 70 6f 73 73 69 62 |t origin| (possib|
|000045e0| 6c 79 20 63 68 61 6e 67 | 65 64 20 62 79 20 74 72 |ly chang|ed by tr|
|000045f0| 61 6e 73 2d 0a 20 20 20 | 20 20 20 20 20 20 20 20 |ans-. | |
|00004600| 20 20 6c 61 74 69 6f 6e | 29 20 20 69 6e 20 20 74 | lation|) in t|
|00004610| 68 65 20 20 63 6f 75 6e | 74 65 72 2d 63 6c 6f 63 |he coun|ter-cloc|
|00004620| 6b 77 69 73 65 20 20 64 | 69 72 65 63 74 69 6f 6e |kwise d|irection|
|00004630| 2e 20 20 54 68 65 0a 20 | 20 20 20 20 20 20 20 20 |. The. | |
|00004640| 20 20 20 20 72 6f 74 61 | 74 69 6f 6e 20 61 6d 6f | rota|tion amo|
|00004650| 75 6e 74 20 6e 65 65 64 | 20 6e 6f 74 20 62 65 20 |unt need| not be |
|00004660| 61 6e 20 69 6e 74 65 67 | 65 72 2e 20 20 54 68 65 |an integ|er. The|
|00004670| 20 64 65 66 61 75 6c 74 | 0a 20 20 20 20 20 20 20 | default|. |
|00004680| 20 20 20 20 20 20 69 73 | 20 30 20 64 65 67 72 65 | is| 0 degre|
|00004690| 65 73 20 28 6e 6f 20 72 | 6f 74 61 74 69 6f 6e 29 |es (no r|otation)|
|000046a0| 2e 0a 0a 20 20 20 20 20 | 5f 08 68 5f 08 6f 5f 08 |... |_.h_.o_.|
|000046b0| 73 5f 08 74 3a 5f 08 64 | 5f 08 69 5f 08 73 5f 08 |s_.t:_.d|_.i_.s_.|
|000046c0| 70 5f 08 6c 5f 08 61 5f | 08 79 0a 20 20 20 20 20 |p_.l_.a_|.y. |
|000046d0| 20 20 20 20 20 20 20 20 | 54 68 69 73 20 20 61 72 | |This ar|
|000046e0| 67 75 6d 65 6e 74 20 20 | 61 6c 6c 6f 77 20 20 79 |gument |allow y|
|000046f0| 6f 75 20 20 74 6f 20 20 | 73 70 65 63 69 66 79 20 |ou to |specify |
|00004700| 74 68 65 20 68 6f 73 74 | 20 61 6e 64 0a 20 20 20 |the host| and. |
|00004710| 20 20 20 20 20 20 20 20 | 20 20 64 69 73 70 6c 61 | | displa|
|00004720| 79 20 20 6e 75 6d 62 65 | 72 20 20 6f 6e 20 77 68 |y numbe|r on wh|
|00004730| 69 63 68 20 74 6f 20 66 | 69 6e 64 20 74 68 65 20 |ich to f|ind the |
|00004740| 74 61 72 67 65 74 20 77 | 69 6e 64 6f 77 2e 0a 20 |target w|indow.. |
|00004750| 20 20 20 20 20 20 20 20 | 20 20 20 20 46 6f 72 20 | | For |
|00004760| 65 78 61 6d 70 6c 65 20 | 60 78 77 70 73 20 6f 72 |example |`xwps or|
|00004770| 70 68 65 75 73 3a 31 27 | 20 77 6f 75 6c 64 20 73 |pheus:1'| would s|
|00004780| 70 65 63 69 66 79 20 74 | 68 61 74 20 20 74 68 65 |pecify t|hat the|
|00004790| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 74 61 |. | ta|
|000047a0| 72 67 65 74 20 20 77 69 | 6e 64 6f 77 20 20 69 73 |rget wi|ndow is|
|000047b0| 20 20 6f 6e 20 20 64 69 | 73 70 6c 61 79 20 20 60 | on di|splay `|
|000047c0| 31 27 20 20 6f 6e 20 74 | 68 65 20 6d 61 63 68 69 |1' on t|he machi|
|000047d0| 6e 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ne. | |
|000047e0| 60 6f 72 70 68 65 75 73 | 27 2e 20 20 42 79 20 20 |`orpheus|'. By |
|000047f0| 64 65 66 61 75 6c 74 2c | 20 20 5f 08 78 5f 08 77 |default,| _.x_.w|
|00004800| 5f 08 70 5f 08 73 20 20 | 75 73 65 73 20 20 74 68 |_.p_.s |uses th|
|00004810| 65 20 20 68 6f 73 74 20 | 20 61 6e 64 0a 20 20 20 |e host | and. |
|00004820| 20 20 20 20 20 20 20 20 | 20 20 64 69 73 70 6c 61 | | displa|
|00004830| 79 20 20 6e 75 6d 62 65 | 72 20 20 73 74 6f 72 65 |y numbe|r store|
|00004840| 64 20 20 69 6e 20 74 68 | 65 20 65 6e 76 69 72 6f |d in th|e enviro|
|00004850| 6e 6d 65 6e 74 20 76 61 | 72 69 61 62 6c 65 0a 20 |nment va|riable. |
|00004860| 20 20 20 20 20 20 20 20 | 20 20 20 20 44 49 53 50 | | DISP|
|00004870| 4c 41 59 2c 20 61 6e 64 | 20 74 68 65 72 65 66 6f |LAY, and| therefo|
|00004880| 72 65 20 74 68 69 73 20 | 61 72 67 75 6d 65 6e 74 |re this |argument|
|00004890| 20 69 73 20 6e 6f 74 20 | 6e 6f 72 6d 61 6c 6c 79 | is not |normally|
|000048a0| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 73 70 |. | sp|
|000048b0| 65 63 69 66 69 65 64 2e | 0a 0a 43 4f 4c 4f 52 20 |ecified.|..COLOR |
|000048c0| 4d 41 50 0a 20 20 20 20 | 20 5f 08 58 5f 08 77 5f |MAP. | _.X_.w_|
|000048d0| 08 70 5f 08 73 20 61 6c | 6c 6f 77 73 20 79 6f 75 |.p_.s al|lows you|
|000048e0| 20 74 6f 20 63 68 61 6e | 67 65 20 68 6f 77 20 61 | to chan|ge how a|
|000048f0| 20 63 6f 6c 6f 72 20 77 | 69 6c 6c 20 61 70 70 65 | color w|ill appe|
|00004900| 61 72 20 61 73 20 20 6f | 75 74 70 75 74 0a 20 20 |ar as o|utput. |
|00004910| 20 20 20 6f 6e 20 20 74 | 68 65 20 20 50 6f 73 74 | on t|he Post|
|00004920| 53 63 69 70 74 20 70 72 | 69 6e 74 65 72 2e 20 20 |Scipt pr|inter. |
|00004930| 54 68 69 73 20 66 65 61 | 74 75 72 65 20 69 73 20 |This fea|ture is |
|00004940| 75 73 65 66 75 6c 20 6f | 6e 20 62 6c 61 63 6b 0a |useful o|n black.|
|00004950| 20 20 20 20 20 61 6e 64 | 20 77 68 69 74 65 20 70 | and| white p|
|00004960| 72 69 6e 74 65 72 73 20 | 69 66 20 79 6f 75 20 77 |rinters |if you w|
|00004970| 61 6e 74 20 74 6f 20 68 | 69 67 68 6c 69 67 68 74 |ant to h|ighlight|
|00004980| 20 63 65 72 74 61 69 6e | 20 66 65 61 74 75 72 65 | certain| feature|
|00004990| 73 0a 20 20 20 20 20 69 | 6e 20 20 62 6c 61 63 6b |s. i|n black|
|000049a0| 20 20 6f 72 20 6d 61 73 | 6b 20 6f 75 74 20 6f 74 | or mas|k out ot|
|000049b0| 68 65 72 20 66 65 61 74 | 75 72 65 73 20 73 75 63 |her feat|ures suc|
|000049c0| 68 20 61 73 20 74 68 65 | 20 62 61 63 6b 67 72 6f |h as the| backgro|
|000049d0| 75 6e 64 0a 20 20 20 20 | 20 69 6e 20 77 68 69 74 |und. | in whit|
|000049e0| 65 2e 20 20 54 68 65 20 | 63 68 61 6e 67 65 73 20 |e. The |changes |
|000049f0| 61 72 65 20 73 70 65 63 | 69 66 69 65 64 20 62 79 |are spec|ified by|
|00004a00| 20 61 20 66 69 6c 65 20 | 77 68 69 63 68 20 79 6f | a file |which yo|
|00004a10| 75 20 73 65 74 0a 20 20 | 20 20 20 69 6e 20 79 6f |u set. | in yo|
|00004a20| 75 72 20 2e 58 64 65 66 | 61 75 6c 74 73 20 28 73 |ur .Xdef|aults (s|
|00004a30| 65 65 20 43 6f 6c 6f 72 | 6d 61 70 46 69 6c 65 29 |ee Color|mapFile)|
|00004a40| 2e 0a 0a 20 20 20 20 20 | 54 68 65 20 66 6f 72 6d |... |The form|
|00004a50| 61 74 20 6f 66 20 74 68 | 65 20 66 69 6c 65 20 69 |at of th|e file i|
|00004a60| 73 20 60 60 6f 6c 64 63 | 6f 6c 6f 72 20 6e 65 77 |s ``oldc|olor new|
|00004a70| 63 6f 6c 6f 72 27 27 2c | 20 77 68 65 72 65 20 20 |color'',| where |
|00004a80| 5f 08 6f 5f 08 6c 5f 08 | 64 5f 08 2d 0a 20 20 20 |_.o_.l_.|d_.-. |
|00004a90| 20 20 5f 08 63 5f 08 6f | 5f 08 6c 5f 08 6f 5f 08 | _.c_.o|_.l_.o_.|
|00004aa0| 72 20 20 61 6e 64 20 5f | 08 6e 5f 08 65 5f 08 77 |r and _|.n_.e_.w|
|00004ab0| 5f 08 63 5f 08 6f 5f 08 | 6c 5f 08 6f 5f 08 72 20 |_.c_.o_.|l_.o_.r |
|00004ac0| 61 72 65 20 74 68 65 20 | 75 73 75 61 6c 20 58 20 |are the |usual X |
|00004ad0| 63 6f 6c 6f 72 20 73 70 | 65 63 69 66 69 63 61 74 |color sp|ecificat|
|00004ae0| 69 6f 6e 73 2e 20 20 41 | 0a 20 20 20 20 20 73 70 |ions. A|. sp|
|00004af0| 65 63 69 61 6c 20 64 65 | 66 69 6e 69 74 69 6f 6e |ecial de|finition|
|00004b00| 20 4e 4f 43 4f 4c 4f 52 | 20 20 63 61 6e 20 20 62 | NOCOLOR| can b|
|00004b10| 65 20 20 73 70 65 63 69 | 66 69 65 64 20 20 61 73 |e speci|fied as|
|00004b20| 20 20 74 68 65 20 20 6e | 65 77 0a 20 20 20 20 20 | the n|ew. |
|00004b30| 63 6f 6c 6f 72 2c 20 69 | 66 20 6e 6f 20 70 72 69 |color, i|f no pri|
|00004b40| 6e 74 69 6e 67 20 6f 66 | 20 74 68 61 74 20 63 6f |nting of| that co|
|00004b50| 6c 6f 72 20 69 73 20 64 | 65 73 69 72 65 64 2e 0a |lor is d|esired..|
|00004b60| 0a 20 20 20 20 20 45 78 | 61 6d 70 6c 65 0a 20 20 |. Ex|ample. |
|00004b70| 20 20 20 20 20 53 6b 79 | 42 6c 75 65 20 62 6c 61 | Sky|Blue bla|
|00004b80| 63 6b 0a 20 20 20 20 20 | 20 20 23 38 35 38 35 38 |ck. | #85858|
|00004b90| 39 20 20 4e 4f 43 4f 4c | 4f 52 0a 0a 58 20 44 45 |9 NOCOL|OR..X DE|
|00004ba0| 46 41 55 4c 54 53 0a 20 | 20 20 20 20 54 72 61 6e |FAULTS. | Tran|
|00004bb0| 73 6c 61 74 65 58 20 20 | 20 20 20 4e 75 6d 62 65 |slateX | Numbe|
|00004bc0| 72 20 6f 66 20 69 6e 63 | 68 65 73 20 74 6f 20 6d |r of inc|hes to m|
|00004bd0| 6f 76 65 20 74 68 65 20 | 6f 72 69 67 69 6e 20 20 |ove the |origin |
|00004be0| 68 6f 72 69 7a 6f 6e 2d | 0a 20 20 20 20 20 20 20 |horizon-|. |
|00004bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 74 61 6c | | tal|
|00004c00| 6c 79 2e 20 20 44 65 66 | 61 75 6c 74 20 69 73 20 |ly. Def|ault is |
|00004c10| 2b 31 2e 30 20 69 6e 63 | 68 65 73 2e 0a 0a 20 20 |+1.0 inc|hes... |
|00004c20| 20 20 20 54 72 61 6e 73 | 6c 61 74 65 59 20 20 20 | Trans|lateY |
|00004c30| 20 20 4e 75 6d 62 65 72 | 20 6f 66 20 69 6e 63 68 | Number| of inch|
|00004c40| 65 73 20 74 6f 20 6d 6f | 76 65 20 20 74 68 65 20 |es to mo|ve the |
|00004c50| 20 6f 72 69 67 69 6e 20 | 20 76 65 72 74 69 2d 0a | origin | verti-.|
|00004c60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c70| 20 20 20 20 63 61 6c 6c | 79 2e 20 20 44 65 66 61 | call|y. Defa|
|00004c80| 75 6c 74 20 69 73 20 2b | 31 2e 30 20 69 6e 63 68 |ult is +|1.0 inch|
|00004c90| 65 73 2e 0a 0a 20 20 20 | 20 20 53 63 61 6c 65 58 |es... | ScaleX|
|00004ca0| 20 20 20 20 20 20 20 20 | 20 4e 75 6d 62 65 72 20 | | Number |
|00004cb0| 6f 66 20 69 6e 63 68 65 | 73 20 74 6f 20 73 63 61 |of inche|s to sca|
|00004cc0| 6c 65 20 74 68 65 20 69 | 6d 61 67 65 20 20 68 6f |le the i|mage ho|
|00004cd0| 72 69 7a 6f 6e 2d 0a 20 | 20 20 20 20 20 20 20 20 |rizon-. | |
|00004ce0| 20 20 20 20 20 20 20 20 | 20 20 20 74 61 6c 6c 79 | | tally|
|00004cf0| 2e 20 20 44 65 66 61 75 | 6c 74 20 69 73 20 35 2e |. Defau|lt is 5.|
|00004d00| 30 20 69 6e 63 68 65 73 | 2e 0a 0a 20 20 20 20 20 |0 inches|... |
|00004d10| 53 63 61 6c 65 59 20 20 | 20 20 20 20 20 20 20 4e |ScaleY | N|
|00004d20| 75 6d 62 65 72 20 6f 66 | 20 69 6e 63 68 65 73 20 |umber of| inches |
|00004d30| 74 6f 20 73 63 61 6c 65 | 20 20 74 68 65 20 20 69 |to scale| the i|
|00004d40| 6d 61 67 65 20 20 76 65 | 72 74 69 2d 0a 20 20 20 |mage ve|rti-. |
|00004d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004d60| 20 63 61 6c 6c 79 2e 20 | 20 44 65 66 61 75 6c 74 | cally. | Default|
|00004d70| 20 69 73 20 35 2e 30 20 | 69 6e 63 68 65 73 2e 0a | is 5.0 |inches..|
|00004d80| 0a 20 20 20 20 20 52 6f | 74 61 74 69 6f 6e 20 20 |. Ro|tation |
|00004d90| 20 20 20 20 20 4e 75 6d | 62 65 72 20 20 6f 66 20 | Num|ber of |
|00004da0| 20 64 65 67 72 65 65 73 | 20 20 74 6f 20 20 72 6f | degrees| to ro|
|00004db0| 74 61 74 65 20 20 20 74 | 68 65 20 20 20 69 6d 61 |tate t|he ima|
|00004dc0| 67 65 0a 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ge. | |
|00004dd0| 20 20 20 20 20 20 20 63 | 6f 75 6e 74 65 72 2d 63 | c|ounter-c|
|00004de0| 6c 6f 63 6b 77 69 73 65 | 2e 20 20 44 65 66 61 75 |lockwise|. Defau|
|00004df0| 6c 74 20 69 73 20 6e 6f | 20 72 6f 74 61 74 69 6f |lt is no| rotatio|
|00004e00| 6e 2e 0a 0a 20 20 20 20 | 20 43 6f 6c 6f 72 6d 61 |n... | Colorma|
|00004e10| 70 46 69 6c 65 20 20 20 | 57 68 65 72 65 20 74 6f |pFile |Where to|
|00004e20| 20 72 65 61 64 20 74 68 | 65 20 66 69 6c 65 20 63 | read th|e file c|
|00004e30| 6f 6e 74 61 69 6e 69 6e | 67 20 74 68 65 20 6d 61 |ontainin|g the ma|
|00004e40| 70 70 69 6e 67 0a 0a 0a | 0a 58 20 56 65 72 73 69 |pping...|.X Versi|
|00004e50| 6f 6e 20 31 30 20 20 20 | 20 20 20 20 20 4c 61 73 |on 10 | Las|
|00004e60| 74 20 63 68 61 6e 67 65 | 3a 20 32 20 4d 61 72 63 |t change|: 2 Marc|
|00004e70| 68 20 31 39 38 39 20 20 | 20 20 20 20 20 20 20 20 |h 1989 | |
|00004e80| 20 20 20 20 20 20 20 20 | 20 32 0a 0a 0a 0a 0a 0a | | 2......|
|00004e90| 0a 58 57 50 53 28 31 29 | 20 20 20 20 20 20 20 20 |.XWPS(1)| |
|00004ea0| 20 20 20 20 20 20 20 20 | 20 20 20 55 53 45 52 20 | | USER |
|00004eb0| 43 4f 4d 4d 41 4e 44 53 | 20 20 20 20 20 20 20 20 |COMMANDS| |
|00004ec0| 20 20 20 20 20 20 20 20 | 20 20 20 58 57 50 53 28 | | XWPS(|
|00004ed0| 31 29 0a 0a 0a 0a 20 20 | 20 20 20 20 20 20 20 20 |1).... | |
|00004ee0| 20 20 20 20 20 20 20 20 | 20 20 6f 66 0a 0a 20 20 | | of.. |
|00004ef0| 20 20 20 42 6f 72 64 65 | 72 73 20 20 20 20 20 20 | Borde|rs |
|00004f00| 20 20 49 66 20 60 60 6f | 6e 27 27 2c 20 74 68 65 | If ``o|n'', the|
|00004f10| 6e 20 62 6f 72 64 65 72 | 73 20 61 72 65 20 69 6e |n border|s are in|
|00004f20| 63 6c 75 64 65 64 20 20 | 69 6e 20 20 74 68 65 0a |cluded |in the.|
|00004f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f40| 20 20 20 20 64 75 6d 70 | 2e 20 20 44 65 66 61 75 | dump|. Defau|
|00004f50| 6c 74 20 69 73 20 60 60 | 6f 6e 27 27 2e 0a 0a 45 |lt is ``|on''...E|
|00004f60| 4e 56 49 52 4f 4e 4d 45 | 4e 54 0a 20 20 20 20 20 |NVIRONME|NT. |
|00004f70| 44 49 53 50 4c 41 59 20 | 54 6f 20 67 65 74 20 64 |DISPLAY |To get d|
|00004f80| 65 66 61 75 6c 74 20 68 | 6f 73 74 20 61 6e 64 20 |efault h|ost and |
|00004f90| 64 69 73 70 6c 61 79 20 | 6e 75 6d 62 65 72 2e 0a |display |number..|
|00004fa0| 0a 0a 41 55 54 48 4f 52 | 0a 20 20 20 20 20 43 6f |..AUTHOR|. Co|
|00004fb0| 70 79 72 69 67 68 74 20 | 31 39 38 39 20 55 6e 69 |pyright |1989 Uni|
|00004fc0| 76 65 72 73 69 74 79 20 | 6f 66 20 43 61 6c 69 66 |versity |of Calif|
|00004fd0| 6f 72 6e 69 61 2c 20 42 | 65 72 6b 65 6c 65 79 0a |ornia, B|erkeley.|
|00004fe0| 0a 20 20 20 20 20 42 65 | 6e 6a 61 6d 69 6e 20 43 |. Be|njamin C|
|00004ff0| 68 65 6e 2c 20 45 6c 65 | 63 74 72 6f 6e 69 63 73 |hen, Ele|ctronics|
|00005000| 20 52 65 73 65 61 72 63 | 68 20 4c 61 62 6f 72 61 | Researc|h Labora|
|00005010| 74 6f 72 79 0a 0a 0a 0a | 0a 0a 0a 0a 0a 0a 0a 0a |tory....|........|
|00005020| 0a 0a 0a 0a 0a 0a 0a 0a | 0a 0a 0a 0a 0a 0a 0a 0a |........|........|
|00005030| 0a 0a 0a 0a 0a 0a 0a 0a | 0a 0a 0a 0a 0a 0a 0a 58 |........|.......X|
|00005040| 20 56 65 72 73 69 6f 6e | 20 31 30 20 20 20 20 20 | Version| 10 |
|00005050| 20 20 20 4c 61 73 74 20 | 63 68 61 6e 67 65 3a 20 | Last |change: |
|00005060| 32 20 4d 61 72 63 68 20 | 31 39 38 39 20 20 20 20 |2 March |1989 |
|00005070| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 33 | | 3|
|00005080| 0a 0a 0a 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 20 |....SHAR|_EOF.fi |
|00005090| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|000050a0| 74 69 6e 67 20 63 68 65 | 63 6b 0a 69 66 20 74 65 |ting che|ck.if te|
|000050b0| 73 74 20 2d 66 20 27 58 | 64 65 66 61 75 6c 74 73 |st -f 'X|defaults|
|000050c0| 2e 73 61 6d 70 6c 65 27 | 0a 74 68 65 6e 0a 09 65 |.sample'|.then..e|
|000050d0| 63 68 6f 20 73 68 61 72 | 3a 20 77 69 6c 6c 20 6e |cho shar|: will n|
|000050e0| 6f 74 20 6f 76 65 72 2d | 77 72 69 74 65 20 65 78 |ot over-|write ex|
|000050f0| 69 73 74 69 6e 67 20 66 | 69 6c 65 20 22 27 58 64 |isting f|ile "'Xd|
|00005100| 65 66 61 75 6c 74 73 2e | 73 61 6d 70 6c 65 27 22 |efaults.|sample'"|
|00005110| 0a 65 6c 73 65 0a 63 61 | 74 20 3c 3c 20 5c 53 48 |.else.ca|t << \SH|
|00005120| 41 52 5f 45 4f 46 20 3e | 20 27 58 64 65 66 61 75 |AR_EOF >| 'Xdefau|
|00005130| 6c 74 73 2e 73 61 6d 70 | 6c 65 27 0a 78 77 70 73 |lts.samp|le'.xwps|
|00005140| 2e 53 63 61 6c 65 58 3a | 20 20 20 20 20 20 20 20 |.ScaleX:| |
|00005150| 20 20 20 20 32 2e 30 0a | 78 77 70 73 2e 53 63 61 | 2.0.|xwps.Sca|
|00005160| 6c 65 59 3a 20 20 20 20 | 20 20 20 20 20 20 20 20 |leY: | |
|00005170| 32 2e 30 0a 78 77 70 73 | 2e 54 72 61 6e 73 6c 61 |2.0.xwps|.Transla|
|00005180| 74 65 58 3a 20 20 20 20 | 20 20 20 20 33 2e 30 0a |teX: | 3.0.|
|00005190| 78 77 70 73 2e 54 72 61 | 6e 73 6c 61 74 65 59 3a |xwps.Tra|nslateY:|
|000051a0| 20 20 20 20 20 20 20 20 | 33 2e 30 0a 78 77 70 73 | |3.0.xwps|
|000051b0| 2e 52 6f 74 61 74 69 6f | 6e 3a 20 20 20 20 20 20 |.Rotatio|n: |
|000051c0| 20 20 20 20 39 30 2e 30 | 0a 78 77 70 73 2e 42 6f | 90.0|.xwps.Bo|
|000051d0| 72 64 65 72 73 3a 20 20 | 20 20 20 20 20 20 20 20 |rders: | |
|000051e0| 20 6f 66 66 0a 78 77 70 | 73 2e 43 6f 6c 6f 72 6d | off.xwp|s.Colorm|
|000051f0| 61 70 46 69 6c 65 3a 20 | 20 20 20 20 20 78 77 70 |apFile: | xwp|
|00005200| 73 2e 73 61 6d 70 6c 65 | 0a 53 48 41 52 5f 45 4f |s.sample|.SHAR_EO|
|00005210| 46 0a 66 69 20 23 20 65 | 6e 64 20 6f 66 20 6f 76 |F.fi # e|nd of ov|
|00005220| 65 72 77 72 69 74 69 6e | 67 20 63 68 65 63 6b 0a |erwritin|g check.|
|00005230| 69 66 20 74 65 73 74 20 | 2d 66 20 27 78 77 70 73 |if test |-f 'xwps|
|00005240| 2e 31 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |.1'.then|..echo s|
|00005250| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|00005260| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00005270| 67 20 66 69 6c 65 20 22 | 27 78 77 70 73 2e 31 27 |g file "|'xwps.1'|
|00005280| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|00005290| 48 41 52 5f 45 4f 46 20 | 3e 20 27 78 77 70 73 2e |HAR_EOF |> 'xwps.|
|000052a0| 31 27 0a 2e 54 48 20 58 | 57 50 53 20 31 20 22 32 |1'..TH X|WPS 1 "2|
|000052b0| 20 4d 61 72 63 68 20 31 | 39 38 39 22 20 22 58 20 | March 1|989" "X |
|000052c0| 56 65 72 73 69 6f 6e 20 | 31 30 22 0a 2e 53 48 20 |Version |10"..SH |
|000052d0| 4e 41 4d 45 0a 78 77 70 | 73 20 2d 20 58 20 57 69 |NAME.xwp|s - X Wi|
|000052e0| 6e 64 6f 77 20 53 79 73 | 74 65 6d 2c 20 77 69 6e |ndow Sys|tem, win|
|000052f0| 64 6f 77 20 69 6d 61 67 | 65 20 64 75 6d 70 65 72 |dow imag|e dumper|
|00005300| 2e 0a 2e 53 48 20 53 59 | 4e 4f 50 53 49 53 0a 2e |...SH SY|NOPSIS..|
|00005310| 42 20 22 78 77 70 73 22 | 0a 5b 20 2d 64 65 62 75 |B "xwps"|.[ -debu|
|00005320| 67 20 5d 20 5b 20 2d 68 | 65 6c 70 20 5d 20 5b 20 |g ] [ -h|elp ] [ |
|00005330| 2d 6e 6f 62 64 72 73 20 | 5d 20 5b 20 2d 6f 75 74 |-nobdrs |] [ -out|
|00005340| 20 5c 66 49 66 69 6c 65 | 5c 66 50 20 5d 20 5b 20 | \fIfile|\fP ] [ |
|00005350| 2d 78 79 20 5d 0a 5b 20 | 5c 66 49 68 6f 73 74 5c |-xy ].[ |\fIhost\|
|00005360| 66 50 3a 5c 66 49 64 69 | 73 70 6c 61 79 5c 66 50 |fP:\fIdi|splay\fP|
|00005370| 20 5d 0a 2e 53 48 20 44 | 45 53 43 52 49 50 54 49 | ]..SH D|ESCRIPTI|
|00005380| 4f 4e 0a 2e 50 50 0a 2e | 49 20 58 77 70 73 0a 69 |ON..PP..|I Xwps.i|
|00005390| 73 20 61 6e 20 58 20 57 | 69 6e 64 6f 77 20 53 79 |s an X W|indow Sy|
|000053a0| 73 74 65 6d 20 28 70 72 | 6f 74 6f 63 6f 6c 20 76 |stem (pr|otocol v|
|000053b0| 65 72 73 69 6f 6e 20 31 | 30 29 20 77 69 6e 64 6f |ersion 1|0) windo|
|000053c0| 77 20 69 6d 61 67 65 20 | 64 75 6d 70 69 6e 67 20 |w image |dumping |
|000053d0| 75 74 69 6c 69 74 79 2e | 0a 2e 49 20 58 77 70 73 |utility.|..I Xwps|
|000053e0| 0a 61 6c 6c 6f 77 73 20 | 58 20 75 73 65 72 73 20 |.allows |X users |
|000053f0| 74 6f 20 73 74 6f 72 65 | 20 77 69 6e 64 6f 77 20 |to store| window |
|00005400| 69 6d 61 67 65 73 20 69 | 6e 20 61 20 50 6f 73 74 |images i|n a Post|
|00005410| 53 63 72 69 70 74 20 66 | 69 6c 65 2e 20 20 0a 54 |Script f|ile. .T|
|00005420| 68 69 73 20 66 69 6c 65 | 20 63 61 6e 20 74 68 65 |his file| can the|
|00005430| 6e 20 62 65 20 70 72 69 | 6e 74 65 64 0a 6f 6e 20 |n be pri|nted.on |
|00005440| 61 20 50 6f 73 74 53 63 | 72 69 70 74 20 70 72 69 |a PostSc|ript pri|
|00005450| 6e 74 65 72 20 73 75 63 | 68 20 61 73 20 74 68 65 |nter suc|h as the|
|00005460| 20 41 70 70 6c 65 20 4c | 61 73 65 72 57 72 69 74 | Apple L|aserWrit|
|00005470| 65 72 2e 0a 54 68 65 20 | 74 61 72 67 65 74 20 77 |er..The |target w|
|00005480| 69 6e 64 6f 77 20 69 73 | 20 73 65 6c 65 63 74 65 |indow is| selecte|
|00005490| 64 20 62 79 20 63 6c 69 | 63 6b 69 6e 67 20 74 68 |d by cli|cking th|
|000054a0| 65 20 6d 6f 75 73 65 20 | 69 6e 20 74 68 65 20 64 |e mouse |in the d|
|000054b0| 65 73 69 72 65 64 20 77 | 69 6e 64 6f 77 2e 0a 54 |esired w|indow..T|
|000054c0| 68 65 20 6b 65 79 62 6f | 61 72 64 20 62 65 6c 6c |he keybo|ard bell|
|000054d0| 20 69 73 20 72 75 6e 67 | 20 6f 6e 63 65 20 61 74 | is rung| once at|
|000054e0| 20 74 68 65 20 62 65 67 | 69 6e 6e 69 6e 67 20 6f | the beg|inning o|
|000054f0| 66 20 74 68 65 20 64 75 | 6d 70 20 61 6e 64 20 74 |f the du|mp and t|
|00005500| 77 69 63 65 20 77 68 65 | 6e 0a 74 68 65 20 64 75 |wice whe|n.the du|
|00005510| 6d 70 20 69 73 20 63 6f | 6d 70 6c 65 74 65 64 2e |mp is co|mpleted.|
|00005520| 20 20 41 6e 20 6f 70 74 | 69 6f 6e 61 6c 20 63 6f | An opt|ional co|
|00005530| 6c 6f 72 20 6d 61 70 20 | 63 61 6e 20 62 65 20 73 |lor map |can be s|
|00005540| 70 65 63 69 66 69 65 64 | 20 73 6f 0a 75 73 65 72 |pecified| so.user|
|00005550| 73 20 63 61 6e 20 63 75 | 73 74 6f 6d 69 7a 65 20 |s can cu|stomize |
|00005560| 68 6f 77 20 63 6f 6c 6f | 72 73 20 61 72 65 20 72 |how colo|rs are r|
|00005570| 65 70 72 65 73 65 6e 74 | 65 64 20 61 74 20 74 68 |epresent|ed at th|
|00005580| 65 20 6f 75 74 70 75 74 | 20 28 73 65 65 20 43 4f |e output| (see CO|
|00005590| 4c 4f 52 4d 41 50 29 2e | 0a 41 6c 73 6f 2c 20 78 |LORMAP).|.Also, x|
|000055a0| 77 70 73 20 69 6d 70 6c | 65 6d 65 6e 74 73 20 74 |wps impl|ements t|
|000055b0| 68 65 20 42 6f 75 6e 64 | 69 6e 67 42 6f 78 20 73 |he Bound|ingBox s|
|000055c0| 74 61 74 65 6d 65 6e 74 | 20 69 6e 20 50 6f 73 74 |tatement| in Post|
|000055d0| 53 63 72 69 70 74 20 77 | 68 69 63 68 20 64 65 66 |Script w|hich def|
|000055e0| 69 6e 65 73 0a 74 68 65 | 20 72 65 63 74 61 6e 67 |ines.the| rectang|
|000055f0| 6c 65 20 74 68 61 74 20 | 65 6e 63 6c 6f 73 65 73 |le that |encloses|
|00005600| 20 61 6c 6c 20 6f 66 20 | 74 68 65 20 6d 61 72 6b | all of |the mark|
|00005610| 73 20 70 61 69 6e 74 65 | 64 20 61 73 20 61 20 72 |s painte|d as a r|
|00005620| 65 73 75 6c 74 20 6f 66 | 0a 65 78 65 63 75 74 69 |esult of|.executi|
|00005630| 6e 67 20 74 68 65 20 70 | 72 6f 67 72 61 6d 2e 20 |ng the p|rogram. |
|00005640| 20 54 68 65 73 65 20 69 | 6d 61 67 65 73 20 63 61 | These i|mages ca|
|00005650| 6e 20 74 68 65 6e 20 62 | 65 20 69 6e 63 6c 75 64 |n then b|e includ|
|00005660| 65 64 20 69 6e 20 70 72 | 6f 67 72 61 6d 73 0a 73 |ed in pr|ograms.s|
|00005670| 75 63 68 20 61 73 20 4c | 61 54 65 78 20 66 6f 72 |uch as L|aTex for|
|00005680| 20 70 72 69 6e 74 69 6e | 67 2e 0a 2e 53 48 20 41 | printin|g...SH A|
|00005690| 52 47 55 4d 45 4e 54 20 | 53 55 4d 4d 41 52 59 0a |RGUMENT |SUMMARY.|
|000056a0| 2e 50 50 0a 2e 54 50 20 | 38 0a 2e 42 20 22 2d 68 |.PP..TP |8..B "-h|
|000056b0| 65 6c 70 22 0a 50 72 69 | 6e 74 20 6f 75 74 20 74 |elp".Pri|nt out t|
|000056c0| 68 65 20 60 55 73 61 67 | 65 3a 27 20 63 6f 6d 6d |he `Usag|e:' comm|
|000056d0| 61 6e 64 20 73 79 6e 74 | 61 78 20 73 75 6d 6d 61 |and synt|ax summa|
|000056e0| 72 79 2e 0a 2e 50 50 0a | 2e 54 50 20 38 0a 2e 42 |ry...PP.|.TP 8..B|
|000056f0| 20 22 2d 6e 6f 62 64 72 | 73 22 0a 54 68 69 73 20 | "-nobdr|s".This |
|00005700| 61 72 67 75 6d 65 6e 74 | 20 73 70 65 63 69 66 69 |argument| specifi|
|00005710| 65 73 20 74 68 61 74 20 | 74 68 65 20 77 69 6e 64 |es that |the wind|
|00005720| 6f 77 20 64 75 6d 70 20 | 20 73 68 6f 75 6c 64 20 |ow dump | should |
|00005730| 20 6e 6f 74 20 20 69 6e | 63 6c 75 64 65 20 20 74 | not in|clude t|
|00005740| 68 65 0a 70 69 78 65 6c | 73 20 74 68 61 74 20 63 |he.pixel|s that c|
|00005750| 6f 6d 70 6f 73 65 20 74 | 68 65 20 58 20 77 69 6e |ompose t|he X win|
|00005760| 64 6f 77 20 62 6f 72 64 | 65 72 2e 20 20 54 68 69 |dow bord|er. Thi|
|00005770| 73 20 69 73 20 75 73 65 | 66 75 6c 20 69 6e 20 73 |s is use|ful in s|
|00005780| 69 74 75 61 74 69 6f 6e | 73 0a 77 68 65 72 65 20 |ituation|s.where |
|00005790| 79 6f 75 20 6d 61 79 20 | 77 69 73 68 20 74 6f 20 |you may |wish to |
|000057a0| 69 6e 63 6c 75 64 65 20 | 74 68 65 20 20 77 69 6e |include |the win|
|000057b0| 64 6f 77 20 20 63 6f 6e | 74 65 6e 74 73 20 69 6e |dow con|tents in|
|000057c0| 20 61 20 64 6f 63 75 6d | 65 6e 74 20 0a 61 73 20 | a docum|ent .as |
|000057d0| 61 6e 20 69 6c 6c 75 73 | 74 72 61 74 69 6f 6e 2e |an illus|tration.|
|000057e0| 0a 2e 50 50 0a 2e 54 50 | 20 38 0a 2e 42 20 22 2d |..PP..TP| 8..B "-|
|000057f0| 6f 75 74 20 5c 66 49 66 | 69 6c 65 5c 66 50 22 0a |out \fIf|ile\fP".|
|00005800| 54 68 69 73 20 61 72 67 | 75 6d 65 6e 74 20 61 6c |This arg|ument al|
|00005810| 6c 6f 77 73 20 74 68 65 | 20 75 73 65 72 20 74 6f |lows the| user to|
|00005820| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 73 70 65 63 | explici|tly spec|
|00005830| 69 66 79 20 74 68 65 20 | 6f 75 74 70 75 74 0a 66 |ify the |output.f|
|00005840| 69 6c 65 20 6f 6e 20 74 | 68 65 20 63 6f 6d 6d 61 |ile on t|he comma|
|00005850| 6e 64 20 6c 69 6e 65 2e | 20 20 54 68 65 20 64 65 |nd line.| The de|
|00005860| 66 61 75 6c 74 20 69 73 | 20 74 6f 20 6f 75 74 70 |fault is| to outp|
|00005870| 75 74 20 74 6f 20 73 74 | 61 6e 64 61 72 64 20 6f |ut to st|andard o|
|00005880| 75 74 2e 0a 2e 50 50 0a | 2e 54 50 20 38 0a 2e 42 |ut...PP.|.TP 8..B|
|00005890| 20 22 2d 74 78 20 5c 66 | 49 69 6e 63 68 65 73 5c | "-tx \f|Iinches\|
|000058a0| 66 50 2c 20 2d 74 79 20 | 5c 66 49 69 6e 63 68 65 |fP, -ty |\fIinche|
|000058b0| 73 5c 66 50 22 0a 54 68 | 65 73 65 20 61 72 67 75 |s\fP".Th|ese argu|
|000058c0| 6d 65 6e 74 73 20 61 6c | 6c 6f 77 20 74 68 65 20 |ments al|low the |
|000058d0| 75 73 65 72 20 74 6f 20 | 6d 6f 76 65 20 74 68 65 |user to |move the|
|000058e0| 20 69 6d 61 67 65 20 74 | 6f 20 61 20 6e 65 77 20 | image t|o a new |
|000058f0| 70 6f 73 69 74 69 6f 6e | 20 77 69 74 68 0a 72 65 |position| with.re|
|00005900| 73 70 65 63 74 20 74 6f | 20 74 68 65 20 70 61 67 |spect to| the pag|
|00005910| 65 20 62 79 20 74 68 65 | 20 74 68 65 20 73 70 65 |e by the| the spe|
|00005920| 63 69 66 69 65 64 20 61 | 6d 6f 75 6e 74 0a 69 6e |cified a|mount.in|
|00005930| 20 69 6e 63 68 65 73 2e | 20 20 54 68 65 20 6c 6f | inches.| The lo|
|00005940| 77 65 72 20 6c 65 66 74 | 20 63 6f 72 6e 65 72 20 |wer left| corner |
|00005950| 6f 66 20 74 68 65 20 70 | 61 67 65 20 69 73 20 75 |of the p|age is u|
|00005960| 73 65 64 20 61 73 20 74 | 68 65 20 6f 72 69 67 69 |sed as t|he origi|
|00005970| 6e 2e 20 0a 54 68 65 20 | 64 69 73 70 6c 61 63 65 |n. .The |displace|
|00005980| 6d 65 6e 74 20 6e 65 65 | 64 20 6e 6f 74 20 62 65 |ment nee|d not be|
|00005990| 20 61 6e 20 69 6e 74 65 | 67 65 72 2e 0a 54 68 65 | an inte|ger..The|
|000059a0| 20 64 65 66 61 75 6c 74 | 20 69 73 20 2b 31 2e 30 | default| is +1.0|
|000059b0| 20 69 6e 63 68 65 73 20 | 69 6e 20 62 6f 74 68 20 | inches |in both |
|000059c0| 64 69 72 65 63 74 69 6f | 6e 73 2e 0a 2e 50 50 0a |directio|ns...PP.|
|000059d0| 2e 54 50 20 38 0a 2e 42 | 20 22 2d 73 78 20 5c 66 |.TP 8..B| "-sx \f|
|000059e0| 49 69 6e 63 68 65 73 5c | 66 50 2c 20 2d 73 79 20 |Iinches\|fP, -sy |
|000059f0| 5c 66 49 69 6e 63 68 65 | 73 5c 66 50 22 0a 54 68 |\fIinche|s\fP".Th|
|00005a00| 65 73 65 20 61 72 67 75 | 6d 65 6e 74 73 20 61 6c |ese argu|ments al|
|00005a10| 6c 6f 77 20 74 68 65 20 | 75 73 65 72 20 74 6f 20 |low the |user to |
|00005a20| 73 63 61 6c 65 20 74 68 | 65 20 69 6d 61 67 65 20 |scale th|e image |
|00005a30| 62 79 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |by the s|pecified|
|00005a40| 20 61 6d 6f 75 6e 74 0a | 69 6e 20 69 6e 63 68 65 | amount.|in inche|
|00005a50| 73 2e 20 20 54 68 65 20 | 6c 6f 77 65 72 20 6c 65 |s. The |lower le|
|00005a60| 66 74 20 70 6f 73 69 74 | 69 6f 6e 20 6f 66 20 74 |ft posit|ion of t|
|00005a70| 68 65 20 77 69 6e 64 6f | 77 20 69 6d 61 67 65 20 |he windo|w image |
|00005a80| 69 73 20 75 73 65 64 0a | 61 73 20 74 68 65 20 6f |is used.|as the o|
|00005a90| 72 69 67 69 6e 20 66 6f | 72 20 74 68 65 20 73 63 |rigin fo|r the sc|
|00005aa0| 61 6c 69 6e 67 2e 20 54 | 68 65 20 73 63 61 6c 65 |aling. T|he scale|
|00005ab0| 20 61 6d 6f 75 6e 74 20 | 6e 65 65 64 20 6e 6f 74 | amount |need not|
|00005ac0| 20 62 65 20 61 6e 20 69 | 6e 74 65 67 65 72 2e 0a | be an i|nteger..|
|00005ad0| 54 68 65 20 64 65 66 61 | 75 6c 74 20 69 73 20 35 |The defa|ult is 5|
|00005ae0| 2e 30 20 69 6e 63 68 65 | 73 20 75 6e 69 66 6f 72 |.0 inche|s unifor|
|00005af0| 6d 20 73 63 61 6c 69 6e | 67 2e 0a 2e 50 50 0a 2e |m scalin|g...PP..|
|00005b00| 54 50 20 38 0a 2e 42 20 | 22 2d 72 6f 74 20 5c 66 |TP 8..B |"-rot \f|
|00005b10| 49 64 65 67 72 65 65 73 | 5c 66 50 22 0a 54 68 65 |Idegrees|\fP".The|
|00005b20| 73 65 20 61 72 67 75 6d | 65 6e 74 73 20 61 6c 6c |se argum|ents all|
|00005b30| 6f 77 20 74 68 65 20 75 | 73 65 72 20 74 6f 20 72 |ow the u|ser to r|
|00005b40| 6f 74 61 74 65 20 74 68 | 65 20 69 6d 61 67 65 20 |otate th|e image |
|00005b50| 62 79 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |by the s|pecified|
|00005b60| 20 61 6d 6f 75 6e 74 0a | 69 6e 20 64 65 67 72 65 | amount.|in degre|
|00005b70| 65 73 2e 20 20 52 6f 74 | 61 74 69 6f 6e 20 6f 63 |es. Rot|ation oc|
|00005b80| 63 75 72 73 20 61 62 6f | 75 74 20 74 68 65 20 63 |curs abo|ut the c|
|00005b90| 75 72 72 65 6e 74 20 6f | 72 69 67 69 6e 20 28 70 |urrent o|rigin (p|
|00005ba0| 6f 73 73 69 62 6c 79 20 | 63 68 61 6e 67 65 64 0a |ossibly |changed.|
|00005bb0| 62 79 20 74 72 61 6e 73 | 6c 61 74 69 6f 6e 29 20 |by trans|lation) |
|00005bc0| 69 6e 20 74 68 65 20 63 | 6f 75 6e 74 65 72 2d 63 |in the c|ounter-c|
|00005bd0| 6c 6f 63 6b 77 69 73 65 | 20 64 69 72 65 63 74 69 |lockwise| directi|
|00005be0| 6f 6e 2e 0a 54 68 65 20 | 72 6f 74 61 74 69 6f 6e |on..The |rotation|
|00005bf0| 20 61 6d 6f 75 6e 74 20 | 6e 65 65 64 20 6e 6f 74 | amount |need not|
|00005c00| 20 62 65 20 61 6e 20 69 | 6e 74 65 67 65 72 2e 0a | be an i|nteger..|
|00005c10| 54 68 65 20 64 65 66 61 | 75 6c 74 20 69 73 20 30 |The defa|ult is 0|
|00005c20| 20 64 65 67 72 65 65 73 | 20 28 6e 6f 20 72 6f 74 | degrees| (no rot|
|00005c30| 61 74 69 6f 6e 29 2e 0a | 2e 50 50 0a 2e 54 50 20 |ation)..|.PP..TP |
|00005c40| 38 0a 2e 42 20 22 5c 66 | 49 68 6f 73 74 5c 66 50 |8..B "\f|Ihost\fP|
|00005c50| 3a 5c 66 49 64 69 73 70 | 6c 61 79 5c 66 50 22 0a |:\fIdisp|lay\fP".|
|00005c60| 54 68 69 73 20 20 61 72 | 67 75 6d 65 6e 74 20 20 |This ar|gument |
|00005c70| 61 6c 6c 6f 77 20 20 79 | 6f 75 20 20 74 6f 20 20 |allow y|ou to |
|00005c80| 73 70 65 63 69 66 79 20 | 74 68 65 20 68 6f 73 74 |specify |the host|
|00005c90| 20 61 6e 64 20 64 69 73 | 70 6c 61 79 20 6e 75 6d | and dis|play num|
|00005ca0| 62 65 72 20 6f 6e 0a 77 | 68 69 63 68 20 74 6f 20 |ber on.w|hich to |
|00005cb0| 66 69 6e 64 20 74 68 65 | 20 74 61 72 67 65 74 20 |find the| target |
|00005cc0| 77 69 6e 64 6f 77 2e 20 | 20 46 6f 72 20 65 78 61 |window. | For exa|
|00005cd0| 6d 70 6c 65 20 60 78 77 | 70 73 20 6f 72 70 68 65 |mple `xw|ps orphe|
|00005ce0| 75 73 3a 31 27 0a 77 6f | 75 6c 64 20 73 70 65 63 |us:1'.wo|uld spec|
|00005cf0| 69 66 79 20 74 68 61 74 | 20 74 68 65 20 74 61 72 |ify that| the tar|
|00005d00| 67 65 74 20 77 69 6e 64 | 6f 77 20 69 73 20 6f 6e |get wind|ow is on|
|00005d10| 20 64 69 73 70 6c 61 79 | 20 60 31 27 20 6f 6e 20 | display| `1' on |
|00005d20| 74 68 65 20 6d 61 63 68 | 69 6e 65 0a 60 6f 72 70 |the mach|ine.`orp|
|00005d30| 68 65 75 73 27 2e 20 20 | 42 79 20 64 65 66 61 75 |heus'. |By defau|
|00005d40| 6c 74 2c 0a 2e 49 20 78 | 77 70 73 0a 75 73 65 73 |lt,..I x|wps.uses|
|00005d50| 20 74 68 65 20 68 6f 73 | 74 20 61 6e 64 20 64 69 | the hos|t and di|
|00005d60| 73 70 6c 61 79 20 6e 75 | 6d 62 65 72 20 73 74 6f |splay nu|mber sto|
|00005d70| 72 65 64 20 69 6e 20 74 | 68 65 20 65 6e 76 69 72 |red in t|he envir|
|00005d80| 6f 6e 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 0a |onment v|ariable.|
|00005d90| 44 49 53 50 4c 41 59 2c | 20 61 6e 64 20 74 68 65 |DISPLAY,| and the|
|00005da0| 72 65 66 6f 72 65 20 74 | 68 69 73 20 61 72 67 75 |refore t|his argu|
|00005db0| 6d 65 6e 74 20 69 73 20 | 6e 6f 74 20 6e 6f 72 6d |ment is |not norm|
|00005dc0| 61 6c 6c 79 20 73 70 65 | 63 69 66 69 65 64 2e 0a |ally spe|cified..|
|00005dd0| 2e 53 48 20 22 43 4f 4c | 4f 52 20 4d 41 50 22 0a |.SH "COL|OR MAP".|
|00005de0| 2e 49 20 58 77 70 73 0a | 61 6c 6c 6f 77 73 20 79 |.I Xwps.|allows y|
|00005df0| 6f 75 20 74 6f 20 63 68 | 61 6e 67 65 20 68 6f 77 |ou to ch|ange how|
|00005e00| 20 61 20 63 6f 6c 6f 72 | 20 77 69 6c 6c 20 61 70 | a color| will ap|
|00005e10| 70 65 61 72 20 61 73 20 | 6f 75 74 70 75 74 20 6f |pear as |output o|
|00005e20| 6e 20 74 68 65 20 50 6f | 73 74 53 63 69 70 74 0a |n the Po|stScipt.|
|00005e30| 70 72 69 6e 74 65 72 2e | 20 20 54 68 69 73 20 66 |printer.| This f|
|00005e40| 65 61 74 75 72 65 20 69 | 73 20 75 73 65 66 75 6c |eature i|s useful|
|00005e50| 20 6f 6e 20 62 6c 61 63 | 6b 20 61 6e 64 20 77 68 | on blac|k and wh|
|00005e60| 69 74 65 20 70 72 69 6e | 74 65 72 73 0a 69 66 20 |ite prin|ters.if |
|00005e70| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 68 69 67 68 |you want| to high|
|00005e80| 6c 69 67 68 74 20 63 65 | 72 74 61 69 6e 20 66 65 |light ce|rtain fe|
|00005e90| 61 74 75 72 65 73 20 69 | 6e 20 62 6c 61 63 6b 20 |atures i|n black |
|00005ea0| 6f 72 20 6d 61 73 6b 20 | 6f 75 74 20 6f 74 68 65 |or mask |out othe|
|00005eb0| 72 0a 66 65 61 74 75 72 | 65 73 20 73 75 63 68 20 |r.featur|es such |
|00005ec0| 61 73 20 74 68 65 20 62 | 61 63 6b 67 72 6f 75 6e |as the b|ackgroun|
|00005ed0| 64 20 69 6e 20 77 68 69 | 74 65 2e 20 20 54 68 65 |d in whi|te. The|
|00005ee0| 20 63 68 61 6e 67 65 73 | 20 61 72 65 20 73 70 65 | changes| are spe|
|00005ef0| 63 69 66 69 65 64 20 62 | 79 0a 61 20 66 69 6c 65 |cified b|y.a file|
|00005f00| 20 77 68 69 63 68 20 79 | 6f 75 20 73 65 74 20 69 | which y|ou set i|
|00005f10| 6e 20 79 6f 75 72 20 2e | 58 64 65 66 61 75 6c 74 |n your .|Xdefault|
|00005f20| 73 20 28 73 65 65 20 43 | 6f 6c 6f 72 6d 61 70 46 |s (see C|olormapF|
|00005f30| 69 6c 65 29 2e 0a 2e 50 | 50 0a 54 68 65 20 66 6f |ile)...P|P.The fo|
|00005f40| 72 6d 61 74 20 6f 66 20 | 74 68 65 20 66 69 6c 65 |rmat of |the file|
|00005f50| 20 69 73 20 60 60 6f 6c | 64 63 6f 6c 6f 72 20 6e | is ``ol|dcolor n|
|00005f60| 65 77 63 6f 6c 6f 72 27 | 27 2c 20 77 68 65 72 65 |ewcolor'|', where|
|00005f70| 20 0a 2e 42 20 22 5c 66 | 49 6f 6c 64 63 6f 6c 6f | ..B "\f|Ioldcolo|
|00005f80| 72 5c 66 50 20 61 6e 64 | 20 5c 66 49 6e 65 77 63 |r\fP and| \fInewc|
|00005f90| 6f 6c 6f 72 5c 66 50 22 | 0a 61 72 65 20 74 68 65 |olor\fP"|.are the|
|00005fa0| 20 75 73 75 61 6c 20 58 | 20 63 6f 6c 6f 72 20 73 | usual X| color s|
|00005fb0| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 73 2e 20 20 |pecifica|tions. |
|00005fc0| 41 20 73 70 65 63 69 61 | 6c 20 64 65 66 69 6e 69 |A specia|l defini|
|00005fd0| 74 69 6f 6e 20 4e 4f 43 | 4f 4c 4f 52 0a 63 61 6e |tion NOC|OLOR.can|
|00005fe0| 20 62 65 20 73 70 65 63 | 69 66 69 65 64 20 61 73 | be spec|ified as|
|00005ff0| 20 74 68 65 20 6e 65 77 | 20 63 6f 6c 6f 72 2c 20 | the new| color, |
|00006000| 69 66 20 6e 6f 20 70 72 | 69 6e 74 69 6e 67 20 6f |if no pr|inting o|
|00006010| 66 20 74 68 61 74 20 63 | 6f 6c 6f 72 0a 69 73 20 |f that c|olor.is |
|00006020| 64 65 73 69 72 65 64 2e | 0a 2e 50 50 0a 45 78 61 |desired.|..PP.Exa|
|00006030| 6d 70 6c 65 20 20 0a 2e | 6e 66 0a 20 20 53 6b 79 |mple ..|nf. Sky|
|00006040| 42 6c 75 65 20 62 6c 61 | 63 6b 0a 20 20 23 38 35 |Blue bla|ck. #85|
|00006050| 38 35 38 39 20 20 4e 4f | 43 4f 4c 4f 52 0a 2e 4c |8589 NO|COLOR..L|
|00006060| 50 0a 2e 53 48 20 22 58 | 20 44 45 46 41 55 4c 54 |P..SH "X| DEFAULT|
|00006070| 53 22 0a 2e 54 50 20 31 | 35 0a 2e 42 20 54 72 61 |S"..TP 1|5..B Tra|
|00006080| 6e 73 6c 61 74 65 58 0a | 4e 75 6d 62 65 72 20 6f |nslateX.|Number o|
|00006090| 66 20 69 6e 63 68 65 73 | 20 74 6f 20 6d 6f 76 65 |f inches| to move|
|000060a0| 20 74 68 65 20 6f 72 69 | 67 69 6e 20 68 6f 72 69 | the ori|gin hori|
|000060b0| 7a 6f 6e 74 61 6c 6c 79 | 2e 0a 44 65 66 61 75 6c |zontally|..Defaul|
|000060c0| 74 20 69 73 20 2b 31 2e | 30 20 69 6e 63 68 65 73 |t is +1.|0 inches|
|000060d0| 2e 0a 2e 54 50 20 31 35 | 0a 2e 42 20 54 72 61 6e |...TP 15|..B Tran|
|000060e0| 73 6c 61 74 65 59 0a 4e | 75 6d 62 65 72 20 6f 66 |slateY.N|umber of|
|000060f0| 20 69 6e 63 68 65 73 20 | 74 6f 20 6d 6f 76 65 20 | inches |to move |
|00006100| 74 68 65 20 6f 72 69 67 | 69 6e 20 76 65 72 74 69 |the orig|in verti|
|00006110| 63 61 6c 6c 79 2e 0a 44 | 65 66 61 75 6c 74 20 69 |cally..D|efault i|
|00006120| 73 20 2b 31 2e 30 20 69 | 6e 63 68 65 73 2e 0a 2e |s +1.0 i|nches...|
|00006130| 54 50 20 31 35 0a 2e 42 | 20 53 63 61 6c 65 58 0a |TP 15..B| ScaleX.|
|00006140| 4e 75 6d 62 65 72 20 6f | 66 20 69 6e 63 68 65 73 |Number o|f inches|
|00006150| 20 74 6f 20 73 63 61 6c | 65 20 74 68 65 20 69 6d | to scal|e the im|
|00006160| 61 67 65 20 68 6f 72 69 | 7a 6f 6e 74 61 6c 6c 79 |age hori|zontally|
|00006170| 2e 0a 44 65 66 61 75 6c | 74 20 69 73 20 35 2e 30 |..Defaul|t is 5.0|
|00006180| 20 69 6e 63 68 65 73 2e | 0a 2e 54 50 20 31 35 0a | inches.|..TP 15.|
|00006190| 2e 42 20 53 63 61 6c 65 | 59 0a 4e 75 6d 62 65 72 |.B Scale|Y.Number|
|000061a0| 20 6f 66 20 69 6e 63 68 | 65 73 20 74 6f 20 73 63 | of inch|es to sc|
|000061b0| 61 6c 65 20 74 68 65 20 | 69 6d 61 67 65 20 76 65 |ale the |image ve|
|000061c0| 72 74 69 63 61 6c 6c 79 | 2e 0a 44 65 66 61 75 6c |rtically|..Defaul|
|000061d0| 74 20 69 73 20 35 2e 30 | 20 69 6e 63 68 65 73 2e |t is 5.0| inches.|
|000061e0| 0a 2e 54 50 20 31 35 0a | 2e 42 20 52 6f 74 61 74 |..TP 15.|.B Rotat|
|000061f0| 69 6f 6e 0a 4e 75 6d 62 | 65 72 20 6f 66 20 64 65 |ion.Numb|er of de|
|00006200| 67 72 65 65 73 20 74 6f | 20 72 6f 74 61 74 65 20 |grees to| rotate |
|00006210| 74 68 65 20 69 6d 61 67 | 65 20 63 6f 75 6e 74 65 |the imag|e counte|
|00006220| 72 2d 63 6c 6f 63 6b 77 | 69 73 65 2e 0a 44 65 66 |r-clockw|ise..Def|
|00006230| 61 75 6c 74 20 69 73 20 | 6e 6f 20 72 6f 74 61 74 |ault is |no rotat|
|00006240| 69 6f 6e 2e 0a 2e 54 50 | 20 31 35 0a 2e 42 20 43 |ion...TP| 15..B C|
|00006250| 6f 6c 6f 72 6d 61 70 46 | 69 6c 65 0a 57 68 65 72 |olormapF|ile.Wher|
|00006260| 65 20 74 6f 20 72 65 61 | 64 20 74 68 65 20 66 69 |e to rea|d the fi|
|00006270| 6c 65 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 74 68 |le conta|ining th|
|00006280| 65 20 6d 61 70 70 69 6e | 67 20 6f 66 20 27 63 6f |e mappin|g of 'co|
|00006290| 6c 6f 72 73 27 2e 0a 2e | 54 50 0a 2e 42 20 42 6f |lors'...|TP..B Bo|
|000062a0| 72 64 65 72 73 0a 49 66 | 20 60 60 6f 6e 27 27 2c |rders.If| ``on'',|
|000062b0| 20 74 68 65 6e 20 62 6f | 72 64 65 72 73 20 61 72 | then bo|rders ar|
|000062c0| 65 20 69 6e 63 6c 75 64 | 65 64 20 69 6e 20 74 68 |e includ|ed in th|
|000062d0| 65 20 64 75 6d 70 2e 0a | 44 65 66 61 75 6c 74 20 |e dump..|Default |
|000062e0| 69 73 20 60 60 6f 6e 27 | 27 2e 0a 2e 53 48 20 45 |is ``on'|'...SH E|
|000062f0| 4e 56 49 52 4f 4e 4d 45 | 4e 54 0a 2e 50 50 0a 2e |NVIRONME|NT..PP..|
|00006300| 54 50 20 38 0a 2e 42 20 | 44 49 53 50 4c 41 59 0a |TP 8..B |DISPLAY.|
|00006310| 54 6f 20 67 65 74 20 64 | 65 66 61 75 6c 74 20 68 |To get d|efault h|
|00006320| 6f 73 74 20 61 6e 64 20 | 64 69 73 70 6c 61 79 20 |ost and |display |
|00006330| 6e 75 6d 62 65 72 2e 0a | 0a 2e 53 48 20 41 55 54 |number..|..SH AUT|
|00006340| 48 4f 52 0a 2e 50 50 0a | 43 6f 70 79 72 69 67 68 |HOR..PP.|Copyrigh|
|00006350| 74 20 31 39 38 39 20 55 | 6e 69 76 65 72 73 69 74 |t 1989 U|niversit|
|00006360| 79 20 6f 66 20 43 61 6c | 69 66 6f 72 6e 69 61 2c |y of Cal|ifornia,|
|00006370| 20 42 65 72 6b 65 6c 65 | 79 0a 2e 50 50 0a 42 65 | Berkele|y..PP.Be|
|00006380| 6e 6a 61 6d 69 6e 20 43 | 68 65 6e 2c 20 45 6c 65 |njamin C|hen, Ele|
|00006390| 63 74 72 6f 6e 69 63 73 | 20 52 65 73 65 61 72 63 |ctronics| Researc|
|000063a0| 68 20 4c 61 62 6f 72 61 | 74 6f 72 79 0a 0a 53 48 |h Labora|tory..SH|
|000063b0| 41 52 5f 45 4f 46 0a 66 | 69 20 23 20 65 6e 64 20 |AR_EOF.f|i # end |
|000063c0| 6f 66 20 6f 76 65 72 77 | 72 69 74 69 6e 67 20 63 |of overw|riting c|
|000063d0| 68 65 63 6b 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |heck.if |test -f |
|000063e0| 27 63 6f 6c 6f 72 6d 61 | 70 2e 73 61 6d 70 6c 65 |'colorma|p.sample|
|000063f0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.