home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: 1925
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C source text
| default
| |
99%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 61 6c 74 2e |Newsgrou|ps: alt.|
|00000010| 73 6f 75 72 63 65 73 0a | 46 72 6f 6d 3a 20 6d 6c |sources.|From: ml|
|00000020| 65 69 73 68 65 72 40 6e | 6d 73 75 2e 65 64 75 20 |eisher@n|msu.edu |
|00000030| 28 4d 61 72 6b 20 4c 65 | 69 73 68 65 72 29 0a 53 |(Mark Le|isher).S|
|00000040| 75 62 6a 65 63 74 3a 20 | 5b 78 70 65 72 74 5d 20 |ubject: |[xpert] |
|00000050| 52 65 3a 20 48 6f 77 20 | 74 6f 20 47 65 74 20 39 |Re: How |to Get 9|
|00000060| 30 20 64 65 67 72 65 65 | 20 52 6f 74 61 74 65 64 |0 degree| Rotated|
|00000070| 20 46 6f 6e 74 73 3f 20 | 28 63 6f 64 65 29 0a 4d | Fonts? |(code).M|
|00000080| 65 73 73 61 67 65 2d 49 | 44 3a 20 3c 31 39 39 30 |essage-I|D: <1990|
|00000090| 4f 63 74 38 2e 31 35 31 | 33 31 33 2e 31 30 39 34 |Oct8.151|313.1094|
|000000a0| 32 40 6d 61 74 68 2e 6c | 73 61 2e 75 6d 69 63 68 |2@math.l|sa.umich|
|000000b0| 2e 65 64 75 3e 0a 44 61 | 74 65 3a 20 4d 6f 6e 2c |.edu>.Da|te: Mon,|
|000000c0| 20 38 20 4f 63 74 20 39 | 30 20 31 35 3a 31 33 3a | 8 Oct 9|0 15:13:|
|000000d0| 31 33 20 47 4d 54 0a 0a | 41 72 63 68 69 76 65 2d |13 GMT..|Archive-|
|000000e0| 6e 61 6d 65 3a 20 78 72 | 6f 74 2f 30 37 2d 4f 63 |name: xr|ot/07-Oc|
|000000f0| 74 2d 39 30 0a 4f 72 69 | 67 69 6e 61 6c 2d 70 6f |t-90.Ori|ginal-po|
|00000100| 73 74 69 6e 67 2d 62 79 | 3a 20 6d 6c 65 69 73 68 |sting-by|: mleish|
|00000110| 65 72 40 6e 6d 73 75 2e | 65 64 75 20 28 4d 61 72 |er@nmsu.|edu (Mar|
|00000120| 6b 20 4c 65 69 73 68 65 | 72 29 0a 4f 72 69 67 69 |k Leishe|r).Origi|
|00000130| 6e 61 6c 2d 73 75 62 6a | 65 63 74 3a 20 52 65 3a |nal-subj|ect: Re:|
|00000140| 20 48 6f 77 20 74 6f 20 | 47 65 74 20 39 30 20 64 | How to |Get 90 d|
|00000150| 65 67 72 65 65 20 52 6f | 74 61 74 65 64 20 46 6f |egree Ro|tated Fo|
|00000160| 6e 74 73 3f 20 28 63 6f | 64 65 29 0a 52 65 70 6f |nts? (co|de).Repo|
|00000170| 73 74 65 64 2d 62 79 3a | 20 65 6d 76 40 6d 61 74 |sted-by:| emv@mat|
|00000180| 68 2e 6c 73 61 2e 75 6d | 69 63 68 2e 65 64 75 20 |h.lsa.um|ich.edu |
|00000190| 28 45 64 77 61 72 64 20 | 56 69 65 6c 6d 65 74 74 |(Edward |Vielmett|
|000001a0| 69 29 0a 0a 5b 52 65 70 | 6f 73 74 65 64 20 66 72 |i)..[Rep|osted fr|
|000001b0| 6f 6d 20 63 6f 6d 70 2e | 77 69 6e 64 6f 77 73 2e |om comp.|windows.|
|000001c0| 78 2e 0a 43 6f 6d 6d 65 | 6e 74 73 20 6f 6e 20 74 |x..Comme|nts on t|
|000001d0| 68 69 73 20 73 65 72 76 | 69 63 65 20 74 6f 20 65 |his serv|ice to e|
|000001e0| 6d 76 40 6d 61 74 68 2e | 6c 73 61 2e 75 6d 69 63 |mv@math.|lsa.umic|
|000001f0| 68 2e 65 64 75 20 28 45 | 64 77 61 72 64 20 56 69 |h.edu (E|dward Vi|
|00000200| 65 6c 6d 65 74 74 69 29 | 2e 5d 0a 0a 42 65 6c 6f |elmetti)|.]..Belo|
|00000210| 77 20 69 73 20 73 6f 6d | 65 20 63 6f 64 65 20 49 |w is som|e code I|
|00000220| 20 70 75 6c 6c 65 64 20 | 6f 66 66 20 6f 66 20 74 | pulled |off of t|
|00000230| 68 69 73 20 76 65 72 79 | 20 67 72 6f 75 70 28 73 |his very| group(s|
|00000240| 6f 6d 65 20 74 69 6d 65 | 20 61 67 6f 29 2e 20 20 |ome time| ago). |
|00000250| 49 0a 74 68 69 6e 6b 20 | 49 20 70 6c 61 79 65 64 |I.think |I played|
|00000260| 20 77 69 74 68 20 69 74 | 20 61 20 6c 69 74 74 6c | with it| a littl|
|00000270| 65 2c 20 62 75 74 20 6e | 65 76 65 72 20 73 65 72 |e, but n|ever ser|
|00000280| 69 6f 75 73 6c 79 2e 0a | 0a 2d 2d 2d 2d 2d 2d 2d |iously..|.-------|
|00000290| 2d 2d 2d 2d 2d 20 43 75 | 74 20 48 65 72 65 20 2d |----- Cu|t Here -|
|000002a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002b0| 2d 2d 2d 2d 2d 0a 23 21 | 2f 62 69 6e 2f 73 68 0a |-----.#!|/bin/sh.|
|000002c0| 23 20 54 68 69 73 20 69 | 73 20 61 20 73 68 65 6c |# This i|s a shel|
|000002d0| 6c 20 61 72 63 68 69 76 | 65 20 28 70 72 6f 64 75 |l archiv|e (produ|
|000002e0| 63 65 64 20 62 79 20 73 | 68 61 72 20 33 2e 34 39 |ced by s|har 3.49|
|000002f0| 29 0a 23 20 54 6f 20 65 | 78 74 72 61 63 74 20 74 |).# To e|xtract t|
|00000300| 68 65 20 66 69 6c 65 73 | 20 66 72 6f 6d 20 74 68 |he files| from th|
|00000310| 69 73 20 61 72 63 68 69 | 76 65 2c 20 73 61 76 65 |is archi|ve, save|
|00000320| 20 69 74 20 74 6f 20 61 | 20 66 69 6c 65 2c 20 72 | it to a| file, r|
|00000330| 65 6d 6f 76 65 0a 23 20 | 65 76 65 72 79 74 68 69 |emove.# |everythi|
|00000340| 6e 67 20 61 62 6f 76 65 | 20 74 68 65 20 22 21 2f |ng above| the "!/|
|00000350| 62 69 6e 2f 73 68 22 20 | 6c 69 6e 65 20 61 62 6f |bin/sh" |line abo|
|00000360| 76 65 2c 20 61 6e 64 20 | 74 79 70 65 20 22 73 68 |ve, and |type "sh|
|00000370| 20 66 69 6c 65 5f 6e 61 | 6d 65 22 2e 0a 23 0a 23 | file_na|me"..#.#|
|00000380| 20 6d 61 64 65 20 31 30 | 2f 30 37 2f 31 39 39 30 | made 10|/07/1990|
|00000390| 20 31 38 3a 34 33 20 55 | 54 43 20 62 79 20 6d 6c | 18:43 U|TC by ml|
|000003a0| 65 69 73 68 65 72 40 61 | 69 67 79 70 74 6f 73 0a |eisher@a|igyptos.|
|000003b0| 23 20 53 6f 75 72 63 65 | 20 64 69 72 65 63 74 6f |# Source| directo|
|000003c0| 72 79 20 2f 74 6d 70 5f | 6d 6e 74 2f 68 6f 6d 65 |ry /tmp_|mnt/home|
|000003d0| 2f 74 68 72 69 6e 61 6b | 69 61 31 2f 6d 6c 65 69 |/thrinak|ia1/mlei|
|000003e0| 73 68 65 72 2f 78 5f 73 | 74 75 66 66 0a 23 0a 23 |sher/x_s|tuff.#.#|
|000003f0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 73 20 | existin|g files |
|00000400| 77 69 6c 6c 20 4e 4f 54 | 20 62 65 20 6f 76 65 72 |will NOT| be over|
|00000410| 77 72 69 74 74 65 6e 20 | 75 6e 6c 65 73 73 20 2d |written |unless -|
|00000420| 63 20 69 73 20 73 70 65 | 63 69 66 69 65 64 0a 23 |c is spe|cified.#|
|00000430| 0a 23 20 54 68 69 73 20 | 73 68 61 72 20 63 6f 6e |.# This |shar con|
|00000440| 74 61 69 6e 73 3a 0a 23 | 20 6c 65 6e 67 74 68 20 |tains:.#| length |
|00000450| 20 6d 6f 64 65 20 20 20 | 20 20 20 20 6e 61 6d 65 | mode | name|
|00000460| 0a 23 20 2d 2d 2d 2d 2d | 2d 20 2d 2d 2d 2d 2d 2d |.# -----|- ------|
|00000470| 2d 2d 2d 2d 20 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |---- ---|--------|
|00000480| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 0a |--------|-------.|
|000004a0| 23 20 20 20 38 30 36 37 | 20 2d 72 77 2d 72 77 2d |# 8067| -rw-rw-|
|000004b0| 72 2d 2d 20 72 6f 74 61 | 74 65 2d 74 65 78 74 39 |r-- rota|te-text9|
|000004c0| 30 2e 63 0a 23 0a 23 20 | 3d 3d 3d 3d 3d 3d 3d 3d |0.c.#.# |========|
|000004d0| 3d 3d 3d 3d 3d 20 72 6f | 74 61 74 65 2d 74 65 78 |===== ro|tate-tex|
|000004e0| 74 39 30 2e 63 20 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |t90.c ==|========|
|000004f0| 3d 3d 3d 3d 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |====.if |test -f |
|00000500| 27 72 6f 74 61 74 65 2d | 74 65 78 74 39 30 2e 63 |'rotate-|text90.c|
|00000510| 27 20 2d 61 20 58 22 24 | 31 22 20 21 3d 20 58 22 |' -a X"$|1" != X"|
|00000520| 2d 63 22 3b 20 74 68 65 | 6e 0a 09 65 63 68 6f 20 |-c"; the|n..echo |
|00000530| 27 78 20 2d 20 73 6b 69 | 70 70 69 6e 67 20 72 6f |'x - ski|pping ro|
|00000540| 74 61 74 65 2d 74 65 78 | 74 39 30 2e 63 20 28 46 |tate-tex|t90.c (F|
|00000550| 69 6c 65 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |ile alre|ady exis|
|00000560| 74 73 29 27 0a 65 6c 73 | 65 0a 65 63 68 6f 20 27 |ts)'.els|e.echo '|
|00000570| 78 20 2d 20 65 78 74 72 | 61 63 74 69 6e 67 20 72 |x - extr|acting r|
|00000580| 6f 74 61 74 65 2d 74 65 | 78 74 39 30 2e 63 20 28 |otate-te|xt90.c (|
|00000590| 54 65 78 74 29 27 0a 73 | 65 64 20 27 73 2f 5e 58 |Text)'.s|ed 's/^X|
|000005a0| 2f 2f 27 20 3c 3c 20 27 | 53 48 41 52 5f 45 4f 46 |//' << '|SHAR_EOF|
|000005b0| 27 20 3e 20 27 72 6f 74 | 61 74 65 2d 74 65 78 74 |' > 'rot|ate-text|
|000005c0| 39 30 2e 63 27 20 26 26 | 0a 2f 2a 20 4e 6f 74 65 |90.c' &&|./* Note|
|000005d0| 73 20 3a 0a 58 20 2a 09 | 54 65 78 74 39 30 28 29 |s :.X *.|Text90()|
|000005e0| 20 64 72 61 77 73 20 61 | 20 74 65 78 74 20 73 74 | draws a| text st|
|000005f0| 72 69 6e 67 20 72 6f 74 | 61 74 65 64 20 62 79 20 |ring rot|ated by |
|00000600| 39 30 20 64 65 67 72 65 | 65 73 20 6f 6e 20 74 68 |90 degre|es on th|
|00000610| 65 20 67 69 76 65 6e 0a | 58 20 2a 09 64 72 61 77 |e given.|X *.draw|
|00000620| 61 62 6c 65 20 61 6e 64 | 20 67 69 76 65 6e 20 67 |able and| given g|
|00000630| 63 2e 20 20 54 68 65 20 | 67 63 20 69 73 20 6e 6f |c. The |gc is no|
|00000640| 74 20 6d 6f 64 69 66 69 | 65 64 2e 20 20 54 65 78 |t modifi|ed. Tex|
|00000650| 74 39 30 28 29 20 72 65 | 73 70 65 63 74 73 0a 58 |t90() re|spects.X|
|00000660| 20 2a 09 74 68 65 20 46 | 6f 72 65 67 72 6f 75 6e | *.the F|oregroun|
|00000670| 64 2c 20 43 6c 69 70 4d | 61 73 6b 2c 20 61 6e 64 |d, ClipM|ask, and|
|00000680| 20 43 6c 69 70 4f 72 69 | 67 69 6e 20 63 6f 6d 70 | ClipOri|gin comp|
|00000690| 6f 6e 65 6e 74 73 20 6f | 66 20 74 68 65 0a 58 20 |onents o|f the.X |
|000006a0| 2a 09 67 63 2e 20 20 59 | 6f 75 20 6d 75 73 74 20 |*.gc. Y|ou must |
|000006b0| 70 61 73 73 20 74 68 65 | 20 46 6f 6e 74 73 74 72 |pass the| Fontstr|
|000006c0| 75 63 74 20 73 65 70 61 | 72 61 74 65 6c 79 20 62 |uct sepa|rately b|
|000006d0| 65 63 61 75 73 65 20 54 | 65 78 74 39 30 28 29 0a |ecause T|ext90().|
|000006e0| 58 20 2a 09 6e 65 65 64 | 73 20 74 6f 20 64 65 74 |X *.need|s to det|
|000006f0| 65 72 6d 69 6e 65 20 74 | 65 78 74 20 65 78 74 65 |ermine t|ext exte|
|00000700| 6e 74 73 20 66 72 6f 6d | 20 74 68 65 20 67 63 20 |nts from| the gc |
|00000710| 61 6c 6f 6e 65 2e 0a 58 | 20 2a 0a 58 20 2a 09 54 |alone..X| *.X *.T|
|00000720| 68 65 20 67 65 6e 65 72 | 61 6c 20 73 63 68 65 6d |he gener|al schem|
|00000730| 65 20 69 73 20 61 73 20 | 66 6f 6c 6c 6f 77 73 2e |e is as |follows.|
|00000740| 20 20 46 69 72 73 74 20 | 6d 61 6b 65 20 61 20 31 | First |make a 1|
|00000750| 20 62 69 74 20 64 65 65 | 70 20 70 69 78 6d 61 70 | bit dee|p pixmap|
|00000760| 0a 58 20 2a 09 61 6e 64 | 20 72 65 6e 64 65 72 20 |.X *.and| render |
|00000770| 74 68 65 20 74 65 78 74 | 20 75 73 69 6e 67 20 74 |the text| using t|
|00000780| 68 65 20 75 73 75 61 6c | 20 58 44 72 61 77 53 74 |he usual| XDrawSt|
|00000790| 72 69 6e 67 28 29 20 66 | 75 6e 63 74 69 6f 6e 2e |ring() f|unction.|
|000007a0| 0a 58 20 2a 09 54 68 65 | 6e 20 75 73 65 20 58 47 |.X *.The|n use XG|
|000007b0| 65 74 49 6d 61 67 65 28 | 29 20 74 6f 20 70 75 6c |etImage(|) to pul|
|000007c0| 6c 20 74 68 61 74 20 62 | 61 63 6b 20 74 6f 20 74 |l that b|ack to t|
|000007d0| 68 65 20 63 6c 69 65 6e | 74 2c 20 58 43 72 65 61 |he clien|t, XCrea|
|000007e0| 74 65 49 6d 61 67 65 28 | 29 0a 58 20 2a 20 20 20 |teImage(|).X * |
|000007f0| 20 20 20 61 6e 6f 74 68 | 65 72 20 58 49 6d 61 67 | anoth|er XImag|
|00000800| 65 20 61 6e 64 20 70 75 | 74 20 74 68 65 20 72 6f |e and pu|t the ro|
|00000810| 74 61 74 65 64 20 70 6f | 69 6e 74 73 20 66 72 6f |tated po|ints fro|
|00000820| 6d 20 74 68 65 20 67 6f | 74 74 65 6e 20 69 6d 61 |m the go|tten ima|
|00000830| 67 65 0a 58 20 2a 09 69 | 6e 74 6f 20 69 74 2e 20 |ge.X *.i|nto it. |
|00000840| 20 58 50 75 74 49 6d 61 | 67 65 28 29 20 74 68 65 | XPutIma|ge() the|
|00000850| 20 72 6f 74 61 74 65 64 | 20 69 6d 61 67 65 20 62 | rotated| image b|
|00000860| 61 63 6b 20 74 6f 20 61 | 6e 6f 74 68 65 72 20 31 |ack to a|nother 1|
|00000870| 20 62 69 74 0a 58 20 2a | 09 64 65 65 70 20 70 69 | bit.X *|.deep pi|
|00000880| 78 6d 61 70 20 6f 6e 20 | 74 68 65 20 73 65 72 76 |xmap on |the serv|
|00000890| 65 72 2e 20 20 4e 6f 77 | 2c 20 69 66 20 74 68 65 |er. Now|, if the|
|000008a0| 72 65 20 77 65 72 65 20 | 6e 6f 74 20 61 20 43 6c |re were |not a Cl|
|000008b0| 69 70 4d 61 73 6b 0a 58 | 20 2a 09 73 65 74 20 69 |ipMask.X| *.set i|
|000008c0| 6e 20 74 68 65 20 67 63 | 2c 20 77 65 20 63 6f 75 |n the gc|, we cou|
|000008d0| 6c 64 20 75 73 65 20 74 | 68 69 73 20 70 69 78 6d |ld use t|his pixm|
|000008e0| 61 70 20 77 69 74 68 20 | 74 68 65 20 72 6f 74 61 |ap with |the rota|
|000008f0| 74 65 64 20 69 6d 61 67 | 65 0a 58 20 2a 09 28 27 |ted imag|e.X *.('|
|00000900| 72 6f 74 5f 70 6d 27 29 | 20 61 73 20 61 20 43 6c |rot_pm')| as a Cl|
|00000910| 69 70 4d 61 73 6b 20 69 | 6e 20 67 63 20 61 6e 64 |ipMask i|n gc and|
|00000920| 20 75 73 65 20 46 69 6c | 6c 52 65 63 74 61 6e 67 | use Fil|lRectang|
|00000930| 6c 65 20 6f 6e 20 74 68 | 65 0a 58 20 2a 09 67 69 |le on th|e.X *.gi|
|00000940| 76 65 6e 20 64 72 61 77 | 61 62 6c 65 2e 20 20 42 |ven draw|able. B|
|00000950| 75 74 20 74 68 69 73 20 | 77 6f 75 6c 64 20 69 67 |ut this |would ig|
|00000960| 6e 6f 72 65 20 61 6e 64 | 20 64 65 73 74 72 6f 79 |nore and| destroy|
|00000970| 20 74 68 65 20 43 6c 69 | 70 4d 61 73 6b 0a 58 20 | the Cli|pMask.X |
|00000980| 2a 09 69 6e 20 74 68 65 | 20 67 69 76 65 6e 20 67 |*.in the| given g|
|00000990| 63 2e 20 20 53 6f 20 77 | 65 20 6d 61 6b 65 20 61 |c. So w|e make a|
|000009a0| 6e 6f 74 68 65 72 20 70 | 69 78 6d 61 70 20 28 27 |nother p|ixmap ('|
|000009b0| 64 65 65 70 5f 70 6d 27 | 29 2c 20 61 73 20 64 65 |deep_pm'|), as de|
|000009c0| 65 70 0a 58 20 2a 09 61 | 73 20 74 68 65 20 67 69 |ep.X *.a|s the gi|
|000009d0| 76 65 6e 20 64 72 61 77 | 61 62 6c 65 2c 20 58 43 |ven draw|able, XC|
|000009e0| 6f 70 79 41 72 65 61 28 | 29 20 74 68 65 20 72 65 |opyArea(|) the re|
|000009f0| 6c 65 76 61 6e 74 20 73 | 74 75 66 66 20 69 6e 20 |levant s|tuff in |
|00000a00| 74 68 65 0a 58 20 2a 09 | 64 72 61 77 61 62 6c 65 |the.X *.|drawable|
|00000a10| 20 69 6e 74 6f 20 64 65 | 65 70 5f 70 6d 2c 20 74 | into de|ep_pm, t|
|00000a20| 68 65 6e 20 75 73 69 6e | 67 20 27 72 6f 74 5f 70 |hen usin|g 'rot_p|
|00000a30| 6d 27 20 61 73 20 61 20 | 43 6c 69 70 4d 61 73 6b |m' as a |ClipMask|
|00000a40| 0a 58 20 2a 09 63 61 6c | 6c 20 58 46 69 6c 6c 52 |.X *.cal|l XFillR|
|00000a50| 65 63 74 61 6e 67 6c 65 | 20 74 6f 20 62 6c 65 65 |ectangle| to blee|
|00000a60| 64 20 74 68 65 20 72 6f | 74 61 74 65 64 20 74 65 |d the ro|tated te|
|00000a70| 78 74 20 6f 6e 74 6f 20 | 27 64 65 65 70 5f 70 6d |xt onto |'deep_pm|
|00000a80| 27 2c 0a 58 20 2a 09 74 | 68 65 6e 20 58 43 6f 70 |',.X *.t|hen XCop|
|00000a90| 79 41 72 65 61 20 27 64 | 65 65 70 5f 70 6d 27 20 |yArea 'd|eep_pm' |
|00000aa0| 62 61 63 6b 20 6f 6e 74 | 6f 20 74 68 65 20 67 69 |back ont|o the gi|
|00000ab0| 76 65 6e 20 64 72 61 77 | 61 62 6c 65 2c 20 75 73 |ven draw|able, us|
|00000ac0| 69 6e 67 0a 58 20 2a 09 | 74 68 65 20 67 69 76 65 |ing.X *.|the give|
|00000ad0| 6e 20 27 67 63 27 20 73 | 6f 20 69 74 73 20 43 6c |n 'gc' s|o its Cl|
|00000ae0| 69 70 4d 61 73 6b 20 69 | 73 20 72 65 73 70 65 63 |ipMask i|s respec|
|00000af0| 74 65 64 2e 20 20 57 68 | 65 77 2e 0a 58 20 2a 0a |ted. Wh|ew..X *.|
|00000b00| 58 20 2a 09 54 68 65 20 | 58 49 6d 61 67 65 20 73 |X *.The |XImage s|
|00000b10| 74 72 75 63 74 75 72 65 | 20 6e 65 65 64 73 20 61 |tructure| needs a|
|00000b20| 20 56 69 73 75 61 6c 20 | 77 68 65 6e 20 79 6f 75 | Visual |when you|
|00000b30| 20 63 72 65 61 74 65 20 | 69 74 20 77 69 74 68 0a | create |it with.|
|00000b40| 58 20 2a 09 58 43 72 65 | 61 74 65 49 6d 61 67 65 |X *.XCre|ateImage|
|00000b50| 2e 20 20 49 20 61 6d 20 | 6d 61 6b 69 6e 67 20 61 |. I am |making a|
|00000b60| 6e 20 58 49 6d 61 67 65 | 20 77 68 69 63 68 20 73 |n XImage| which s|
|00000b70| 68 6f 75 6c 64 20 62 65 | 20 69 64 65 6e 74 69 63 |hould be| identic|
|00000b80| 61 6c 0a 58 20 2a 09 65 | 78 63 65 70 74 20 69 6e |al.X *.e|xcept in|
|00000b90| 20 73 68 61 70 65 20 74 | 6f 20 74 68 65 20 74 68 | shape t|o the th|
|00000ba0| 61 74 20 49 20 67 6f 74 | 20 66 72 6f 6d 20 58 47 |at I got| from XG|
|00000bb0| 65 74 49 6d 61 67 65 20 | 62 75 74 20 74 68 65 20 |etImage |but the |
|00000bc0| 67 6f 74 74 65 6e 0a 58 | 20 2a 09 6f 6e 65 20 63 |gotten.X| *.one c|
|00000bd0| 6f 6e 74 61 69 6e 73 20 | 6e 6f 20 69 6e 66 6f 72 |ontains |no infor|
|00000be0| 6d 61 74 69 6f 6e 20 61 | 62 6f 75 74 20 74 68 65 |mation a|bout the|
|00000bf0| 20 56 69 73 75 61 6c 2e | 20 20 49 20 70 75 6e 74 | Visual.| I punt|
|00000c00| 20 61 6e 64 20 75 73 65 | 0a 58 20 2a 09 74 68 65 | and use|.X *.the|
|00000c10| 20 64 65 66 61 75 6c 74 | 20 56 69 73 75 61 6c 20 | default| Visual |
|00000c20| 6f 66 20 74 68 65 20 64 | 65 66 61 75 6c 74 20 53 |of the d|efault S|
|00000c30| 63 72 65 65 6e 20 20 2d | 2d 20 49 20 61 6d 20 6f |creen -|- I am o|
|00000c40| 6e 6c 79 20 6d 61 6b 69 | 6e 67 0a 58 20 2a 09 61 |nly maki|ng.X *.a|
|00000c50| 20 31 20 62 69 74 20 64 | 65 65 70 20 70 69 78 6d | 1 bit d|eep pixm|
|00000c60| 61 70 20 73 6f 20 77 68 | 61 74 20 64 69 66 66 65 |ap so wh|at diffe|
|00000c70| 72 65 6e 63 65 20 63 61 | 6e 20 69 74 20 6d 61 6b |rence ca|n it mak|
|00000c80| 65 3f 2e 0a 58 20 2a 0a | 58 20 2a 09 49 20 6e 65 |e?..X *.|X *.I ne|
|00000c90| 65 64 20 74 6f 20 70 61 | 73 73 20 61 20 64 72 61 |ed to pa|ss a dra|
|00000ca0| 77 61 62 6c 65 5f 64 65 | 70 74 68 20 74 6f 20 54 |wable_de|pth to T|
|00000cb0| 65 78 74 39 30 20 62 65 | 63 61 75 73 65 20 74 68 |ext90 be|cause th|
|00000cc0| 65 72 65 20 69 73 20 6e | 6f 0a 58 20 2a 09 77 61 |ere is n|o.X *.wa|
|00000cd0| 79 20 74 6f 20 61 73 6b | 20 61 20 64 72 61 77 61 |y to ask| a drawa|
|00000ce0| 62 6c 65 20 68 6f 77 20 | 64 65 65 70 20 69 74 20 |ble how |deep it |
|00000cf0| 69 73 2e 0a 58 20 2a 0a | 58 20 2a 09 49 66 20 77 |is..X *.|X *.If w|
|00000d00| 65 20 6b 6e 65 77 20 74 | 68 61 74 20 74 68 65 72 |e knew t|hat ther|
|00000d10| 65 20 77 65 72 65 20 6e | 6f 20 43 6c 69 70 4d 61 |e were n|o ClipMa|
|00000d20| 73 6b 20 69 6e 20 74 68 | 65 20 67 69 76 65 6e 20 |sk in th|e given |
|00000d30| 67 63 20 77 65 20 63 6f | 75 6c 64 0a 58 20 2a 09 |gc we co|uld.X *.|
|00000d40| 73 6b 69 70 20 74 68 65 | 20 32 20 43 6f 70 79 41 |skip the| 2 CopyA|
|00000d50| 72 65 61 28 29 73 2c 20 | 62 75 74 20 74 68 65 72 |rea()s, |but ther|
|00000d60| 65 20 69 73 20 6e 6f 20 | 77 61 79 20 74 6f 20 64 |e is no |way to d|
|00000d70| 65 74 65 72 6d 69 6e 65 | 20 74 68 69 73 0a 58 20 |etermine| this.X |
|00000d80| 2a 09 77 69 74 68 6f 75 | 74 20 70 61 73 73 69 6e |*.withou|t passin|
|00000d90| 67 20 79 65 74 20 61 6e | 6f 74 68 65 72 20 61 72 |g yet an|other ar|
|00000da0| 67 75 6d 65 6e 74 20 74 | 6f 20 54 65 78 74 39 30 |gument t|o Text90|
|00000db0| 20 28 61 6e 20 61 72 67 | 75 6d 65 6e 74 20 77 68 | (an arg|ument wh|
|00000dc0| 6f 73 65 0a 58 20 2a 09 | 76 61 6c 75 65 20 69 73 |ose.X *.|value is|
|00000dd0| 20 70 72 6f 62 61 62 6c | 79 20 6e 6f 74 20 6b 6e | probabl|y not kn|
|00000de0| 6f 77 6e 20 62 79 20 74 | 68 65 20 63 61 6c 6c 65 |own by t|he calle|
|00000df0| 72 29 2e 0a 58 20 2a 09 | 0a 58 20 2a 09 54 65 78 |r)..X *.|.X *.Tex|
|00000e00| 74 39 30 20 61 6c 6c 6f | 63 61 74 65 73 20 61 6e |t90 allo|cates an|
|00000e10| 64 20 66 72 65 65 73 20 | 71 75 69 74 65 20 61 20 |d frees |quite a |
|00000e20| 66 65 77 20 58 20 6f 62 | 6a 65 63 74 73 2e 20 20 |few X ob|jects. |
|00000e30| 49 66 20 79 6f 75 72 20 | 73 65 72 76 65 72 0a 58 |If your |server.X|
|00000e40| 20 2a 09 68 61 73 20 6d | 65 6d 6f 72 79 20 6c 65 | *.has m|emory le|
|00000e50| 61 6b 73 20 79 6f 75 20 | 77 69 6c 6c 20 66 69 6e |aks you |will fin|
|00000e60| 64 20 6f 75 74 20 61 62 | 6f 75 74 20 74 68 65 6d |d out ab|out them|
|00000e70| 20 75 73 69 6e 67 20 74 | 68 69 73 2e 20 20 50 65 | using t|his. Pe|
|00000e80| 72 68 61 70 73 0a 58 20 | 2a 09 6f 6e 65 20 63 6f |rhaps.X |*.one co|
|00000e90| 75 6c 64 20 63 61 63 68 | 65 20 74 68 65 73 65 20 |uld cach|e these |
|00000ea0| 74 68 69 6e 67 73 20 61 | 73 20 73 74 61 74 69 63 |things a|s static|
|00000eb0| 73 20 74 6f 20 54 65 78 | 74 39 30 2e 0a 58 20 2a |s to Tex|t90..X *|
|00000ec0| 0a 58 20 2a 09 49 20 68 | 61 76 65 20 69 6e 63 6c |.X *.I h|ave incl|
|00000ed0| 75 64 65 64 20 61 20 74 | 65 73 74 20 6d 61 69 6e |uded a t|est main|
|00000ee0| 28 29 20 70 72 6f 67 72 | 61 6d 2e 20 20 54 6f 20 |() progr|am. To |
|00000ef0| 75 73 65 20 69 74 20 3a | 0a 58 20 2a 09 09 63 63 |use it :|.X *..cc|
|00000f00| 20 2d 6f 20 78 72 6f 74 | 20 78 72 6f 74 2e 63 20 | -o xrot| xrot.c |
|00000f10| 2d 6c 58 31 31 20 2d 6c | 6d 0a 58 20 2a 09 09 78 |-lX11 -l|m.X *..x|
|00000f20| 72 6f 74 20 78 70 6f 73 | 20 79 70 6f 73 0a 58 20 |rot xpos| ypos.X |
|00000f30| 2a 09 77 68 65 72 65 20 | 78 70 6f 73 20 61 6e 64 |*.where |xpos and|
|00000f40| 20 79 70 6f 73 20 67 69 | 76 65 20 74 68 65 20 70 | ypos gi|ve the p|
|00000f50| 6f 73 69 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 73 |osition |of the s|
|00000f60| 74 72 69 6e 67 2e 0a 58 | 20 2a 0a 58 20 2a 09 49 |tring..X| *.X *.I|
|00000f70| 66 20 61 6e 79 20 6f 6e | 65 20 68 61 73 20 61 20 |f any on|e has a |
|00000f80| 62 65 74 74 65 72 20 77 | 61 79 20 6f 66 20 64 6f |better w|ay of do|
|00000f90| 69 6e 67 20 74 68 69 73 | 2c 20 70 6c 65 61 73 65 |ing this|, please|
|00000fa0| 20 74 65 6c 6c 20 6d 65 | 20 61 62 6f 75 74 20 69 | tell me| about i|
|00000fb0| 74 2e 0a 58 20 2a 0a 58 | 20 2a 09 42 69 6c 6c 20 |t..X *.X| *.Bill |
|00000fc0| 44 75 6e 6c 61 70 0a 58 | 20 2a 09 44 65 70 74 2e |Dunlap.X| *.Dept.|
|00000fd0| 20 6f 66 20 53 74 61 74 | 69 73 74 69 63 73 2c 20 | of Stat|istics, |
|00000fe0| 47 4e 2d 32 32 0a 58 20 | 2a 09 55 6e 69 76 65 72 |GN-22.X |*.Univer|
|00000ff0| 73 69 74 79 20 6f 66 20 | 57 61 73 68 69 6e 67 74 |sity of |Washingt|
|00001000| 6f 6e 0a 58 20 2a 09 53 | 65 61 74 74 6c 65 2c 20 |on.X *.S|eattle, |
|00001010| 57 41 20 39 38 31 39 35 | 0a 58 20 2a 09 62 69 6c |WA 98195|.X *.bil|
|00001020| 6c 40 73 74 61 74 2e 77 | 61 73 68 69 6e 67 74 6f |l@stat.w|ashingto|
|00001030| 6e 2e 65 64 75 0a 58 20 | 2a 2f 0a 23 69 6e 63 6c |n.edu.X |*/.#incl|
|00001040| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0a 23 69 |ude <std|io.h>.#i|
|00001050| 6e 63 6c 75 64 65 20 3c | 58 31 31 2f 58 6c 69 62 |nclude <|X11/Xlib|
|00001060| 2e 68 3e 0a 23 69 6e 63 | 6c 75 64 65 20 3c 58 31 |.h>.#inc|lude <X1|
|00001070| 31 2f 58 75 74 69 6c 2e | 68 3e 0a 58 0a 76 6f 69 |1/Xutil.|h>.X.voi|
|00001080| 64 20 54 65 78 74 39 30 | 28 29 20 3b 0a 73 74 61 |d Text90|() ;.sta|
|00001090| 74 69 63 20 76 6f 69 64 | 20 42 61 69 6c 4f 75 74 |tic void| BailOut|
|000010a0| 28 29 20 3b 0a 73 74 61 | 74 69 63 20 44 69 73 70 |() ;.sta|tic Disp|
|000010b0| 6c 61 79 20 2a 64 70 79 | 20 3b 0a 73 74 61 74 69 |lay *dpy| ;.stati|
|000010c0| 63 20 57 69 6e 64 6f 77 | 20 77 69 6e 20 3b 0a 73 |c Window| win ;.s|
|000010d0| 74 61 74 69 63 20 58 46 | 6f 6e 74 53 74 72 75 63 |tatic XF|ontStruc|
|000010e0| 74 20 2a 66 6f 6e 74 73 | 74 72 75 63 74 20 3b 0a |t *fonts|truct ;.|
|000010f0| 73 74 61 74 69 63 20 47 | 43 20 77 69 6e 5f 67 63 |static G|C win_gc|
|00001100| 20 3b 0a 73 74 61 74 69 | 63 20 58 47 43 56 61 6c | ;.stati|c XGCVal|
|00001110| 75 65 73 20 78 67 63 76 | 20 3b 0a 65 78 74 65 72 |ues xgcv| ;.exter|
|00001120| 6e 20 63 68 61 72 20 2a | 6d 61 6c 6c 6f 63 28 29 |n char *|malloc()|
|00001130| 20 3b 0a 58 0a 2f 2a 20 | 41 52 47 53 55 53 45 44 | ;.X./* |ARGSUSED|
|00001140| 20 2a 2f 0a 6d 61 69 6e | 28 61 72 67 63 2c 20 61 | */.main|(argc, a|
|00001150| 72 67 76 29 0a 69 6e 74 | 20 61 72 67 63 20 3b 0a |rgv).int| argc ;.|
|00001160| 63 68 61 72 20 2a 2a 61 | 72 67 76 20 3b 0a 7b 0a |char **a|rgv ;.{.|
|00001170| 58 09 75 6e 73 69 67 6e | 65 64 20 6c 6f 6e 67 20 |X.unsign|ed long |
|00001180| 66 67 2c 20 62 67 20 3b | 0a 58 09 69 6e 74 20 78 |fg, bg ;|.X.int x|
|00001190| 2c 20 79 20 3b 0a 58 09 | 69 66 20 28 21 28 2d 2d |, y ;.X.|if (!(--|
|000011a0| 61 72 67 63 3e 30 20 26 | 26 20 73 73 63 61 6e 66 |argc>0 &|& sscanf|
|000011b0| 28 2a 2b 2b 61 72 67 76 | 2c 20 22 25 64 22 2c 20 |(*++argv|, "%d", |
|000011c0| 26 78 29 3d 3d 31 29 29 | 0a 58 09 09 78 20 3d 20 |&x)==1))|.X..x = |
|000011d0| 32 30 20 3b 0a 58 09 69 | 66 20 28 21 28 2d 2d 61 |20 ;.X.i|f (!(--a|
|000011e0| 72 67 63 3e 30 20 26 26 | 20 73 73 63 61 6e 66 28 |rgc>0 &&| sscanf(|
|000011f0| 2a 2b 2b 61 72 67 76 2c | 20 22 25 64 22 2c 20 26 |*++argv,| "%d", &|
|00001200| 79 29 3d 3d 31 29 29 0a | 58 09 09 79 20 3d 20 32 |y)==1)).|X..y = 2|
|00001210| 30 20 3b 0a 58 09 64 70 | 79 20 3d 20 58 4f 70 65 |0 ;.X.dp|y = XOpe|
|00001220| 6e 44 69 73 70 6c 61 79 | 28 28 63 68 61 72 20 2a |nDisplay|((char *|
|00001230| 29 4e 55 4c 4c 29 20 3b | 0a 58 09 69 66 20 28 21 |)NULL) ;|.X.if (!|
|00001240| 64 70 79 29 20 42 61 69 | 6c 4f 75 74 28 22 58 4f |dpy) Bai|lOut("XO|
|00001250| 70 65 6e 44 69 73 70 6c | 61 79 22 29 20 3b 0a 58 |penDispl|ay") ;.X|
|00001260| 09 66 67 20 3d 20 42 6c | 61 63 6b 50 69 78 65 6c |.fg = Bl|ackPixel|
|00001270| 28 64 70 79 2c 20 44 65 | 66 61 75 6c 74 53 63 72 |(dpy, De|faultScr|
|00001280| 65 65 6e 28 64 70 79 29 | 29 20 3b 0a 58 09 62 67 |een(dpy)|) ;.X.bg|
|00001290| 20 3d 20 57 68 69 74 65 | 50 69 78 65 6c 28 64 70 | = White|Pixel(dp|
|000012a0| 79 2c 20 44 65 66 61 75 | 6c 74 53 63 72 65 65 6e |y, Defau|ltScreen|
|000012b0| 28 64 70 79 29 29 20 3b | 0a 23 64 65 66 69 6e 65 |(dpy)) ;|.#define|
|000012c0| 20 57 49 4e 5f 57 49 44 | 54 48 20 35 30 30 0a 23 | WIN_WID|TH 500.#|
|000012d0| 64 65 66 69 6e 65 20 57 | 49 4e 5f 48 45 49 47 48 |define W|IN_HEIGH|
|000012e0| 54 20 31 30 30 0a 58 09 | 77 69 6e 20 3d 20 58 43 |T 100.X.|win = XC|
|000012f0| 72 65 61 74 65 53 69 6d | 70 6c 65 57 69 6e 64 6f |reateSim|pleWindo|
|00001300| 77 28 64 70 79 2c 20 44 | 65 66 61 75 6c 74 52 6f |w(dpy, D|efaultRo|
|00001310| 6f 74 57 69 6e 64 6f 77 | 28 64 70 79 29 2c 0a 58 |otWindow|(dpy),.X|
|00001320| 09 09 32 30 30 2c 20 32 | 30 30 2c 20 2f 2a 20 70 |..200, 2|00, /* p|
|00001330| 6f 73 69 74 69 6f 6e 20 | 2a 2f 0a 58 09 09 57 49 |osition |*/.X..WI|
|00001340| 4e 5f 57 49 44 54 48 2c | 20 57 49 4e 5f 48 45 49 |N_WIDTH,| WIN_HEI|
|00001350| 47 48 54 2c 20 2f 2a 20 | 73 69 7a 65 20 2a 2f 0a |GHT, /* |size */.|
|00001360| 58 09 09 32 2c 20 2f 2a | 20 62 6f 72 64 65 72 20 |X..2, /*| border |
|00001370| 77 69 64 74 68 20 2a 2f | 0a 58 09 09 66 67 2c 20 |width */|.X..fg, |
|00001380| 2f 2a 20 62 6f 72 64 65 | 72 20 63 6f 6c 6f 72 20 |/* borde|r color |
|00001390| 2a 2f 0a 58 09 09 62 67 | 29 20 3b 20 2f 2a 20 62 |*/.X..bg|) ; /* b|
|000013a0| 61 63 6b 67 72 6f 75 6e | 64 20 63 6f 6c 6f 72 20 |ackgroun|d color |
|000013b0| 2a 2f 0a 58 09 69 66 20 | 28 21 77 69 6e 29 20 42 |*/.X.if |(!win) B|
|000013c0| 61 69 6c 4f 75 74 28 22 | 58 43 72 65 61 74 65 53 |ailOut("|XCreateS|
|000013d0| 69 6d 70 6c 65 57 69 6e | 64 6f 77 22 29 20 3b 0a |impleWin|dow") ;.|
|000013e0| 23 64 65 66 69 6e 65 20 | 53 54 52 49 4e 47 20 22 |#define |STRING "|
|000013f0| 54 68 69 73 20 69 73 20 | 61 20 74 65 73 74 22 0a |This is |a test".|
|00001400| 58 09 66 6f 6e 74 73 74 | 72 75 63 74 20 3d 20 58 |X.fontst|ruct = X|
|00001410| 4c 6f 61 64 51 75 65 72 | 79 46 6f 6e 74 28 64 70 |LoadQuer|yFont(dp|
|00001420| 79 2c 20 22 66 69 78 65 | 64 22 29 20 3b 0a 58 09 |y, "fixe|d") ;.X.|
|00001430| 69 66 20 28 21 66 6f 6e | 74 73 74 72 75 63 74 29 |if (!fon|tstruct)|
|00001440| 20 42 61 69 6c 4f 75 74 | 28 22 58 4c 6f 61 64 51 | BailOut|("XLoadQ|
|00001450| 75 65 72 79 46 6f 6e 74 | 22 29 20 3b 0a 58 09 78 |ueryFont|") ;.X.x|
|00001460| 67 63 76 2e 66 6f 72 65 | 67 72 6f 75 6e 64 20 3d |gcv.fore|ground =|
|00001470| 20 66 67 20 3b 0a 58 09 | 78 67 63 76 2e 62 61 63 | fg ;.X.|xgcv.bac|
|00001480| 6b 67 72 6f 75 6e 64 20 | 3d 20 62 67 20 3b 0a 58 |kground |= bg ;.X|
|00001490| 09 78 67 63 76 2e 6c 69 | 6e 65 5f 77 69 64 74 68 |.xgcv.li|ne_width|
|000014a0| 20 3d 20 34 20 3b 0a 58 | 09 77 69 6e 5f 67 63 20 | = 4 ;.X|.win_gc |
|000014b0| 3d 20 58 43 72 65 61 74 | 65 47 43 28 64 70 79 2c |= XCreat|eGC(dpy,|
|000014c0| 20 77 69 6e 2c 0a 58 09 | 09 47 43 46 6f 72 65 67 | win,.X.|.GCForeg|
|000014d0| 72 6f 75 6e 64 7c 47 43 | 42 61 63 6b 67 72 6f 75 |round|GC|Backgrou|
|000014e0| 6e 64 7c 47 43 4c 69 6e | 65 57 69 64 74 68 2c 0a |nd|GCLin|eWidth,.|
|000014f0| 58 09 09 26 78 67 63 76 | 29 20 3b 0a 58 09 69 66 |X..&xgcv|) ;.X.if|
|00001500| 20 28 21 77 69 6e 5f 67 | 63 29 20 42 61 69 6c 4f | (!win_g|c) BailO|
|00001510| 75 74 28 22 58 43 72 65 | 61 74 65 47 43 28 77 69 |ut("XCre|ateGC(wi|
|00001520| 6e 5f 67 63 29 22 29 20 | 3b 0a 58 09 58 53 65 6c |n_gc)") |;.X.XSel|
|00001530| 65 63 74 49 6e 70 75 74 | 28 64 70 79 2c 20 77 69 |ectInput|(dpy, wi|
|00001540| 6e 2c 20 45 78 70 6f 73 | 75 72 65 4d 61 73 6b 29 |n, Expos|ureMask)|
|00001550| 20 3b 0a 58 09 58 4d 61 | 70 57 69 6e 64 6f 77 28 | ;.X.XMa|pWindow(|
|00001560| 64 70 79 2c 20 77 69 6e | 29 20 3b 0a 58 09 77 68 |dpy, win|) ;.X.wh|
|00001570| 69 6c 65 20 28 31 29 20 | 7b 0a 58 09 09 58 52 65 |ile (1) |{.X..XRe|
|00001580| 63 74 61 6e 67 6c 65 20 | 72 65 63 74 20 3b 0a 58 |ctangle |rect ;.X|
|00001590| 09 09 58 45 76 65 6e 74 | 20 65 76 65 6e 74 20 3b |..XEvent| event ;|
|000015a0| 0a 58 09 09 58 57 69 6e | 64 6f 77 41 74 74 72 69 |.X..XWin|dowAttri|
|000015b0| 62 75 74 65 73 20 78 77 | 61 20 3b 0a 58 09 09 58 |butes xw|a ;.X..X|
|000015c0| 4e 65 78 74 45 76 65 6e | 74 28 64 70 79 2c 20 26 |NextEven|t(dpy, &|
|000015d0| 65 76 65 6e 74 29 20 3b | 0a 58 09 09 69 66 20 28 |event) ;|.X..if (|
|000015e0| 21 28 65 76 65 6e 74 2e | 74 79 70 65 20 3d 3d 20 |!(event.|type == |
|000015f0| 45 78 70 6f 73 65 20 26 | 26 20 28 28 58 45 78 70 |Expose &|& ((XExp|
|00001600| 6f 73 65 45 76 65 6e 74 | 20 2a 29 26 65 76 65 6e |oseEvent| *)&even|
|00001610| 74 29 2d 3e 63 6f 75 6e | 74 20 3d 3d 20 30 29 29 |t)->coun|t == 0))|
|00001620| 0a 58 09 09 09 63 6f 6e | 74 69 6e 75 65 20 3b 0a |.X...con|tinue ;.|
|00001630| 58 09 09 69 66 20 28 21 | 58 47 65 74 57 69 6e 64 |X..if (!|XGetWind|
|00001640| 6f 77 41 74 74 72 69 62 | 75 74 65 73 28 64 70 79 |owAttrib|utes(dpy|
|00001650| 2c 20 77 69 6e 2c 20 26 | 78 77 61 29 29 0a 58 09 |, win, &|xwa)).X.|
|00001660| 09 09 62 72 65 61 6b 20 | 3b 0a 58 09 09 58 43 6c |..break |;.X..XCl|
|00001670| 65 61 72 57 69 6e 64 6f | 77 28 64 70 79 2c 20 77 |earWindo|w(dpy, w|
|00001680| 69 6e 29 20 3b 0a 23 64 | 65 66 69 6e 65 20 4d 41 |in) ;.#d|efine MA|
|00001690| 52 47 49 4e 20 35 0a 58 | 09 09 72 65 63 74 2e 78 |RGIN 5.X|..rect.x|
|000016a0| 20 3d 20 4d 41 52 47 49 | 4e 20 3b 20 72 65 63 74 | = MARGI|N ; rect|
|000016b0| 2e 79 20 3d 20 4d 41 52 | 47 49 4e 20 3b 0a 58 09 |.y = MAR|GIN ;.X.|
|000016c0| 09 72 65 63 74 2e 77 69 | 64 74 68 20 3d 20 78 77 |.rect.wi|dth = xw|
|000016d0| 61 2e 77 69 64 74 68 20 | 2d 20 32 20 2a 20 4d 41 |a.width |- 2 * MA|
|000016e0| 52 47 49 4e 20 3b 0a 58 | 09 09 72 65 63 74 2e 68 |RGIN ;.X|..rect.h|
|000016f0| 65 69 67 68 74 20 3d 20 | 78 77 61 2e 68 65 69 67 |eight = |xwa.heig|
|00001700| 68 74 20 2d 20 20 32 20 | 2a 20 4d 41 52 47 49 4e |ht - 2 |* MARGIN|
|00001710| 20 3b 0a 58 09 09 58 53 | 65 74 43 6c 69 70 52 65 | ;.X..XS|etClipRe|
|00001720| 63 74 61 6e 67 6c 65 73 | 28 64 70 79 2c 20 77 69 |ctangles|(dpy, wi|
|00001730| 6e 5f 67 63 2c 20 30 2c | 20 30 2c 20 26 72 65 63 |n_gc, 0,| 0, &rec|
|00001740| 74 2c 20 31 2c 20 55 6e | 73 6f 72 74 65 64 29 20 |t, 1, Un|sorted) |
|00001750| 3b 0a 58 09 09 58 44 72 | 61 77 4c 69 6e 65 28 64 |;.X..XDr|awLine(d|
|00001760| 70 79 2c 20 77 69 6e 2c | 20 77 69 6e 5f 67 63 2c |py, win,| win_gc,|
|00001770| 20 30 2c 20 30 2c 20 78 | 77 61 2e 77 69 64 74 68 | 0, 0, x|wa.width|
|00001780| 2c 20 78 77 61 2e 68 65 | 69 67 68 74 29 20 3b 0a |, xwa.he|ight) ;.|
|00001790| 58 09 09 58 44 72 61 77 | 4c 69 6e 65 28 64 70 79 |X..XDraw|Line(dpy|
|000017a0| 2c 20 77 69 6e 2c 20 77 | 69 6e 5f 67 63 2c 20 78 |, win, w|in_gc, x|
|000017b0| 77 61 2e 77 69 64 74 68 | 2c 20 30 2c 20 30 2c 20 |wa.width|, 0, 0, |
|000017c0| 78 77 61 2e 68 65 69 67 | 68 74 29 20 3b 0a 58 09 |xwa.heig|ht) ;.X.|
|000017d0| 09 54 65 78 74 39 30 28 | 64 70 79 2c 20 77 69 6e |.Text90(|dpy, win|
|000017e0| 2c 20 78 77 61 2e 64 65 | 70 74 68 2c 20 77 69 6e |, xwa.de|pth, win|
|000017f0| 5f 67 63 2c 20 78 2c 20 | 79 2c 20 53 54 52 49 4e |_gc, x, |y, STRIN|
|00001800| 47 2c 20 73 74 72 6c 65 | 6e 28 53 54 52 49 4e 47 |G, strle|n(STRING|
|00001810| 29 2c 20 66 6f 6e 74 73 | 74 72 75 63 74 29 20 3b |), fonts|truct) ;|
|00001820| 0a 58 09 7d 0a 58 09 65 | 78 69 74 28 30 29 20 3b |.X.}.X.e|xit(0) ;|
|00001830| 0a 7d 0a 58 0a 73 74 61 | 74 69 63 20 76 6f 69 64 |.}.X.sta|tic void|
|00001840| 0a 42 61 69 6c 4f 75 74 | 28 6d 73 67 29 0a 63 68 |.BailOut|(msg).ch|
|00001850| 61 72 20 2a 6d 73 67 20 | 3b 0a 7b 0a 58 09 66 70 |ar *msg |;.{.X.fp|
|00001860| 72 69 6e 74 66 28 73 74 | 64 65 72 72 2c 20 22 45 |rintf(st|derr, "E|
|00001870| 72 72 6f 72 20 69 6e 20 | 25 73 20 2d 2d 20 62 61 |rror in |%s -- ba|
|00001880| 69 6c 69 6e 67 20 6f 75 | 74 5c 6e 22 2c 20 6d 73 |iling ou|t\n", ms|
|00001890| 67 29 20 3b 0a 58 09 65 | 78 69 74 28 31 29 20 3b |g) ;.X.e|xit(1) ;|
|000018a0| 0a 7d 0a 58 0a 76 6f 69 | 64 0a 54 65 78 74 39 30 |.}.X.voi|d.Text90|
|000018b0| 28 64 70 79 2c 20 64 72 | 61 77 61 62 6c 65 2c 20 |(dpy, dr|awable, |
|000018c0| 64 72 61 77 61 62 6c 65 | 5f 64 65 70 74 68 2c 20 |drawable|_depth, |
|000018d0| 67 63 2c 20 78 2c 20 79 | 2c 20 73 74 72 69 6e 67 |gc, x, y|, string|
|000018e0| 2c 20 6c 65 6e 67 74 68 | 2c 20 66 6f 6e 74 73 74 |, length|, fontst|
|000018f0| 72 75 63 74 29 0a 44 69 | 73 70 6c 61 79 20 2a 64 |ruct).Di|splay *d|
|00001900| 70 79 20 3b 0a 44 72 61 | 77 61 62 6c 65 20 64 72 |py ;.Dra|wable dr|
|00001910| 61 77 61 62 6c 65 20 3b | 0a 69 6e 74 20 64 72 61 |awable ;|.int dra|
|00001920| 77 61 62 6c 65 5f 64 65 | 70 74 68 20 3b 0a 47 43 |wable_de|pth ;.GC|
|00001930| 20 67 63 20 3b 0a 69 6e | 74 20 78 2c 20 79 20 3b | gc ;.in|t x, y ;|
|00001940| 0a 63 68 61 72 20 2a 73 | 74 72 69 6e 67 20 3b 0a |.char *s|tring ;.|
|00001950| 69 6e 74 20 6c 65 6e 67 | 74 68 20 3b 0a 58 58 46 |int leng|th ;.XXF|
|00001960| 6f 6e 74 53 74 72 75 63 | 74 20 2a 66 6f 6e 74 73 |ontStruc|t *fonts|
|00001970| 74 72 75 63 74 20 3b 0a | 7b 0a 58 09 50 69 78 6d |truct ;.|{.X.Pixm|
|00001980| 61 70 20 70 6d 2c 20 72 | 6f 74 5f 70 6d 2c 20 64 |ap pm, r|ot_pm, d|
|00001990| 65 65 70 5f 70 6d 20 3b | 0a 58 09 47 43 20 70 6d |eep_pm ;|.X.GC pm|
|000019a0| 5f 67 63 2c 20 64 65 65 | 70 5f 67 63 20 3b 0a 58 |_gc, dee|p_gc ;.X|
|000019b0| 09 58 49 6d 61 67 65 20 | 2a 69 6d 61 67 65 2c 20 |.XImage |*image, |
|000019c0| 2a 72 6f 74 5f 69 6d 61 | 67 65 20 3b 0a 58 09 69 |*rot_ima|ge ;.X.i|
|000019d0| 6e 74 20 72 6f 77 2c 20 | 63 6f 6c 20 3b 0a 58 09 |nt row, |col ;.X.|
|000019e0| 63 68 61 72 20 2a 64 20 | 3b 0a 58 09 69 6e 74 20 |char *d |;.X.int |
|000019f0| 72 6f 74 5f 62 79 74 65 | 73 5f 70 65 72 5f 6c 69 |rot_byte|s_per_li|
|00001a00| 6e 65 20 3b 0a 58 09 58 | 43 68 61 72 53 74 72 75 |ne ;.X.X|CharStru|
|00001a10| 63 74 20 78 63 73 20 3b | 0a 58 09 69 6e 74 20 77 |ct xcs ;|.X.int w|
|00001a20| 69 64 74 68 2c 20 68 65 | 69 67 68 74 20 3b 0a 58 |idth, he|ight ;.X|
|00001a30| 09 69 6e 74 20 64 69 72 | 65 63 74 69 6f 6e 2c 20 |.int dir|ection, |
|00001a40| 66 6f 6e 74 5f 61 73 63 | 65 6e 74 2c 20 66 6f 6e |font_asc|ent, fon|
|00001a50| 74 5f 64 65 73 63 65 6e | 74 20 3b 0a 58 09 58 54 |t_descen|t ;.X.XT|
|00001a60| 65 78 74 45 78 74 65 6e | 74 73 28 66 6f 6e 74 73 |extExten|ts(fonts|
|00001a70| 74 72 75 63 74 2c 20 73 | 74 72 69 6e 67 2c 20 6c |truct, s|tring, l|
|00001a80| 65 6e 67 74 68 2c 0a 58 | 09 09 26 64 69 72 65 63 |ength,.X|..&direc|
|00001a90| 74 69 6f 6e 2c 20 26 66 | 6f 6e 74 5f 61 73 63 65 |tion, &f|ont_asce|
|00001aa0| 6e 74 2c 20 26 66 6f 6e | 74 5f 64 65 73 63 65 6e |nt, &fon|t_descen|
|00001ab0| 74 2c 0a 58 09 09 26 78 | 63 73 29 20 3b 0a 58 09 |t,.X..&x|cs) ;.X.|
|00001ac0| 77 69 64 74 68 20 3d 20 | 78 63 73 2e 77 69 64 74 |width = |xcs.widt|
|00001ad0| 68 20 3b 0a 58 09 68 65 | 69 67 68 74 20 3d 20 66 |h ;.X.he|ight = f|
|00001ae0| 6f 6e 74 5f 61 73 63 65 | 6e 74 20 2b 20 66 6f 6e |ont_asce|nt + fon|
|00001af0| 74 5f 64 65 73 63 65 6e | 74 20 3b 0a 58 09 70 6d |t_descen|t ;.X.pm|
|00001b00| 20 3d 20 58 43 72 65 61 | 74 65 50 69 78 6d 61 70 | = XCrea|tePixmap|
|00001b10| 28 64 70 79 2c 20 77 69 | 6e 2c 20 77 69 64 74 68 |(dpy, wi|n, width|
|00001b20| 2c 20 68 65 69 67 68 74 | 2c 20 31 29 20 3b 0a 58 |, height|, 1) ;.X|
|00001b30| 09 69 66 20 28 21 70 6d | 29 20 42 61 69 6c 4f 75 |.if (!pm|) BailOu|
|00001b40| 74 28 22 58 43 72 65 61 | 74 65 50 69 78 6d 61 70 |t("XCrea|tePixmap|
|00001b50| 22 29 20 3b 0a 58 09 72 | 6f 74 5f 70 6d 20 3d 20 |") ;.X.r|ot_pm = |
|00001b60| 58 43 72 65 61 74 65 50 | 69 78 6d 61 70 28 64 70 |XCreateP|ixmap(dp|
|00001b70| 79 2c 20 64 72 61 77 61 | 62 6c 65 2c 20 68 65 69 |y, drawa|ble, hei|
|00001b80| 67 68 74 2c 20 77 69 64 | 74 68 2c 20 31 29 20 3b |ght, wid|th, 1) ;|
|00001b90| 0a 58 09 69 66 20 28 21 | 72 6f 74 5f 70 6d 29 20 |.X.if (!|rot_pm) |
|00001ba0| 42 61 69 6c 4f 75 74 28 | 22 58 43 72 65 61 74 65 |BailOut(|"XCreate|
|00001bb0| 50 69 78 6d 61 70 22 29 | 20 3b 0a 58 09 78 67 63 |Pixmap")| ;.X.xgc|
|00001bc0| 76 2e 66 6f 72 65 67 72 | 6f 75 6e 64 20 3d 20 31 |v.foregr|ound = 1|
|00001bd0| 20 3b 20 2f 2a 20 79 65 | 73 2c 20 31 2c 20 74 68 | ; /* ye|s, 1, th|
|00001be0| 69 73 20 77 69 6c 6c 20 | 62 65 20 61 20 6d 61 73 |is will |be a mas|
|00001bf0| 6b 20 2a 2f 0a 58 09 78 | 67 63 76 2e 62 61 63 6b |k */.X.x|gcv.back|
|00001c00| 67 72 6f 75 6e 64 20 3d | 20 30 20 3b 0a 58 09 78 |ground =| 0 ;.X.x|
|00001c10| 67 63 76 2e 66 6f 6e 74 | 20 3d 20 66 6f 6e 74 73 |gcv.font| = fonts|
|00001c20| 74 72 75 63 74 2d 3e 66 | 69 64 20 3b 0a 58 09 70 |truct->f|id ;.X.p|
|00001c30| 6d 5f 67 63 20 3d 20 58 | 43 72 65 61 74 65 47 43 |m_gc = X|CreateGC|
|00001c40| 28 64 70 79 2c 20 70 6d | 2c 0a 58 09 09 47 43 46 |(dpy, pm|,.X..GCF|
|00001c50| 6f 72 65 67 72 6f 75 6e | 64 7c 47 43 42 61 63 6b |oregroun|d|GCBack|
|00001c60| 67 72 6f 75 6e 64 7c 47 | 43 46 6f 6e 74 2c 0a 58 |ground|G|CFont,.X|
|00001c70| 09 09 26 78 67 63 76 29 | 20 3b 0a 58 09 69 66 20 |..&xgcv)| ;.X.if |
|00001c80| 28 21 70 6d 5f 67 63 29 | 20 42 61 69 6c 4f 75 74 |(!pm_gc)| BailOut|
|00001c90| 28 22 58 43 72 65 61 74 | 65 47 43 28 70 6d 5f 67 |("XCreat|eGC(pm_g|
|00001ca0| 63 29 22 29 20 3b 0a 58 | 09 58 44 72 61 77 53 74 |c)") ;.X|.XDrawSt|
|00001cb0| 72 69 6e 67 28 64 70 79 | 2c 20 70 6d 2c 20 70 6d |ring(dpy|, pm, pm|
|00001cc0| 5f 67 63 2c 20 30 2c 20 | 66 6f 6e 74 5f 61 73 63 |_gc, 0, |font_asc|
|00001cd0| 65 6e 74 2c 20 73 74 72 | 69 6e 67 2c 20 6c 65 6e |ent, str|ing, len|
|00001ce0| 67 74 68 29 20 3b 0a 58 | 09 69 6d 61 67 65 20 3d |gth) ;.X|.image =|
|00001cf0| 20 58 47 65 74 49 6d 61 | 67 65 28 64 70 79 2c 20 | XGetIma|ge(dpy, |
|00001d00| 70 6d 2c 20 30 2c 20 30 | 2c 20 77 69 64 74 68 2c |pm, 0, 0|, width,|
|00001d10| 20 68 65 69 67 68 74 2c | 20 41 6c 6c 50 6c 61 6e | height,| AllPlan|
|00001d20| 65 73 2c 20 58 59 50 69 | 78 6d 61 70 29 20 3b 0a |es, XYPi|xmap) ;.|
|00001d30| 58 09 69 66 20 28 21 69 | 6d 61 67 65 29 20 42 61 |X.if (!i|mage) Ba|
|00001d40| 69 6c 4f 75 74 28 22 58 | 47 65 74 49 6d 61 67 65 |ilOut("X|GetImage|
|00001d50| 22 29 20 3b 0a 23 64 65 | 66 69 6e 65 20 72 6f 75 |") ;.#de|fine rou|
|00001d60| 6e 64 75 70 28 6e 2c 20 | 6d 6f 64 29 20 28 20 28 |ndup(n, |mod) ( (|
|00001d70| 6e 29 25 28 6d 6f 64 29 | 20 3f 20 28 31 2b 28 6e |n)%(mod)| ? (1+(n|
|00001d80| 29 2f 28 6d 6f 64 29 29 | 2a 6d 6f 64 20 3a 20 6e |)/(mod))|*mod : n|
|00001d90| 20 29 0a 58 09 72 6f 74 | 5f 62 79 74 65 73 5f 70 | ).X.rot|_bytes_p|
|00001da0| 65 72 5f 6c 69 6e 65 20 | 3d 20 72 6f 75 6e 64 75 |er_line |= roundu|
|00001db0| 70 28 69 6d 61 67 65 2d | 3e 68 65 69 67 68 74 2c |p(image-|>height,|
|00001dc0| 20 69 6d 61 67 65 2d 3e | 62 69 74 6d 61 70 5f 70 | image->|bitmap_p|
|00001dd0| 61 64 29 2f 28 69 6d 61 | 67 65 2d 3e 62 69 74 6d |ad)/(ima|ge->bitm|
|00001de0| 61 70 5f 70 61 64 2f 38 | 29 20 3b 0a 58 09 64 20 |ap_pad/8|) ;.X.d |
|00001df0| 3d 20 28 63 68 61 72 20 | 2a 29 6d 61 6c 6c 6f 63 |= (char |*)malloc|
|00001e00| 28 72 6f 74 5f 62 79 74 | 65 73 5f 70 65 72 5f 6c |(rot_byt|es_per_l|
|00001e10| 69 6e 65 20 2a 20 69 6d | 61 67 65 2d 3e 77 69 64 |ine * im|age->wid|
|00001e20| 74 68 29 20 3b 0a 58 09 | 69 66 20 28 21 64 29 20 |th) ;.X.|if (!d) |
|00001e30| 42 61 69 6c 4f 75 74 28 | 22 6d 61 6c 6c 6f 63 22 |BailOut(|"malloc"|
|00001e40| 29 20 3b 0a 58 09 72 6f | 74 5f 69 6d 61 67 65 20 |) ;.X.ro|t_image |
|00001e50| 3d 20 58 43 72 65 61 74 | 65 49 6d 61 67 65 28 64 |= XCreat|eImage(d|
|00001e60| 70 79 2c 0a 58 09 09 44 | 65 66 61 75 6c 74 56 69 |py,.X..D|efaultVi|
|00001e70| 73 75 61 6c 28 64 70 79 | 2c 20 30 29 2c 20 2f 2a |sual(dpy|, 0), /*|
|00001e80| 20 49 20 77 61 6e 74 20 | 74 68 65 20 73 61 6d 65 | I want |the same|
|00001e90| 20 61 73 20 69 73 20 69 | 6e 20 69 6d 61 67 65 20 | as is i|n image |
|00001ea0| 2a 2f 0a 58 09 09 69 6d | 61 67 65 2d 3e 64 65 70 |*/.X..im|age->dep|
|00001eb0| 74 68 2c 0a 58 09 09 69 | 6d 61 67 65 2d 3e 66 6f |th,.X..i|mage->fo|
|00001ec0| 72 6d 61 74 2c 0a 58 09 | 09 69 6d 61 67 65 2d 3e |rmat,.X.|.image->|
|00001ed0| 78 6f 66 66 73 65 74 2c | 0a 58 09 09 64 2c 0a 58 |xoffset,|.X..d,.X|
|00001ee0| 09 09 69 6d 61 67 65 2d | 3e 68 65 69 67 68 74 2c |..image-|>height,|
|00001ef0| 20 69 6d 61 67 65 2d 3e | 77 69 64 74 68 2c 20 2f | image->|width, /|
|00001f00| 2a 20 79 65 73 2c 20 72 | 65 76 65 72 73 65 20 74 |* yes, r|everse t|
|00001f10| 68 65 73 65 20 2a 2f 0a | 58 09 09 69 6d 61 67 65 |hese */.|X..image|
|00001f20| 2d 3e 62 69 74 6d 61 70 | 5f 70 61 64 2c 20 0a 58 |->bitmap|_pad, .X|
|00001f30| 09 09 72 6f 74 5f 62 79 | 74 65 73 5f 70 65 72 5f |..rot_by|tes_per_|
|00001f40| 6c 69 6e 65 29 20 3b 0a | 58 09 69 66 20 28 21 72 |line) ;.|X.if (!r|
|00001f50| 6f 74 5f 69 6d 61 67 65 | 29 20 42 61 69 6c 4f 75 |ot_image|) BailOu|
|00001f60| 74 28 22 58 43 72 65 61 | 74 65 49 6d 61 67 65 22 |t("XCrea|teImage"|
|00001f70| 29 20 3b 0a 58 09 2f 2a | 20 72 6f 74 61 74 65 20 |) ;.X./*| rotate |
|00001f80| 69 6d 61 67 65 20 39 30 | 20 64 65 67 72 65 65 73 |image 90| degrees|
|00001f90| 20 63 6c 6f 63 6b 77 69 | 73 65 20 2a 2f 0a 58 09 | clockwi|se */.X.|
|00001fa0| 66 6f 72 28 72 6f 77 3d | 30 20 3b 20 72 6f 77 3c |for(row=|0 ; row<|
|00001fb0| 69 6d 61 67 65 2d 3e 68 | 65 69 67 68 74 20 3b 20 |image->h|eight ; |
|00001fc0| 72 6f 77 2b 2b 29 20 7b | 0a 58 09 09 66 6f 72 28 |row++) {|.X..for(|
|00001fd0| 63 6f 6c 3d 30 20 3b 20 | 63 6f 6c 3c 69 6d 61 67 |col=0 ; |col<imag|
|00001fe0| 65 2d 3e 77 69 64 74 68 | 20 3b 20 63 6f 6c 2b 2b |e->width| ; col++|
|00001ff0| 29 20 7b 0a 58 09 09 09 | 28 76 6f 69 64 29 58 50 |) {.X...|(void)XP|
|00002000| 75 74 50 69 78 65 6c 28 | 72 6f 74 5f 69 6d 61 67 |utPixel(|rot_imag|
|00002010| 65 2c 20 72 6f 77 2c 20 | 72 6f 74 5f 69 6d 61 67 |e, row, |rot_imag|
|00002020| 65 2d 3e 68 65 69 67 68 | 74 2d 31 2d 63 6f 6c 2c |e->heigh|t-1-col,|
|00002030| 0a 58 09 09 09 09 58 47 | 65 74 50 69 78 65 6c 28 |.X....XG|etPixel(|
|00002040| 69 6d 61 67 65 2c 20 63 | 6f 6c 2c 20 72 6f 77 29 |image, c|ol, row)|
|00002050| 29 20 3b 0a 58 09 09 7d | 0a 58 09 7d 0a 58 09 58 |) ;.X..}|.X.}.X.X|
|00002060| 50 75 74 49 6d 61 67 65 | 28 64 70 79 2c 20 72 6f |PutImage|(dpy, ro|
|00002070| 74 5f 70 6d 2c 20 70 6d | 5f 67 63 2c 20 72 6f 74 |t_pm, pm|_gc, rot|
|00002080| 5f 69 6d 61 67 65 2c 0a | 58 09 09 30 2c 20 30 2c |_image,.|X..0, 0,|
|00002090| 20 2f 2a 20 73 6f 75 72 | 63 65 20 6f 72 69 67 69 | /* sour|ce origi|
|000020a0| 6e 20 2a 2f 0a 58 09 09 | 30 2c 20 30 2c 20 2f 2a |n */.X..|0, 0, /*|
|000020b0| 20 64 65 73 74 20 6f 72 | 69 67 69 6e 20 2a 2f 0a | dest or|igin */.|
|000020c0| 58 09 09 72 6f 74 5f 69 | 6d 61 67 65 2d 3e 77 69 |X..rot_i|mage->wi|
|000020d0| 64 74 68 2c 20 72 6f 74 | 5f 69 6d 61 67 65 2d 3e |dth, rot|_image->|
|000020e0| 68 65 69 67 68 74 29 20 | 3b 0a 58 09 2f 2a 20 4e |height) |;.X./* N|
|000020f0| 6f 77 20 74 68 65 20 70 | 69 78 6d 61 70 20 72 6f |ow the p|ixmap ro|
|00002100| 74 5f 70 6d 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |t_pm con|tains a |
|00002110| 6d 61 73 6b 20 6f 66 20 | 74 68 65 20 72 6f 74 61 |mask of |the rota|
|00002120| 74 65 64 20 74 65 78 74 | 20 2a 2f 0a 58 0a 58 09 |ted text| */.X.X.|
|00002130| 64 65 65 70 5f 70 6d 20 | 3d 20 58 43 72 65 61 74 |deep_pm |= XCreat|
|00002140| 65 50 69 78 6d 61 70 28 | 64 70 79 2c 20 64 72 61 |ePixmap(|dpy, dra|
|00002150| 77 61 62 6c 65 2c 0a 58 | 09 09 72 6f 74 5f 69 6d |wable,.X|..rot_im|
|00002160| 61 67 65 2d 3e 77 69 64 | 74 68 2c 20 72 6f 74 5f |age->wid|th, rot_|
|00002170| 69 6d 61 67 65 2d 3e 68 | 65 69 67 68 74 2c 20 64 |image->h|eight, d|
|00002180| 72 61 77 61 62 6c 65 5f | 64 65 70 74 68 29 20 3b |rawable_|depth) ;|
|00002190| 0a 58 09 69 66 20 28 21 | 64 65 65 70 5f 70 6d 29 |.X.if (!|deep_pm)|
|000021a0| 20 42 61 69 6c 4f 75 74 | 28 22 58 43 72 65 61 74 | BailOut|("XCreat|
|000021b0| 65 50 69 78 6d 61 70 28 | 64 65 65 70 5f 70 6d 29 |ePixmap(|deep_pm)|
|000021c0| 22 29 20 3b 0a 58 09 64 | 65 65 70 5f 67 63 20 3d |") ;.X.d|eep_gc =|
|000021d0| 20 58 43 72 65 61 74 65 | 47 43 28 64 70 79 2c 20 | XCreate|GC(dpy, |
|000021e0| 64 65 65 70 5f 70 6d 2c | 20 30 4c 2c 20 26 78 67 |deep_pm,| 0L, &xg|
|000021f0| 63 76 29 20 3b 0a 58 09 | 69 66 20 28 21 64 65 65 |cv) ;.X.|if (!dee|
|00002200| 70 5f 67 63 29 20 42 61 | 69 6c 4f 75 74 28 22 58 |p_gc) Ba|ilOut("X|
|00002210| 43 72 65 61 74 65 47 43 | 28 64 65 65 70 5f 67 63 |CreateGC|(deep_gc|
|00002220| 29 22 29 20 3b 0a 58 09 | 58 43 6f 70 79 41 72 65 |)") ;.X.|XCopyAre|
|00002230| 61 28 64 70 79 2c 20 64 | 72 61 77 61 62 6c 65 2c |a(dpy, d|rawable,|
|00002240| 20 64 65 65 70 5f 70 6d | 2c 20 64 65 65 70 5f 67 | deep_pm|, deep_g|
|00002250| 63 2c 0a 58 09 09 78 2c | 20 79 2c 20 2f 2a 20 73 |c,.X..x,| y, /* s|
|00002260| 6f 75 72 63 65 20 6f 72 | 69 67 69 6e 20 2a 2f 0a |ource or|igin */.|
|00002270| 58 09 09 72 6f 74 5f 69 | 6d 61 67 65 2d 3e 77 69 |X..rot_i|mage->wi|
|00002280| 64 74 68 2c 20 72 6f 74 | 5f 69 6d 61 67 65 2d 3e |dth, rot|_image->|
|00002290| 68 65 69 67 68 74 2c 20 | 2f 2a 20 73 69 7a 65 20 |height, |/* size |
|000022a0| 2a 2f 0a 58 09 09 30 2c | 20 30 29 20 3b 20 2f 2a |*/.X..0,| 0) ; /*|
|000022b0| 20 64 65 73 74 69 6e 61 | 74 69 6f 6e 20 6f 72 69 | destina|tion ori|
|000022c0| 67 69 6e 20 2a 2f 0a 58 | 09 58 43 6f 70 79 47 43 |gin */.X|.XCopyGC|
|000022d0| 28 64 70 79 2c 20 67 63 | 2c 20 47 43 46 6f 72 65 |(dpy, gc|, GCFore|
|000022e0| 67 72 6f 75 6e 64 2c 20 | 64 65 65 70 5f 67 63 29 |ground, |deep_gc)|
|000022f0| 20 3b 0a 58 09 58 53 65 | 74 43 6c 69 70 4d 61 73 | ;.X.XSe|tClipMas|
|00002300| 6b 28 64 70 79 2c 20 64 | 65 65 70 5f 67 63 2c 20 |k(dpy, d|eep_gc, |
|00002310| 72 6f 74 5f 70 6d 29 20 | 3b 0a 58 09 58 46 69 6c |rot_pm) |;.X.XFil|
|00002320| 6c 52 65 63 74 61 6e 67 | 6c 65 28 64 70 79 2c 20 |lRectang|le(dpy, |
|00002330| 64 65 65 70 5f 70 6d 2c | 20 64 65 65 70 5f 67 63 |deep_pm,| deep_gc|
|00002340| 2c 20 30 2c 20 30 2c 0a | 58 09 09 72 6f 74 5f 69 |, 0, 0,.|X..rot_i|
|00002350| 6d 61 67 65 2d 3e 77 69 | 64 74 68 2c 20 72 6f 74 |mage->wi|dth, rot|
|00002360| 5f 69 6d 61 67 65 2d 3e | 68 65 69 67 68 74 29 20 |_image->|height) |
|00002370| 3b 0a 58 09 58 43 6f 70 | 79 41 72 65 61 28 64 70 |;.X.XCop|yArea(dp|
|00002380| 79 2c 20 64 65 65 70 5f | 70 6d 2c 20 64 72 61 77 |y, deep_|pm, draw|
|00002390| 61 62 6c 65 2c 20 67 63 | 2c 0a 58 09 09 30 2c 20 |able, gc|,.X..0, |
|000023a0| 30 2c 20 2f 2a 20 73 6f | 75 72 63 65 20 6f 72 69 |0, /* so|urce ori|
|000023b0| 67 69 6e 20 2a 2f 0a 58 | 09 09 72 6f 74 5f 69 6d |gin */.X|..rot_im|
|000023c0| 61 67 65 2d 3e 77 69 64 | 74 68 2c 20 72 6f 74 5f |age->wid|th, rot_|
|000023d0| 69 6d 61 67 65 2d 3e 68 | 65 69 67 68 74 2c 20 2f |image->h|eight, /|
|000023e0| 2a 20 73 69 7a 65 20 2a | 2f 0a 58 09 09 78 2c 20 |* size *|/.X..x, |
|000023f0| 79 29 20 3b 20 2f 2a 20 | 64 65 73 74 69 6e 61 74 |y) ; /* |destinat|
|00002400| 69 6f 6e 20 6f 72 69 67 | 69 6e 20 2a 2f 0a 58 0a |ion orig|in */.X.|
|00002410| 58 09 2f 2a 20 49 20 73 | 65 74 20 74 68 65 73 65 |X./* I s|et these|
|00002420| 20 74 68 69 6e 67 73 20 | 74 6f 20 4e 55 4c 4c 20 | things |to NULL |
|00002430| 61 66 74 65 72 20 66 72 | 65 65 69 6e 67 20 74 6f |after fr|eeing to|
|00002440| 20 70 72 65 70 61 72 65 | 20 66 6f 72 0a 58 09 20 | prepare| for.X. |
|00002450| 2a 20 63 61 63 68 69 6e | 67 20 74 68 65 6d 20 2a |* cachin|g them *|
|00002460| 2f 0a 58 09 66 72 65 65 | 28 64 29 20 3b 20 64 20 |/.X.free|(d) ; d |
|00002470| 3d 20 28 63 68 61 72 20 | 2a 29 4e 55 4c 4c 20 3b |= (char |*)NULL ;|
|00002480| 0a 58 09 58 46 72 65 65 | 47 43 28 64 70 79 2c 20 |.X.XFree|GC(dpy, |
|00002490| 70 6d 5f 67 63 29 20 3b | 20 70 6d 5f 67 63 20 3d |pm_gc) ;| pm_gc =|
|000024a0| 20 28 47 43 29 4e 55 4c | 4c 20 3b 0a 58 09 58 46 | (GC)NUL|L ;.X.XF|
|000024b0| 72 65 65 47 43 28 64 70 | 79 2c 20 64 65 65 70 5f |reeGC(dp|y, deep_|
|000024c0| 67 63 29 20 3b 20 64 65 | 65 70 5f 67 63 20 3d 20 |gc) ; de|ep_gc = |
|000024d0| 28 47 43 29 4e 55 4c 4c | 20 3b 0a 58 09 58 46 72 |(GC)NULL| ;.X.XFr|
|000024e0| 65 65 50 69 78 6d 61 70 | 28 64 70 79 2c 20 70 6d |eePixmap|(dpy, pm|
|000024f0| 29 20 3b 20 70 6d 20 3d | 20 28 50 69 78 6d 61 70 |) ; pm =| (Pixmap|
|00002500| 29 4e 55 4c 4c 20 3b 0a | 58 09 58 46 72 65 65 50 |)NULL ;.|X.XFreeP|
|00002510| 69 78 6d 61 70 28 64 70 | 79 2c 20 64 65 65 70 5f |ixmap(dp|y, deep_|
|00002520| 70 6d 29 20 3b 20 64 65 | 65 70 5f 70 6d 20 3d 20 |pm) ; de|ep_pm = |
|00002530| 28 50 69 78 6d 61 70 29 | 4e 55 4c 4c 20 3b 0a 58 |(Pixmap)|NULL ;.X|
|00002540| 09 58 46 72 65 65 50 69 | 78 6d 61 70 28 64 70 79 |.XFreePi|xmap(dpy|
|00002550| 2c 20 72 6f 74 5f 70 6d | 29 20 3b 20 72 6f 74 5f |, rot_pm|) ; rot_|
|00002560| 70 6d 20 3d 20 28 50 69 | 78 6d 61 70 29 4e 55 4c |pm = (Pi|xmap)NUL|
|00002570| 4c 20 3b 0a 58 09 58 44 | 65 73 74 72 6f 79 49 6d |L ;.X.XD|estroyIm|
|00002580| 61 67 65 28 69 6d 61 67 | 65 29 20 3b 20 69 6d 61 |age(imag|e) ; ima|
|00002590| 67 65 20 3d 20 28 58 49 | 6d 61 67 65 20 2a 29 4e |ge = (XI|mage *)N|
|000025a0| 55 4c 4c 20 3b 0a 58 09 | 58 44 65 73 74 72 6f 79 |ULL ;.X.|XDestroy|
|000025b0| 49 6d 61 67 65 28 72 6f | 74 5f 69 6d 61 67 65 29 |Image(ro|t_image)|
|000025c0| 20 3b 20 72 6f 74 5f 69 | 6d 61 67 65 20 3d 20 28 | ; rot_i|mage = (|
|000025d0| 58 49 6d 61 67 65 20 2a | 29 4e 55 4c 4c 20 3b 0a |XImage *|)NULL ;.|
|000025e0| 58 09 2f 2a 20 64 69 64 | 20 49 20 66 72 65 65 20 |X./* did| I free |
|000025f0| 65 76 65 72 79 74 68 69 | 6e 67 3f 20 2a 2f 0a 58 |everythi|ng? */.X|
|00002600| 09 72 65 74 75 72 6e 20 | 3b 0a 7d 0a 53 48 41 52 |.return |;.}.SHAR|
|00002610| 5f 45 4f 46 0a 63 68 6d | 6f 64 20 30 36 36 34 20 |_EOF.chm|od 0664 |
|00002620| 72 6f 74 61 74 65 2d 74 | 65 78 74 39 30 2e 63 20 |rotate-t|ext90.c |
|00002630| 7c 7c 0a 65 63 68 6f 20 | 27 72 65 73 74 6f 72 65 |||.echo |'restore|
|00002640| 20 6f 66 20 72 6f 74 61 | 74 65 2d 74 65 78 74 39 | of rota|te-text9|
|00002650| 30 2e 63 20 66 61 69 6c | 65 64 27 0a 57 63 5f 63 |0.c fail|ed'.Wc_c|
|00002660| 3d 22 60 77 63 20 2d 63 | 20 3c 20 27 72 6f 74 61 |="`wc -c| < 'rota|
|00002670| 74 65 2d 74 65 78 74 39 | 30 2e 63 27 60 22 0a 74 |te-text9|0.c'`".t|
|00002680| 65 73 74 20 38 30 36 37 | 20 2d 65 71 20 22 24 57 |est 8067| -eq "$W|
|00002690| 63 5f 63 22 20 7c 7c 0a | 09 65 63 68 6f 20 27 72 |c_c" ||.|.echo 'r|
|000026a0| 6f 74 61 74 65 2d 74 65 | 78 74 39 30 2e 63 3a 20 |otate-te|xt90.c: |
|000026b0| 6f 72 69 67 69 6e 61 6c | 20 73 69 7a 65 20 38 30 |original| size 80|
|000026c0| 36 37 2c 20 63 75 72 72 | 65 6e 74 20 73 69 7a 65 |67, curr|ent size|
|000026d0| 27 20 22 24 57 63 5f 63 | 22 0a 66 69 0a 65 78 69 |' "$Wc_c|".fi.exi|
|000026e0| 74 20 30 0a 2d 2d 0a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |t 0.--.-|--------|
|000026f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002700| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002710| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002720| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002730| 2d 2d 2d 2d 0a 6d 6c 65 | 69 73 68 65 72 40 6e 6d |----.mle|isher@nm|
|00002740| 73 75 2e 65 64 75 20 20 | 20 20 20 20 20 20 20 20 |su.edu | |
|00002750| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 49 20 6c | | "I l|
|00002760| 61 75 67 68 65 64 2e 0a | 4d 61 72 6b 20 4c 65 69 |aughed..|Mark Lei|
|00002770| 73 68 65 72 20 20 20 20 | 20 20 20 20 20 20 20 20 |sher | |
|00002780| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002790| 20 20 20 20 49 20 63 72 | 69 65 64 2e 0a 43 6f 6d | I cr|ied..Com|
|000027a0| 70 75 74 69 6e 67 20 52 | 65 73 65 61 72 63 68 20 |puting R|esearch |
|000027b0| 4c 61 62 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |Lab | |
|000027c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 49 20 66 | | I f|
|000027d0| 65 6c 6c 20 64 6f 77 6e | 2e 0a 4e 65 77 20 4d 65 |ell down|..New Me|
|000027e0| 78 69 63 6f 20 53 74 61 | 74 65 20 55 6e 69 76 65 |xico Sta|te Unive|
|000027f0| 72 73 69 74 79 20 20 20 | 20 20 20 20 20 20 20 20 |rsity | |
|00002800| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 49 74 20 | | It |
|00002810| 63 68 61 6e 67 65 64 20 | 6d 79 20 6c 69 66 65 2e |changed |my life.|
|00002820| 22 0a 4c 61 73 20 43 72 | 75 63 65 73 2c 20 4e 4d |".Las Cr|uces, NM|
|00002830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002840| 20 20 20 20 20 2d 20 52 | 69 63 68 20 5b 43 6f 77 | - R|ich [Cow|
|00002850| 62 6f 79 20 46 65 6e 67 | 27 73 20 53 70 61 63 65 |boy Feng|'s Space|
|00002860| 20 42 61 72 20 61 6e 64 | 20 47 72 69 6c 6c 65 5d | Bar and| Grille]|
|00002870| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+