home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume16 / nethck31 / patch2ee < prev    next >
Encoding:
Internet Message Format  |  1993-06-15  |  60.7 KB

  1. Path: uunet!gatech!emory!ogicse!news.tek.com!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v17i106:  nethack31 - display oriented dungeons & dragons (Ver. 3.1), Patch2ee/33
  5. Message-ID: <1v8j32$je6@ying.cna.tek.com>
  6. Date: 11 Jun 93 00:19:46 GMT
  7. Article-I.D.: ying.1v8j32$je6
  8. Organization: Tektronix, Inc, Redmond, OR, USA
  9. Lines: 1872
  10. Approved: billr@saab.CNA.TEK.COM
  11. NNTP-Posting-Host: saab.cna.tek.com
  12. Xref: uunet comp.sources.games:1779
  13.  
  14. Submitted-by: izchak@linc.cis.upenn.edu (Izchak Miller)
  15. Posting-number: Volume 17, Issue 106
  16. Archive-name: nethack31/Patch2ee
  17. Patch-To: nethack31: Volume 16, Issue 1-116
  18. Environment: Amiga, Atari, Mac, MS-DOS, Windows-NT, OS2, Unix, VMS, X11
  19.  
  20.  
  21.  
  22. #! /bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 31 (of 33)."
  29. # Contents:  sys/amiga/wbwin.uu sys/mac/mttymain.c sys/msdos/video.c
  30. # Wrapped by billr@saab on Thu Jun 10 16:55:08 1993
  31. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  32. if test -f 'sys/amiga/wbwin.uu' -a "${1}" != "-c" ; then 
  33.   echo shar: Renaming existing file \"'sys/amiga/wbwin.uu'\" to \"'sys/amiga/wbwin.uu.orig'\"
  34.   mv -f 'sys/amiga/wbwin.uu' 'sys/amiga/wbwin.uu.orig'
  35. fi
  36. echo shar: Extracting \"'sys/amiga/wbwin.uu'\" \(30237 characters\)
  37. sed "s/^X//" >'sys/amiga/wbwin.uu' <<'END_OF_FILE'
  38. Xbegin 664 wbwin.pw
  39. XM4&]W97)7:6YD;W=S('8R+C5C(*DQ.3@W+"`Q.3@X(&)Y($E.3U9!5%)/3DE#
  40. XM4RP@24Y#+B`@("`@("`@("`@("`@("`@("`@("`@```"K`````E``8#_````
  41. XM`0`````!``````AW8G=I;BYC``?//V@``````H``R``"``*````/``````?)
  42. XMP`````````````````(````73F5T2&%C:R!7;W)K0F5N8V@@5C,N,0`````!
  43. XM``````$`````#)"0D```(/#P\`!@L`````L``A`_``"'>@"J`%#_____!\]>
  44. XM$`````````````````````````````('RTA````````!```"`"@`#P(U`)0`
  45. XM!0`%_____P```!Y396QE8W0@4V%V960@1V%M92!O<B!.97<@1V%M90`'SUU0
  46. XM``7_^?_F``8`*("#``,'SS,P````````````````!\]'(``$!\](Z/____\#
  47. XM```%!\]=-````````````AP```(<``<````'```````````"$P`"````````
  48. XM``````````````$#__________\````*`"@`BP?+2L@'RTL`!\\Q0`?/1V`'
  49. XMSS'8!\\V:`````=38W)O;&P``````0`````!``````I'04130U)/3$P`````
  50. XM`0`````!````````!0`,_^8`"@`C``,``0?/26@`````!\]=J```````````
  51. XM``4'SUW(_____P$```4'SUV,```````````"'````AP`"P````L`````!\])
  52. XM:/__``L"```"!\]%^``````````(``````(V```#``$```8``0`````'STJ8
  53. XM``````````,@(``````(`",``0?/2P`'STNX!\],Z`?/3E@'SUWP!\]>````
  54. XM``A-97-S86=E``````$``````0`````#+3$``````0`````!``?/7C`!$```
  55. XM````!P``!\]>0`?/\Z@````(4')O:F5C=``'SUZ(!\]>F!!(!\]>8``````0
  56. XM``?/\:@``````0(#`0```````````,@`"```````````````!4AE;'``````
  57. XM`0`'SV(8!\]J6!!!!\_QR``````0``?/\?```````0(#`0`````````(`,@`
  58. XM"```````````````!D%B;W5T``````$`!\_R.`?/\E`04P?/\A``````$``'
  59. XMS_)@``````$"`P$`````````(`"X``@```````````````M4;W`@4V-O<F5S
  60. XM``````$`!\_RJ`?/\K@04@?/\H``````$``'S_+(``````$"`P$`````````
  61. XM&`"X``@```````````````A296-O=F5R``````$`!\_S$`?/\S`010?/\N@`
  62. XM````$``'S_-```````$"`P$`````````(`"X``@``````````````!-%9&ET
  63. XM($-O;F9I9W5R871I;VX``````0`'S_.(!\_SF!!1!\_S8``````0````````
  64. XM`````0(#`0`````````@`,@`"```````````````!5%U:70``````0`'S_/(
  65. XM`1``1@````<```?/\]@`````````!4=A;64`!\_T(`?/]#`020?/\_@`````
  66. XM$``'S_1```````$"`P$````````````(``@```````````````5);F9O````
  67. XM``$`!\_TB`?/]*`00P?/]&``````$``'S_2P``````$"`P$`````````"`"8
  68. XM``@```````````````I#;W!Y($EN9F\``````0`'S_3X!\_U"!!$!\_TT```
  69. XM```0``?/]1@``````0(#`0`````````@`)@`"```````````````"$1I<V-A
  70. XM<F0``````0`'S_5@!\_U<!!.!\_U.``````0`````````````0(#`0``````
  71. XM```8`)@`"```````````````!U)E;F%M90`````!```"$`X`(`)```4`!?__
  72. XM__\`````!]`!R````````````````````````P?/^_@```````=1=65S=%\`
  73. XM``,`K@`\`2H`/``%``7_____````&DYE=$AA8VL@5V]R:T)E;F-H(%)E<75E
  74. XM<W0`!\__R``,`"L`5P`+`````P`!!\_^W``````'S_\(``````````````?/
  75. XM_SC_____`@``!0?/_NP```````````!8````6``,````#````````````P`!
  76. XM```@``(`````!\__*``````````$665S``````H````!!\__8`?/_W`'S_^`
  77. XM!\__D`?/_Z@'S_^X````!%EE<P`````!``````$`````#$=!1%%515-46453
  78. XM``````$``````0`'T`#@`,<`*P!7``L````#``$'S__T``````?0`"``````
  79. XM```````$!]``4/____\"```%!]``!````````````%@```!8``P````,````
  80. XM```````#``$``",``@`````'T`!```````````-.;P`````*`````0?0`'@'
  81. XMT`"(!]``F`?0`*@'T`#`!]``T`````-.;P`````!``````$`````"T=!1%%5
  82. XM15-43D\``````0`````!````````#``0`1(`%0`#``,``0?0`0P`````````
  83. XM``````````````4'T`$X_____P,```4'T`$<```````````!$P```1,`%@``
  84. XM`!8```````````````@``P``!]`!8`?0`7@'T`&(!]`!F`?0`:@'T`&X````
  85. XM"4)O<F1E<G,R``````$``````0`````#+3$``````0`````!``$``0``.P`5
  86. XM``````?0`>@`````````%U-U<F4@>6]U('=A;G0@=&\@455)5#\```(0#@`E
  87. XMAD``!0`%_____P`````'T$B@```````````````````````J!\_ZX```````
  88. XM"4]P=&EO;G-?```!`!T`)P)1`*$`!0`%_____P````U%9&ET($]P=&EO;G,`
  89. XM!]`'4`"$`#<`/@`*```!`P`!!]`%I``````'T`70``````````````?0!?#_
  90. XM____`P``!0?0!;0````````````_````/P`+````"P```````````0`!```+
  91. XM``(`````!\_[Z``````````&0V]L;W(`````"@```0$'T`;H!]`&^`?0!P@'
  92. XMT`<8!]`',`?0!T`````!``````$``````0`````*1T%$3T-/3$]2``````$`
  93. XM`````0`'T`B``,H`-P!-``H`@`$#``$'T`=\``````?0!Z@`````````````
  94. XM!]`'V/____\#```%!]`'C````````````$X```!.``L````+```````````!
  95. XM``$```D``@`````'T`?(``````````A#;VYF:7)M``````H```$!!]`(``?0
  96. XM"!`'T`@@!]`(,`?0"$@'T`AP`````0`````!``````$`````#$=!1$]#3TY&
  97. XM25)-``````$``````0`'T`F@`'L`#0!$``H```$#``$'T`BL``````?0"-@`
  98. XM````````````!]`)$/____\#```%!]`(O````````````$4```!%``L````+
  99. XM```````````!``$```(``@`````'T`CX``````````E$:7-C;&]S90`````*
  100. XM```!`0?0"3@'T`E(!]`)6`?0"6@'T`F`!]`)D`````$``````0`````!````
  101. XM``U'041/1$E30TQ/4T4``````0`````!``?0"K@`[P`;`#T`"@```0,``0?0
  102. XM"<P`````!]`)^`````````````8'T`HH_____P,```4'T`G<````````````
  103. XM/@```#X`"P````L```````````$``0``!P`"``````?0"A@`````````!T9I
  104. XM>&EN=@`````*```!`0?0"E`'T`I@!]`*<`?0"H`'T`J8!]`*J`````$`````
  105. XM`0`````!``````M'041/1DE824Y6``````$``````0`'T`O0`*\`&P`Y``H`
  106. XM``$#``$'T`KD``````?0"Q`````````````'!]`+0/____\#```%!]`*]```
  107. XM`````````#H````Z``L````+```````````!``$```D``@`````'T`LP````
  108. XM``````9&;'5S:``````*```!`0?0"V@'T`MX!]`+B`?0"Y@'T`NP!]`+P```
  109. XM``$``````0`````!``````I'041/1DQ54T@``````0`````!``?0#.@`?0`;
  110. XM`"H`"@```0,``0?0"_P`````!]`,*`````````````@'T`Q8_____P,```4'
  111. XMT`P,````````````*P```"L`"P````L```````````$``0``!0`"``````?0
  112. XM#$@`````````!4AE;'``````"@```0$'T`R`!]`,D`?0#*`'T`RP!]`,R`?0
  113. XM#-@````!``````$``````0`````)1T%$3TA%3%```````0`````!``?0#@``
  114. XM?0`I`#T`"@```0,``0?0#10`````!]`-0``````````````'T`UP_____P,`
  115. XM``4'T`TD````````````/@```#X`"P````L```````````$``0```@`"````
  116. XM``?0#6``````````"$EG;FEN='(`````"@```0$'T`V8!]`-J`?0#;@'T`W(
  117. XM!]`-X`?0#?`````!``````$``````0`````,1T%$3TE'3DE.5%(``````0``
  118. XM```!``?0#Q@`20`;`"H`"@```0,``0?0#BP`````!]`.6`````````````H'
  119. XMT`Z(_____P,```4'T`X\````````````*P```"L`"P````L```````````$`
  120. XM`0``!@`"``````?0#G@`````````!4YE=W,`````"@```0$'T`ZP!]`.P`?0
  121. XM#M`'T`[@!]`.^`?0#P@````!``````$``````0`````)1T%$3TY%5U,`````
  122. XM`0`````!``?0$#@`PP`I`%4`"@"``0,``0?0#T0`````!]`/<```````````
  123. XM```'T`^H_____P,```4'T`]4````````````5@```%8`"P````L`````````
  124. XM``$``0```P`"``````?0#Y``````````"TYU;6)E<B!0860`````"@```0$'
  125. XMT`_0!]`/X`?0#_`'T!``!]`0&`?0$"@````!``````$``````0`````.1T%$
  126. XM3TY534)%4E!!1``````!``````$`!]`2:``)`"D`;``*```!`P`!!]`09```
  127. XM```'T!"0``````````````?0$,C_____`P``!0?0$'0```````````!M````
  128. XM;0`+````"P```````````0`!```%``(`````!]`0L``````````-075T;R!0
  129. XM:6-K(%5P``````H```$!!]`2``?0$A`'T!(@!]`2,`?0$D@'T!)8`````0``
  130. XM```!``````$`````"T=!1$]024-+55```````0`````!``?0$X@`R0`-`&\`
  131. XM"@```0,``0?0$I0`````!]`2P``````````````'T!+X_____P,```4'T!*D
  132. XM````````````<````'``"P````L```````````$``0```P`"``````?0$N``
  133. XM````````#E)E<W0@3VX@4W!A8V4`````"@```0$'T!,@!]`3,`?0$T`'T!-0
  134. XM!]`3:`?0$W@````!``````$``````0`````01T%$3U)%4U1/3E-004-%````
  135. XM``$``````0`'T!2@`3\`#0`V``H```$#``$'T!.T``````?0$^``````````
  136. XM````!]`4$/____\#```%!]`3Q````````````#<````W``L````+````````
  137. XM```!``$```0``@`````'T!0```````````=3:6QE;G0`````"@```0$'T!0X
  138. XM!]`42`?0%%@'T!1H!]`4@`?0%)`````!``````$``````0`````+1T%$3U-)
  139. XM3$5.5``````!``````$`!]`5P`$@`"D`10`*`(`!`P`!!]`4S``````'T!3X
  140. XM``````````````?0%3#_____`P``!0?0%-P```````````!&````1@`+````
  141. XM"P```````````0`!```"``(`````!]`5&``````````)4V%F92!0970`````
  142. XM"@```0$'T!58!]`5:`?0%7@'T!6(!]`5H`?0%;`````!``````$``````0``
  143. XM```,1T%$3U-!1D50150``````0`````!``?0%_`!;@`I`$X`"@"``0,``0?0
  144. XM%>P`````!]`6&``````````````'T!90_____P,```4'T!7\````````````
  145. XM3P```$\`"P````L```````````$``0```P`"``````?0%C@`````````"E-O
  146. XM<G0@4&%C:P`````*```!`0?0%G@'T!:(!]`6F`?0%J@'T!;`!]`6T`````$`
  147. XM`````0`````!``````U'041/4T]25%!!0TL``````0`````!``?0&.@"&``-
  148. XM`"\`"@```0,``0?0&!P`````!]`6X``````````````'T!A8_____P,```4'
  149. XMT!@L````````````,````#``"P````L```````````$``0```P`"``````?0
  150. XM&$@`````````!E-O=6YD``````H```$!!]`8@`?0&)`'T!B@!]`8L`?0&,@'
  151. XMT!C8`````0`````!``````$`````"D=!1$]33U5.1``````!``````$`!]`:
  152. XM"`'$`"D`30`*```!`P`!!]`9%``````'T!E```````````````?0&7C_____
  153. XM`P``!0?0&20```````````!.````3@`+````"P```````````0`!```#``(`
  154. XM````!]`98``````````*4W1A;F0@3W5T``````H```$!!]`9H`?0&;`'T!G`
  155. XM!]`9T`?0&>@'T!GX`````0`````!``````$`````#4=!1$]35$%.1$]55```
  156. XM```!``````$`!]`<```)`!L`.0`*`(`!`P`!!]`:-``````'T!I@````````
  157. XM``````?0&I#_____`P``!0?0&D0````````````Z````.@`+````"P``````
  158. XM`````0`!```+``(`````!]`:@``````````%5&EM90`````*```!`0?0&K@'
  159. XMT!K(!]`:V`?0&N@'T!O@!]`;\`````$``````0`````!``````E'041/5$E-
  160. XM10`````!``````$`!]`=(`%\``T`50`*```!`P`!!]`<+``````'T!Q8````
  161. XM``````````?0')#_____`P``!0?0'#P```````````!6````5@`+````"P``
  162. XM`````````0`!```"``(`````!]`<>``````````+5&]M8B!3=&]N90`````*
  163. XM```!`0?0'+@'T!S(!]`<V`?0'.@'T!T`!]`=$`````$``````0`````!````
  164. XM``Y'041/5$]-0E-43TY%``````$``````0`'T"`P`98`&P`\``H```$#``$'
  165. XMT!U,``````?0'7@````````````5!]`=J/____\#```%!]`=7```````````
  166. XM`#T````]``L````+```````````!``$```(``@`````'T!V8``````````A6
  167. XM97)B;W-E``````H```$!!]`=T`?0'>`'T!WP!]`?^`?0(!`'T"`@`````0``
  168. XM```!``````$`````#$=!1$]615)"3U-%``````$``````0`'T"&@`&$`10"4
  169. XM``D```(#``0'T"!<````````````````!]`@V```!]`A"/____\#```%!]`@
  170. XM;````````````)4```"5``H````*``````````````!&`"`@("`@("`@("`@
  171. XM("`@````9&5V<SIP=S(M8V]N9FEG=7)A=&EO;@!396QE8W0@=&AE(&=A9&=E
  172. XM="!T;R!M;W9E+@!4`````0H```(!!]`A,`?0(4@'T"%8!]`A:`?0(8`'T"&0
  173. XM````"E!A8VM/<F1E<@`````!``````$`````#D=!1$]004-+3U)$15(`````
  174. XM`0`````!``?0(P@`80!2`)0`"0```@,`!`?0(<P````````````````'T")(
  175. XM```'T")X_____P,```4'T"'<````````````E0```)4`"@````H`````````
  176. XM`````$8``"`@("`@("`@("`@("````!D979S.G!W,BUC;VYF:6=U<F%T:6]N
  177. XM`%-E;&5C="!T:&4@9V%D9V5T('1O(&UO=F4N`%0````!"@```@$'T"*@!]`B
  178. XML`?0(L`'T"+0!]`BZ`?0(O@````(0V%T3F%M90`````!``````$`````#$=!
  179. XM1$]#051.04U%``````$``````0`'T"1P`&$`7P"4``D```(#``0'T",T````
  180. XM````````````!]`CL```!]`CX/____\#```%!]`C1````````````)4```"5
  181. XM``H````*``````````````!&`"`@("`@("`@("`@("`@````9&5V<SIP=S(M
  182. XM8V]N9FEG=7)A=&EO;@!396QE8W0@=&AE(&=A9&=E="!T;R!M;W9E+@!4````
  183. XM`0H```(!!]`D"`?0)!@'T"0H!]`D.`?0)%`'T"1@````"$1O9TYA;64`````
  184. XM`0`````!``````Q'041/1$]'3D%-10`````!``````$`!]`EV`!A`&P`E``)
  185. XM```"`P`$!]`DG`````````````````?0)1@```?0)4C_____`P``!0?0)*P`
  186. XM``````````"5````E0`*````"@``````````````1@`@("`@("`@("`@("`@
  187. XM(````&1E=G,Z<'<R+6-O;F9I9W5R871I;VX`4V5L96-T('1H92!G861G970@
  188. XM=&\@;6]V92X`5`````$*```"`0?0)7`'T"6`!]`ED`?0):`'T"6X!]`ER```
  189. XM``9&<G5I=``````!``````$`````"D=!1$]&4E5)5``````!``````$`!]`G
  190. XM,`'9``T`-@`*```!`P`!!]`F!``````'T"8P``````````````?0)F#_____
  191. XM`P``!0?0)A0````````````W````-P`+````"P```````````0`!```#``(`
  192. XM````!]`F4``````````'1F5M86QE``````H```$!!]`FR`?0)M@'T";H!]`F
  193. XM^`?0)Q`'T"<@`````0`````!``````$`````"T=!1$]&14U!3$4``````0``
  194. XM```!``?0*)@`80!Y`)0`"0```@,`!`?0)UP````````````````'T"?8```'
  195. XMT"@(_____P,```4'T"=L````````````E0```)4`"@````H`````````````
  196. XM`$8`("`@("`@("`@("`@("````!D979S.G!W,BUC;VYF:6=U<F%T:6]N`%-E
  197. XM;&5C="!T:&4@9V%D9V5T('1O(&UO=F4N`%0````!"@```@$'T"@P!]`H0`?0
  198. XM*%`'T"A@!]`H>`?0*(@````(3V)J96-T<P`````!``````$`````#$=!1$]/
  199. XM0DI%0U13``````$``````0`'T"FX`=D`&P!N``H```$#``$'T"C$``````?0
  200. XM*/`````````````<!]`I*/____\#```%!]`HU````````````&\```!O``L`
  201. XM```+```````````!``$```,``@`````'T"D0``````````Y!<VL@4V%V92!$
  202. XM:7-K``````H```$!!]`I4`?0*6`'T"EP!]`I@`?0*9@'T"FH`````0`````!
  203. XM``````$`````#$=!1$]!4TM3059%``````$``````0`'T"K0`A``DP`W``H`
  204. XM```#``$'T"GD``````?0*A``````````````!]`J0/____\!```%!]`I]```
  205. XM`````````#@````X``L````+```````````!``$```,``@`````'T"HP````
  206. XM``````=#04Y#14P`````"@````$'T"IH!]`J>`?0*H@'T"J8!]`JL`?0*L``
  207. XM```!``````$``````0`````+1T%$3T-!3D-%3``````!``````$`!]`KZ``-
  208. XM`)(`-P`*`````P`!!]`J_``````'T"LH``````````````?0*UC_____`0``
  209. XM!0?0*PP````````````X````.``+````"P```````````0`!```+``(`````
  210. XM!]`K2``````````%3TM!60`````*`````0?0*X`'T"N0!]`KH`?0*[`'T"O(
  211. XM!]`KV`````$``````0`````!``````E'041/3TM!60`````!``````$`!]`M
  212. XM"``)`#<`<@`*`(`!`P`!!]`L%``````'T"Q```````````````?0+'C_____
  213. XM`P``!0?0+"0```````````!S````<P`+````"P```````````0`!```%``(`
  214. XM````!]`L8``````````.2&EG:&QI9VAT(%!E=``````*```!`0?0+*`'T"RP
  215. XM!]`LP`?0+-`'T"SH!]`L^`````$``````0`````!``````Y'041/2$E,251%
  216. XM4$54``````$``````0`'T"X@`2``-P`[``H`@`$#``$'T"TT``````?0+6``
  217. XM````````````!]`MD/____\#```%!]`M1````````````#P````\``L````+
  218. XM```````````!``$```4``@`````'T"V```````````=,96=A8WD`````"@"`
  219. XM`0$'T"VX!]`MR`?0+=@'T"WH!]`N``?0+A`````!``````$``````0`````+
  220. XM1T%$3TQ%1T%#60`````!``````$`!]`O0``)``T`:``*```!`P`!!]`N3```
  221. XM```'T"YX``````````````?0+K#_____`P``!0?0+EP```````````!I````
  222. XM:0`+````"P```````````0`!```%``(`````!]`NF``````````-3&ET($-O
  223. XM<G)I9&]R``````H```$!!]`NV`?0+N@'T"[X!]`O"`?0+R`'T"\P`````0``
  224. XM```!``````$`````$$=!1$],251#3U)2241/4@`````!``````$`!]`P8`%E
  225. XM`#<`?P`*`(`!`P`!!]`O;``````'T"^8``````````````?0+]#_____`P``
  226. XM!0?0+WP```````````"`````@``+````"P```````````0`!```%``(`````
  227. XM!]`ON``````````04VAO=R!%>'!E<FEE;F-E``````H```$!!]`O^`?0,`@'
  228. XMT#`8!]`P*`?0,$`'T#!0`````0`````!``````$`````#$=!1$]32$]715A0
  229. XM``````$``````0`'T#)8`>T`-P!:``H```$#``$'T#",``````?0,+@`````
  230. XM````````!]`QV/____\#```%!]`PG````````````%L```!;``L````+````
  231. XM```````!``$```4``@`````'T##8``````````M3:&]W(%-C;W)E``````H`
  232. XM``$!!]`P\`?0,@`'T#(0!]`R(`?0,C@'T#)(`````0`````!``````$`````
  233. XM#D=!1$]32$]74T-/4D4``````0`````!``?0-%`!-0`;`%H`"@```0,``0?0
  234. XM,H0`````!]`RL````````````"0'T#/@_____P,```4'T#*4````````````
  235. XM6P```%L`"P````L```````````$``0``!0`"``````?0,M``````````"T-H
  236. XM96-K<&]I;G0`````"@"``0$'T#+H!]`R^`?0-`@'T#08!]`T,`?0-$`````!
  237. XM``````$``````0`````-1T%$3T-(2U!/24Y4``````$``````0`'T#:0`&$`
  238. XMA@"4``D```(#``0'T#1\````````````````!]`UX```!]`V$/____\#```%
  239. XM!]`TC````````````)4```"5``H````*``````````````!&`"`@("`@("`@
  240. XM("`@("`@````9&5V<SIP=S(M8V]N9FEG=7)A=&EO;@!396QE8W0@=&AE(&=A
  241. XM9&=E="!T;R!M;W9E+@!4`````0H```(!!]`T^`?0-C@'T#9(!]`V6`?0-G`'
  242. XMT#:`````!4YA;64``````0`````!``````E'041/3D%-10`````!``````$`
  243. XM!]`Z"`&S`$4`E``)```"`P`$!]`VO`````````````````?0.%````?0.(#_
  244. XM____`P``!0?0-LP```````````"5````E0`*````"@``````````````1@`@
  245. XM("`@("`@("`@("`@(````&1E=G,Z<'<R+6-O;F9I9W5R871I;VX`4V5L96-T
  246. XM('1H92!G861G970@=&\@;6]V92X`5`````$*```"`0?0-N@'T#BH!]`XN`?0
  247. XM.,@'T#C@!]`X\`````Q0:6-K=7!4>7!E<P`````!``````$`````$$=!1$]0
  248. XM24-+55!465!%4P`````!``````$`!]`\:`&S`%(`E``)```"`P`$!]`Z-```
  249. XM``````````````?0.K````?0.N#_____`P``!0?0.D0```````````"5````
  250. XME0`*````"@``````````````1@`@("`@("`@("`@("`@(````&1E=G,Z<'<R
  251. XM+6-O;F9I9W5R871I;VX`4V5L96-T('1H92!G861G970@=&\@;6]V92X`5```
  252. XM``$*```"`0?0/`@'T#F8!]`\(`?0/#`'T#Q(!]`\6`````M7:6YD;W=4>7!E
  253. XM``````$``````0`````/1T%$3U=)3D1/5U194$4``````0`````!``?0/G@!
  254. XMLP!?`)0`"0``"@,`!`?0/)0````````````````'T#S8```'T#W@_____P,`
  255. XM``4'T#RD````````````E0```)4`"@````H```````````````\``````"`@
  256. XM("`@("`@("````$*```*`0?0/@@'T#X@!]`^,`?0/D`'T#Y8!]`^:`````M-
  257. XM<V=(:7-T;W)Y``````$``````0`````/1T%$3TU31TA)4U1/4ED``````0``
  258. XM```!``?00@@!LP!L`)0`"0```@,`!`?0/J0````````````````'T#[0```'
  259. XMT$!8_____P,```4'T#ZT````````````E0```)4`"@````H`````````````
  260. XM`$8`("`@("`@("`@("`@("````!D979S.G!W,BUC;VYF:6=U<F%T:6]N`%-E
  261. XM;&5C="!T:&4@9V%D9V5T('1O(&UO=F4N`%0````!"@```@$'T$"`!]!`D`?0
  262. XM0*`'T$"P!]!`R`?00-@````(4&%L971T90`````!``````$`````#$=!1$]0
  263. XM04Q%5%1%``````$``````0`'T$1``;,`>0"4``D```(#``0'T$(T````````
  264. XM````````!]!"L```!]!"X/____\#```%!]!"1````````````)4```"5``H`
  265. XM```*``````````````!&`"`@("`@("`@("`@("`@````9&5V<SIP=S(M8V]N
  266. XM9FEG=7)A=&EO;@!396QE8W0@=&AE(&=A9&=E="!T;R!M;W9E+@!4`````0H`
  267. XM``(!!]!`Z`?00/@'T$&8!]!$"`?01"`'T$0P````!E-C;W)E``````$`````
  268. XM`0`````*1T%$3U-#3U)%``````$``````0`'T$:H`;,`A@"4``D```(#``0'
  269. XMT$1L````````````````!]!&"```!]!&./____\#```%!]!$?```````````
  270. XM`)4```"5``H````*``````````````!&`"`@("`@("`@("`@("`@````9&5V
  271. XM<SIP=S(M8V]N9FEG=7)A=&EO;@!396QE8W0@=&AE(&=A9&=E="!T;R!M;W9E
  272. XM+@!4`````0H```(!!]!$Z`?01/@'T$9@!]!&<`?01H@'T$:8````"%!E=%1Y
  273. XM<&4``````0`````!``````Q'041/4$545%E010`````!``````$```````(8
  274. XM`"D`+P`*`(`!`P`!!]!&U``````'T$?@``````````````?02!#_____`P``
  275. XM!0?01N0````````````P````,``+````"P```````````0`!```(``(`````
  276. XM!]!(```````````%3G5L;``````*```!`0?02#@'T$A(!]!(6`?02&@'T$B`
  277. XM!]!(D`````$``````0`````!``````E'041/3E5,3``````!``````$``P`!
  278. XM```'`$8`````!]!(P`?02-@````,4&%C:R!/<F1E<CH``P`!```7`%,`````
  279. XM!]!)X`?02?@````*0V%T($YA;64Z``,``0``%P!@``````?02A@'T$HP````
  280. XM"D1O9R!.86UE.@`#``$``"\`;0`````'T$CX!]!*4`````=&<G5I=#H``P`!
  281. XM```?`'H`````!]!*<`?02H@````)3V)J96-T<SH``P`!```W`(<`````!]!*
  282. XMJ`?02K@````&3F%M93H``P`!``&``'L`````!]!*V`?02N@````'4V-O<F4Z
  283. XM``,``0`!<`!N``````?02^`'T$OX````"5!A;&5T=&4Z``,``0`!4`!4````
  284. XM``?03!@'T$PP````#5=I;F1O=R!4>7!E.@`#``$``5``80`````'T$Q0!]!,
  285. XM:`````U-<V<@2&ES=&]R>3H``P`!``%(`$<`````!]!,B`?03*`````.4&EC
  286. XM:W5P(%1Y<&5S.@`#``$``6@`B``````'T$S```````````I0970@5'EP93H`
  287. XM``(0#@`D`D``!0`%_____P`````'T&LP```````````````````````(!]!0
  288. XM^```````!D-O;F9?```!`'X`/`&2`'(`!0`%_____P```!A%9&ET($=A;64@
  289. XM0V]N9FEG=7)A=&EO;@`'T%Y(`%$`'`$W``D````#``0'T%J<````````````
  290. XM````!]!:R```!]!<V/____\#```%!]!:K````````````3@```$X``H````*
  291. XM``````````````#(`"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  292. XM("`@("``````````````__\#`0(````````LK-0`+:Q8```````K5,P`````
  293. XM!S@`*F]P````0@`J<`@`R0`/`&@`"`!2```````J;^(`````````````__\#
  294. XM`0(````````LK-0`+;H(```````K5,P`````".@`*F^X````0@`J<%``R0`7
  295. XM`&@`"`!2```````J<"H`````````````__\#`0(```````$*`````0?07@@'
  296. XMT%+X!]!6*`?07B`'T%KX!]!>.`````M3=')(86-K9&ER``````$``````0``
  297. XM```.1T%$4U122$%#2T1)4@`````!``````$`!]!A,`!1`"H!-P`)`````P`$
  298. XM!]!>=`````````````````?07J````?07M#_____`P``!0?07H0`````````
  299. XM``$X```!.``*````"@``````````````R``@("`@("`@("`@("`@("`@("`@
  300. XM("`@("`@("`@("`@("`@("`@`````````````/__`P$"````````+*S4`"VL
  301. XM6```````*U3,``````<X`"IO<````$(`*G`(`,D`#P!H``@`4@``````*F_B
  302. XM`````````````/__`P$"````````+*S4`"VZ"```````*U3,``````CH`"IO
  303. XMN````$(`*G!0`,D`%P!H``@`4@``````*G`J`````````````/__`P$"````
  304. XM```!"@````$'T%[X!]!@V`?08.@'T&#X!]!A$`?082`````(4W1R4&5N<P``
  305. XM```!``````$`````"T=!1%-44E!%3E,``````0`````!``?08Q@`40`.`38`
  306. XM"0````,`!`?085P````````````````'T&)8```'T&*(_____P,```4'T&%L
  307. XM```````````!-P```3<`"@````H``````````````,@`("`@("`@("`@("`@
  308. XM("`@("`@("`@("`@("`@("`@("`@("`@(`````````````#__P,!`@``````
  309. XM`"RLU``MK%@``````"M4S``````'.``J;W````!"`"IP"`#)``\`:``(`%(`
  310. XM`````"IOX@````````````#__P,!`@```````"RLU``MN@@``````"M4S```
  311. XM```(Z``J;[@```!"`"IP4`#)`!<`:``(`%(``````"IP*@````````````#_
  312. XM_P,!`@```````0H````!!]!BL`?08L`'T&+0!]!BX`?08O@'T&,(````"%-T
  313. XM<E!A=&@``````0`````!``````M'04135%)0051(``````$``````0`'T&4(
  314. XM`%$`.`$W``D````#``0'T&-$````````````````!]!D0```!]!D</____\#
  315. XM```%!]!C5````````````3@```$X``H````*``````````````#(`"`@("`@
  316. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("``````````````__\#
  317. XM`0(````````LK-0`+:Q8```````K5,P`````!S@`*F]P````0@`J<`@`R0`/
  318. XM`&@`"`!2```````J;^(`````````````__\#`0(````````LK-0`+;H(````
  319. XM```K5,P`````".@`*F^X````0@`J<%``R0`7`&@`"`!2```````J<"H`````
  320. XM````````__\#`0(```````$*`````0?09)@'T&2P!]!DP`?09-`'T&3H!]!D
  321. XM^`````I3='),979E;',``````0`````!``````U'04135%),159%3%,`````
  322. XM`0`````!``?09O``40!&`3<`"0````,`!`?0930````````````````'T&8P
  323. XM```'T&9@_____P,```4'T&5$```````````!.````3@`"@````H`````````
  324. XM`````,@`("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(```
  325. XM``````````#__P,!`@```````"RLU``MK%@``````"M4S``````'.``J;W``
  326. XM``!"`"IP"`#)``\`:``(`%(``````"IOX@````````````#__P,!`@``````
  327. XM`"RLU``MN@@``````"M4S``````(Z``J;[@```!"`"IP4`#)`!<`:``(`%(`
  328. XM`````"IP*@````````````#__P,!`@```````0H````!!]!FB`?09I@'T&:H
  329. XM!]!FN`?09M`'T&;@````"%-T<E-A=F4``````0`````!``````M'04135%)3
  330. XM059%``````$``````0`'T&BX`)<`9`#Q``D```(#``0'T&<<````````````
  331. XM````!]!H"```!]!H./____\!```%!]!G+````````````/(```#R``H````*
  332. XM```````````````R3F5T:&%C:SI.971(86-K+F-N9@`@("`@("`@("`@````
  333. XM``9V`#D?^``XPFX```````````$*```"`0?09T@'T&A@!]!H<`?0:(`'T&B8
  334. XM!]!HJ`````M#;VYF:6=.86UE``````$``````0`````,1T%$0T].1DY!344`
  335. XM`````0`````!``?0:A@`"0!5`#,`"@````,``0?0:.0`````!]!I$```````
  336. XM```````'T&E`_____P(```4'T&CT````````````-````#0`"P````L`````
  337. XM``````$``0``"@`"``````?0:3``````````!4QO860`````"@````$'T&EH
  338. XM!]!I>`?0:8@'T&GP!]!IF`?0:@@````!``````$``````0`````,1T%$0T].
  339. XM1DQ/040``````0`````!````````20!5`#,`"@````,``0?0:D0`````!]!J
  340. XM<``````````````'T&J@_____P(```4'T&I4````````````-````#0`"P``
  341. XM``L```````````$``0``"@`"``````?0:I``````````!5-A=F4`````"@``
  342. XM``$'T&K(!]!JV`?0:N@'T&KX!]!K$`?0:R`````!``````$``````0`````,
  343. XM1T%$0T].1E-!5D4``````0`````!``,``0``)P`0``````?0:U`'T&M@````
  344. XM!E!A=&@Z``,``0``#P`>``````?0:X`'T&N8````"4AA8VMD:7(Z``,``0``
  345. XM)P`L``````?0:[@'T&O(````!E!E;G,Z``,``0``%P`Z``````?0:^@'T&OX
  346. XM````"$QE=F5L<SH``P`!```'`$@`````!]!L&`?0;#`````*4V%V92!$:7(Z
  347. XM``$``0``"@!E``````?0;%``````````$D-O;F9I9R!&:6QE($YA;64Z```"
  348. XM$`X`)`)```4`!?____\``````````````````````````````````@?03-@`
  349. XM``````53=')?```!`#<`/`(.`!\`!0`%_____P```!%3=')I;F<@4F5Q=65S
  350. XM=&5R``?0M#@`30`/`;8`"@```@,`!`?06*0````````````````'T%C0```'
  351. XMT%G@_____P,```4'T%BT```````````!MP```;<`"P````L`````````````
  352. XM`&0`("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  353. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@.`````!XJ@`IXD````!"
  354. XM`"GBV`#4``\`&``````!"@```@$'T$SX!]!6>`?05O`'T%H(!]!L<`?0;/@`
  355. XM```'4W1R:6YG``````$``````0`````#+3$``````0`````!````````"0`/
  356. XM`#@`"@````,``0?0M&0`````!]"TD``````````````'T+7@_____P,```4'
  357. XMT+1T````````````.0```#D`"P````L```````````,``0``!``"``````?0
  358. XM</@`````````!T-A;F-E;``````*`````0?0M@@'T+88!]"V*`?0MC@'T+90
  359. XM!]"V8`````$``````0`````!``````U'04135%)#04Y#14P``````0`````!
  360. XM```"$`X`)`-```4`!?____\'T,\`````````````````````````````#`?/
  361. XM,A@```````9);F9O7P```0`I`#,"+`!=``4`!?____\````11V%M92!);F9O
  362. XM<FUA=&EO;@`'T+O@`%``'P'1``H```(#``0'T+=T``````?/^Y@`````!]!5
  363. XM^```!]!7X/____\#```%!]"WA````````````=(```'2``L````+````````
  364. XM```#``$`_[H``0`````'SS(H``````````E#;VUM96YT.@````!D````````
  365. XM```'STL@````0@?/4-``R0`/`*``"`!2``````?/4*H`````````````__\#
  366. XM`0(```````?1V?P'T>4@``````?0@?0````````'SU"`````0@``````R0`7
  367. XM`*```````0H```(!!\_^,`?/_D`'T`A8!]!4Z`?05/@'T%@(````"$-O;6UE
  368. XM;G0``````0`````!``````,M,0`````!``````$`!]"\J`!N``\`Q``+````
  369. XM`P`$!]"\#``````'T+*X``````?0M+````?0N/C_____`P``!0?0O!P`````
  370. XM``````#%````Q0`,````#````````````P`!`/^;``(`````!]"R@```````
  371. XM```-4&QA>65R($YA;64Z`````&0```````````?/2R````!"!\]0T`#)``\`
  372. XMH``(`%(`````!\]0J@````````````#__P,!`@``````!]'9_`?1Y2``````
  373. XM!]"!]`````````?/4(````!"``````#)`!<`H```````"@````$'T++8!]"R
  374. XMZ`?0M.`'T+>@!]"T\`?0MG`````'4&QA>65R``````$``````0`````*1T%$
  375. XM4$Q.04U%``````$``````0`'T+XX`9(`#P"/``L``P`#``$'T+S4``````?0
  376. XMN2``````````````!]"]L/____\#```%!]"\Y````````````)````"0``P`
  377. XM```,```````````#``$`_ZL``@`````'T+V8``````````M#:&%R86-T97(Z
  378. XM``````@``P``!]"]V`?0O>@'T+WX!]"^"`?0OA@'T+XH````!D-L87-S````
  379. XM``$``````0`````#+3$``````0`````!``?0QK@`=``_`:T`"0````,`!`?0
  380. XMOF0`````!]"^D``````'T+[(```'T,78_____P,```4'T+YT```````````!
  381. XMK@```:X`"@````H```````````,``0#_D@`!``````?0OK``````````#%1O
  382. XM;VP@5'EP97,Z`````,@`("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  383. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@`",`$`$\`%$`````
  384. XM`````````````````"Y>H````$(`+G1(````&`#8``@`5@``````+G0B````
  385. XM`$,``````/__`P$"````````+Q;\`"\G^@``````+X+T````(8HX`"YS^```
  386. XM`$(`+G8(````(`#8``@`4@``````+G1J`````````````````0H````!!]#&
  387. XM``?0OO@'T,88!]#&*`?0QD`'T,90````"E1O;VQ4>7!E<P`````!``````$`
  388. XM````#4=!1%1/3TQ465!%4P`````!``````$`!]#':`!A`#T`#0`&`````P`!
  389. XM!]#&Y`````````````````````````?0QF#_____`P``!0?0QO0`````````
  390. XM```.````#@`'````!P``````````````"@````$'T,:(!]#'$`?0QR`'T,<P
  391. XM!]#'2`?0QU@````'5&]O;%5P``````$``````0`````*1T%$5$]/3%50````
  392. XM``$``````0`'T,A8`&$`1``-``8````#``$'T,>4````````````````````
  393. XM````!]#'P/____\#```%!]#'I`````````````X````.``<````'````````
  394. XM```````*`````0?0Q^@'T,@`!]#($`?0R"`'T,@X!]#(2`````E4;V]L1&]W
  395. XM;@`````!``````$`````#$=!1%1/3TQ$3U=.``````$``````0`'T,F(`8T`
  396. XM+P"4``H````#``$'T,B$``````?0R+``````````````!]#(\/____\#```%
  397. XM!]#(E````````````)4```"5``L````+```````````#``$```8``0`````'
  398. XMT,C0`````````!)%9&ET($=A;64@3W!T:6]N<P`````2`````0?0R1@'T,DP
  399. XM!]#)0`?0R5`'T,EH!]#)>`````E%9&ET3W!T<P`````!``````$`````#$=!
  400. XM1$5$251/4%13``````$``````0`'T,J@``P`+@`Z``H````#``$'T,FT````
  401. XM``?0R>``````````````!]#*$/____\#```%!]#)Q````````````#L````[
  402. XM``L````+```````````#``$``!(``0`````'T,H```````````1!9&0`````
  403. XM"@````$'T,HX!]#*2`?0RE@'T,IH!]#*@`?0RI`````!``````$``````0``
  404. XM```+1T%$041$5$]/3``````!``````$`!]#+N`!.`"X`.P`*`````P`!!]#*
  405. XMS``````'T,KX``````````````?0RRC_____`P``!0?0RMP````````````\
  406. XM````/``+````"P```````````P`!```2``$`````!]#+&``````````$1&5L
  407. XM``````H````!!]#+4`?0RV`'T,MP!]#+@`?0RY@'T,NH`````0`````!````
  408. XM``$`````"T=!1$1%3%1/3TP``````0`````!``?0S-``"P!.`$<`"0````,`
  409. XM`0?0R^0`````!]#,$``````````````'T,Q`_____P,```4'T,OT````````
  410. XM````2````$@`"@````H```````````,``0``%0`!``````?0S#``````````
  411. XM!5-A=F4`````"@````$'T,QH!]#,>`?0S(@'T,R8!]#,L`?0S,`````!````
  412. XM``$``````0`````,1T%$4T%614E.1D\``````0`````!``?0S>@!V@!.`$<`
  413. XM"0````,``0?0S/P`````!]#-*``````````````'T,U8_____P,```4'T,T,
  414. XM````````````2````$@`"@````H```````````,``0``%``!``````?0S4@`
  415. XM````````!5%U:70`````"@````$'T`:8!]`&J`?07?@'T%W@!]`_Z`?0/_@`
  416. XM```!``````$``````0`````,1T%$455)5$E.1D\``````0`````!````````
  417. XM]P!.`$<`"0````,``0?0SA0`````!]#.0``````````````'T,YP_____P,`
  418. XM``4'T,XD````````````2````$@`"@````H```````````,``0``&``!````
  419. XM``?0SF``````````!%5S90`````*`````0?/KE@'SZYH!]!;\`?01?`'T$7@
  420. XM!]!;X`````$``````0`````!``````M'04154T5)3D9/``````$``````0`'
  421. XMT,\@`1````````<```?0SS@`````````"D-H87)A8W1E<@`'T,^`!]#/D"P`
  422. XM!]#/6``````0``?0SZ```!_^`0(#`0`3`````````',`"```````````````
  423. XM!U)A;F1O;0`````!``?0S^@'T-``)``'T,_``````!``!]#0$```'_T!`@,!
  424. XM`!,```````@`<P`(```````````````-07)C:&5O;&]G:7-T``````$`!]#0
  425. XM6`?0T'`D``?0T#``````$``'T-"````?^P$"`P$`$P``````$`!S``@`````
  426. XM``````````I"87)B87)I86X``````0`'T-#(!]#0V"0`!]#0H``````0``?0
  427. XMT.@``!_W`0(#`0`3```````8`',`"```````````````"$-A=F5M86X`````
  428. XM`0`'T-$P!]#10"0`!]#1"``````0``?0T5```!_O`0(#`0`3```````@`',`
  429. XM"```````````````!$5L9@`````!``?0T9@'T-&H)``'T-%P`````!``!]#1
  430. XMN```']\!`@,!`!,``````"@`<P`(```````````````'2&5A;&5R``````$`
  431. XM!]#2``?0TA`D``?0T=@`````$``'T-(@```?OP$"`P$`$P``````,`!S``@`
  432. XM``````````````=+;FEG:'0``````0`'T-)H!]#2>"0`!]#20``````0``?0
  433. XMTH@``!]_`0(#`0`3```````X`',`"```````````````!U!R:65S=``````!
  434. XM``?0TM`'T-+@)``'T-*H`````!``!]#2\```'O\!`@,!`!,``````$``<P`(
  435. XM```````````````&4F]G=64``````0`'T-,X!]#32"0`!]#3$``````0``?0
  436. XMTU@``!W_`0(#`0`3``````!(`',`"```````````````"%-A;75R86D`````
  437. XM`0`'T-.@!]#3L"0`!]#3>``````0``?0T\```!O_`0(#`0`3``````!0`',`
  438. XM"```````````````"%1O=7)I<W0``````0`'T-0(!]#4("0`!]#3X``````0
  439. XM``?0U#```!?_`0(#`0`3``````!8`',`"```````````````"59A;&MY<FEE
  440. XM``````$`!]#4>`?0U(@D``?0U%``````$``````````/_P$"`P$`$P``````
  441. XM8`!S``@```````````````=7:7IA<F0``````0```A`.`"`"0``%``7_____
  442. XM``````?0XZ````````````````````````$'T+C@```````'2&5L<#%?```!
  443. XM`(8`/`&!`#,`!0`%_____P```!A(96QP(&9O<B!'86UE(%-E;&5C=&EO;@``
  444. XM``````P`(@`O``P````#``$'T.+D``````?0V5`````````````%!]#C$/__
  445. XM__\!```%!]#B]````````````#`````P``T````-```````````!``$```<`
  446. XM`@`````'T-EP``````````5/:V%Y`````!(````!!]#C.`?0XT@'T.-8!]#C
  447. XM:`?0XX`'T..0`````0`````!``````$`````#$=!1$A%3%!/2T%9``````$`
  448. XM`````0`#``$```D`#0`````'T.:H!]#FX````"Y#;&EC:R!O;B!.97='86UE
  449. XM($=A9&=E="!O<B!A(%-A=F5D($=A;64@='=I8V4``P`!```*`!8`````!]#G
  450. XM```````````O=&\@<W1A<G0@82!N97<@9V%M92!O<B!T;R!R97-U;64@82!S
  451. XM879E9"!G86UE+@```A`.`"`"0``%``7_____``````?0Q&``````````````
  452. XM``````````$'T%7@```````'2&5L<#)?```!`(L`/`%T`#H`!0`%_____P``
  453. XM`!M(96QP(&9O<B!'86UE($UA;FEP=6QA=&EO;@```````!$`*@`O``H````#
  454. XM``$'T,+L``````?0P5@````````````$!]##&/____\!```%!]#"_```````
  455. XM`````#`````P``L````+```````````!``$```<``@`````'T,%X````````
  456. XM``5/:V%Y`````!(````!!]#!B`?0PA@'T,(H!]#$*`?0Q$`'T,10`````0``
  457. XM```!``````$`````#$=!1$A%3%!/2T%9``````$``````0`#``$```\`#0``
  458. XM```'T-NP!]#$@````"M5<V4@365N=2!B=71T;VX@=&\@<V5L96-T(&]P97)A
  459. XM=&EO;B!O;B!T:&4``P`!```/`!8`````!]#=``?0QI@````L<V5L96-T960@
  460. XM9V%M92P@;W(@9&]U8FQE(&-L:6-K(&]N(&$@9V%M92!T;P`#``$```\`'P``
  461. XM```'T-OH`````````!=R97-U;64@=&AE('-A=F5D(&=A;64N```"$`X`(`)`
  462. XM``4`!?____\`````!]#QJ````````````````````````0?0YS@```````=!
  463. XM8F]U=%\```$`60`\`;\`4P`%``7_____````'$%B;W5T('1H92!.971(86-K
  464. XM(%=O<FM"96YC:````````*,`1`!M``H````#``$'T/$4``````?0[Z``````
  465. XM```````%!]#P8/____\!```%!]#Q)````````````&X```!N``L````+````
  466. XM```````!``$``"@``@`````'T.WP``````````5/:V%Y`````!(````!!]#N
  467. XMF`?0[P@'T/"(!]#QD`?0\)@'T/%``````0`````!``````$`````#$=!1$A%
  468. XM3%!/2T%9``````$``````0`#``$```@`#0`````'T/(0!]#R0````"94:&4@
  469. XM3F5T2&%C:R!7;W)K0F5N8V@@=V%S(&1E<VEG;F5D(&)Y``(``0`!-@`-````
  470. XM``?0\F`'T/+0````"TME;B!,;W)B97(``P`!``&,``T`````!]#R>`?0\O``
  471. XM```$86YD``(``0``"``6``````?0\U`'T/-H````#T=R96=G(%=O;F1E<FQY
  472. XM``,``0``>``6``````?0\X@'T/.8`````BX``P`!``"'`!8`````!]#SN`?0
  473. XM\^@````G5&AE('!R;V=R86UM:6YG('=A<R!S=&%R=&5D(&)Y($ME;B!A;F0`
  474. XM`P`!```(`!\`````!]#T"`?0]"@````59FEN:7-H960@8GD@1W)E9V<N+BX`
  475. XM`@`!```4`"\`````!]#T2`?0](@````S2&%C:U="(&ES(&-O<'ER:6=H="!'
  476. XM<F5G9R!7;VYD97)L>2!A;F0@2V5N($QO<F)E<BP``@`!```*`#@`````!]#T
  477. XMJ``````````V,3DY,B!S964@3F5T2&%C:R!L:6-E;G-E(&9O<B!D971A:6QS
  478. XM(&%N9"!L:6UI=&%T:6]N<R$```(0#@!@`F``!0`%_____P``````````````
  479. XM```````````````````#!]#$\```````!TAE;'`S7P```0!+``D![@"]``4`
  480. XM!?____\````@2&5L<"!F;W(@3F5T:&%C:R!7;W)K0F5N8V@@5C,N,0`'T0GH
  481. XM``P`K0`O``H````#``$'T.%<``````?0X$`````````````#!]#@L/____\"
  482. XM```%!]#A;````````````#`````P``L````+```````````!``$```@``@``
  483. XM```'T-Q(``````````5&4E=$`````!(````#!]#@8`?0X-@'T.&(!]#D&`?0
  484. XMY#`'T.1``````0`````!``````$`````#$=!1$A%3%!&4E=$``````$`````
  485. XM`0`'T0I``;(`K0`O``H````#``$'T0H4``````?0Y%`````````````$!]#E
  486. XM</____\"```%!]$*)````````````#`````P``L````+```````````!``$`
  487. XM``@``@`````'T.1P``````````5"2U=$`````!(````#!]#E0`?0Y9@'T.6H
  488. XM!]#F$`?0YB@'T.8X`````0`````!``````$`````#$=!1$A%3%!"2U=$````
  489. XM``$``````0```````,(`L``A``@``P`#``$'T.9(````````````````````
  490. XM`/__!]$*F/____\#```%!]$*?````````````"(````B``D````)``````?0
  491. XMYDC_0/_Y`0```@?0[D@`````````"``````!Z0``````"0`#``$'T.Y8!]#O
  492. XM@`?0[Y`'T0K`!]$*T`?1"N`````!``````$``````0`````#+3$``````0``
  493. XM```!```"$`X`)`)@``4`!?____\`````!]$5T```````````````````````
  494. XM!`?05,````````52<W1?```"`+$`/`$G`#D`!0`%_____P```!-296-O=F5R
  495. XM(%!A<F%M971E<G,`!]#<F`!E``\`N@`)```"`P`$!]#`%```````````````
  496. XM``?0P\````?0P_#_____`P``!0?0P"0```````````"[````NP`*````"@``
  497. XM```````````!+```````!``;``!H*``./\_XA`!$``````*``,C__P``)0``
  498. XM`A!'````````````.0?4````````````*``>_____P`!``D````!``(``P`(
  499. XM``0`!0`'``D`!@,``0`!F@`!```````Y""`````````````'````.)FF``$`
  500. XM.)HF``(`.)GF``,`.)DF``0`.)IF``4`.)JF``8`.)EF```````!```````!
  501. XM```````!```````!```````!`````````````0````````````$```````$`
  502. XM``````$```````$```````$``````````````````0```````0```````0!I
  503. XM``0!MP"^``$```````(00``XF#H```````````````````````4``````0H`
  504. XM``(!!]!4T`?0PK`'T,08!]#$H`?0Q+@'T,3(````"%)E<W1$:7(``````0``
  505. XM```!``````M'041215-41$E2``````$``````0`'T1@P`&4`'`"Z``D```(#
  506. XM``0'T-S$````````````````!]#<"```!]#:(/____\#```%!]#<U```````
  507. XM`````+L```"[``H````*``````````````$L```````$`!L``&@H``X_S_B$
  508. XM`$0``````H``R/__```E```"$$<````````````Y!]0````````````H`![_
  509. XM____``$`"0````$``@`#``@`!``%``<`"0`&`P`!``&:``$``````#D((```
  510. XM``````````<````XF:8``0`XFB8``@`XF>8``P`XF28`!``XFF8`!0`XFJ8`
  511. XM!@`XF68```````$```````$```````$```````$```````$````````````!
  512. XM`````````````0```````0```````0```````0```````0``````````````
  513. XM```!```````!```````!`&D`!`&W`+X``0```````A!``#B8.@``````````
  514. XM````````````!0`````!"@```@$'T-PX!]#<\`?0W9@'T-ZX!]#=J`?0WM``
  515. XM```(4F5S=$]L9``````!``````$`````"T=!1%)%4U1/3$0``````0`````!
  516. XM``?1&Y@`"@`J`#D`"@````,``0?1&%P`````!]#?(`````````````4'T-^(
  517. XM_____P,```4'T1AL````````````.@```#H`"P````L```````````$`````
  518. XM#``!``````?0WT``````````!4]K87D`````"@````$'T-^P!]#?4`?0Y;@'
  519. XMT/5(!]#W$`?0^=`````)4F5S=$]K87D``````0`````!``````Q'041215-4
  520. XM3TM!60`````!``````$```````#F`"H`.0`*`````P`!!]$;Q``````'T0,8
  521. XM````````````!@?1%'C_____`P``!0?1&]0````````````Z````.@`+````
  522. XM"P```````````0`````%``$`````!]$#D``````````'0V%N8V5L``````H`
  523. XM```!!]$#H`?1%0@'T148!]$5*`?1%;`'T17`````"U)E<W1#86YC96P`````
  524. XM`0`````!``````M'041215-40T%.``````$``````0`!``````X`#P`````'
  525. XMT1>`!]$7F`````M$:7)E8W1O<GDZ``$`````$@`=``````?1&(@`````````
  526. X+"D]L9"!&:6QE.@!$
  527. X`
  528. Xend
  529. END_OF_FILE
  530. if test 30237 -ne `wc -c <'sys/amiga/wbwin.uu'`; then
  531.     echo shar: \"'sys/amiga/wbwin.uu'\" unpacked with wrong size!
  532. fi
  533. # end of 'sys/amiga/wbwin.uu'
  534. if test -f 'sys/mac/mttymain.c' -a "${1}" != "-c" ; then 
  535.   echo shar: Renaming existing file \"'sys/mac/mttymain.c'\" to \"'sys/mac/mttymain.c.orig'\"
  536.   mv -f 'sys/mac/mttymain.c' 'sys/mac/mttymain.c.orig'
  537. fi
  538. echo shar: Extracting \"'sys/mac/mttymain.c'\" \(14469 characters\)
  539. sed "s/^X//" >'sys/mac/mttymain.c' <<'END_OF_FILE'
  540. X/*    SCCS Id: @(#)mttymain.c    3.1    93/02/26            */
  541. X/* Copyright (c) Jon W{tte, 1993                    */
  542. X/* NetHack may be freely redistributed.  See license for details.    */
  543. X
  544. X#include "hack.h"
  545. X#include "wintty.h"
  546. X#include "mactty.h"
  547. X
  548. X#include <stdarg.h>
  549. X#include <Menus.h>
  550. X
  551. Xextern void InitRes ( void ) ;
  552. Xextern Boolean small_screen ;
  553. Xextern void DoMenu ( long ) ;
  554. Xextern void UpdateMenus ( void ) ;
  555. Xextern int GetFromKeyQueue ( void ) ;
  556. Xextern void dprintf ( char * , ... ) ;
  557. X
  558. X
  559. X#define POWER_LIMIT 22
  560. X#define SECONDARY_POWER_LIMIT 16
  561. X#define CHANNEL_LIMIT 14
  562. X#define SECONDARY_CHANNEL_LIMIT 12
  563. X
  564. X#define MT_WINDOW 135
  565. X#define MT_WIDTH 80
  566. Xstatic short MT_HEIGHT = 24;
  567. X
  568. X
  569. X/*
  570. X * Names:
  571. X *
  572. X * Statics are prefixed _
  573. X * Mac-tty becomes mt_
  574. X */
  575. X
  576. X
  577. Xstatic void _mt_set_colors ( long * colors ) ;
  578. X
  579. X
  580. Xstatic long _mt_attrs [ 5 ] [ 2 ] = {
  581. X    { 0x202020 , 0xffffff } , /* Normal */
  582. X    { 0xff8080 , 0xffffff } , /* Underline */
  583. X    { 0x40c020 , 0xe0e0e0 } , /* Bold */
  584. X    { 0x003030 , 0xff0060 } , /* Blink */
  585. X    { 0xff8888 , 0x000000 } , /* Inverse */
  586. X} ;
  587. X
  588. X
  589. Xstatic char _attrs_inverse [ 5 ] = {
  590. X    0 , 0 , 0 , 0 , 0 ,
  591. X} ;
  592. X
  593. X
  594. X#if 0
  595. X#define BLACK        0
  596. X#define RED        1
  597. X#define GREEN        2
  598. X#define BROWN        3    /* on IBM, low-intensity yellow is brown */
  599. X#define BLUE        4
  600. X#define MAGENTA     5
  601. X#define CYAN        6
  602. X#define GRAY        7    /* low-intensity white */
  603. X#define NO_COLOR    8
  604. X#define ORANGE_COLORED    9    /* "orange" conflicts with the object */
  605. X#define BRIGHT_GREEN    10
  606. X#define YELLOW        11
  607. X#define BRIGHT_BLUE    12
  608. X#define BRIGHT_MAGENTA  13
  609. X#define BRIGHT_CYAN    14
  610. X#define WHITE        15
  611. X#define MAXCOLORS    16
  612. X#endif
  613. X
  614. Xstatic long _mt_colors [ 16 ] [ 2 ] = {
  615. X    { 0x000000 , 0xaaaaaa } , /* Black */
  616. X    { 0x880000 , 0xffffff } , /* Red */
  617. X    { 0x008800 , 0xffffff } , /* Green */
  618. X    { 0x553300 , 0xffffff } , /* Brown */
  619. X    { 0x000088 , 0xffffff } , /* Blue */
  620. X    { 0x770077 , 0xffffff } , /* Magenta */
  621. X    { 0x007777 , 0xffffff } , /* Cyan */
  622. X    { 0x888888 , 0xffffff } , /* Gray */
  623. X    { 0x222222 , 0xffffff } , /* No Color */
  624. X    { 0xeeee00 , 0x606060 } , /* Orange */
  625. X    { 0x00ff00 , 0x606060 } , /* Bright Green */
  626. X    { 0xeeee00 , 0x606060 } , /* Yellow */
  627. X    { 0x0000ff , 0x606060 } , /* Bright Blue */
  628. X    { 0xee00ee , 0x606060 } , /* Bright Magenta */
  629. X    { 0x00eeee , 0x606060 } , /* Bright Cyan */
  630. X    { 0x000000 , 0xffffff } , /* White */
  631. X} ;
  632. X
  633. Xstatic char _colors_inverse [ MAXCOLORS ] = {
  634. X    1 , 0 , 0 , 0 ,
  635. X    0 , 0 , 0 , 0 ,
  636. X    0 , 0 , 0 , 0 ,
  637. X    0 , 0 , 0 , 0 ,
  638. X} ;
  639. X
  640. X
  641. X#ifdef CHANGE_COLOR
  642. X
  643. Xvoid
  644. Xtty_change_color ( int color , long rgb , int reverse ) {
  645. Xlong inverse = 0 , the_rgb = rgb ;
  646. Xint total_power = 0 , max_channel = 0 ;
  647. Xint cnt = 3 ;
  648. X
  649. X    the_rgb >>= 4 ;
  650. X    while ( cnt -- > 0 ) {
  651. X        total_power += the_rgb & 0xf ;
  652. X        max_channel = max ( max_channel , the_rgb & 0xf ) ;
  653. X        the_rgb >>= 8 ;
  654. X    }
  655. X
  656. X    if ( total_power >= POWER_LIMIT ||
  657. X        ( total_power >= SECONDARY_POWER_LIMIT &&
  658. X            max_channel >= SECONDARY_CHANNEL_LIMIT ) ||
  659. X        max_channel >= CHANNEL_LIMIT ) {
  660. X        inverse = 0x000000 ;
  661. X    } else {
  662. X        inverse = 0xffffff ;
  663. X    }
  664. X
  665. X    if ( reverse ) {
  666. X    long rev = rgb ;
  667. X
  668. X        rgb = inverse ;
  669. X        inverse = rev ;
  670. X    }
  671. X
  672. X    if ( color >= MAXCOLORS ) {
  673. X        if ( color - MAXCOLORS >= 5 ) {
  674. X            impossible ( "Changing too many colors" ) ;
  675. X            return ;
  676. X        }
  677. X        _mt_attrs [ color - MAXCOLORS ] [ 0 ] = rgb ;
  678. X        _mt_attrs [ color - MAXCOLORS ] [ 1 ] = inverse ;
  679. X        _attrs_inverse [ color - MAXCOLORS ] = reverse ;
  680. X    } else if ( color >= 0 ) {
  681. X        _mt_colors [ color ] [ 0 ] = rgb ;
  682. X        _mt_colors [ color ] [ 1 ] = inverse ;
  683. X        _colors_inverse [ color ] = reverse ;
  684. X    } else {
  685. X        impossible ( "Changing negative color" ) ;
  686. X    }
  687. X}
  688. X
  689. X
  690. Xstatic char color_buf [ 5 * ( MAXCOLORS + 5 ) + 1 ] ;
  691. X
  692. Xchar *
  693. Xtty_get_color_string ( void ) {
  694. Xchar tmp [ 10 ] ;
  695. Xint count ;
  696. X
  697. X    color_buf [ 0 ] = 0 ;
  698. X
  699. X    for ( count = 0 ; count < MAXCOLORS ; count ++ ) {
  700. X    int flag = _colors_inverse [ count ] ? 1 : 0 ;
  701. X
  702. X        sprintf ( tmp , "%s%s%x%x%x" , count ? "/" : "" ,
  703. X            flag ? "-" : "" ,
  704. X            ( _mt_colors [ count ] [ flag ] >> 20 ) & 0xf ,
  705. X            ( _mt_colors [ count ] [ flag ] >> 12 ) & 0xf ,
  706. X            ( _mt_colors [ count ] [ flag ] >> 4 ) & 0xf ) ;
  707. X        strcat ( color_buf , tmp ) ;
  708. X    }
  709. X    for ( count = 0 ; count < 5 ; count ++ ) {
  710. X    int flag = _colors_inverse [ count ] ? 1 : 0 ;
  711. X
  712. X        sprintf ( tmp , "/%s%x%x%x" ,
  713. X            flag ? "-" : "" ,
  714. X            ( _mt_attrs [ count ] [ flag ] >> 20 ) & 0xf ,
  715. X            ( _mt_attrs [ count ] [ flag ] >> 12 ) & 0xf ,
  716. X            ( _mt_attrs [ count ] [ flag ] >> 4 ) & 0xf ) ;
  717. X        strcat ( color_buf , tmp ) ;
  718. X    }
  719. X
  720. X    return color_buf ;
  721. X}
  722. X#endif
  723. X
  724. X
  725. Xextern struct DisplayDesc *ttyDisplay;    /* the tty display descriptor */
  726. X
  727. Xchar kill_char = 27 ;
  728. Xchar erase_char = 8 ;
  729. X
  730. XWindowPtr _mt_window = NULL ;
  731. Xstatic Boolean _mt_in_color = 0 ;
  732. X
  733. X
  734. Xstatic void
  735. X_mt_init_stuff ( void )
  736. X{
  737. Xlong resp , flag ;
  738. Xshort num_cols , num_rows , win_width , win_height , font_num , font_size ;
  739. Xshort char_width , row_height ;
  740. Xshort hor , vert ;
  741. X
  742. X#if 1
  743. X    if ( windowprocs == mac_procs ) {
  744. X        dprintf ( "Mac Windows" ) ;
  745. X        MT_HEIGHT -= 1 ;
  746. X    } else {
  747. X        dprintf ( "TTY Windows" ) ;
  748. X    }
  749. X#else
  750. X    if (!strcmp(windowprocs.name, "mac")) {
  751. X        MT_HEIGHT -= 1;    /* the message box is in a separate window */
  752. X    }
  753. X#endif
  754. X
  755. X    LI = MT_HEIGHT ;
  756. X    CO = MT_WIDTH ;
  757. X
  758. X    /*
  759. X     * If there is at least one screen CAPABLE of color, and if
  760. X     * 32-bit QD is there, we use color. 32-bit QD is needed for the
  761. X     * offscreen GWorld
  762. X     */
  763. X    if ( ! Gestalt ( gestaltQuickdrawVersion , & resp ) && resp > 0x1ff ) {
  764. X    GDHandle gdh ;
  765. X
  766. X        gdh = GetDeviceList ( ) ;
  767. X        while ( gdh ) {
  768. X            if ( TestDeviceAttribute ( gdh , screenDevice ) ) {
  769. X                if ( HasDepth ( gdh , 8 , 1 , 1 ) ||
  770. X                    HasDepth ( gdh , 12 , 1 , 1 ) || /* Intuition tells me this may happen
  771. X                                                        on color LCDs */
  772. X                    HasDepth ( gdh , 16 , 1 , 1 ) ||
  773. X                    HasDepth ( gdh , 4 , 1 , 1 ) || /* why here!? */
  774. X                    HasDepth ( gdh , 32 , 1 , 1 ) ) {
  775. X
  776. X                    _mt_in_color = 1 ;
  777. X                    break ;
  778. X                }
  779. X            }
  780. X            gdh = GetNextDevice ( gdh ) ;
  781. X        }
  782. X    }
  783. X
  784. X    mustwork ( create_tty ( & _mt_window , MT_WINDOW , _mt_in_color ) ) ;
  785. X    ( ( WindowPeek ) _mt_window ) -> windowKind = ( WIN_BASE_KIND + NHW_MAP ) ;
  786. X    SelectWindow ( _mt_window ) ;
  787. X    SetPort ( _mt_window ) ;
  788. X    SetOrigin ( -3 , -3 ) ;
  789. X    font_num = 0 ;
  790. X    font_size = ( flags.large_font && ! small_screen ) ? 12 : 9 ;
  791. X    GetFNum ( "\PHackFont" , & font_num ) ;
  792. X    if ( font_num != 0 ) {
  793. X        mustwork ( init_tty_number ( _mt_window , font_num , font_size ,
  794. X            MT_WIDTH , MT_HEIGHT + 1 ) ) ;
  795. X    } else {
  796. X        mustwork ( init_tty_name ( _mt_window , "\PMonaco" , font_size ,
  797. X            MT_WIDTH , MT_HEIGHT + 1 ) ) ;
  798. X    }
  799. X
  800. X    mustwork ( get_tty_metrics ( _mt_window , & num_cols , & num_rows , & win_width ,
  801. X        & win_height , & font_num , & font_size , & char_width , & row_height ) ) ;
  802. X
  803. X    SizeWindow ( _mt_window , win_width + 6 , win_height + 6 , 1 ) ;
  804. X    dprintf ( "Checking for TTY window position" ) ;
  805. X    if ( RetrievePosition ( kMapWindow , & vert , & hor ) ) {
  806. X        dprintf ( "\PMoving window to (%d,%d)" , hor , vert ) ;
  807. X        MoveWindow ( _mt_window , hor , vert , 1 ) ;
  808. X    }
  809. X    ShowWindow ( _mt_window ) ;
  810. X    SetPort ( _mt_window ) ;
  811. X
  812. X    mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , & flag ) ) ;
  813. X/* Start in raw, always flushing mode */
  814. X    flag |= TA_ALWAYS_REFRESH ;
  815. X    mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  816. X
  817. X    mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  818. X    flag |= TA_BLINKING_CURSOR | TA_WRAP_AROUND ;
  819. X#ifdef applec
  820. X    flag &= ~ TA_CR_ADD_NL ;
  821. X#else
  822. X    flag |= ~ TA_NL_ADD_CR ;
  823. X#endif
  824. X    mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  825. X
  826. X    InitRes ( ) ;
  827. X}
  828. X
  829. X
  830. Xstatic void
  831. X_mt_handle_event ( EventRecord * event ) {
  832. XRect r ;
  833. Xint code ;
  834. XWindowPtr window ;
  835. X
  836. X    if ( event -> what == mouseDown ) {
  837. X        r = ( * GetGrayRgn ( ) ) -> rgnBBox ;
  838. X        InsetRect ( & r , 3 , 3 ) ;
  839. X
  840. X        code = FindWindow ( event -> where , & window ) ;
  841. X        switch ( code ) {
  842. X            case inDrag :
  843. X                DragWindow ( window , event -> where , & r ) ;
  844. X                if ( window == _mt_window ) {
  845. X                    SaveWindowPos ( window ) ;
  846. X                }
  847. X                break ;
  848. X            case inSysWindow :
  849. X                SystemClick ( event , window ) ;
  850. X                break ;
  851. X            case inMenuBar :
  852. X                UpdateMenus ( ) ;
  853. X                DoMenu ( MenuSelect ( event -> where ) ) ;
  854. X                break ;
  855. X            default :
  856. X                /* Do nothing */
  857. X                ;
  858. X        }
  859. X    } else if ( event -> what == diskEvt ) {
  860. X        if ( event -> message & 0xffff0000 != 0L ) {
  861. X        Point p = { 100 , 100 } ;
  862. X
  863. X            ( void ) itworked ( DIBadMount ( p , event -> message ) ) ;
  864. X        }
  865. X    }
  866. X}
  867. X
  868. X
  869. Xint
  870. Xtgetch ( void ) {
  871. XEventRecord event ;
  872. Xlong sleepTime = 0 ;
  873. Xint ret ;
  874. X
  875. X    while ( 1 ) {
  876. X        update_tty ( _mt_window ) ;
  877. X        ret = GetFromKeyQueue ( ) ;
  878. X        if ( ret ) {
  879. X            return ret ;
  880. X        }
  881. X        WaitNextEvent ( -1 , & event , sleepTime , 0 ) ;
  882. X        SetPort ( _mt_window ) ;
  883. X        if ( handle_tty_event ( _mt_window , & event ) ) {
  884. X            _mt_handle_event ( & event ) ;
  885. X        }
  886. X        if ( event . what == keyDown || event . what == autoKey ) {
  887. X            if ( ! ( event . modifiers & cmdKey ) ) {
  888. X                return ( event . message & 0xff ) ;
  889. X            } else {
  890. X                DoMenu ( MenuKey ( event . message & 0xff ) ) ;
  891. X            }
  892. X        } else if ( ! sleepTime ) {
  893. X            Point p = event . where ;
  894. X            GlobalToLocal ( & p ) ;
  895. X            if ( PtInRect ( p , & ( _mt_window -> portRect ) ) ) {
  896. X                ObscureCursor ( ) ;
  897. X            } else {
  898. X                InitCursor ( ) ;
  899. X            }
  900. X        }
  901. X        if ( event . what == nullEvent ) {
  902. X            sleepTime = GetCaretTime ( ) ;
  903. X        } else {
  904. X            sleepTime = 0 ;
  905. X        }
  906. X    }
  907. X}
  908. X
  909. X
  910. Xvoid
  911. Xgetreturn ( char * str ) {
  912. X    FlushEvents ( -1 , 0 ) ;
  913. X    printf_tty ( _mt_window , "Press space %s" , str ) ;
  914. X    ( void ) tgetch ( ) ;
  915. X}
  916. X
  917. X
  918. Xint
  919. Xhas_color ( int color ) {
  920. X#if defined(applec)
  921. X# pragma unused(color)
  922. X#endif
  923. XRect r;
  924. XPoint p = { 0 , 0 } ;
  925. XGDHandle gh ;
  926. X
  927. X    if ( ! _mt_in_color ) {
  928. X        return 0 ;
  929. X    }
  930. X
  931. X    r = _mt_window -> portRect ;
  932. X    SetPort ( _mt_window ) ;
  933. X    GlobalToLocal ( & p ) ;
  934. X    OffsetRect ( & r , p . h , p . v ) ;
  935. X
  936. X    gh = GetMaxDevice ( & r ) ;
  937. X    if ( ! gh ) {
  938. X        return 0 ;
  939. X    }
  940. X
  941. X    return ( * ( ( * gh ) -> gdPMap ) ) -> pixelSize > 4 ; /* > 4 bpp */
  942. X}
  943. X
  944. X
  945. Xvoid
  946. Xtty_delay_output ( void ) {
  947. XEventRecord event ;
  948. Xlong toWhen = TickCount ( ) + 3 ;
  949. X
  950. X    while ( TickCount ( ) < toWhen ) {
  951. X        WaitNextEvent ( updateMask , & event , 3L , 0 ) ;
  952. X        if ( event . what == updateEvt ) {
  953. X            if ( ! handle_tty_event ( _mt_window , & event ) ) {
  954. X                _mt_handle_event ( & event ) ;
  955. X            }
  956. X        }
  957. X    }
  958. X}
  959. X
  960. X
  961. Xvoid
  962. Xtty_nhbell ( void ) {
  963. X    SysBeep ( 20 ) ;
  964. X}
  965. X
  966. X
  967. Xvoid
  968. Xcmov ( int x , int y ) {
  969. X    move_tty_cursor ( _mt_window , x , y ) ;
  970. X    ttyDisplay -> cury = y ;
  971. X    ttyDisplay -> curx = x ;
  972. X}
  973. X
  974. X
  975. Xvoid
  976. Xnocmov ( int x , int y ) {
  977. X    cmov ( x , y ) ;
  978. X}
  979. X
  980. X
  981. Xstatic void
  982. X_mt_set_colors ( long * colors ) {
  983. Xshort err ;
  984. X
  985. X    if ( ! _mt_in_color ) {
  986. X        return ;
  987. X    }
  988. X    err = set_tty_attrib ( _mt_window , TTY_ATTRIB_FOREGROUND , colors [ 0 ] ) ;
  989. X    err = set_tty_attrib ( _mt_window , TTY_ATTRIB_BACKGROUND , colors [ 1 ] ) ;
  990. X}
  991. X
  992. X
  993. Xvoid
  994. Xterm_end_attr ( int attr ) {
  995. X#if defined(applec)
  996. X# pragma unused ( attr )
  997. X#endif
  998. X    _mt_set_colors ( _mt_attrs [ 0 ] ) ;
  999. X}
  1000. X
  1001. X
  1002. Xvoid
  1003. Xterm_start_attr ( int attr ) {
  1004. X    switch ( attr ) {
  1005. X        case ATR_ULINE:
  1006. X            _mt_set_colors ( _mt_attrs [ 1 ] ) ;
  1007. X            break ;
  1008. X        case ATR_BOLD:
  1009. X            _mt_set_colors ( _mt_attrs [ 2 ] ) ;
  1010. X            break ;
  1011. X        case ATR_BLINK:
  1012. X            _mt_set_colors ( _mt_attrs [ 3 ] ) ;
  1013. X            break ;
  1014. X        case ATR_INVERSE:
  1015. X            _mt_set_colors ( _mt_attrs [ 4 ] ) ;
  1016. X            break ;
  1017. X        default:
  1018. X            _mt_set_colors ( _mt_attrs [ 0 ] ) ;
  1019. X            break ;
  1020. X    }
  1021. X}
  1022. X
  1023. X
  1024. Xvoid
  1025. Xstandoutend ( void ) {
  1026. X    term_end_attr ( ATR_INVERSE ) ;
  1027. X}
  1028. X
  1029. X
  1030. Xvoid
  1031. Xstandoutbeg ( void ) {
  1032. X    term_start_attr ( ATR_INVERSE ) ;
  1033. X}
  1034. X
  1035. X
  1036. Xvoid
  1037. Xxputs ( char * str ) {
  1038. Xshort err ;
  1039. X
  1040. X    err = add_tty_string ( _mt_window , str ) ;
  1041. X}
  1042. X
  1043. X
  1044. Xvoid
  1045. Xterm_end_color ( void ) {
  1046. X    _mt_set_colors ( _mt_colors [ NO_COLOR ] ) ;
  1047. X}
  1048. X
  1049. X
  1050. Xvoid
  1051. Xcl_end ( void ) {
  1052. Xshort err ;
  1053. X
  1054. X    _mt_set_colors ( _mt_attrs [ 0 ] ) ;
  1055. X    err = clear_tty_window ( _mt_window , ttyDisplay -> curx , ttyDisplay -> cury ,
  1056. X        MT_WIDTH - 1 , ttyDisplay -> cury ) ;
  1057. X}
  1058. X
  1059. X
  1060. Xvoid
  1061. Xclear_screen ( void ) {
  1062. Xshort err ;
  1063. X
  1064. X    _mt_set_colors ( _mt_attrs [ 0 ] ) ;
  1065. X    err = clear_tty ( _mt_window ) ;
  1066. X}
  1067. X
  1068. X
  1069. Xvoid
  1070. Xcl_eos ( void ) {
  1071. Xshort err ;
  1072. X
  1073. X    cl_end ( ) ;
  1074. X    _mt_set_colors ( _mt_attrs [ 0 ] ) ;
  1075. X    err = clear_tty_window ( _mt_window , 0 , ttyDisplay -> cury + 1 , MT_WIDTH - 1 ,
  1076. X        MT_HEIGHT - 1 ) ;
  1077. X}
  1078. X
  1079. X
  1080. Xvoid
  1081. Xhome ( void ) {
  1082. Xshort err ;
  1083. X
  1084. X    err = move_tty_cursor ( _mt_window , 0 , 0 ) ;
  1085. X    ttyDisplay -> curx = 0 ;
  1086. X    ttyDisplay -> cury = 0 ;
  1087. X}
  1088. X
  1089. X
  1090. Xvoid
  1091. Xbacksp ( void ) {
  1092. Xshort err ;
  1093. X
  1094. X    err = add_tty_char ( _mt_window , 8 ) ;
  1095. X    err = add_tty_char ( _mt_window , 32 ) ;
  1096. X    err = add_tty_char ( _mt_window , 8 ) ;
  1097. X    err = update_tty ( _mt_window ) ;
  1098. X}
  1099. X
  1100. X
  1101. Xvoid
  1102. Xmsmsg ( const char * str , ... ) {
  1103. Xva_list args ;
  1104. Xchar * buf = alloc ( 1000 ) ;
  1105. X
  1106. X    va_start ( args , str ) ;
  1107. X    vsprintf ( buf , str , args ) ;
  1108. X    va_end ( args ) ;
  1109. X
  1110. X    xputs ( buf ) ;
  1111. X    free ( buf ) ;
  1112. X}
  1113. X
  1114. X
  1115. Xvoid
  1116. Xterm_end_raw_bold ( void ) {
  1117. X    standoutend ( ) ;
  1118. X}
  1119. X
  1120. X
  1121. Xvoid
  1122. Xterm_start_raw_bold ( void ) {
  1123. X    standoutbeg ( ) ;
  1124. X}
  1125. X
  1126. X
  1127. Xvoid
  1128. Xterm_start_color ( int color ) {
  1129. X    if ( color >= 0 && color < MAXCOLORS ) {
  1130. X        _mt_set_colors ( _mt_colors [ color ] ) ;
  1131. X    }
  1132. X}
  1133. X
  1134. X
  1135. Xvoid
  1136. Xsetftty ( void ) {
  1137. Xlong flag ;
  1138. X
  1139. X    mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , & flag ) ) ;
  1140. X/* Buffered output in the game */
  1141. X    flag &= ~ TA_ALWAYS_REFRESH ;
  1142. X    flag |= TA_INHIBIT_VERT_SCROLL ; /* don't scroll */
  1143. X    mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  1144. X
  1145. X    mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  1146. X#ifdef applec
  1147. X    flag &= ~ TA_CR_ADD_NL ;
  1148. X#else
  1149. X    flag |= ~ TA_NL_ADD_CR ;
  1150. X#endif
  1151. X    mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  1152. X
  1153. X    flags . cbreak = 1 ;
  1154. X}
  1155. X
  1156. X
  1157. Xvoid
  1158. Xtty_startup ( int * width , int * height  ) {
  1159. X    _mt_init_stuff ( ) ;
  1160. X    * width = MT_WIDTH ;
  1161. X    * height = MT_HEIGHT ;
  1162. X}
  1163. X
  1164. X
  1165. Xvoid
  1166. Xgettty ( void ) {
  1167. X}
  1168. X
  1169. X
  1170. Xvoid
  1171. Xsettty ( char * str ) {
  1172. Xlong flag ;
  1173. X
  1174. X    update_tty ( _mt_window ) ;
  1175. X
  1176. X    mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , & flag ) ) ;
  1177. X/* Buffered output in the game, raw in "raw" mode */
  1178. X    flag &= ~ TA_INHIBIT_VERT_SCROLL ; /* scroll */
  1179. X    flag |= TA_ALWAYS_REFRESH ;
  1180. X    mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_FLAGS , flag ) ) ;
  1181. X
  1182. X    mustwork ( get_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , & flag ) ) ;
  1183. X#ifdef applec
  1184. X    flag |= TA_CR_ADD_NL ;
  1185. X#else
  1186. X    flag |= TA_NL_ADD_CR ;
  1187. X#endif
  1188. X    mustwork ( set_tty_attrib ( _mt_window , TTY_ATTRIB_CURSOR , flag ) ) ;
  1189. X
  1190. X    tty_raw_print ( "\n" ) ;
  1191. X    if ( str ) {
  1192. X        tty_raw_print ( str ) ;
  1193. X    }
  1194. X}
  1195. X
  1196. X
  1197. Xvoid
  1198. Xtty_number_pad ( int arg ) {
  1199. X#if defined(applec)
  1200. X# pragma unused(arg)
  1201. X#endif
  1202. X}
  1203. X
  1204. X
  1205. Xvoid
  1206. Xtty_start_screen ( void ) {
  1207. X    flags . cbreak = 1 ;
  1208. X}
  1209. X
  1210. X
  1211. Xvoid
  1212. Xtty_end_screen ( void ) {
  1213. X}
  1214. X
  1215. X
  1216. Xint
  1217. Xterm_puts ( char * str ) {
  1218. X    xputs ( str ) ;
  1219. X    return strlen ( str ) ;
  1220. X}
  1221. X
  1222. X
  1223. Xint
  1224. Xterm_putc ( int c ) {
  1225. Xshort err ;
  1226. X
  1227. X    err = add_tty_char ( _mt_window , c ) ;
  1228. X    return err ? EOF : c ;
  1229. X}
  1230. X
  1231. X
  1232. Xint
  1233. Xterm_flush ( void * desc ) {
  1234. X    if ( desc == stdout || desc == stderr ) {
  1235. X        update_tty ( _mt_window ) ;
  1236. X    } else {
  1237. X        impossible ( "Substituted flush for file" ) ;
  1238. X        return fflush ( desc ) ;
  1239. X    }
  1240. X    return 0 ;
  1241. X}
  1242. END_OF_FILE
  1243. if test 14469 -ne `wc -c <'sys/mac/mttymain.c'`; then
  1244.     echo shar: \"'sys/mac/mttymain.c'\" unpacked with wrong size!
  1245. fi
  1246. # end of 'sys/mac/mttymain.c'
  1247. if test -f 'sys/msdos/video.c' -a "${1}" != "-c" ; then 
  1248.   echo shar: Renaming existing file \"'sys/msdos/video.c'\" to \"'sys/msdos/video.c.orig'\"
  1249.   mv -f 'sys/msdos/video.c' 'sys/msdos/video.c.orig'
  1250. fi
  1251. echo shar: Extracting \"'sys/msdos/video.c'\" \(12337 characters\)
  1252. sed "s/^X//" >'sys/msdos/video.c' <<'END_OF_FILE'
  1253. X/*   SCCS Id: @(#)video.c   3.1     93/05/09                        */
  1254. X/*   Copyright (c) NetHack PC Development Team 1993                 */
  1255. X/*   NetHack may be freely redistributed.  See license for details. */
  1256. X/*                                                                  */
  1257. X/*
  1258. X * video.c - Hardware video support
  1259. X *                                                  
  1260. X *Edit History:
  1261. X *     Initial Creation              M. Allison      93/04/04
  1262. X *     Add colour support            M. Allison      93/04/06
  1263. X *     Fix cl_end()                  M. Allison      93/04/11
  1264. X *     Use CO,LI in decl.c           M. Allison      93/04/24
  1265. X *     Add djgpp support             K. Smolkowski   93/04/26
  1266. X *     Add runtime monoadapter check M. Allison      93/05/09
  1267. X */
  1268. X
  1269. X#include "hack.h"
  1270. X
  1271. X#include <dos.h>
  1272. X
  1273. X#ifdef SCREEN_BIOS
  1274. X#define MONO_CHECK               /* Enable monochrome adapter support */
  1275. X#endif
  1276. X
  1277. X/*
  1278. X * PC interrupts
  1279. X */
  1280. X#ifdef PC9801
  1281. X#define CRT_BIOS    0x18
  1282. X#else
  1283. X#define VIDEO_BIOS  0x10
  1284. X#endif
  1285. X#define DOSCALL        0x21
  1286. X
  1287. X/*
  1288. X * Character Attributes
  1289. X */
  1290. X#define ATTRIB_NORMAL         0x07    /* Normal attribute */
  1291. X#define ATTRIB_INTENSE           0x0f    /* Intense White */
  1292. X#ifdef MONO_CHECK
  1293. X#define ATTRIB_MONO_UNDERLINE 0x01    /* Underlined,white */
  1294. X#define ATTRIB_MONO_BLINK     0x87    /* Flash bit, white */
  1295. X#define ATTRIB_MONO_REVERSE   0x70    /* Black on white */
  1296. X#endif
  1297. X/*
  1298. X * Video BIOS functions
  1299. X */
  1300. X#ifdef PC9801
  1301. X#define SETCURPOS   0x13    /* Set Cursor Position */
  1302. X#define SENSEMODE   0x0b    /* Sense CRT Mode */
  1303. X#else
  1304. X#define GETCURPOS   0x03    /* Get Cursor Position */
  1305. X#define SETCURPOS   0x02    /* Set Cursor Position */
  1306. X#define GETMODE     0x0f    /* Get Video Mode */
  1307. X#define SETMODE     0x00    /* Set Video Mode */
  1308. X#define SETPAGE     0x05    /* Set Video Page */
  1309. X#define FONTINFO    0x1130  /* Get Font Info */
  1310. X#define SCROLL      0x06    /* Scroll or initialize window */
  1311. X#define PUTCHARATT  0x09    /* Write attribute & char at cursor */
  1312. X#endif
  1313. X
  1314. X#ifdef OVLB
  1315. X
  1316. Xvoid
  1317. Xget_scr_size()
  1318. X{
  1319. X    union REGS regs;
  1320. X
  1321. X    if (!flags.BIOS) {        /* assume standard screen size */
  1322. X        CO = 80;
  1323. X        LI = 24;
  1324. X        return;
  1325. X    }
  1326. X
  1327. X# ifdef PC9801
  1328. X    regs.h.ah = SENSEMODE;
  1329. X    int86(CRT_BIOS, ®s, ®s);
  1330. X
  1331. X    LI = (regs.h.al & 0x01) ? 20 : 25;
  1332. X    CO = (regs.h.al & 0x02) ? 40 : 80;
  1333. X# else
  1334. X    regs.x.ax = FONTINFO;
  1335. X    regs.x.bx = 0;            /* current ROM BIOS font */
  1336. X    regs.h.dl = 24;            /* default row count */
  1337. X                    /* in case no EGA/MCGA/VGA */
  1338. X    int86(VIDEO_BIOS, ®s, ®s); /* Get Font Information */
  1339. X
  1340. X    /* MDA/CGA/PCjr ignore INT 10h, Function 11h, but since we
  1341. X     * cleverly loaded up DL with the default, everything's fine.
  1342. X     *
  1343. X     * Otherwise, DL now contains rows - 1.  Also, CX contains the
  1344. X     * points (bytes per character) and ES:BP points to the font
  1345. X     * table.  -3.
  1346. X     */
  1347. X
  1348. X    regs.h.ah = GETMODE;
  1349. X    int86(VIDEO_BIOS, ®s, ®s); /* Get Video Mode */
  1350. X
  1351. X    /* This goes back all the way to the original PC.  Completely
  1352. X     * safe.  AH contains # of columns, AL contains display mode,
  1353. X     * and BH contains the active display page.
  1354. X     */
  1355. X
  1356. X    LI = regs.h.dl + 1;
  1357. X    CO = regs.h.ah;
  1358. X# endif /* PC9801 */
  1359. X}
  1360. X#endif
  1361. X
  1362. X#ifdef NO_TERMS
  1363. X
  1364. X#include "wintty.h"
  1365. X
  1366. X# ifdef SCREEN_DJGPPFAST
  1367. X#include <pc.h>
  1368. X# endif
  1369. X
  1370. Xvoid FDECL(cmov, (int, int));
  1371. Xvoid FDECL(nocmov, (int, int));
  1372. X
  1373. X# ifdef TEXTCOLOR
  1374. Xchar ttycolors[MAXCOLORS];
  1375. Xstatic void NDECL(init_ttycolor);
  1376. X# endif
  1377. X
  1378. X# ifdef SCREEN_BIOS
  1379. Xvoid FDECL(gotoxy, (int,int));
  1380. Xvoid FDECL(get_cursor, (int *, int *));
  1381. X#  ifdef MONO_CHECK
  1382. Xint  NDECL(monoadapt_check);
  1383. X#  endif
  1384. X# endif
  1385. X
  1386. X# ifdef SCREEN_DJGPPFAST
  1387. X#define gotoxy(x,y) ScreenSetCursor(y,x)
  1388. X#define get_cursor(x,y) ScreenGetCursor(y,x)
  1389. X# endif
  1390. X
  1391. X/* 
  1392. X *  LI, CO are ifdefs of a data structure in decl.c, and are initialized
  1393. X *  by get_scr_size()
  1394. X */
  1395. X/*extern  int LI, CO; */    /* decl.h does this already */
  1396. Xchar g_attribute;        /* Current attribute to use */
  1397. X
  1398. X# ifdef MONO_CHECK
  1399. Xint monoflag;            /* 0 = not monochrome, else monochrome */
  1400. X# endif
  1401. X
  1402. X#ifdef OVLB
  1403. X
  1404. Xvoid
  1405. Xbacksp()
  1406. X{
  1407. X    int x,y;
  1408. X
  1409. X    get_cursor(&x, &y);
  1410. X    if (x > 0) x = x-1;
  1411. X    gotoxy(x,y);
  1412. X    xputc(' ');
  1413. X    gotoxy(x,y);
  1414. X}
  1415. X
  1416. X#endif /* OVLB */
  1417. X#ifdef OVL0
  1418. X
  1419. Xvoid
  1420. Xclear_screen()
  1421. X/* djgpp provides ScreenClear(), but in version 1.09 it is broken
  1422. X * so for now we just use the BIOS Routines
  1423. X */
  1424. X{
  1425. X    union REGS regs;
  1426. X
  1427. X    regs.h.dl = CO - 1;      /* columns */
  1428. X    regs.h.dh = LI - 1;          /* rows */
  1429. X    regs.x.cx = 0;              /* CL,CH = x,y of upper left */
  1430. X    regs.x.ax = 0;
  1431. X    regs.x.bx = 0;
  1432. X    regs.h.bh = ATTRIB_NORMAL;
  1433. X    regs.h.ah = SCROLL;
  1434. X                      /* DL,DH = x,y of lower right */
  1435. X    int86(VIDEO_BIOS, ®s, ®s);  /* Scroll or init window */
  1436. X    gotoxy(0,0);
  1437. X}
  1438. X
  1439. Xvoid
  1440. Xcl_end()    /* clear to end of line */
  1441. X{
  1442. X    union REGS regs;
  1443. X    int x,y,count;
  1444. X
  1445. X    x = ttyDisplay->curx;
  1446. X    y = ttyDisplay->cury;
  1447. X    gotoxy(x,y);
  1448. X    count = CO - x;
  1449. X    regs.h.ah = PUTCHARATT;    /* write attribute & character */    
  1450. X    regs.h.al = ' ';        /* character */
  1451. X    regs.h.bh = 0;            /* display page */
  1452. X                    /* BL = attribute */
  1453. X    regs.h.bl = ATTRIB_NORMAL;
  1454. X    regs.x.cx = count;
  1455. X    if (count != 0)
  1456. X        int86(VIDEO_BIOS, ®s, ®s); /* write attribute 
  1457. X                            & character */
  1458. X    tty_curs(BASE_WINDOW, (int)ttyDisplay->curx+1,
  1459. X                        (int)ttyDisplay->cury);
  1460. X}
  1461. X
  1462. Xvoid
  1463. Xcl_eos()    /* clear to end of screen */
  1464. X{
  1465. X    union REGS regs;
  1466. X    int x,y;
  1467. X
  1468. X    get_cursor(&x, &y);
  1469. X    cl_end();            /* clear to end of line */
  1470. X    gotoxy(0,(y < (LI-1) ? y+1 : (LI-1)));        
  1471. X    regs.h.dl = CO-1;      /* X  of lower right */
  1472. X    regs.h.dh = LI-1;          /* Y  of lower right */
  1473. X    regs.h.cl = 0;              /* X  of upper left */
  1474. X                        /* Y (row)  of upper left */
  1475. X    regs.h.ch = (y < (LI-1) ? y+1 :(LI-1));
  1476. X    regs.x.cx = 0; 
  1477. X    regs.x.ax = 0;
  1478. X    regs.x.bx = 0;
  1479. X    regs.h.bh = ATTRIB_NORMAL;
  1480. X    regs.h.ah = SCROLL;
  1481. X    int86(VIDEO_BIOS, ®s, ®s); /* Scroll or initialize window */
  1482. X    tty_curs(BASE_WINDOW, (int)ttyDisplay->curx+1,
  1483. X                        (int)ttyDisplay->cury);
  1484. X}
  1485. X
  1486. Xvoid
  1487. Xcmov(x, y)
  1488. Xregister int x, y;
  1489. X{
  1490. X    ttyDisplay->cury = y;
  1491. X    ttyDisplay->curx = x;
  1492. X    gotoxy(x,y);
  1493. X}
  1494. X
  1495. X# endif /* OVL0 */
  1496. X# ifdef OVLB
  1497. X
  1498. Xint
  1499. Xhas_color(int color)
  1500. X{
  1501. X#  ifdef TEXTCOLOR
  1502. X    return
  1503. X#   ifdef MONO_CHECK
  1504. X    (monoflag) ? 0 :
  1505. X#   endif
  1506. X    1;
  1507. X#  else
  1508. X    return 0;
  1509. X#  endif
  1510. X}
  1511. X
  1512. X# endif /* OVLB */
  1513. X# ifdef OVL0
  1514. X
  1515. Xvoid
  1516. Xhome()
  1517. X{
  1518. X    tty_curs(BASE_WINDOW, 1, 0);
  1519. X    ttyDisplay->curx = ttyDisplay->cury = 0;
  1520. X    gotoxy(0,0);
  1521. X}
  1522. X
  1523. Xvoid
  1524. Xnocmov(x, y)
  1525. Xint x,y;
  1526. X{
  1527. X    gotoxy(x,y);
  1528. X}
  1529. X
  1530. Xvoid
  1531. Xstandoutbeg()
  1532. X{
  1533. X    g_attribute = ATTRIB_INTENSE;    /* intense white */
  1534. X}
  1535. X
  1536. Xvoid
  1537. Xstandoutend()
  1538. X{
  1539. X    g_attribute = ATTRIB_NORMAL;    /* normal white */
  1540. X}
  1541. X
  1542. X# endif /* OVL0 */
  1543. X# ifdef OVLB
  1544. X
  1545. Xvoid
  1546. Xterm_end_attr(int attr)
  1547. X{
  1548. X        g_attribute = ATTRIB_NORMAL;    /* normal white */
  1549. X}
  1550. X
  1551. Xvoid
  1552. Xterm_end_color(void)
  1553. X{
  1554. X    g_attribute = ATTRIB_NORMAL;    /* normal white  (harmless) */
  1555. X}
  1556. X
  1557. Xvoid
  1558. Xterm_end_raw_bold(void)
  1559. X{
  1560. X    standoutend(); 
  1561. X}
  1562. X
  1563. Xvoid
  1564. Xterm_start_attr(int attr)
  1565. X{
  1566. X    switch(attr){
  1567. X
  1568. X    case ATR_ULINE:
  1569. X#  ifdef MONO_CHECK
  1570. X        if (monoflag) {
  1571. X            g_attribute = ATTRIB_MONO_UNDERLINE;
  1572. X        } else {
  1573. X            g_attribute = ATTRIB_INTENSE;
  1574. X        }
  1575. X        break;
  1576. X#  endif
  1577. X    case ATR_BOLD:
  1578. X        g_attribute = ATTRIB_INTENSE;
  1579. X        break;
  1580. X    case ATR_BLINK:
  1581. X#  ifdef MONO_CHECK
  1582. X        if (monoflag) {
  1583. X            g_attribute = ATTRIB_MONO_BLINK;
  1584. X        } else {
  1585. X            g_attribute = ATTRIB_INTENSE;
  1586. X        }
  1587. X        break;
  1588. X#  endif
  1589. X    case ATR_INVERSE:
  1590. X#  ifdef MONO_CHECK
  1591. X        if (monoflag) {
  1592. X            g_attribute = ATTRIB_MONO_REVERSE;
  1593. X        } else {
  1594. X            g_attribute = ATTRIB_INTENSE;
  1595. X        }
  1596. X        break;
  1597. X#  endif
  1598. X    default:
  1599. X        g_attribute = ATTRIB_NORMAL;
  1600. X        break;
  1601. X    }                
  1602. X}
  1603. X
  1604. X
  1605. Xvoid
  1606. Xterm_start_color(int color)
  1607. X{
  1608. X#  ifdef TEXTCOLOR
  1609. X    short attr;
  1610. X
  1611. X#   ifdef MONO_CHECK
  1612. X    if (monoflag) {
  1613. X        g_attribute = ATTRIB_NORMAL;
  1614. X    } else {
  1615. X#   endif
  1616. X        if (color >= 0 && color < MAXCOLORS) {
  1617. X            g_attribute = ttycolors[color];
  1618. X          }
  1619. X#   ifdef MONO_CHECK
  1620. X    }
  1621. X#   endif
  1622. X#  endif
  1623. X}
  1624. X
  1625. Xvoid
  1626. Xterm_start_raw_bold(void)
  1627. X{
  1628. X    standoutbeg();
  1629. X}
  1630. X
  1631. X# endif /* OVLB */
  1632. X# ifdef OVL1
  1633. X
  1634. Xvoid
  1635. Xtty_delay_output()
  1636. X{
  1637. X    /* delay 50 ms - not implimented */
  1638. X}
  1639. X# endif /* OVL1 */
  1640. X
  1641. X# ifdef OVLB
  1642. Xvoid
  1643. Xtty_end_screen()
  1644. X{
  1645. X    clear_screen();
  1646. X}
  1647. X
  1648. Xvoid
  1649. Xtty_nhbell()
  1650. X{
  1651. X        union REGS regs;
  1652. X
  1653. X        if (flags.silent) return;
  1654. X        regs.h.dl = 0x07;        /* bell */
  1655. X        regs.h.ah = 0x02;         /* Character Output */
  1656. X        int86(DOSCALL, ®s, ®s);
  1657. X}
  1658. X
  1659. Xvoid
  1660. Xtty_number_pad(state)
  1661. Xint state;
  1662. X{
  1663. X}
  1664. X
  1665. Xvoid
  1666. Xtty_startup(wid, hgt)
  1667. X    int *wid, *hgt;
  1668. X{
  1669. X    if (CO && LI) {
  1670. X        *wid = CO;
  1671. X        *hgt = LI;
  1672. X    } else {
  1673. X        *wid = CO = 80;
  1674. X        *hgt = LI = 25;
  1675. X    }
  1676. X#  ifdef MONO_CHECK
  1677. X    monoflag = monoadapt_check();
  1678. X    if (!monoflag) {
  1679. X#  endif
  1680. X#  ifdef TEXTCOLOR
  1681. X       init_ttycolor();
  1682. X#  endif
  1683. X#  ifdef MONO_CHECK
  1684. X    }
  1685. X#  endif
  1686. X    g_attribute = ATTRIB_NORMAL;
  1687. X}
  1688. X
  1689. Xvoid
  1690. Xtty_start_screen()
  1691. X{
  1692. X    if (flags.num_pad) tty_number_pad(1);   /* make keypad send digits */
  1693. X}
  1694. X
  1695. X# endif /* OVLB */
  1696. X# ifdef OVL0
  1697. X
  1698. Xvoid
  1699. Xxputs(s)
  1700. Xconst char *s;
  1701. X{
  1702. X    char c;
  1703. X    int x,y;
  1704. X
  1705. X    x = ttyDisplay->curx;
  1706. X    y = ttyDisplay->cury;
  1707. X    if (s != NULL) {
  1708. X        while (*s != '\0') {
  1709. X            gotoxy(x,y);
  1710. X            c = *s++;
  1711. X            xputc(c);
  1712. X            if (x < (CO-1)) x++;
  1713. X            gotoxy(x,y);
  1714. X        }
  1715. X    }
  1716. X}
  1717. X
  1718. Xvoid
  1719. Xxputc(ch)    /* write out character (and attribute) */
  1720. Xchar ch;
  1721. X{
  1722. X#  ifdef SCREEN_BIOS
  1723. X    union REGS regs;
  1724. X#  endif
  1725. X    int x,y;
  1726. X    char attribute;
  1727. X
  1728. X    attribute = (((g_attribute > 0) && (g_attribute < MAXCOLORS)) ?
  1729. X            g_attribute : ATTRIB_NORMAL);
  1730. X
  1731. X#  ifdef SCREEN_DJGPPFAST
  1732. X    get_cursor(&x,&y);
  1733. X    ScreenPutChar((int)ch,(int)attribute,x,y);
  1734. X#  endif
  1735. X
  1736. X#  ifdef SCREEN_BIOS
  1737. X    regs.h.ah = PUTCHARATT;    /* write attribute & character */
  1738. X    regs.h.al = ch;            /* character */
  1739. X    regs.h.bh = 0;            /* display page */
  1740. X                    /* BL = attribute */
  1741. X#    ifdef MONO_CHECK
  1742. X    regs.h.bl = ((g_attribute == 0) ? ATTRIB_NORMAL : g_attribute);
  1743. X#    else
  1744. X    regs.h.bl = (((g_attribute > 0) && (g_attribute < MAXCOLORS)) ? 
  1745. X            g_attribute : ATTRIB_NORMAL);
  1746. X#    endif
  1747. X    regs.x.cx = 1;            /* one character */
  1748. X    int86(VIDEO_BIOS, ®s, ®s); /* write attribute & character */
  1749. X    get_cursor(&x,&y);
  1750. X#  endif /* SCREEN_BIOS */
  1751. X    if (x < (CO -1 )) ++x;
  1752. X    gotoxy(x,y);
  1753. X}
  1754. X
  1755. X/*
  1756. X *  Supporting routines.  None of these routines are required to 
  1757. X *  resolve references outside this source file.
  1758. X */
  1759. X#  ifdef SCREEN_BIOS
  1760. Xvoid
  1761. Xget_cursor(x,y)    /* get cursor position */
  1762. Xint *x, *y;
  1763. X{
  1764. X    union REGS regs;
  1765. X
  1766. X    regs.x.dx = 0;
  1767. X    regs.h.ah = GETCURPOS;        /* get cursor position */
  1768. X    regs.x.cx = 0;
  1769. X    regs.x.bx = 0;    
  1770. X    int86(VIDEO_BIOS, ®s, ®s); /* Get Cursor Position */
  1771. X    *x = regs.h.dl;
  1772. X    *y = regs.h.dh;
  1773. X}
  1774. X
  1775. Xvoid
  1776. Xgotoxy(x,y)
  1777. Xint x,y;
  1778. X{
  1779. X    union REGS regs;
  1780. X
  1781. X    regs.h.ah = SETCURPOS;
  1782. X# ifdef PC9801
  1783. X    regs.x.dx = 2 * (80 * y + x);
  1784. X    int86(CRT_BIOS, ®s, ®s);    /* Set Cursor Position */
  1785. X# else
  1786. X    regs.h.bh = 0;            /* display page */
  1787. X    regs.h.dh = y;            /* row */
  1788. X    regs.h.dl = x;            /* column */
  1789. X    int86(VIDEO_BIOS, ®s, ®s); /* Set Cursor Position */
  1790. X# endif
  1791. X
  1792. X    /* This, too, goes back all the way to the original PC.  If
  1793. X     * we ever get so fancy as to swap display pages (i doubt it),
  1794. X     * then we'll need to set BH appropriately.  This function
  1795. X     * returns nothing.  -3.
  1796. X     */
  1797. X}
  1798. X#  ifdef MONO_CHECK
  1799. Xint monoadapt_check()
  1800. X{
  1801. X    union REGS regs;
  1802. X
  1803. X    regs.h.al = 0;
  1804. X    regs.h.ah = GETMODE;            /* get video mode */
  1805. X    int86(VIDEO_BIOS, ®s, ®s);
  1806. X    return (regs.h.al == 7) ? 1 : 0;    /* 7 means monochrome mode */
  1807. X}
  1808. X#   endif /* MONO_CHECK */
  1809. X#  endif /* SCREEN_BIOS */
  1810. X
  1811. X# endif /* OVL0 */
  1812. X# ifdef OVLB
  1813. X
  1814. X#  ifdef TEXTCOLOR
  1815. X/*
  1816. X * BLACK                0
  1817. X * RED                  1
  1818. X * GREEN                2
  1819. X * BROWN                3       low-intensity yellow
  1820. X * BLUE                 4
  1821. X * MAGENTA              5
  1822. X * CYAN                 6
  1823. X * GRAY                 7       low-intensity white
  1824. X * NO_COLOR             8
  1825. X * ORANGE_COLORED       9
  1826. X * BRIGHT_GREEN         10
  1827. X * YELLOW               11
  1828. X * BRIGHT_BLUE          12
  1829. X * BRIGHT_MAGENTA       13
  1830. X * BRIGHT_CYAN          14
  1831. X * WHITE                15
  1832. X * MAXCOLORS            16
  1833. X * BRIGHT               8
  1834. X */
  1835. X
  1836. Xstatic void
  1837. Xinit_ttycolor()
  1838. X{
  1839. X    ttycolors[BLACK] = 7;                      /* mapped to 7 = white */
  1840. X    ttycolors[RED] = 4;            /*  4 = red */
  1841. X    ttycolors[GREEN] = 2;            /*  2 = green */
  1842. X    ttycolors[BROWN] = 6;            /*  6 = brown */
  1843. X    ttycolors[BLUE] = 1;            /*  1 = blue */
  1844. X    ttycolors[MAGENTA] = 5;            /*  5 = magenta */
  1845. X    ttycolors[CYAN] = 3;            /*  3 = cyan */
  1846. X    ttycolors[GRAY] = 8;            /*  8 = dark gray */
  1847. X    ttycolors[BRIGHT] = 15;            /* 15 = intense white */
  1848. X    ttycolors[ORANGE_COLORED] = 12;        /* 12 = light red */
  1849. X    ttycolors[BRIGHT_GREEN] = 10;        /* 10 = light green */
  1850. X    ttycolors[YELLOW] = 14;            /* 14 = yellow */
  1851. X    ttycolors[BRIGHT_BLUE] = 9;        /*  9 = light blue */
  1852. X    ttycolors[BRIGHT_MAGENTA] = 13;        /* 13 = light magenta */
  1853. X    ttycolors[BRIGHT_CYAN] = 11;        /* 11 = light cyan */
  1854. X    ttycolors[WHITE] = 7;            /*  7 = white */
  1855. X}
  1856. X
  1857. X#  endif /* TEXTCOLOR */
  1858. X# endif OVLB
  1859. X
  1860. X#endif /* NO_TERMS */
  1861. X
  1862. X/* video.c */
  1863. END_OF_FILE
  1864. if test 12337 -ne `wc -c <'sys/msdos/video.c'`; then
  1865.     echo shar: \"'sys/msdos/video.c'\" unpacked with wrong size!
  1866. fi
  1867. # end of 'sys/msdos/video.c'
  1868. echo shar: End of archive 31 \(of 33\).
  1869. cp /dev/null ark31isdone
  1870. MISSING=""
  1871. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
  1872.     if test ! -f ark${I}isdone ; then
  1873.     MISSING="${MISSING} ${I}"
  1874.     fi
  1875. done
  1876. if test "${MISSING}" = "" ; then
  1877.     echo You have unpacked all 33 archives.
  1878.     echo "Now execute ./patchit.sh"
  1879.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1880. else
  1881.     echo You still need to unpack the following archives:
  1882.     echo "        " ${MISSING}
  1883. fi
  1884. ##  End of shell archive.
  1885. exit 0
  1886.