home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / games / volume14 / xpilot / part19 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  57.1 KB

  1. Path: uunet!zephyr.ens.tek.com!master!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v14i021:  xpilot - Multiplayer gravity war game hand-shake program, Part19/24
  5. Message-ID: <3316@master.CNA.TEK.COM>
  6. Date: 4 Aug 92 19:30:56 GMT
  7. Sender: news@master.CNA.TEK.COM
  8. Lines: 1695
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Bjoern Stabell <bjoerns@staff.cs.uit.no>
  12. Posting-number: Volume 14, Issue 21
  13. Archive-name: xpilot/Part19
  14. Environment: X11, ANSI C
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 19 (of 24)."
  25. # Contents:  maps/CAMD.uue src/lib/socklib.c
  26. # Wrapped by billr@saab on Tue Aug  4 10:38:58 1992
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'maps/CAMD.uue' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'maps/CAMD.uue'\"
  30. else
  31. echo shar: Extracting \"'maps/CAMD.uue'\" \(31341 characters\)
  32. sed "s/^X//" >'maps/CAMD.uue' <<'END_OF_FILE'
  33. Xbegin 644 CAMD.map
  34. XM,34P>#$U,`HP"E1H92!#;VUP=71E<B!!:61E9"!-87`@1&5S:6=N97(G<R!F
  35. XM:7)S="!R96%L('1E<W0N+BX*5&]M($=R>61E;&%N9`IX>'AX>'AX>'AX>'AX
  36. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  37. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  38. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  39. XM>'@*>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  40. XM>'AX>'AS("`@("`@("!A>'AX>&-X>'AX>'AX>'AX>'AX>'AX>'AX>'AS("`@
  41. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  42. XM("`@("`@("`@("`@("`@('%X"GAX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  43. XM>'AX>'AX>'AX>',@("`@("`@("`@("`@("`@("`@("`@(&$@<R`@("`@("`@
  44. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  45. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X>`IX>'AX>'AX>'AX
  46. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX8R`@("`@("`@("`@("`@("`@("`@("`@
  47. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  48. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  49. XM("!Q>'@*>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX<R`@("`@("`@("`@
  50. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  51. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  52. XM("`@("`@("`@("`@("`@("`@>'AX"GAX>'AX>'AX>'AS8R!A>'AX>'AX>'AX
  53. XM>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  54. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  55. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@($9X>`IX>'AX>'AX
  56. XM>'AS("`@("!A>'AX>'AX9B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  57. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  58. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X("`@("`@("`@("`@("`@
  59. XM("`@<7AX<W@*>'AX>'AX>'AS("`@("`@("!A>'AS("`@("`@("`@("`@("`@
  60. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  61. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!D
  62. XM>'<@("`@("`@("`@("`@("`@<7AX<R!X"GAX>'AX>'AS("`@("`@("`@("!&
  63. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  64. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  65. XM("`@("`@("`@("`@("`@('AX=R`@("`@("`@("`@("`@<7AX>"`@>`IX>'AX
  66. XM>'AX("`@("`@("`@('%X>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  67. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  68. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX=R`@("`@("`@
  69. XM("`@<7AX>',@('@*>'AX>'AX>"`@("`@("`@("!X>',@("`@("`@("`@("`@
  70. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  71. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  72. XM("`@(&%X>'AX>'<@("`@("`@<7AX>'@@("!X"GAX>'AX>',@("`@("`@("`@
  73. XM>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  74. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  75. XM("`@("`@("`@("`@("`@("`@("`@("!A>'AX>'AW("`J<7AX>'AS("`@>`IX
  76. XM>'AX>'@@("`@("`@("`@<7AS("`@("`@("`@("`@("`@("`@("`@("`@("`@
  77. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  78. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX
  79. XM>'AX>'AX>',@("`@('@*>'AX>'AS("`@("`@("`@('AX("`@("`@("`@("`@
  80. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  81. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  82. XM("`@("`@("`@("`@("!A>'AX>'AX>',@("`@("!X"GAX>'AX("`@("`@("`@
  83. XM("!X<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  84. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  85. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX>',@("`@("`@
  86. XM>`IX>'AX>"`@("`@("`@("!Q>"`@("`@("`@("`@("`@("`@("`@("`@("`@
  87. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  88. XM("`@("`@("`@("`@("`@("`@>"`@("`@("`@("`@("`@("`@("`@("`@("`@
  89. XM("`@(&%X>',@("`@("`@('@*>'AX>',@("`@("`@("`@>'@@("`@("`@("`@
  90. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  91. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7@@("`@("`@("`@
  92. XM("`@("`@("`@("`@("`@("`@("`@87@@("`@("`@("!X"GAX>',@("`@("`@
  93. XM("`@('AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  94. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  95. XM("`@<7AX("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  96. XM("`@>`IX>'@@("`@("`@("`@("!X("`@("`@("`@("`@("`@("`@("`@("`@
  97. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  98. XM("`@("`@("`@("`@("`@("!Q>'AX>'<@("`@("`@("`@("`@("`@("`@("`@
  99. XM("`@("`@("`@("`@("`@("`@('@*>'AX("`@("`@("`@("`J>&8@("`@("`@
  100. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  101. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX=R`@("`@
  102. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"GAX<R`@("`@
  103. XM("`@("`@87,@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  104. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q
  105. XM>'AX>'AX>'AX>'AW("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  106. XM("`@("`@>`IX>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  107. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  108. XM("`@("`@("`@("!Q>'AX>'AX>'AX>'AX>'AX1GAX=R`@("`@("`@("`@("`@
  109. XM("`@("`@("`@("`@("`@("`@("`@('@*>'@@("`@("`@("`@("`@("`@("`@
  110. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  111. XM("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  112. XM>'AX=R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"GAX("`@
  113. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  114. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q>'AX>'AX>'AX>'AX
  115. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@("`@
  116. XM("`@("`@("`@>`IX<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  117. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX
  118. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX=R`@
  119. XM("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@
  120. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  121. XM("`@("`@('%X>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  122. XM>'AX>'AX>'AX>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@("`@("!X"G@@
  123. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  124. XM("`@("`@("`@("`@("`@("`@("!Q>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  125. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AW("`@("`@("`@
  126. XM("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  127. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AX>'AX>'AX
  128. XM>'AX>'AX>'AX>'AX>'AX>$9X>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  129. XM>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@
  130. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  131. XM("!Q>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX<R`@("`@("`@("`@("`@("`@
  132. XM("`@("`@87AX>'AX>'AX>'AX>'AX>'AX=R`@("`@("`@("`@("`@("`@("!X
  133. XM"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  134. XM("`@("`@("`@("`@("!Q>'AX>'AX>'AX>'AX>'AX<R`@("`@("`@("`@("`@
  135. XM("`@("`@("`@("`@("`@("`@("`@("`@87AX>'AX>'AX>'AX>'AX>'@@("`@
  136. XM("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@("`@
  137. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX>'AS("`@8R`@
  138. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@87AX
  139. XM>'AX>'AX>'AX>'AX("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@
  140. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q>'AX
  141. XM>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  142. XM("`@("`@("`@("`@("`@87AX>'AX>'AX>'AX>'<@("`@("`@("`@("`@("`@
  143. XM(&1X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  144. XM("`@("`@("`@("!Q>'AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@
  145. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@87AX>'AX>'AX>'AX
  146. XM("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@
  147. XM("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX<R`@("`@("`@("`@
  148. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  149. XM("`@("`@87AX>'AX>'AX>"`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@
  150. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX
  151. XM>'AX<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  152. XM("`@("`@("`@("`@("`@("`@("`@("!A>'AX>'AX>'@@("`@("`@("`@("`@
  153. XM("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  154. XM("`@("`@("`@<7AX>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  155. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX>'AX
  156. XM>'AX("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@
  157. XM("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AX>',@("`@("`@("`@("`@
  158. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  159. XM("`@("`@("`@("!A>'AX>'AX>"`@("`@("`@("`@("`@("`@('@*>"`@("`@
  160. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AX
  161. XM<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  162. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX>'AX>'AW("`@("`@("`@
  163. XM("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  164. XM("`@("`@("`@<7AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  165. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X
  166. XM>'AX>'AF("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@
  167. XM("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AS("`@("`@("`@("`@("`@
  168. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  169. XM("`@("`@("`@("`@("`@>'AX>'AX>',@("`@("`@("`@("`@("`@('@*>"`@
  170. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX>'AX
  171. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  172. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@9'AX>'AX>'@@("`@("`@
  173. XM("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  174. XM("`@("`@("`@("!X>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  175. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  176. XM("!X>'AX>'AS("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@
  177. XM("`@("`@("`@("`@("`@("`@("`@("`@("!D>'AF("`@("`@("`@("`@("`@
  178. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  179. XM("`@("`@("`@("`@("`@("`@>'AX>'AX("`@("`@("`@("`@("`@("`@('@*
  180. XM>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  181. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  182. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX>'AX>"`@("`@
  183. XM("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  184. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  185. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  186. XM("`@('%X>'AX>'@@("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@
  187. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  188. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  189. XM("`@("`@("`@("`@("`@("`@("!X>'AX>'AX("`@("`@("`@("`@("`@("`@
  190. XM('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  191. XM('(@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  192. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX>'AX>"`@
  193. XM("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@
  194. XM("`@("`@("`@("`@("`@('%X=R`@("`@("`@("`@("`@("`@("`@("`@("`@
  195. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  196. XM("`@("`@('AX>'AX>'@@("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@
  197. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AW("`@("`@("`@
  198. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  199. XM("`@("`@("`@("`@("`@("`@("`@("!X>'AX>'AX("`@("`@("`@("`@("`@
  200. XM("`@('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  201. XM("!Q>'AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  202. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX>'AX
  203. XM<R`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@
  204. XM("`@("`@("`@("`@("`@('%X>'AX>'@@("`@("`@("`@("`@("`@("`@("`@
  205. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  206. XM("`@("`@("`@('AX>'AX>"`@("`@("`@("`@("`@("`@("`@>`IX("`@("`@
  207. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AX>'AS("`@("`@
  208. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  209. XM("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AX>'@@("`@("`@("`@("`@
  210. XM("`@("`@('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q>'AX
  211. XM>'AX>'AX<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  212. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q>'AX
  213. XM>'AX("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@
  214. XM("`@("`@("`@<7AX>'AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@
  215. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  216. XM("`@("`@("`@("`@>'AX>'AX>"`@("`@("`@("`@("`@("`@("`@>`IX("`@
  217. XM("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX>'AX>'AS("`@("`@("`@
  218. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  219. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AX>',@("`@("`@("`@
  220. XM("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@("`@("!Q>'AX>'AX>'AX
  221. XM>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  222. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX
  223. XM>'AX>',@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@
  224. XM("`@('%X>'AX>'AX>'AX>'A&("`@("`@("`@("`@("`@("`@("`@("`@("`@
  225. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  226. XM("`@("`@("`@("`@('%X>'AX>'@@("`@("`@("`@("`@("`@("`@("`@>`IX
  227. XM("`@("`@("`@("`@("`@("`@('%X>'AX>'AX>'AX>'AS("`@("`@("`@("`@
  228. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  229. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>',@("`@("`@("`@
  230. XM("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@('%X>'AX>'AX>'AX
  231. XM>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  232. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X
  233. XM>'AX>',@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@
  234. XM("`@("!X>'AX>'AX>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  235. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  236. XM("`@("`@("`@("`@("!&>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@
  237. XM>`IX("`@("`@("`@("`@("`@("!Q>'AX>'AX>'AX>',@("`@("`@("`@("`@
  238. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  239. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AX>',@("`@("`@("`@
  240. XM("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@>'AX>'AX>'AX
  241. XM>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  242. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q
  243. XM>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@
  244. XM("`@("`@('AX>'AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@
  245. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  246. XM("`@("`@("`@("`@("`@>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@
  247. XM("`@>`IX("`@("`@("`@("`@("`@("!X>'AX>'AX>'AS("`@("`@("`@("`@
  248. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  249. XM("`@("`@("`@("`@("`@("`@("`@('AX=R`@("`@<7AX>',@("`@("`@("`@
  250. XM("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@>'AX>'AX
  251. XM>'AX("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  252. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AW*B`@
  253. XM<7AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@
  254. XM("`@("`@("`@('AX>'AX>'AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@
  255. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  256. XM("`@("`@("`@87AX>'AX>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@
  257. XM("`@("`@>`IX("`@("`@("`@("`@("`@('%X>'AX>'AX>'@@("`@("`@("`@
  258. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  259. XM("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX>'AX>',@("`@("`@("`@
  260. XM("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("!X>'AX
  261. XM>'AX>'AX9B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  262. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  263. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@
  264. XM("`@("`@("`@("`@>'AX>'AX>'AX>"`@("`@("`@("`@("`@("`@("`@("`@
  265. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  266. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  267. XM("`@("`@("`@>`IX("`@("`@("`@("`@("`@('AX>'AX>'AX>',@("`@("`@
  268. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  269. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  270. XM("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("!X
  271. XM>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  272. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  273. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@
  274. XM("`@("`@("`@("`@("`@>'AX>'AX>'AX("`@("`@("`@("`@("`@("`@("`@
  275. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  276. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  277. XM("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@('AX>'AX>'AX<R`@("`@
  278. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  279. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  280. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@
  281. XM("!X>'AX>'AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  282. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  283. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X
  284. XM"G@@("`@("`@("`@("`@("`@87AX>'AX>'@@("`@("`@("`@("`@("`@("`@
  285. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  286. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  287. XM("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("!X>'AX>'AX("`@
  288. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  289. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  290. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@
  291. XM("`@("`@>'AX>'AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  292. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  293. XM<7AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  294. XM("!X"G@@("`@("`@("`@("`@("`@('AX>'AX>'@@("`@("`@("`@("`@("`@
  295. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  296. XM("`@("`@("`@("`@("`@<7AX>',@("`@("`@("`@("`@("`@("`@("`@("`@
  297. XM("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("!X>'AX>'AX
  298. XM=R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  299. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX>'AX>',@("`@("`@("`@
  300. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@
  301. XM("`@("`@("`@>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  302. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX
  303. XM>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  304. XM("`@("!X"G@@("`@("`@("`@("`@("`@('AX>'AX>'AX("`@("`@("`@("`@
  305. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  306. XM("`@("`@("`@("!Q>'AX>'AX<R`@("`@("`@("`@("`@("`@("`@("`@("`@
  307. XM("`@("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("!X>'AX
  308. XM>'AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  309. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX>'AX>'<@("`@("`@("`@
  310. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@
  311. XM("`@("`@("`@("`@87AX>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@
  312. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX
  313. XM>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  314. XM("`@("`@("!X"GAW("`@("`@("`@("`@("`@("!X>'AX>'AX=R`@("`@("`@
  315. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  316. XM("`@("`@("`@("`@("!X>'AX>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@
  317. XM("`@("`@("`@("`@("`@("`@("`@("`@>`IX>'<@("`@("`@("`@("`@("`@
  318. XM>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  319. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@87AX>'AX>'AX>'AX>'AX
  320. XM>'AX>'AX>'AW("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>'AX
  321. XM=R`@("`@("`@("`@("`@('AX>'AX>'AX9B`@("`@("`@("`@("`@("`@("`@
  322. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  323. XM("`@("`@(&%X>'AX>'AX>'AX>'AX>'AX>'AX>'AX=R`@("`@("`@("`@("`@
  324. XM("`@("`@("`@("!X"GAX>'AW("`@("`@("`@("`@("!X>'AX>'AX>"`@("`@
  325. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  326. XM("`@("`@("`@("`@("`@("`@("`@("`@(&%X>'AX>'AX>'AX>'AX>'AX>'AX
  327. XM>'AX>'<@("`@("`@("`@("`@("`@("`@("`@>`IX>'AX>'AX>'AW("`@("`@
  328. XM("`@>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  329. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  330. XM(&%X>'AX>'AX>'AX>'AX>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@('@*
  331. XM>'AX>'AX>'AX>'AW("`@("`@(&%X>'AX>'AX("`@("`@("`@("`@("`@("`@
  332. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  333. XM("`@("`@("`@("`@("`@("`@("`@(&%X>'AX>'AX>'AX>'AX>'AX=R`@("`@
  334. XM("`@("`@("`@("`@("!X"GAS87AX>'AX>'AX>'<@("`@("`@>'AX>'AX>"`@
  335. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  336. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX
  337. XM>'AX>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@>`IX("!A>'AX>'AX>'AX
  338. XM>"`@("`@('AX>'AX>'AW("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  339. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  340. XM("`@("`@("`@("`@("`@87AX>'AX>'AX>'AX("`@("`@("`@("`@("`@("`@
  341. XM('@*>"`@("!A>'AX>'AX>'@@("`@("!X>'AX>'AX>"`@("`@("`@("`@("`@
  342. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  343. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@87AX>'AX>'AX>"`@
  344. XM("`@("`@("`@("`@("`@("!X"G@@("`@('AX>'AX>'AX("`@("`@>'AX>'AX
  345. XM>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  346. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  347. XM("`@("!X>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@>`IX("`@("!A>'AX
  348. XM>'AX>"`@("`@('AX>'AX>'AX("`@("`@("`@("`@("`@("`@("`@("`@("`@
  349. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  350. XM("`@("`@("`@("`@("`@/B`@("`@87AX>'AX>'AX("`@("`@("`@("`@("`@
  351. XM("`@('@*>"`@("`@("`@87AX>'@@("`@("!X>'AX>'AX>"`@("`@("`@("`@
  352. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  353. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX
  354. XM>"`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("!X>'AX("`@("`@>'AX
  355. XM>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  356. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  357. XM("`@("`@("!X>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@>`IX("`@("`@
  358. XM("`@87AX>"`@("`@<7AX>'AX>'AX("`@("`@("`@("`@("`@("`@("`@("`@
  359. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  360. XM("`@("`@("`@("`@("`@("`@<B`@("`@>'AX>'AX>'AS("`@("`@("`@("`@
  361. XM("`@("`@('@*>"`@("`@("`@('%X>'@@("`@('AX>'AX>'AX>"`@("`@("`@
  362. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  363. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@9$9F("`@('AX>'AX
  364. XM>',@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("!X>'AS("`@("!X
  365. XM>'AX>'AX>'@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  366. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  367. XM("`@("!C("`@("!X>'AX>'@@("`@("`@("`@("`@("`@("`@("`@>`IX("`@
  368. XM("`@("`@>'AS("`@("`@>'AX>'AX>'AX("`@("`@("`@("`@("`@("`@("`@
  369. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  370. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX>'AX("`@("`@("`@("`@
  371. XM("`@("`@("`@('@*>"`@("`@("`@<7AS("`@("`@<7AX>'AX>'AX<R`@("`@
  372. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  373. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX
  374. XM>'AX>"`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@(',@("`@("`@
  375. XM<7AX>'AX>'AX<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  376. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  377. XM("`@("`@("`@("`@("!X>'AX>'@@("`@("`@("`@("`@("`@("`@("`@>`IX
  378. XM("`@("`@("`@("`@("`@<7AX>'AX>'AX<R`@("`@("`@("`@("`@("`@("`@
  379. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  380. XM("`@("`@("`@("`@("`@("`@("`@("`@/"`@("`@>'AX>'AS("`@("`@("`@
  381. XM("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@<7AX>'AX>'AS("`@("`@
  382. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  383. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  384. XM<7AX>'AS("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@
  385. XM<7AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  386. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  387. XM("`@("`@("`@("`@("`@<7AX>'AX9B`@("`@("`@("`@("`@("`@("`@("`@
  388. XM>`IX("`@("`@("`@=R`@<7AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@
  389. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  390. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q>'AX>'AS("`@("`@("`@
  391. XM("`@("`@("`@("`@("`@('@*>"`@("`@("`@(&%W<7AX>'AX>',@("`@("`@
  392. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  393. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@<7AX
  394. XM>'AX>'AX("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@("`@
  395. XM>'AX>'AX>',@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  396. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  397. XM("`@("`@("`@('%X>'AX>'AX>$8@("`@("`@("`@("`@("`@("`@("`@("`@
  398. XM("`@>`IX("`@("`@("`@($9X>'AX<R`@("`@("`@("`@("`@("`@("`@("`@
  399. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  400. XM("`@("`@("`@("`@("`@("`@("`@("!Q>'AX>'AX>'AX>',@("`@("`@("`@
  401. XM("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("!X>'AX<R`@("`@("`@
  402. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  403. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'AX>'AX
  404. XM>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@("`@
  405. XM("!Q>'AX<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  406. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  407. XM("`@<7AX>'AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  408. XM("`@("`@>`IX("`@<7AW("!Q>'AX<R`@("`@("`@("`@("`@("`@("`@("`@
  409. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  410. XM("`@("`@("`@("`@("`@("!Q>'AX>'AX>'AX>'AS("`@("`@("`@("`@("`@
  411. XM("`@("`@("`@("`@("`@("`@("`@('@*>"`@(&%X>"IQ>'AX<R`@("`@("`@
  412. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  413. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX>'AX>'AX>'AS
  414. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@("`@
  415. XM87AX>'AX<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  416. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  417. XM("`@<7AX>'AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  418. XM("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  419. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  420. XM("`@("`@("`@("`@("`@("`@('AX>'AX>'AX>'AX("`@("`@("`@("`@("`@
  421. XM("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@
  422. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  423. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AX>'AX>'AX
  424. XM<R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X"G@@
  425. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  426. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  427. XM("`@("`@>'AX>'AX>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  428. XM("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  429. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  430. XM("`@("`@("`@("`@("`@("`@("`@('AX>'AX>'AX("`@("`@("`@("`@("`@
  431. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@("`@
  432. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  433. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AX>'AX
  434. XM>'<@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X
  435. XM"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  436. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  437. XM("`@("`@("`@87AX>'AX>'AX("`@("`@("`@("`@("`@("`@("`@("`@("`@
  438. XM("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@("`@
  439. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  440. XM("`@("`@("`@("`@("`@("`@("`@("`@("!X>'AX>'AX>'<@("`@("`@("`@
  441. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@("`@
  442. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  443. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@87AX
  444. XM>'AX>'AX=R`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  445. XM("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  446. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  447. XM("`@("`@("`@("`@("`@87AX>'AX>'AW("`@("`@("`@("`@("`@("`@("`@
  448. XM("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@("`@
  449. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  450. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX>'AX>'<@("`@
  451. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@("`@
  452. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  453. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  454. XM("`@(&%X>'AX>'AX>'<@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  455. XM("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  456. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  457. XM("`@("`@("`@("`@("`@("`@("`@(&%X>'AX>'AX=R`@("`@("`@("`@("`@
  458. XM("`@("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@("`@
  459. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  460. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(&%X>'AX
  461. XM>'AW("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@("`@
  462. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  463. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  464. XM("`@("`@("`@("`@87AX>'AX>"`@("`@("`@("`@("`@("`@("`@("`@("`@
  465. XM("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  466. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  467. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("!A>'AX>'AW("`@("`@("`@
  468. XM("`@("`@("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@("`@
  469. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  470. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  471. XM('AX>'AX1B`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*>"`@
  472. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  473. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@*B`@("`@("`@("`@("`@("`@
  474. XM("`@("`@("`@("`@("`@("!A>'AX>',@("`@("`@("`@("`@("`@("`@("`@
  475. XM("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  476. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  477. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX>'@@("`@("`@
  478. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@>`IX("`@("`@("`@("`@("`@
  479. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  480. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  481. XM("`@("!X>'AS("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('@*
  482. XM>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  483. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  484. XM("`@("`@("`@("`@("`@("`@("`@87AS("`@("`@("`@("`@("`@("`@("`@
  485. XM("`@("`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  486. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  487. XM("L@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@(&1X("`@("`@
  488. XM("`@("`@("`@("`@("`@("`@("!R("`@("`@("`@>`IX("`@("`@("`@("`@
  489. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  490. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  491. XM("`@("`@("`@>"H@("`@("`@("`@("`@("`@("`@("`@("!D>'=Q("`@("`@
  492. XM('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  493. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  494. XM("`@("`@("`@("`@("`@("`@("`@("`@('AS("`@("`@("`@("`@("`@("`@
  495. XM("`@("`@<7AX<R`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@("`@
  496. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  497. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!S("`@
  498. XM("`@("`@("`@("`@("`@("`@("`@<7AX<R`@("`@("`@>`IX("`@("`@("`@
  499. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  500. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  501. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX<R`@("`@
  502. XM("`@('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  503. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  504. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  505. XM("`@("`@('AX<R`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@("`@
  506. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  507. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  508. XM("`@("`@("`@("`@("`@("`@("`@("!X>'<J("`@("`@("`@>`IX("`@("`@
  509. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  510. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  511. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@>'AX>"`@
  512. XM("`@("`@('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  513. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  514. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  515. XM("`@("`@("`@<7AX>',@("`@("`@("!X"G@@("`@("`@("`@("`@("`@("`@
  516. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  517. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  518. XM("`@("`@("`@("`@("`@("`@("`@("`@<7AX>$8@("`@("`@("`@>`IX("`@
  519. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  520. XM("`@("`@("`@("`@("`@("`@("`@9'<@('%F("`@("`@("`@("`@("`@("`@
  521. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('AX>'AS
  522. XM("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  523. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!X("!X("`@
  524. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  525. XM("`@("`@("`@('%X>'AX=R`@("`@("`@("!X"G@@("`@("`@("`@("`@("`@
  526. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  527. XM("`@('AW("!Q>"`@>"`@<7@@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  528. XM("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX>'@@("`@("`@("`@>`IX
  529. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  530. XM("`@("`@("`@("`@("`@("`@("!X>'<@>'@@('@@<7AX("`@("`@("`@("`@
  531. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@('%X>'AX
  532. XM>'AX("`@("`@("`@('@*>"`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  533. XM("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("!Q>'AX<GA&('%X
  534. XM<GAX>'<@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@("`@
  535. XM("`@("`@("`@('%X>'AX>'AX>'<@("`@("`@("!X"GAX>'AX>'AX>'AX>'AX
  536. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  537. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  538. XM>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX>'AX
  539. X">`IX
  540. X`
  541. Xend
  542. END_OF_FILE
  543. if test 31341 -ne `wc -c <'maps/CAMD.uue'`; then
  544.     echo shar: \"'maps/CAMD.uue'\" unpacked with wrong size!
  545. fi
  546. # end of 'maps/CAMD.uue'
  547. fi
  548. if test -f 'src/lib/socklib.c' -a "${1}" != "-c" ; then 
  549.   echo shar: Will not clobber existing file \"'src/lib/socklib.c'\"
  550. else
  551. echo shar: Extracting \"'src/lib/socklib.c'\" \(23176 characters\)
  552. sed "s/^X//" >'src/lib/socklib.c' <<'END_OF_FILE'
  553. X/* -*-C-*-
  554. X *
  555. X * Project :     TRACE
  556. X *
  557. X * File    :     socklib.c
  558. X *
  559. X * Description
  560. X *
  561. X * Copyright (C) 1991 by Arne Helme, The TRACE project
  562. X *
  563. X * Rights to use this source is granted for all non-commercial and research
  564. X * uses. Creation of derivate forms of this software may be subject to
  565. X * restriction. Please obtain written permission from the author.
  566. X *
  567. X * This software is provided "as is" without any express or implied warranty.
  568. X *
  569. X * RCS:      socklib.c,v 1.3 1992/06/25 04:31:37 bjoerns Exp
  570. X * Log:      socklib.c,v
  571. X * Revision 1.3  1992/06/25  04:31:37  bjoerns
  572. X * Added source id to socklib.
  573. X *
  574. X * Revision 1.2  1992/05/19  21:11:39  bjoerns
  575. X * Minor.
  576. X *
  577. X * Revision 1.1.1.1  1992/05/11  12:32:34  bjoerns
  578. X * XPilot v1.0
  579. X *
  580. X * Revision 1.2  91/10/02  08:38:01  08:38:01  arne (Arne Helme)
  581. X * "ANSI C prototypes added.
  582. X * Timeout interface changed."
  583. X * 
  584. X * Revision 1.1  91/10/02  08:34:45  08:34:45  arne (Arne Helme)
  585. X * Initial revision
  586. X * 
  587. X */
  588. X
  589. X#ifndef lint
  590. Xstatic char sourceid[] =
  591. X    "@(#)$Id: ";
  592. X#endif
  593. X
  594. X/* _SOCKLIB_LIBSOURCE must be defined int this file */
  595. X#define _SOCKLIB_LIBSOURCE
  596. X
  597. X/* Socklib Includes And Definitions */
  598. X#include "socklib.h"
  599. X
  600. X/* Debug macro */
  601. X#ifdef DEBUG
  602. X#define DEB(x) x
  603. X#else
  604. X#define DEB(x)
  605. X#endif
  606. X
  607. X/* Default timeout value of socklib_timeout */
  608. X#define DEFAULT_S_TIMEOUT_VALUE        10
  609. X#define DEFAULT_US_TIMEOUT_VALUE    0
  610. X
  611. X/* Default retry value of sl_default_retries */
  612. X#define DEFAULT_RETRIES            5
  613. X
  614. X/* External references */
  615. Xextern int         errno;
  616. X
  617. X/* Environment buffer for setjmp and longjmp */
  618. Xstatic            jmp_buf env;
  619. X
  620. X/* Global socklib errno variable */
  621. Xint            sl_errno = 0;
  622. X
  623. X/* Global timeout variable. May be modified by users */
  624. Xint            sl_timeout_s = DEFAULT_S_TIMEOUT_VALUE;
  625. Xint            sl_timeout_us = DEFAULT_US_TIMEOUT_VALUE;
  626. X
  627. X/* Global default retries variable used by DgramSendRec */
  628. Xint            sl_default_retries = DEFAULT_RETRIES;
  629. X
  630. X/* Global variable containing the last address from DgramReceiveAny */
  631. Xstruct sockaddr_in    sl_dgram_lastaddr;
  632. X
  633. X/* Global broadcast enable variable (super-user only), default disabled */
  634. Xint            sl_broadcast_enabled = 0;
  635. X
  636. X
  637. X/*
  638. X *******************************************************************************
  639. X *
  640. X *    SetTimeout()
  641. X *
  642. X *******************************************************************************
  643. X * Description
  644. X *    Sets the global timout value to s + us.
  645. X *
  646. X * Input Parameters
  647. X *    s            - Timeout value in seconds
  648. X *    us            - Timeout value in useconds
  649. X *
  650. X * Output Parameters
  651. X *    None
  652. X *
  653. X * Return Value
  654. X *    void
  655. X *
  656. X * Globals Referenced
  657. X *    sl_timeout_us        - Timeout value in useconds
  658. X *    sl_timeout_s        - Timeout value in seconds
  659. X *
  660. X * External Calls
  661. X *    None
  662. X *
  663. X * Called By
  664. X *    User applications
  665. X *
  666. X * Originally coded by Arne Helme
  667. X */
  668. X#ifdef __STDC__
  669. Xvoid
  670. XSetTimeout(int s, int us)
  671. X#else
  672. XSetTimeout(s, us)
  673. Xint s, us;
  674. X#endif /* __STDC__ */
  675. X{
  676. X    sl_timeout_us = us;
  677. X    sl_timeout_s = s;
  678. X} /* SetTimeout */
  679. X
  680. X
  681. X/*
  682. X *******************************************************************************
  683. X *
  684. X *    CreateServerSocket()
  685. X *
  686. X *******************************************************************************
  687. X * Description
  688. X *    Creates a TCP/IP server socket in the Internet domain.
  689. X *
  690. X * Input Parameters
  691. X *    port        - Server's listen port.
  692. X *
  693. X * Output Parameters
  694. X *    None
  695. X *
  696. X * Return Value
  697. X *    The function returns the socket descriptor, or -1 if 
  698. X *    any errors occured. 
  699. X *
  700. X * Globals Referenced
  701. X *    sl_errno    - if errors occured: SL_ESOCKET, SL_EBIND,
  702. X *              SL_ELISTEN
  703. X *
  704. X * External Calls
  705. X *    socket
  706. X *    bind
  707. X *    listen
  708. X *
  709. X * Called By
  710. X *    User applications.
  711. X *
  712. X * Originally coded by Arne Helme
  713. X */
  714. Xint
  715. X#ifdef __STDC__
  716. XCreateServerSocket(int port)
  717. X#else
  718. XCreateServerSocket(port)
  719. Xint    port;
  720. X#endif /* __STDC__ */
  721. X{
  722. X    struct sockaddr_in    addr_in;
  723. X    int            fd;
  724. X    int            retval;
  725. X
  726. X    fd = socket(AF_INET, SOCK_STREAM, 0);
  727. X    if (fd < 0)
  728. X    {
  729. X    sl_errno = SL_ESOCKET;
  730. X    return (-1);
  731. X    }
  732. X    memset((char *)&addr_in, 0, sizeof(struct sockaddr_in));
  733. X    addr_in.sin_family        = AF_INET;
  734. X    addr_in.sin_addr.s_addr    = INADDR_ANY;
  735. X    addr_in.sin_port        = htons(port);
  736. X    
  737. X    retval = bind(fd, &addr_in, sizeof(struct sockaddr_in));
  738. X    if (retval < 0)
  739. X    {
  740. X    sl_errno = SL_EBIND;
  741. X    (void) close(fd);
  742. X    return (-1);
  743. X    }
  744. X
  745. X    retval = listen(fd, 5);
  746. X    if (retval < 0)
  747. X    {
  748. X    sl_errno = SL_ELISTEN;
  749. X    (void) close(fd);
  750. X    return (-1);
  751. X    }
  752. X
  753. X    return (fd);
  754. X} /* CreateServerSocket */
  755. X
  756. X
  757. X/*
  758. X *******************************************************************************
  759. X *
  760. X *    GetPortNum()
  761. X *
  762. X *******************************************************************************
  763. X * Description
  764. X *    Returns the port number of a socket connection.
  765. X *
  766. X * Input Parameters
  767. X *    fd        - The socket descriptor.
  768. X *
  769. X * Output Parameters
  770. X *    None
  771. X *
  772. X * Return Value
  773. X *    The port number on host standard format.
  774. X *
  775. X * Globals Referenced
  776. X *    None
  777. X *
  778. X * External Calls
  779. X *    getsockname
  780. X *
  781. X * Called By
  782. X *    User applications
  783. X *
  784. X * Originally coded by Arne Helme
  785. X */
  786. Xint 
  787. X#ifdef __STDC__
  788. XGetPortNum(int fd)
  789. X#else
  790. XGetPortNum(fd)
  791. Xint    fd;
  792. X#endif /* __STDC__ */
  793. X{
  794. X    int            len;
  795. X    struct sockaddr_in    addr;
  796. X
  797. X    len = sizeof(struct sockaddr_in);
  798. X    if (getsockname(fd, &addr, &len) < 0)
  799. X    return (-1);
  800. X
  801. X    return (ntohs(addr.sin_port));
  802. X} /* GetPortNum */
  803. X
  804. X
  805. X/*
  806. X *******************************************************************************
  807. X *
  808. X *    CreateClientSocket()
  809. X *
  810. X *******************************************************************************
  811. X * Description
  812. X *    Creates a client TCP/IP socket in the Internet domain.
  813. X *
  814. X * Input Parameters
  815. X *    host        - Pointer to string containing name of the peer
  816. X *              host on either dot-format or ascii-name format.
  817. X *    port        - The requested port number.
  818. X *
  819. X * Output Parameters
  820. X *    None
  821. X *
  822. X * Return Value
  823. X *    Returns the socket descriptor or the error value -1.
  824. X *
  825. X * Globals Referenced
  826. X *    sl_errno    - If errors occured: SL_EHOSTNAME, SL_ESOCKET,
  827. X *              SL_ECONNECT.
  828. X *
  829. X * External Calls
  830. X *    memset
  831. X *    gethostbyname
  832. X *    socket
  833. X *    connect
  834. X *    close
  835. X *
  836. X * Called By
  837. X *    User applications.
  838. X *
  839. X * Originally coded by Arne Helme
  840. X */
  841. Xint 
  842. X#ifdef __STDC__
  843. XCreateClientSocket(char *host, int port)
  844. X#else
  845. XCreateClientSocket(host, port)
  846. Xchar    *host;
  847. Xint    port;
  848. X#endif /* __STDC__ */
  849. X{
  850. X    struct sockaddr_in    peer;
  851. X    struct hostent    *hp;
  852. X    int            fd;
  853. X    
  854. X    memset((char *)&peer, 0, sizeof(struct sockaddr_in));
  855. X    peer.sin_family = AF_INET;
  856. X    peer.sin_port   = htons(port);
  857. X    
  858. X    peer.sin_addr.s_addr = inet_addr(host);
  859. X    if (peer.sin_addr.s_addr == (int)-1)
  860. X    {
  861. X    hp = gethostbyname(host);
  862. X    if (hp == NULL)
  863. X    {
  864. X        sl_errno = SL_EHOSTNAME;
  865. X        return (-1);
  866. X    }
  867. X    else
  868. X        peer.sin_addr.s_addr = ((struct in_addr*)(hp->h_addr))->s_addr;
  869. X    }
  870. X
  871. X    fd = socket(AF_INET, SOCK_STREAM, 0);
  872. X    if (fd < 0)
  873. X    {
  874. X    sl_errno = SL_ESOCKET;
  875. X    return (-1);
  876. X    }
  877. X
  878. X    if (connect(fd, &peer, sizeof(struct sockaddr_in)) < 0) 
  879. X    {
  880. X    sl_errno = SL_ECONNECT;
  881. X    (void) close(fd);
  882. X    return (-1);
  883. X    }
  884. X
  885. X    return (fd);
  886. X} /* CreateClientSocket */
  887. X
  888. X
  889. X/*
  890. X *******************************************************************************
  891. X *
  892. X *    SocketAccept()
  893. X *
  894. X *******************************************************************************
  895. X * Description
  896. X *    This function is called in a TCP/IP server to accept incoming calls.
  897. X *    
  898. X * Input Parameters
  899. X *    fd        - The listen socket.
  900. X *
  901. X * Output Parameters
  902. X *    None
  903. X *
  904. X * Return Value
  905. X *    The functions returns a new descriptor which is used to the
  906. X *    actual data transfer.
  907. X *
  908. X * Globals Referenced
  909. X *    None
  910. X *
  911. X * External Calls
  912. X *    setsockopt
  913. X *    
  914. X * Called By
  915. X *    User applications.
  916. X *
  917. X * Originally coded by Arne Helme
  918. X */
  919. Xint 
  920. X#ifdef __STDC__
  921. XSocketAccept(int fd)
  922. X#else
  923. XSocketAccept(fd)
  924. Xint    fd;
  925. X#endif /* __STDC__ */
  926. X{
  927. X    int                socket;
  928. X#ifdef    __hp9000s300
  929. X    long            linger = 1;
  930. X    int                lsize  = sizeof(long);
  931. X#else
  932. X    static struct linger    linger = {1, 300};
  933. X    int                lsize  = sizeof(struct linger);
  934. X#endif
  935. X    socket = accept(fd, NULL, 0);
  936. X
  937. X    if (setsockopt(socket, SOL_SOCKET, SO_LINGER, (char *)&linger,
  938. X           lsize) == -1)
  939. X    return (-1);
  940. X    else
  941. X    return (socket);
  942. X} /* SocketAccept */
  943. X
  944. X
  945. X/*
  946. X *******************************************************************************
  947. X *
  948. X *    SocketReadable()
  949. X *
  950. X *******************************************************************************
  951. X * Description
  952. X *    Checks if data have arrived on the TCP/IP socket connection.
  953. X *
  954. X * Input Parameters
  955. X *    fd        - The socket descriptor to be checked.
  956. X *
  957. X * Output Parameters
  958. X *    None
  959. X *
  960. X * Return Value
  961. X *    TRUE (non-zero) or FALSE (zero).
  962. X *
  963. X * Globals Referenced
  964. X *    socket_timeout
  965. X *
  966. X * External Calls
  967. X *    select
  968. X *
  969. X * Called By
  970. X *    User applications.
  971. X *
  972. X * Originally coded by Arne Helme
  973. X */
  974. Xint 
  975. X#ifdef __STDC__
  976. XSocketReadable(int fd)
  977. X#else
  978. XSocketReadable(fd)
  979. Xint    fd;
  980. X#endif /* __STDC__ */
  981. X{
  982. X    int            readfds = 0, writefds = 0, exceptfds = 0;
  983. X    struct timeval    timeout;
  984. X
  985. X    timerclear(&timeout); /* macro function */
  986. X    timeout.tv_sec = sl_timeout_s;
  987. X    timeout.tv_usec = sl_timeout_us;
  988. X    readfds = (1 << fd);
  989. X
  990. X    (void) select(fd + 1, &readfds, &writefds, &exceptfds, &timeout);
  991. X    
  992. X    if (readfds & (1 << fd))
  993. X    return (1);
  994. X    return (0);
  995. X} /* SocketReadable */
  996. X
  997. X
  998. X/*
  999. X *******************************************************************************
  1000. X *
  1001. X *    inthandler()
  1002. X *
  1003. X *******************************************************************************
  1004. X * Description
  1005. X *    Library routine used to jump to a previous state.
  1006. X *
  1007. X * Input Parameters
  1008. X *    None
  1009. X *
  1010. X * Output Parameters
  1011. X *    None
  1012. X *
  1013. X * Return Value
  1014. X *    None
  1015. X *
  1016. X * Globals Referenced
  1017. X *    env
  1018. X *
  1019. X * External Calls
  1020. X *    longjmp
  1021. X *
  1022. X * Called By
  1023. X *    SocketRead
  1024. X *
  1025. X * Originally coded by Arne Helme
  1026. X */
  1027. X#ifdef __STDC__
  1028. Xstatic void 
  1029. X#else
  1030. Xstatic
  1031. X#endif /* __STDC__ */
  1032. Xinthandler()
  1033. X{
  1034. X    DEB(fprintf(stderr, "Connection interrupted, timeout\n"));
  1035. X    (void) longjmp(env, 1);
  1036. X} /* inthandler */
  1037. X
  1038. X
  1039. X/*
  1040. X *******************************************************************************
  1041. X *
  1042. X *    SocketRead()
  1043. X *
  1044. X *******************************************************************************
  1045. X * Description
  1046. X *    Receives <size> bytes and put them into buffer <buf> from
  1047. X *    socket <fd>.
  1048. X *
  1049. X * Input Parameters
  1050. X *    fd        - The socket descriptor.
  1051. X *    size        - The expected amount of data to receive.
  1052. X *
  1053. X * Output Parameters
  1054. X *    buf        - Pointer to a message buffer.
  1055. X *
  1056. X * Return Value
  1057. X *    The number of bytes received or -1 if any errors occured.
  1058. X *
  1059. X * Globals Referenced
  1060. X *    sl_timeout
  1061. X *
  1062. X * External Calls
  1063. X *    setjmp
  1064. X *    alarm
  1065. X *    signal
  1066. X *    read
  1067. X *
  1068. X * Called By
  1069. X *    User applications.
  1070. X *
  1071. X * Originally coded by Arne Helme
  1072. X */
  1073. Xint 
  1074. X#ifdef __STDC__
  1075. XSocketRead(int fd, char *buf, int size)
  1076. X#else
  1077. XSocketRead(fd, buf, size)
  1078. Xint    fd, size;
  1079. Xchar    *buf;
  1080. X#endif /* __STDC__ */
  1081. X{
  1082. X    int    ret, ret1;
  1083. X
  1084. X    if (setjmp(env)) 
  1085. X    {
  1086. X    (void) alarm(0);
  1087. X    (void) signal(SIGALRM, SIG_DFL);
  1088. X    return (-1);
  1089. X    }
  1090. X    ret = 0;
  1091. X    while (ret < size) 
  1092. X    {
  1093. X    (void) signal(SIGALRM, ((void (*) ())inthandler));
  1094. X    (void) alarm(sl_timeout_s);
  1095. X    ret1 = read(fd, &buf[ret], size - ret);
  1096. X    DEB(fprintf(stderr, "Read %d bytes\n", ret1));
  1097. X    (void) alarm(0);
  1098. X    (void) signal(SIGALRM, SIG_DFL);
  1099. X    ret += ret1;
  1100. X    if (ret1 <= 0)
  1101. X        return (-1);
  1102. X    }
  1103. X    return (ret);
  1104. X} /* SocketRead */
  1105. X
  1106. X
  1107. X/*
  1108. X *******************************************************************************
  1109. X *
  1110. X *    SocketWrite()
  1111. X *
  1112. X *******************************************************************************
  1113. X * Description
  1114. X *    Writes <size> bytes from buffer <buf> onto socket <fd>.
  1115. X *
  1116. X * Input Parameters
  1117. X *    fd        - The socket descriptor.
  1118. X *    buf        - Pointer to a send buffer.
  1119. X *    size        - The amount of data to send.
  1120. X *
  1121. X * Output Parameters
  1122. X *    None
  1123. X *
  1124. X * Return Value
  1125. X *    The number of bytes sent or -1 if any errors occured.
  1126. X *
  1127. X * Globals Referenced
  1128. X *    None
  1129. X *
  1130. X * External Calls
  1131. X *    write
  1132. X *
  1133. X * Called By
  1134. X *    User applications.
  1135. X *
  1136. X * Originally coded by Arne Helme
  1137. X */
  1138. Xint 
  1139. X#ifdef __STDC__
  1140. XSocketWrite(int fd, char *buf, int size)
  1141. X#else
  1142. XSocketWrite(fd, buf, size)
  1143. Xint    fd, size;
  1144. Xchar    *buf;
  1145. X#endif /* __STDC__ */
  1146. X{
  1147. X    /*
  1148. X     * A SIGPIPE exception may occur if the peer entity has disconnected.
  1149. X     */
  1150. X    return (write(fd, buf, size));
  1151. X} /* SocketWrite */
  1152. X
  1153. X
  1154. X/*
  1155. X *******************************************************************************
  1156. X *
  1157. X *    SocketClose()
  1158. X *
  1159. X *******************************************************************************
  1160. X * Description
  1161. X *    performs a gracefule shutdown and close on a TCP/IP socket. May
  1162. X *     cause errounous behaviour when used on the same connection from
  1163. X *    more than one process.
  1164. X *
  1165. X * Input Parameters
  1166. X *    fd        - The socket to be closed.
  1167. X *
  1168. X * Output Parameters
  1169. X *    None
  1170. X *
  1171. X * Return Value
  1172. X *    -1 if any errors occured, else 1.
  1173. X *
  1174. X * Globals Referenced
  1175. X *    sl_errno    - If any errors occured: SL_ESHUTD, SL_ECLOSE.
  1176. X *
  1177. X * External Calls
  1178. X *    shutdown
  1179. X *    close
  1180. X *
  1181. X * Called By
  1182. X *    User applications.
  1183. X *
  1184. X * Originally coded by Arne Helme
  1185. X */
  1186. Xint 
  1187. X#ifdef __STDC__
  1188. XSocketClose(int fd)
  1189. X#else
  1190. XSocketClose(fd)
  1191. Xint    fd;
  1192. X#endif /* __STDC__ */
  1193. X{
  1194. X    if (shutdown(fd, 2) == -1)
  1195. X    {
  1196. X    sl_errno = SL_ESHUTD;
  1197. X    return (-1);
  1198. X    }
  1199. X
  1200. X    if (close(fd) == -1)
  1201. X    {
  1202. X    sl_errno = SL_ECLOSE;
  1203. X    return (-1);
  1204. X    }
  1205. X    return (1);
  1206. X} /* SocketClose */
  1207. X
  1208. X
  1209. X/*
  1210. X *******************************************************************************
  1211. X *
  1212. X *    CreateDgramSocket()
  1213. X *
  1214. X *******************************************************************************
  1215. X * Description
  1216. X *    Creates a UDP/IP datagram socket in the Internet domain.
  1217. X *
  1218. X * Input Parameters
  1219. X *    port        - The port number. A value of zero may be specified in
  1220. X *              clients to assign any available port number.
  1221. X *
  1222. X * Output Parameters
  1223. X *    None
  1224. X *
  1225. X * Return Value
  1226. X *    A UDP/IP datagram socket descriptor.
  1227. X *
  1228. X * Globals Referenced
  1229. X *    sl_errno    - If any errors occured: SL_ESOCKET, SL_EBIND.
  1230. X *
  1231. X * External Calls
  1232. X *    socket
  1233. X *    memset
  1234. X *    bind
  1235. X *    close
  1236. X *
  1237. X * Called By
  1238. X *    User applications.
  1239. X *
  1240. X * Originally coded by Arne Helme
  1241. X */
  1242. Xint 
  1243. X#ifdef __STDC__
  1244. XCreateDgramSocket(int port)
  1245. X#else
  1246. XCreateDgramSocket(port)
  1247. Xint    port;
  1248. X#endif /* __STDC__ */
  1249. X{
  1250. X    struct sockaddr_in    addr_in;
  1251. X    int            fd;
  1252. X    int            retval;
  1253. X
  1254. X    fd = socket(AF_INET, SOCK_DGRAM, 0);
  1255. X    if (fd < 0)
  1256. X    {
  1257. X    sl_errno = SL_ESOCKET;
  1258. X    return (-1);
  1259. X    }
  1260. X
  1261. X    memset((char *)&addr_in, 0, sizeof(struct sockaddr_in));
  1262. X    addr_in.sin_family        = AF_INET;
  1263. X    addr_in.sin_addr.s_addr    = INADDR_ANY;
  1264. X    addr_in.sin_port        = htons(port);
  1265. X    retval = bind(fd, &addr_in, sizeof(struct sockaddr_in));
  1266. X    if (retval < 0)
  1267. X    {
  1268. X    sl_errno = SL_EBIND;
  1269. X    (void) close(fd);
  1270. X    return (-1);
  1271. X    }
  1272. X
  1273. X    return (fd);
  1274. X} /* CreateDgramSocket */
  1275. X
  1276. X
  1277. X/*
  1278. X *******************************************************************************
  1279. X *
  1280. X *    DgramSend()
  1281. X *
  1282. X *******************************************************************************
  1283. X * Description
  1284. X *    Transmits a UDP/IP datagram.
  1285. X *
  1286. X * Input Parameters
  1287. X *    fd        - The socket descriptor.
  1288. X *    host        - Pointer to string containing destination host name.
  1289. X *    port        - Destination port.
  1290. X *    sbuf        - Pointer to the message to be sent.
  1291. X *    size        - Message size.
  1292. X *
  1293. X * Output Parameters
  1294. X *    None
  1295. X *
  1296. X * Return Value
  1297. X *    The number of bytes sent or -1 if any errors occured.
  1298. X *
  1299. X * Globals Referenced
  1300. X *    sl_broadcast_enabled
  1301. X *    sl_errno    - If any errors occured: SL_EHOSTNAME.
  1302. X *
  1303. X * External Calls
  1304. X *    memset
  1305. X *    inet_addr
  1306. X *    gethostbyname
  1307. X *    sendto
  1308. X *
  1309. X * Called By
  1310. X *    User applications.
  1311. X *
  1312. X * Originally coded by Arne Helme
  1313. X */
  1314. Xint
  1315. X#ifdef __STDC__
  1316. XDgramSend(int fd, char *host, int port,
  1317. X      char *sbuf, int size)
  1318. X#else
  1319. XDgramSend(fd, host, port, sbuf, size)
  1320. Xint    fd, port, size;
  1321. Xchar    *host, *sbuf;
  1322. X#endif /* __STDC__ */
  1323. X{
  1324. X    struct sockaddr_in    the_addr;
  1325. X    struct hostent    *hp;
  1326. X
  1327. X    (void) memset((char *)&the_addr, 0, sizeof(struct sockaddr_in));
  1328. X    the_addr.sin_family        = AF_INET;
  1329. X    the_addr.sin_port        = htons(port);
  1330. X    if (sl_broadcast_enabled)
  1331. X    the_addr.sin_addr.s_addr    = INADDR_BROADCAST;
  1332. X    else
  1333. X    {
  1334. X    the_addr.sin_addr.s_addr     = inet_addr(host);
  1335. X    if (the_addr.sin_addr.s_addr == (int)-1)
  1336. X    {
  1337. X        hp = gethostbyname(host);
  1338. X        if (hp == NULL)
  1339. X        {
  1340. X        sl_errno = SL_EHOSTNAME;
  1341. X        return (-1);
  1342. X        }
  1343. X        else
  1344. X        the_addr.sin_addr.s_addr = 
  1345. X            ((struct in_addr*)(hp->h_addr))->s_addr;
  1346. X    }
  1347. X    }
  1348. X    return (sendto(fd, sbuf, size, 0, &the_addr,
  1349. X           sizeof(struct sockaddr_in)));
  1350. X} /* DgramSend */
  1351. X
  1352. X
  1353. X/*
  1354. X *******************************************************************************
  1355. X *
  1356. X *    DgramReceiveAny()
  1357. X *
  1358. X *******************************************************************************
  1359. X * Description
  1360. X *    Receives a datagram from any sender.
  1361. X *
  1362. X * Input Parameters
  1363. X *    fd        - The socket descriptor.
  1364. X *    size        - Expected message size.
  1365. X *
  1366. X * Output Parameters
  1367. X *    rbuf        - Pointer to a message buffer.
  1368. X *
  1369. X * Return Value
  1370. X *    The number of bytes received or -1 if any errors occured.
  1371. X *
  1372. X * Globals Referenced
  1373. X *    sl_dgram_lastaddr
  1374. X *
  1375. X * External Calls
  1376. X *    memset
  1377. X *
  1378. X * Called By
  1379. X *    User applications
  1380. X *
  1381. X * Originally coded by Arne Helme
  1382. X */
  1383. Xint
  1384. X#ifdef __STDC__
  1385. XDgramReceiveAny(int fd, char *rbuf, int size)
  1386. X#else
  1387. XDgramReceiveAny(fd, rbuf, size)
  1388. Xint    fd;
  1389. Xchar    *rbuf;
  1390. Xint    size;
  1391. X#endif /* __STDC__ */
  1392. X{
  1393. X    int        addrlen = sizeof(struct sockaddr_in);
  1394. X
  1395. X    (void) memset((char *)&sl_dgram_lastaddr, 0, addrlen);
  1396. X    return (recvfrom(fd, rbuf, size, 0, &sl_dgram_lastaddr, &addrlen));
  1397. X} /* DgramReceiveAny */
  1398. X
  1399. X
  1400. X/*
  1401. X *******************************************************************************
  1402. X *
  1403. X *    DgramReceive()
  1404. X *
  1405. X *******************************************************************************
  1406. X * Description
  1407. X *    Receive a datagram from a specifc host. If a message from another
  1408. X *    host arrives, an error value is returned.
  1409. X *
  1410. X * Input Parameters
  1411. X *    fd        - The socket descriptor.
  1412. X *    from        - Pointer to the specified hostname.
  1413. X *    size        - Expected message size.
  1414. X *
  1415. X * Output Parameters
  1416. X *    rbuf        - Pointer to message buffer.
  1417. X *
  1418. X * Return Value
  1419. X *    The number of bytes received or -1 if any errors occured.
  1420. X *
  1421. X * Globals Referenced
  1422. X *    sl_dgram_lastaddr
  1423. X *    sl_errno    - If any errors occured: SL_EHOSTNAME, SL_EWRONGHOST.
  1424. X *
  1425. X * External Calls
  1426. X *    inet_addr
  1427. X *    gethostbyname
  1428. X *    DgramReceiveAny
  1429. X *
  1430. X * Called By
  1431. X *    User applications.
  1432. X *
  1433. X * Originally coded by Arne Helme
  1434. X */
  1435. Xint
  1436. X#ifdef __STDC__
  1437. XDgramReceive(int fd, char *from, char *rbuf, int size)
  1438. X#else
  1439. XDgramReceive(fd, from, rbuf, size)
  1440. Xint    fd, size;
  1441. Xchar    *from, *rbuf;
  1442. X#endif /* __STDC__ */
  1443. X{
  1444. X    struct sockaddr_in    tmp_addr;
  1445. X    struct hostent    *hp;
  1446. X    int            retval;
  1447. X
  1448. X    tmp_addr.sin_addr.s_addr = inet_addr(from);
  1449. X    if (tmp_addr.sin_addr.s_addr == (int)-1)
  1450. X    {
  1451. X    hp = gethostbyname(from);
  1452. X    if (hp == NULL)
  1453. X    {
  1454. X        sl_errno = SL_EHOSTNAME;
  1455. X        return (-1);
  1456. X    }
  1457. X    else
  1458. X        tmp_addr.sin_addr.s_addr =
  1459. X        ((struct in_addr*)(hp->h_addr))->s_addr;
  1460. X    }
  1461. X    retval = DgramReceiveAny(fd, rbuf, size);
  1462. X    if (retval == -1 || 
  1463. X    tmp_addr.sin_addr.s_addr != sl_dgram_lastaddr.sin_addr.s_addr)
  1464. X    {
  1465. X    sl_errno = SL_EWRONGHOST;
  1466. X    return (-1);
  1467. X    }
  1468. X    return (retval);
  1469. X} /* DgramReceive */
  1470. X
  1471. X
  1472. X/*
  1473. X *******************************************************************************
  1474. X *
  1475. X *    DgramInthandler()
  1476. X *
  1477. X *******************************************************************************
  1478. X * Description
  1479. X *    Library routine used by DgramSendRec to handle alarm interrupts.
  1480. X *
  1481. X * Input Parameters
  1482. X *    None
  1483. X *
  1484. X * Output Parameters
  1485. X *    None
  1486. X *
  1487. X * Return Value
  1488. X *    None
  1489. X *
  1490. X * Globals Referenced
  1491. X *    None
  1492. X *
  1493. X * External Calls
  1494. X *    signal
  1495. X *
  1496. X * Called By
  1497. X *    DgramSendRec
  1498. X *
  1499. X * Originally coded by Arne Helme
  1500. X */
  1501. X#ifdef __STDC__
  1502. Xstatic void
  1503. XDgramInthandler(void)
  1504. X#else
  1505. Xstatic
  1506. XDgramInthandler()
  1507. X#endif /* __STDC__ */
  1508. X{
  1509. X    (void) signal(SIGALRM, ((void (*) ())DgramInthandler));
  1510. X} /* DgramInthandler */
  1511. X
  1512. X
  1513. X/*
  1514. X *******************************************************************************
  1515. X *
  1516. X *    DgramSendRec()
  1517. X *
  1518. X *******************************************************************************
  1519. X * Description
  1520. X *    Sends a message to a specified host and receives a reply from the
  1521. X *    same host. Messages arriving from other hosts when this routine is
  1522. X *    called will be discarded. Timeouts and retries can be modified
  1523. X *     by setting the global variables sl_timeout and sl_default_retries.
  1524. X *
  1525. X * Input Parameters
  1526. X *    fd        - The socket descriptor.
  1527. X *    host        - Pointer to string contaning a hostname.
  1528. X *    port        - The specified port.
  1529. X *    sbuf        - Pointer to buffer containing message to be sent.
  1530. X *    sbuf_size    - The size of the outgoing message.
  1531. X *    rbuf_size    - Expected size of incoming message.
  1532. X *
  1533. X * Output Parameters
  1534. X *    rbuf        - Pointer to message buffer.
  1535. X *
  1536. X * Return Value
  1537. X *    The number of bytes received from the specified host or -1 if any
  1538. X *    errors occured.
  1539. X *
  1540. X * Globals Referenced
  1541. X *    errno
  1542. X *    sl_errno
  1543. X *    sl_timeout
  1544. X *    sl_default_retries
  1545. X *
  1546. X * External Calls
  1547. X *    alarm
  1548. X *    signal
  1549. X *    DgramSend
  1550. X *    DgramReceive
  1551. X *    
  1552. X * Called By
  1553. X *    User applications.
  1554. X *
  1555. X * Originally coded by Arne Helme
  1556. X */
  1557. Xint
  1558. X#ifdef __STDC__
  1559. XDgramSendRec(int fd, char *host, int port, char *sbuf,
  1560. X         int sbuf_size, char *rbuf, int rbuf_size)
  1561. X#else
  1562. XDgramSendRec(fd, host, port, sbuf, sbuf_size, rbuf, rbuf_size)
  1563. Xint    fd, port, sbuf_size, rbuf_size;
  1564. Xchar    *host, *sbuf, *rbuf;
  1565. X#endif /* __STDC__ */
  1566. X{
  1567. X    int        retval;
  1568. X    int        retry = sl_default_retries;
  1569. X    
  1570. X    (void) signal(SIGALRM, ((void (*) ())DgramInthandler));
  1571. X    while (retry)
  1572. X    {
  1573. X    if (DgramSend(fd, host, port, sbuf, sbuf_size) == -1)
  1574. X        return (-1);
  1575. X
  1576. X    (void) alarm(sl_timeout_s);
  1577. X    retval = DgramReceive(fd, host, rbuf, rbuf_size);
  1578. X    if (retval == -1)
  1579. X        if (errno == EINTR || sl_errno == SL_EWRONGHOST)
  1580. X        /* We have a timeout or a message from wrong host */
  1581. X        if (--retry)
  1582. X            continue;    /* Try one more time */
  1583. X        else
  1584. X        {
  1585. X            sl_errno = SL_ENORESP;
  1586. X            break;    /* Unable to get response */
  1587. X        }
  1588. X        else
  1589. X        {
  1590. X        sl_errno = SL_ERECEIVE;
  1591. X        break;        /* Unable to receive response */
  1592. X        }
  1593. X    else
  1594. X        break;        /* Datagram from <host> arrived */
  1595. X    }
  1596. X    (void) alarm(0);
  1597. X    (void) signal(SIGALRM, SIG_DFL);
  1598. X    return (retval);
  1599. X} /* DgramInthandler */
  1600. X
  1601. X
  1602. X/*
  1603. X *******************************************************************************
  1604. X *
  1605. X *    DgramLastaddr()
  1606. X *
  1607. X *******************************************************************************
  1608. X * Description
  1609. X *    Extracts the last host address from the global variable
  1610. X *    sl_dgram_lastaddr.
  1611. X *
  1612. X * Input Parameters
  1613. X *    None
  1614. X *
  1615. X * Output Parameters
  1616. X *    None
  1617. X *
  1618. X * Return Value
  1619. X *    Pointer to string containing the host address. Warning, the string
  1620. X *    resides in static memory area.
  1621. X *
  1622. X * Globals Referenced
  1623. X *    sl_dgram_lastaddr
  1624. X *
  1625. X * External Calls
  1626. X *    inet_ntoa
  1627. X *
  1628. X * Called By
  1629. X *    User applications.
  1630. X *
  1631. X * Originally coded by Arne Helme
  1632. X */
  1633. Xchar *
  1634. X#ifdef __STDC__
  1635. XDgramLastaddr(void)
  1636. X#else
  1637. XDgramLastaddr()
  1638. X#endif /* __STDC__ */
  1639. X{
  1640. X    return (inet_ntoa(sl_dgram_lastaddr.sin_addr));
  1641. X} /* Dgram_Lastaddr */
  1642. X
  1643. X
  1644. X/*
  1645. X *******************************************************************************
  1646. X *
  1647. X *    DgramLastport()
  1648. X *
  1649. X *******************************************************************************
  1650. X * Description
  1651. X *    Extracts the last host port from the global variable sl_dgram_lastaddr.
  1652. X *
  1653. X * Input Parameters
  1654. X *    None
  1655. X *
  1656. X * Output Parameters
  1657. X *    None
  1658. X *
  1659. X * Return Value
  1660. X *    The last port number on host standard format.
  1661. X *
  1662. X * Globals Referenced
  1663. X *    sl_dgram_lastaddr
  1664. X *
  1665. X * External Calls
  1666. X *    None
  1667. X *
  1668. X * Called By
  1669. X *    User applications.
  1670. X *
  1671. X * Originally coded by Arne Helme
  1672. X */
  1673. Xint
  1674. X#ifdef __STDC__
  1675. XDgramLastport(void)
  1676. X#else
  1677. XDgramLastport()
  1678. X#endif /* __STDC__ */
  1679. X{
  1680. X    return (ntohs((int)sl_dgram_lastaddr.sin_port));
  1681. X} /* Dgram_Lastaddr */
  1682. END_OF_FILE
  1683. if test 23176 -ne `wc -c <'src/lib/socklib.c'`; then
  1684.     echo shar: \"'src/lib/socklib.c'\" unpacked with wrong size!
  1685. fi
  1686. # end of 'src/lib/socklib.c'
  1687. fi
  1688. echo shar: End of archive 19 \(of 24\).
  1689. cp /dev/null ark19isdone
  1690. MISSING=""
  1691. 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 ; do
  1692.     if test ! -f ark${I}isdone ; then
  1693.     MISSING="${MISSING} ${I}"
  1694.     fi
  1695. done
  1696. if test "${MISSING}" = "" ; then
  1697.     echo You have unpacked all 24 archives.
  1698.     echo "\nNow run 'bldmaps.sh' to build the map files"
  1699.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1700. else
  1701.     echo You still need to unpack the following archives:
  1702.     echo "        " ${MISSING}
  1703. fi
  1704. ##  End of shell archive.
  1705. exit 0
  1706.