home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / x / volume13 / xdtm / part08 < prev    next >
Text File  |  1991-05-18  |  46KB  |  1,193 lines

  1. Path: uunet!olivea!apple!sun-barr!newstop!exodus!cogs.sussex.ac.uk
  2. From: eddyg@cogs.sussex.ac.uk (EdwardJ. Groenendaal)
  3. Newsgroups: comp.sources.x
  4. Subject: v13i013: xdtm - X Desktop Manager for the X Window System, Part08/11
  5. Message-ID: <13577@exodus.Eng.Sun.COM>
  6. Date: 19 May 91 00:03:46 GMT
  7. References: <csx-13i006:xdtm@uunet.UU.NET>
  8. Sender: news@exodus.Eng.Sun.COM
  9. Lines: 1181
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: Edward "J." Groenendaal <eddyg@cogs.sussex.ac.uk>
  13. Posting-number: Volume 13, Issue 13
  14. Archive-name: xdtm/part08
  15.  
  16. Submitted-by: eddyg@cste
  17. Archive-name: xdtm/part08
  18.  
  19. ---- Cut Here and feed the following to sh ----
  20. #!/bin/sh
  21. # This is part 08 of xdtm
  22. # ============= xdtm/icons/eddy/make.icon ==============
  23. if test ! -d 'xdtm'; then
  24.     echo 'x - creating directory xdtm'
  25.     mkdir 'xdtm'
  26. fi
  27. if test ! -d 'xdtm/icons'; then
  28.     echo 'x - creating directory xdtm/icons'
  29.     mkdir 'xdtm/icons'
  30. fi
  31. if test ! -d 'xdtm/icons/eddy'; then
  32.     echo 'x - creating directory xdtm/icons/eddy'
  33.     mkdir 'xdtm/icons/eddy'
  34. fi
  35. if test -f 'xdtm/icons/eddy/make.icon' -a X"$1" != X"-c"; then
  36.     echo 'x - skipping xdtm/icons/eddy/make.icon (File already exists)'
  37. else
  38. echo 'x - extracting xdtm/icons/eddy/make.icon (Text)'
  39. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/make.icon' &&
  40. X#define make_width 32
  41. X#define make_height 32
  42. Xstatic char make_bits[] = {
  43. X   0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
  44. X   0x5a, 0x00, 0x00, 0x00, 0x4a, 0x3f, 0x00, 0x00, 0x5a, 0x20, 0x00, 0x00,
  45. X   0x42, 0x20, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
  46. X   0x00, 0x20, 0xe4, 0x7f, 0x00, 0xe0, 0x2f, 0x40, 0x7e, 0x00, 0xa4, 0x5f,
  47. X   0x42, 0x00, 0xa0, 0x55, 0x5a, 0x00, 0xa4, 0x5a, 0x4a, 0xff, 0xaf, 0x55,
  48. X   0x5a, 0x00, 0xa4, 0x5a, 0x42, 0x00, 0xa0, 0x5f, 0x7e, 0x00, 0x20, 0x4f,
  49. X   0x00, 0x00, 0xa4, 0x5f, 0x00, 0xe0, 0xaf, 0x5f, 0x00, 0x20, 0x24, 0x40,
  50. X   0x00, 0x20, 0xe0, 0x7f, 0x7e, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
  51. X   0x5a, 0x20, 0x00, 0x00, 0x4a, 0x3f, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00,
  52. X   0x42, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  53. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  54. SHAR_EOF
  55. chmod 0644 xdtm/icons/eddy/make.icon ||
  56. echo 'restore of xdtm/icons/eddy/make.icon failed'
  57. Wc_c="`wc -c < 'xdtm/icons/eddy/make.icon'`"
  58. test 875 -eq "$Wc_c" ||
  59.     echo 'xdtm/icons/eddy/make.icon: original size 875, current size' "$Wc_c"
  60. fi
  61. # ============= xdtm/icons/eddy/makefile.icon ==============
  62. if test -f 'xdtm/icons/eddy/makefile.icon' -a X"$1" != X"-c"; then
  63.     echo 'x - skipping xdtm/icons/eddy/makefile.icon (File already exists)'
  64. else
  65. echo 'x - extracting xdtm/icons/eddy/makefile.icon (Text)'
  66. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/makefile.icon' &&
  67. X/* This X bitmap is designed for use with the X Desktop Manager.
  68. X * it was designed by Edward Groenendaal, April 1991.
  69. X */
  70. X#define makefile_width 32
  71. X#define makefile_height 32
  72. Xstatic char makefile_bits[] = {
  73. X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x90, 0xe3, 0x40, 0x01,
  74. X   0x90, 0xa6, 0x41, 0x02, 0x90, 0x24, 0x41, 0x04, 0x90, 0x24, 0xc1, 0x0f,
  75. X   0x90, 0x24, 0x01, 0x08, 0x90, 0xe7, 0x01, 0x08, 0x10, 0x00, 0x00, 0x08,
  76. X   0x90, 0xe3, 0x38, 0x08, 0x90, 0xa6, 0x69, 0x08, 0x90, 0x24, 0x49, 0x08,
  77. X   0x90, 0x24, 0x49, 0x08, 0x90, 0x24, 0x49, 0x08, 0x90, 0xe7, 0x79, 0x08,
  78. X   0x10, 0x00, 0x00, 0x08, 0x10, 0xc0, 0x00, 0x08, 0x10, 0xc0, 0x00, 0x08,
  79. X   0x10, 0xc0, 0x00, 0x08, 0x10, 0xc0, 0x00, 0x08, 0x10, 0xf0, 0x03, 0x08,
  80. X   0x10, 0xe0, 0x01, 0x08, 0x10, 0xc0, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
  81. X   0x10, 0xe0, 0x01, 0x08, 0x10, 0x20, 0x01, 0x08, 0x10, 0x20, 0x01, 0x08,
  82. X   0x10, 0x20, 0x01, 0x08, 0x10, 0x20, 0x01, 0x08, 0x10, 0xe0, 0x01, 0x08,
  83. X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
  84. SHAR_EOF
  85. chmod 0644 xdtm/icons/eddy/makefile.icon ||
  86. echo 'restore of xdtm/icons/eddy/makefile.icon failed'
  87. Wc_c="`wc -c < 'xdtm/icons/eddy/makefile.icon'`"
  88. test 1010 -eq "$Wc_c" ||
  89.     echo 'xdtm/icons/eddy/makefile.icon: original size 1010, current size' "$Wc_c"
  90. fi
  91. # ============= xdtm/icons/eddy/manpage.icon ==============
  92. if test -f 'xdtm/icons/eddy/manpage.icon' -a X"$1" != X"-c"; then
  93.     echo 'x - skipping xdtm/icons/eddy/manpage.icon (File already exists)'
  94. else
  95. echo 'x - extracting xdtm/icons/eddy/manpage.icon (Text)'
  96. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/manpage.icon' &&
  97. X/* This X bitmap is designed for use with the X Desktop Manager.
  98. X * it was designed by Edward Groenendaal, April 1991.
  99. X */
  100. X#define manpage_width 32
  101. X#define manpage_height 32
  102. Xstatic char manpage_bits[] = {
  103. X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x40, 0x01,
  104. X   0xd0, 0x81, 0x43, 0x02, 0x10, 0x00, 0x40, 0x04, 0x90, 0x0f, 0xc0, 0x0f,
  105. X   0x10, 0x00, 0x00, 0x08, 0x10, 0x76, 0x4f, 0x08, 0x10, 0x00, 0x00, 0x08,
  106. X   0x90, 0x07, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0xae, 0xdb, 0x09,
  107. X   0x10, 0xda, 0xd6, 0x09, 0x10, 0xbe, 0xb6, 0x08, 0x10, 0xb6, 0xb5, 0x09,
  108. X   0x10, 0xbe, 0xb6, 0x09, 0x10, 0x00, 0x00, 0x08, 0x90, 0x0f, 0x00, 0x08,
  109. X   0x10, 0x00, 0x00, 0x08, 0x10, 0x76, 0x77, 0x09, 0x10, 0xda, 0xfd, 0x09,
  110. X   0x10, 0x6e, 0xb7, 0x09, 0x10, 0x76, 0xff, 0x09, 0x10, 0xb6, 0xdb, 0x08,
  111. X   0x10, 0xee, 0xdd, 0x09, 0x10, 0xba, 0xdd, 0x09, 0x10, 0xee, 0xb6, 0x08,
  112. X   0x10, 0xf6, 0xed, 0x09, 0x10, 0xee, 0x76, 0x09, 0x10, 0x00, 0x00, 0x08,
  113. X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
  114. SHAR_EOF
  115. chmod 0644 xdtm/icons/eddy/manpage.icon ||
  116. echo 'restore of xdtm/icons/eddy/manpage.icon failed'
  117. Wc_c="`wc -c < 'xdtm/icons/eddy/manpage.icon'`"
  118. test 1007 -eq "$Wc_c" ||
  119.     echo 'xdtm/icons/eddy/manpage.icon: original size 1007, current size' "$Wc_c"
  120. fi
  121. # ============= xdtm/icons/eddy/ocode.icon ==============
  122. if test -f 'xdtm/icons/eddy/ocode.icon' -a X"$1" != X"-c"; then
  123.     echo 'x - skipping xdtm/icons/eddy/ocode.icon (File already exists)'
  124. else
  125. echo 'x - extracting xdtm/icons/eddy/ocode.icon (Text)'
  126. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/ocode.icon' &&
  127. X/* This X bitmap is designed for use with the X Desktop Manager.
  128. X * it was designed by Edward Groenendaal, April 1991.
  129. X */
  130. X#define ocode_width 32
  131. X#define ocode_height 32
  132. Xstatic char ocode_bits[] = {
  133. X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0xe0, 0x41, 0x01,
  134. X   0xd0, 0xf9, 0x47, 0x02, 0x10, 0x3c, 0x4f, 0x04, 0x50, 0x1c, 0xce, 0x0f,
  135. X   0x10, 0x1e, 0x1e, 0x08, 0xd0, 0x0e, 0xdc, 0x09, 0x10, 0x0e, 0x1c, 0x08,
  136. X   0xd0, 0x0e, 0x5c, 0x0b, 0x10, 0x0e, 0x1c, 0x08, 0xd0, 0x1e, 0xde, 0x0a,
  137. X   0x10, 0x1c, 0x0e, 0x08, 0xd0, 0x3c, 0xaf, 0x0b, 0x10, 0xf8, 0x07, 0x08,
  138. X   0xd0, 0xe3, 0xd1, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xdf, 0xbd, 0x0b,
  139. X   0x10, 0x00, 0x00, 0x08, 0xd0, 0xff, 0x6f, 0x0b, 0x10, 0x00, 0x00, 0x08,
  140. X   0xd0, 0xb7, 0x77, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xbd, 0xb7, 0x0a,
  141. X   0x10, 0x00, 0x00, 0x08, 0xd0, 0x6c, 0x77, 0x0b, 0x10, 0x00, 0x00, 0x08,
  142. X   0xd0, 0xdd, 0x6e, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xdf, 0xb6, 0x0b,
  143. X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
  144. SHAR_EOF
  145. chmod 0644 xdtm/icons/eddy/ocode.icon ||
  146. echo 'restore of xdtm/icons/eddy/ocode.icon failed'
  147. Wc_c="`wc -c < 'xdtm/icons/eddy/ocode.icon'`"
  148. test 1001 -eq "$Wc_c" ||
  149.     echo 'xdtm/icons/eddy/ocode.icon: original size 1001, current size' "$Wc_c"
  150. fi
  151. # ============= xdtm/icons/eddy/prog.icon ==============
  152. if test -f 'xdtm/icons/eddy/prog.icon' -a X"$1" != X"-c"; then
  153.     echo 'x - skipping xdtm/icons/eddy/prog.icon (File already exists)'
  154. else
  155. echo 'x - extracting xdtm/icons/eddy/prog.icon (Text)'
  156. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/prog.icon' &&
  157. X/* This X bitmap is designed for use with the X Desktop Manager.
  158. X * it was designed by Edward Groenendaal, April 1991.
  159. X */
  160. X#define prog_width 32
  161. X#define prog_height 32
  162. Xstatic char prog_bits[] = {
  163. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03,
  164. X   0x04, 0x00, 0x00, 0x06, 0xf4, 0xff, 0xff, 0x1a, 0x14, 0x20, 0x90, 0x22,
  165. X   0xd4, 0xa6, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22, 0x54, 0xad, 0x93, 0x22,
  166. X   0x14, 0x20, 0xf0, 0x22, 0xf4, 0xbf, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22,
  167. X   0x54, 0xa5, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22, 0x54, 0xa0, 0xf6, 0x22,
  168. X   0x14, 0x20, 0xf0, 0x22, 0xf4, 0xff, 0xff, 0x22, 0x14, 0x00, 0xe0, 0x22,
  169. X   0xf4, 0xff, 0xff, 0x22, 0x04, 0x00, 0x00, 0x1a, 0xfc, 0xff, 0xff, 0x7f,
  170. X   0xc0, 0x01, 0xe0, 0x71, 0x30, 0xff, 0x7f, 0x4c, 0x0c, 0x00, 0x00, 0x43,
  171. X   0xfe, 0xff, 0xff, 0x40, 0x02, 0x00, 0x80, 0x30, 0x1a, 0x00, 0x80, 0x0c,
  172. X   0x02, 0x00, 0x80, 0x03, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
  173. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  174. SHAR_EOF
  175. chmod 0644 xdtm/icons/eddy/prog.icon ||
  176. echo 'restore of xdtm/icons/eddy/prog.icon failed'
  177. Wc_c="`wc -c < 'xdtm/icons/eddy/prog.icon'`"
  178. test 998 -eq "$Wc_c" ||
  179.     echo 'xdtm/icons/eddy/prog.icon: original size 998, current size' "$Wc_c"
  180. fi
  181. # ============= xdtm/icons/eddy/slink.icon ==============
  182. if test -f 'xdtm/icons/eddy/slink.icon' -a X"$1" != X"-c"; then
  183.     echo 'x - skipping xdtm/icons/eddy/slink.icon (File already exists)'
  184. else
  185. echo 'x - extracting xdtm/icons/eddy/slink.icon (Text)'
  186. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/slink.icon' &&
  187. X/* This X bitmap is designed for use with the X Desktop Manager.
  188. X * it was designed by Edward Groenendaal, April 1991.
  189. X */
  190. X#define slink_width 32
  191. X#define slink_height 32
  192. Xstatic char slink_bits[] = {
  193. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  194. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  195. X   0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xf0, 0x0f, 0x02, 0x03, 0x10, 0x18,
  196. X   0x02, 0x05, 0x10, 0x28, 0x02, 0x0f, 0x10, 0x78, 0x02, 0x08, 0x10, 0x40,
  197. X   0x62, 0x08, 0x11, 0x40, 0x92, 0x08, 0x13, 0x40, 0x12, 0xe8, 0x17, 0x40,
  198. X   0x62, 0x08, 0x13, 0x40, 0x82, 0x08, 0x11, 0x40, 0x92, 0x08, 0x10, 0x40,
  199. X   0x62, 0x08, 0x10, 0x40, 0x02, 0x08, 0x10, 0x40, 0x02, 0x08, 0x10, 0x40,
  200. X   0x02, 0x08, 0x10, 0x40, 0xfe, 0x0f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00,
  201. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  202. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  203. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  204. SHAR_EOF
  205. chmod 0644 xdtm/icons/eddy/slink.icon ||
  206. echo 'restore of xdtm/icons/eddy/slink.icon failed'
  207. Wc_c="`wc -c < 'xdtm/icons/eddy/slink.icon'`"
  208. test 1001 -eq "$Wc_c" ||
  209.     echo 'xdtm/icons/eddy/slink.icon: original size 1001, current size' "$Wc_c"
  210. fi
  211. # ============= xdtm/icons/eddy/socket.icon ==============
  212. if test -f 'xdtm/icons/eddy/socket.icon' -a X"$1" != X"-c"; then
  213.     echo 'x - skipping xdtm/icons/eddy/socket.icon (File already exists)'
  214. else
  215. echo 'x - extracting xdtm/icons/eddy/socket.icon (Text)'
  216. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/socket.icon' &&
  217. X/* This X bitmap is designed for use with the X Desktop Manager.
  218. X * it was designed by Edward Groenendaal, April 1991.
  219. X */
  220. X#define socket_width 32
  221. X#define socket_height 32
  222. Xstatic char socket_bits[] = {
  223. X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x40, 0x01,
  224. X   0x10, 0x00, 0x40, 0x02, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0xc0, 0x0f,
  225. X   0x10, 0x00, 0x00, 0x08, 0x10, 0xe0, 0x07, 0x08, 0x10, 0x18, 0x18, 0x08,
  226. X   0x10, 0x06, 0x60, 0x08, 0x10, 0x82, 0x41, 0x08, 0x10, 0x81, 0x81, 0x08,
  227. X   0x10, 0x81, 0x81, 0x08, 0x90, 0x80, 0x01, 0x09, 0x90, 0x00, 0x00, 0x09,
  228. X   0x90, 0x00, 0x00, 0x09, 0x90, 0x00, 0x00, 0x09, 0x90, 0x38, 0x1c, 0x09,
  229. X   0x10, 0x39, 0x9c, 0x08, 0x10, 0x01, 0x80, 0x08, 0x10, 0x02, 0x40, 0x08,
  230. X   0x10, 0x06, 0x60, 0x08, 0x10, 0x18, 0x18, 0x08, 0x10, 0xe0, 0x07, 0x08,
  231. X   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
  232. X   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
  233. X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
  234. SHAR_EOF
  235. chmod 0644 xdtm/icons/eddy/socket.icon ||
  236. echo 'restore of xdtm/icons/eddy/socket.icon failed'
  237. Wc_c="`wc -c < 'xdtm/icons/eddy/socket.icon'`"
  238. test 1004 -eq "$Wc_c" ||
  239.     echo 'xdtm/icons/eddy/socket.icon: original size 1004, current size' "$Wc_c"
  240. fi
  241. # ============= xdtm/icons/eddy/text.icon ==============
  242. if test -f 'xdtm/icons/eddy/text.icon' -a X"$1" != X"-c"; then
  243.     echo 'x - skipping xdtm/icons/eddy/text.icon (File already exists)'
  244. else
  245. echo 'x - extracting xdtm/icons/eddy/text.icon (Text)'
  246. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/text.icon' &&
  247. X/* This X bitmap is designed for use with the X Desktop Manager.
  248. X * it was designed by Edward Groenendaal, April 1991.
  249. X */
  250. X#define text_width 32
  251. X#define text_height 32
  252. Xstatic char text_bits[] = {
  253. X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x40, 0x01,
  254. X   0x90, 0xb7, 0x4d, 0x02, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0xc0, 0x0f,
  255. X   0x10, 0x00, 0x00, 0x08, 0x90, 0xdd, 0x3d, 0x09, 0x10, 0x00, 0x00, 0x08,
  256. X   0x90, 0xae, 0x6d, 0x0b, 0x10, 0x00, 0x00, 0x08, 0x90, 0xdd, 0xde, 0x0b,
  257. X   0x10, 0x00, 0x00, 0x08, 0x90, 0xdd, 0xa6, 0x0b, 0x10, 0x00, 0x00, 0x08,
  258. X   0x90, 0x5b, 0xaf, 0x0a, 0x10, 0x00, 0x00, 0x08, 0x90, 0xcd, 0x00, 0x08,
  259. X   0x10, 0x00, 0x00, 0x08, 0x90, 0x5d, 0xbb, 0x0b, 0x10, 0x00, 0x00, 0x08,
  260. X   0x90, 0xdb, 0xda, 0x0a, 0x10, 0x00, 0x00, 0x08, 0x90, 0xed, 0x56, 0x0b,
  261. X   0x10, 0x00, 0x00, 0x08, 0x90, 0xed, 0xb6, 0x0b, 0x10, 0x00, 0x00, 0x08,
  262. X   0x90, 0xdb, 0xed, 0x0a, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
  263. X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
  264. SHAR_EOF
  265. chmod 0644 xdtm/icons/eddy/text.icon ||
  266. echo 'restore of xdtm/icons/eddy/text.icon failed'
  267. Wc_c="`wc -c < 'xdtm/icons/eddy/text.icon'`"
  268. test 998 -eq "$Wc_c" ||
  269.     echo 'xdtm/icons/eddy/text.icon: original size 998, current size' "$Wc_c"
  270. fi
  271. # ============= xdtm/icons/eddy/tty.icon ==============
  272. if test -f 'xdtm/icons/eddy/tty.icon' -a X"$1" != X"-c"; then
  273.     echo 'x - skipping xdtm/icons/eddy/tty.icon (File already exists)'
  274. else
  275. echo 'x - extracting xdtm/icons/eddy/tty.icon (Text)'
  276. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/tty.icon' &&
  277. X/* This X bitmap is designed for use with the X Desktop Manager.
  278. X * it was designed by Edward Groenendaal, April 1991.
  279. X */
  280. X#define tty_width 32
  281. X#define tty_height 32
  282. Xstatic char tty_bits[] = {
  283. X   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x40, 0x00, 0x00, 0x01,
  284. X   0x40, 0xff, 0x7f, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0xdd, 0x4c, 0x01,
  285. X   0x40, 0x01, 0x40, 0x01, 0x40, 0x79, 0x4f, 0x01, 0x40, 0x01, 0x40, 0x01,
  286. X   0x40, 0x1d, 0x5b, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0xad, 0x43, 0x01,
  287. X   0x40, 0x01, 0x40, 0x01, 0x40, 0xd5, 0x4c, 0x01, 0x40, 0x01, 0x40, 0x01,
  288. X   0x40, 0xff, 0x7f, 0x01, 0x40, 0x00, 0x00, 0x01, 0xc0, 0xff, 0xff, 0x01,
  289. X   0x00, 0x10, 0x04, 0x00, 0x00, 0x0f, 0x78, 0x00, 0x00, 0xff, 0x7f, 0x00,
  290. X   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
  291. X   0x00, 0xf0, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
  292. X   0x00, 0xc0, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x00,
  293. X   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  294. SHAR_EOF
  295. chmod 0644 xdtm/icons/eddy/tty.icon ||
  296. echo 'restore of xdtm/icons/eddy/tty.icon failed'
  297. Wc_c="`wc -c < 'xdtm/icons/eddy/tty.icon'`"
  298. test 995 -eq "$Wc_c" ||
  299.     echo 'xdtm/icons/eddy/tty.icon: original size 995, current size' "$Wc_c"
  300. fi
  301. # ============= xdtm/icons/eddy/x.icon ==============
  302. if test -f 'xdtm/icons/eddy/x.icon' -a X"$1" != X"-c"; then
  303.     echo 'x - skipping xdtm/icons/eddy/x.icon (File already exists)'
  304. else
  305. echo 'x - extracting xdtm/icons/eddy/x.icon (Text)'
  306. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/x.icon' &&
  307. X/* This X bitmap is designed for use with the X Desktop Manager.
  308. X * it was designed by Edward Groenendaal, April 1991.
  309. X */
  310. X#define x_width 32
  311. X#define x_height 32
  312. Xstatic char x_bits[] = {
  313. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  314. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  315. X   0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x02, 0x08,
  316. X   0xfe, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x40, 0x02, 0x1e, 0x60, 0x40,
  317. X   0x02, 0x1e, 0x60, 0x40, 0x02, 0x3c, 0x30, 0x40, 0x02, 0x78, 0x18, 0x40,
  318. X   0x02, 0x78, 0x18, 0x40, 0x02, 0xf0, 0x0c, 0x40, 0x02, 0xe0, 0x07, 0x40,
  319. X   0x02, 0xe0, 0x07, 0x40, 0x02, 0xc0, 0x03, 0x40, 0x02, 0xc0, 0x07, 0x40,
  320. X   0x02, 0xe0, 0x07, 0x40, 0x02, 0x60, 0x0f, 0x40, 0x02, 0x30, 0x1e, 0x40,
  321. X   0x02, 0x18, 0x1e, 0x40, 0x02, 0x18, 0x3c, 0x40, 0x02, 0x0c, 0x78, 0x40,
  322. X   0x02, 0x06, 0x78, 0x40, 0x02, 0x06, 0xf0, 0x40, 0x02, 0x00, 0x00, 0x40,
  323. X   0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
  324. SHAR_EOF
  325. chmod 0644 xdtm/icons/eddy/x.icon ||
  326. echo 'restore of xdtm/icons/eddy/x.icon failed'
  327. Wc_c="`wc -c < 'xdtm/icons/eddy/x.icon'`"
  328. test 989 -eq "$Wc_c" ||
  329.     echo 'xdtm/icons/eddy/x.icon: original size 989, current size' "$Wc_c"
  330. fi
  331. # ============= xdtm/icons/eddy/xdtm.icon ==============
  332. if test -f 'xdtm/icons/eddy/xdtm.icon' -a X"$1" != X"-c"; then
  333.     echo 'x - skipping xdtm/icons/eddy/xdtm.icon (File already exists)'
  334. else
  335. echo 'x - extracting xdtm/icons/eddy/xdtm.icon (Text)'
  336. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/xdtm.icon' &&
  337. X/* This X bitmap is designed for use with the X Desktop Manager.
  338. X * it was designed by Edward Groenendaal, April 1991.
  339. X */
  340. X#define xdtm_width 32
  341. X#define xdtm_height 32
  342. Xstatic char xdtm_bits[] = {
  343. X   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x4a, 0x06, 0x00, 0x58,
  344. X   0xfe, 0xff, 0xff, 0x7f, 0x02, 0x08, 0x10, 0x40, 0x02, 0x88, 0xff, 0x43,
  345. X   0x02, 0x88, 0x10, 0x42, 0xfe, 0xcf, 0x39, 0x47, 0x02, 0x48, 0x29, 0x45,
  346. X   0xe2, 0xc8, 0x39, 0x47, 0xa2, 0x88, 0x00, 0x42, 0xa2, 0xf8, 0x07, 0x42,
  347. X   0xe2, 0x88, 0x04, 0x42, 0x02, 0xf8, 0xff, 0x7f, 0xfa, 0x0b, 0x00, 0x40,
  348. X   0x02, 0xe8, 0x9c, 0x43, 0xe2, 0xa8, 0x94, 0x42, 0xa2, 0xa8, 0x94, 0x42,
  349. X   0xa2, 0xe8, 0x9c, 0x43, 0xe2, 0x08, 0x00, 0x40, 0x02, 0xe8, 0xb6, 0x43,
  350. X   0x7a, 0x0b, 0x00, 0x40, 0x02, 0xe8, 0x9c, 0x43, 0x02, 0xa8, 0x94, 0x42,
  351. X   0x02, 0xa8, 0x94, 0x42, 0x02, 0xe8, 0x9c, 0x43, 0xfe, 0x0f, 0x00, 0x40,
  352. X   0x92, 0xec, 0x9c, 0x43, 0x92, 0x0c, 0x00, 0x40, 0x92, 0x0c, 0x00, 0x40,
  353. X   0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
  354. SHAR_EOF
  355. chmod 0644 xdtm/icons/eddy/xdtm.icon ||
  356. echo 'restore of xdtm/icons/eddy/xdtm.icon failed'
  357. Wc_c="`wc -c < 'xdtm/icons/eddy/xdtm.icon'`"
  358. test 998 -eq "$Wc_c" ||
  359.     echo 'xdtm/icons/eddy/xdtm.icon: original size 998, current size' "$Wc_c"
  360. fi
  361. # ============= xdtm/icons/eddy/ycode.icon ==============
  362. if test -f 'xdtm/icons/eddy/ycode.icon' -a X"$1" != X"-c"; then
  363.     echo 'x - skipping xdtm/icons/eddy/ycode.icon (File already exists)'
  364. else
  365. echo 'x - extracting xdtm/icons/eddy/ycode.icon (Text)'
  366. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/ycode.icon' &&
  367. X/* This X bitmap is designed for use with the X Desktop Manager.
  368. X * it was designed by Edward Groenendaal, April 1991.
  369. X */
  370. X#define ycode_width 32
  371. X#define ycode_height 32
  372. Xstatic char ycode_bits[] = {
  373. X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x90, 0x8f, 0x4f, 0x01,
  374. X   0x10, 0x07, 0x47, 0x02, 0x10, 0x8e, 0x43, 0x04, 0x10, 0x8e, 0xc3, 0x0f,
  375. X   0x10, 0xdc, 0x01, 0x08, 0x10, 0xdc, 0x01, 0x08, 0x10, 0xf8, 0x00, 0x08,
  376. X   0x10, 0xf8, 0x00, 0x08, 0x10, 0x70, 0x00, 0x08, 0x10, 0x70, 0x00, 0x08,
  377. X   0x10, 0x70, 0x00, 0x08, 0x10, 0x70, 0x00, 0x08, 0x10, 0xf8, 0x00, 0x08,
  378. X   0xd0, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0x05, 0x00, 0x08,
  379. X   0x10, 0x00, 0x00, 0x08, 0x90, 0xdf, 0x0a, 0x08, 0x10, 0x00, 0x00, 0x08,
  380. X   0x10, 0xb7, 0x03, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0xbd, 0xb7, 0x08,
  381. X   0x10, 0x00, 0x00, 0x08, 0x10, 0x6c, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
  382. X   0x90, 0xdd, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x08,
  383. X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
  384. SHAR_EOF
  385. chmod 0644 xdtm/icons/eddy/ycode.icon ||
  386. echo 'restore of xdtm/icons/eddy/ycode.icon failed'
  387. Wc_c="`wc -c < 'xdtm/icons/eddy/ycode.icon'`"
  388. test 1001 -eq "$Wc_c" ||
  389.     echo 'xdtm/icons/eddy/ycode.icon: original size 1001, current size' "$Wc_c"
  390. fi
  391. # ============= xdtm/icons/eddy/z.icon ==============
  392. if test -f 'xdtm/icons/eddy/z.icon' -a X"$1" != X"-c"; then
  393.     echo 'x - skipping xdtm/icons/eddy/z.icon (File already exists)'
  394. else
  395. echo 'x - extracting xdtm/icons/eddy/z.icon (Text)'
  396. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/z.icon' &&
  397. X/* This X bitmap is designed for use with the X Desktop Manager.
  398. X * it was designed by Edward Groenendaal, April 1991.
  399. X */
  400. X#define z_width 32
  401. X#define z_height 32
  402. X#define z_x_hot 16
  403. X#define z_y_hot 13
  404. Xstatic char z_bits[] = {
  405. X   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00,
  406. X   0x00, 0xf8, 0xff, 0x00, 0x00, 0x3c, 0xf8, 0x01, 0x00, 0x1c, 0xc0, 0x03,
  407. X   0x00, 0x1c, 0x80, 0x03, 0xc0, 0xff, 0x03, 0x07, 0x20, 0x00, 0x01, 0x07,
  408. X   0x50, 0xd5, 0x00, 0x07, 0x20, 0x00, 0x01, 0x0e, 0x40, 0x55, 0x03, 0x0e,
  409. X   0x20, 0x00, 0x01, 0x0e, 0x50, 0xd5, 0x00, 0x0e, 0x20, 0x00, 0x01, 0x0e,
  410. X   0x40, 0x00, 0x02, 0x0e, 0xc0, 0xff, 0x03, 0x0e, 0x00, 0x7e, 0x00, 0x07,
  411. X   0x00, 0x18, 0x00, 0x07, 0x00, 0x18, 0x00, 0x07, 0x00, 0x18, 0x80, 0x03,
  412. X   0x00, 0x3c, 0xc0, 0x03, 0x00, 0x7c, 0xf0, 0x01, 0x00, 0xfc, 0xff, 0x00,
  413. X   0x00, 0xf8, 0x7f, 0x00, 0x00, 0xd8, 0x1f, 0x00, 0x00, 0x18, 0x00, 0x00,
  414. X   0x80, 0xdb, 0x01, 0x00, 0xc0, 0xff, 0x03, 0x00, 0xc0, 0xff, 0x03, 0x00,
  415. X   0x80, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00};
  416. SHAR_EOF
  417. chmod 0644 xdtm/icons/eddy/z.icon ||
  418. echo 'restore of xdtm/icons/eddy/z.icon failed'
  419. Wc_c="`wc -c < 'xdtm/icons/eddy/z.icon'`"
  420. test 1027 -eq "$Wc_c" ||
  421.     echo 'xdtm/icons/eddy/z.icon: original size 1027, current size' "$Wc_c"
  422. fi
  423. # ============= xdtm/lexical.l ==============
  424. if test -f 'xdtm/lexical.l' -a X"$1" != X"-c"; then
  425.     echo 'x - skipping xdtm/lexical.l (File already exists)'
  426. else
  427. echo 'x - extracting xdtm/lexical.l (Text)'
  428. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/lexical.l' &&
  429. X%{ /*-*- Mode: C -*-*/
  430. X/**************************************************************************
  431. X ** File     :       lexical.l                                           **
  432. X ** Author   :       Edward Groenendaal                                  **
  433. X **************************************************************************/
  434. X
  435. X#include "xdtm.h"
  436. X
  437. X/* I shall use the macro RETURN whenever returning a token. If DEBUG_LEX has
  438. X * been defined then the token will be printed out, otherwise it will
  439. X * be returned.
  440. X */
  441. X
  442. X#ifdef DEBUG_LEX
  443. X
  444. X/* define the RETURN macro to print the token to be returned */
  445. X# define RETURN(token)    fprintf(stdout,"Token: " #token "\tReturned.\n")
  446. X
  447. X  /* define the tokens to be returned. ONLY in DEBUG mode, when in normal
  448. X   * operation the tokens are defined by yacc.
  449. X   */
  450. X  enum tokens { IF_T,
  451. X            SET_T,
  452. X            ICON_T,
  453. X            NAME_T,
  454. X            PATH_T,
  455. X            ASSIGN_T,
  456. X            EQUAL_T,
  457. X        NEQUAL_T,
  458. X            STRING_T,
  459. X            SEMIC_T,
  460. X            O_PAR_T,
  461. X            C_PAR_T,
  462. X            O_BRACE_T,
  463. X            C_BRACE_T,
  464. X        DEFICON_T,
  465. X        CHECKPATH_T,
  466. X        TRUE_T,
  467. X        FALSE_T,
  468. X        TYPE_T,
  469. X                DIR_T,
  470. X        FILE_T,
  471. X        READ_T,
  472. X        WRITE_T,
  473. X        EXE_T,
  474. X        BLOCK_T,
  475. X        CHARACTER_T,
  476. X        SLINK_T,
  477. X        SOCKET_T,
  478. X        FIFO_T,
  479. X        PROG_T,
  480. X        OPTIONS_T,
  481. X        COMMA_T,
  482. X        MSEL_T,
  483. X        OSEL_T,
  484. X        NSEL_T,
  485. X        DEFINE_T,
  486. X        IGNORE_T,
  487. X        ERRORTOKEN
  488. X          };
  489. X
  490. X#else           /* No DEBUG */
  491. X
  492. X#include "parser.h"         /* get the tokens from yacc */
  493. X
  494. X/* define the RETURN token to set the return value to the token to be
  495. X * returned, then return that token.
  496. X */
  497. X# define RETURN(token)    yylval.number=token;return(token)
  498. X#endif
  499. X
  500. X#include <sys/types.h>
  501. X#include <stdio.h>
  502. X#include <stdarg.h>
  503. X
  504. X#define MAXERR      20      /* Maximum number of errors before the parser */
  505. X                            /* quits. */
  506. X
  507. Xvoid yyerror(char*, ...);
  508. X
  509. Xtypedef struct {                    /* structure for keyword table */
  510. X    String name;
  511. X    int token;
  512. X} keyword;
  513. X
  514. Xstatic keyword keywordtable[] = {   /* table of keywords, in alphabetical order */
  515. X  {"False",   FALSE_T},
  516. X  {"MSEL",    MSEL_T},
  517. X  {"NSEL",    NSEL_T},
  518. X  {"OSEL",    OSEL_T},
  519. X  {"True",    TRUE_T},
  520. X  {"block",   BLOCK_T},
  521. X  {"character", CHARACTER_T},
  522. X  {"checkpath", CHECKPATH_T},
  523. X  {"deficon", DEFICON_T},
  524. X  {"define",  DEFINE_T},
  525. X  {"dir",     DIR_T},
  526. X  {"exe",     EXE_T},
  527. X  {"false",   FALSE_T},
  528. X  {"fifo",    FIFO_T},
  529. X  {"file",    FILE_T},
  530. X  {"icon",    ICON_T},
  531. X  {"if",      IF_T},
  532. X  {"ignore",  IGNORE_T},
  533. X  {"name",    NAME_T},
  534. X  {"options", OPTIONS_T},
  535. X  {"path",    PATH_T},
  536. X  {"prog",    PROG_T},
  537. X  {"read",    READ_T},
  538. X  {"set",     SET_T},
  539. X  {"slink",   SLINK_T},
  540. X  {"socket",  SOCKET_T},
  541. X  {"true",    TRUE_T},
  542. X  {"type",    TYPE_T},
  543. X  {"write",   WRITE_T}
  544. X};
  545. X/* number of entries in the keyword table */
  546. Xstatic int numkeywords = (sizeof(keywordtable)/sizeof(keywordtable[0]));
  547. X
  548. Xint parseerror=0;                   /* Number of parse errors */
  549. X
  550. X%}
  551. X%%
  552. X[\t ]*"#".*     { /* Remove Comments from beginning of line */ }
  553. X"="             { RETURN(ASSIGN_T);     }
  554. X"=="            { RETURN(EQUAL_T);      }
  555. X"{"             { RETURN(O_BRACE_T);    }
  556. X"}"             { RETURN(C_BRACE_T);    }
  557. X"("             { RETURN(O_PAR_T);      }
  558. X")"             { RETURN(C_PAR_T);      }
  559. X";"             { RETURN(SEMIC_T);      }
  560. X","             { RETURN(COMMA_T);      }
  561. X[A-Za-z]+       { int token = parse_keyword(yytext);
  562. X#ifndef DEBUG_LEX
  563. X          yylval.number = token;
  564. X                  return(token);
  565. X#endif
  566. X        }
  567. X[\n\t ]         { /* Ignore White space */ }
  568. X\"[^\"]*\"      {
  569. X#ifdef DEBUG_LEX
  570. X                  fprintf(stdout, "Token STRING_T %s returned", yytext);
  571. X#else
  572. X          yylval.string = yytext;
  573. X                  return(STRING_T);
  574. X#endif
  575. X                }
  576. X.               { yyerror("illegal character \'%c\'.", yytext[0]);
  577. X                }
  578. X%%
  579. X
  580. X
  581. X/*****************************************************************************
  582. X *                                yywrap                                     *
  583. X *****************************************************************************/
  584. Xint yywrap(void)
  585. X{
  586. X    /* function called when EOF encounterd.
  587. X     *
  588. X     * - Takes nothing
  589. X     * + returns EOF token, not actually used other than to indicate an error
  590. X     *   to the parser. Useful in DEBUG mode to see that EOF has been detected.
  591. X     */
  592. X
  593. X    RETURN(EOFTOKEN);
  594. X}
  595. X
  596. X
  597. X/*****************************************************************************
  598. X *                            parse_keyword                                  *
  599. X *****************************************************************************/
  600. Xint parse_keyword(String str)
  601. X{
  602. X    /* Function to determine whether a string is a reserved keyword or an
  603. X     * identifier. A table of keywords is searched via a binary search to check
  604. X     * to see if the string is a keyword,if it is found the associated
  605. X     * token is returned, otherwise an error is printed and ERRORTOKEN
  606. X     * is returned.
  607. X     * The effect of debugging is to prevent the assignment
  608. X     * to the yacc structure, and to print out the keyword if found.
  609. X     *
  610. X     * - Takes a string to check
  611. X     * + Returns a token (int)
  612. X     */
  613. X
  614. X    register int lower = 0, upper = numkeywords-1;
  615. X
  616. X    while (lower <= upper) {
  617. X        int middle = (lower + upper) /2;
  618. X        keyword *p = &keywordtable[middle];
  619. X        int res = strcmp(p->name, str);
  620. X
  621. X        if (res < 0) {
  622. X            lower = middle +1;
  623. X        } else if (res == 0) {
  624. X#ifdef DEBUG_LEX
  625. X            fprintf(stdout, "Token: %s\tReturned.\n", p->name);
  626. X#endif
  627. X            return(p->token);
  628. X        } else {
  629. X            upper = middle -1;
  630. X        }
  631. X    }
  632. X    yyerror("unknown keyword \'%s\'.", yytext);
  633. X    RETURN(ERRORTOKEN);
  634. X}
  635. X
  636. X/****************************************************************************
  637. X *                                     yyerror                              *
  638. X ****************************************************************************/
  639. Xvoid yyerror(char *fmt, ...)
  640. X{
  641. X    /* Error printing procedure. This procedure takes a variable argument list
  642. X     * in the same format as printf(3s), and outputs it on the stderr stream
  643. X     * prepended by the line-number currently being processed.
  644. X     * parserrror is incremented to indicate that an error has occurred, if
  645. X     * more than MAXERR errors occur the parser exits.
  646. X     *
  647. X     * - Takes a formatted string + parameters to print.
  648. X     * + Returns noting.
  649. X     */
  650. X
  651. X    va_list args;
  652. X    extern int yylineno;
  653. X
  654. X    if (!parseerror) {
  655. X    }
  656. X    if (parseerror < MAXERR) {
  657. X        va_start(args, fmt);
  658. X        fprintf(stderr, "(E) line :%2d: ", yylineno);
  659. X        vfprintf(stderr, fmt, args);
  660. X        fprintf(stderr, "\n");
  661. X        va_end(args);
  662. X        parseerror++;
  663. X    } else {
  664. X        fprintf(stderr, "Fatal error: over %d errors, exiting\n", MAXERR);
  665. X        exit(2);
  666. X    }
  667. X}
  668. SHAR_EOF
  669. chmod 0644 xdtm/lexical.l ||
  670. echo 'restore of xdtm/lexical.l failed'
  671. Wc_c="`wc -c < 'xdtm/lexical.l'`"
  672. test 6783 -eq "$Wc_c" ||
  673.     echo 'xdtm/lexical.l: original size 6783, current size' "$Wc_c"
  674. fi
  675. # ============= xdtm/listoption.c ==============
  676. if test -f 'xdtm/listoption.c' -a X"$1" != X"-c"; then
  677.     echo 'x - skipping xdtm/listoption.c (File already exists)'
  678. else
  679. echo 'x - extracting xdtm/listoption.c (Text)'
  680. sed 's/^X//' << 'SHAR_EOF' > 'xdtm/listoption.c' &&
  681. X/****************************************************************************
  682. X ** File          : listoption.c                                           **
  683. X ** Purpose       : Initialise and Realise long listing dialog options     **
  684. X ** Author        : Edward Groenendaal                                     **
  685. X ** Date          : April 1991                                             **
  686. X ** Documentation : Xdtm Design Folder                                     **
  687. X ** Related Files :                                                        **
  688. X ****************************************************************************/
  689. X
  690. X#include "xdtm.h"
  691. X#include "menus.h"
  692. X#include <X11/Shell.h>
  693. X#include <X11/Xaw/Label.h>
  694. X#include <X11/Xaw/Command.h>
  695. X#include "Xedw/XedwForm.h"
  696. X
  697. X/* Note ListOption *same* order as listoptions */
  698. X
  699. Xtypedef enum {perms, nlinks, owner, group, size, modtm, acctm} ListOption;
  700. X
  701. Xstatic String listoptions[] = {
  702. X  "rwxrwxrwx ",
  703. X  "1 ",
  704. X  "owner ",
  705. X  "group ",
  706. X  "size ",
  707. X  "modtm ",
  708. X  "acctm "
  709. X};
  710. X
  711. X/* Widgets */
  712. X
  713. Xprivate Widget listoptionpopup;      
  714. Xprivate Widget listoptionform1;
  715. Xprivate Widget listoptionform2;
  716. Xprivate Widget listoptionform3;
  717. Xprivate Widget listoptionlabel;
  718. Xprivate Widget listoptionsettings;
  719. Xprivate Widget listoptionpermsButton;
  720. Xprivate Widget listoptionpermsLabel;
  721. Xprivate Widget listoptionlinksButton;
  722. Xprivate Widget listoptionlinksLabel;
  723. Xprivate Widget listoptionownerButton;
  724. Xprivate Widget listoptionownerLabel;
  725. Xprivate Widget listoptiongroupButton;
  726. Xprivate Widget listoptiongroupLabel;
  727. Xprivate Widget listoptionsizeButton;
  728. Xprivate Widget listoptionsizeLabel;
  729. Xprivate Widget listoptionacctmButton;
  730. Xprivate Widget listoptionacctmLabel;
  731. Xprivate Widget listoptionmodtmButton;
  732. Xprivate Widget listoptionmodtmLabel;
  733. Xprivate Widget listoptionquitButton;
  734. X
  735. X#define ToggleButton(b, w)  \
  736. X{ \
  737. X  Arg arglist[1]; \
  738. X  XtSetArg(arglist[0], XtNbitmap, \
  739. X       (current_mode.options & b) ? tick : emptytick); \
  740. X  XtSetValues(w, arglist, 1); \
  741. X}
  742. X         
  743. X/*****************************************************************************
  744. X *                          init_listoption_dialog                           *
  745. X *****************************************************************************/
  746. Xpublic void init_listoption(Widget top)
  747. X{
  748. X  /* Initialise the long listing option dialog */
  749. X
  750. X  private void destroy_listoption_dialog(Widget, caddr_t, caddr_t);
  751. X  private void optionbutton_toggled(Widget, ListOption, caddr_t);
  752. X  Arg arglist[7];
  753. X  Cardinal i;
  754. X  XFontStruct *font;
  755. X  String settings;
  756. X  int width;
  757. X
  758. X  static String Label = "Long Listing Options";
  759. X
  760. X  /* constuct settings label */
  761. X  settings = (String) XtMalloc (sizeof(char) * 55);
  762. X
  763. X  sprintf(settings, "%s%s%s%s%s%s%sfilename", 
  764. X      listoptions[perms], 
  765. X      listoptions[nlinks],
  766. X      listoptions[owner],
  767. X      listoptions[group],
  768. X      listoptions[size],
  769. X      listoptions[modtm],
  770. X      listoptions[acctm]);
  771. X
  772. X  listoptionpopup = XtCreatePopupShell("listoptionpopup",
  773. X                       transientShellWidgetClass,
  774. X                       top,
  775. X                       NULL, 0);
  776. X  
  777. X  listoptionform1 = XtCreateManagedWidget("listoptionform1",
  778. X                      xedwFormWidgetClass,
  779. X                      listoptionpopup,
  780. X                      NULL, 0);
  781. X
  782. X  i = 0;
  783. X  XtSetArg(arglist[i], XtNfullWidth,          True); i++;
  784. X  XtSetArg(arglist[i], XtNjustify, XtJustifyCenter); i++;
  785. X  XtSetArg(arglist[i], XtNlabel,             Label); i++;
  786. X  XtSetArg(arglist[i], XtNborderWidth,           0); i++;
  787. X  listoptionlabel = XtCreateManagedWidget("listoptionlabel",
  788. X                      labelWidgetClass,
  789. X                      listoptionform1,
  790. X                      arglist, i);
  791. X
  792. X  i = 1;
  793. X  XtSetArg(arglist[i], XtNfromVert, listoptionlabel); i++;
  794. X  XtSetArg(arglist[i], XtNjustify,    XtJustifyLeft); i++;
  795. X  listoptionsettings = XtCreateManagedWidget("listoptionsettings",
  796. X                         labelWidgetClass,
  797. X                         listoptionform1,
  798. X                         arglist, i);
  799. X
  800. X  /* Get font from widget, then use XTextWidth to find width of string,
  801. X   * then set the width of the label to this width + 20.
  802. X   */
  803. X
  804. X  XtSetArg(arglist[0], XtNfont, &font);
  805. X  XtGetValues(listoptionsettings, arglist, 1);
  806. X
  807. X  width = XTextWidth(font, settings, strlen(settings));
  808. X
  809. X  XtSetArg(arglist[0], XtNwidth, width + 20);
  810. X  XtSetValues(listoptionlabel, arglist, 1);
  811. X
  812. X  XtFree(settings);
  813. X
  814. X  i = 0;
  815. X  XtSetArg(arglist[i], XtNborderWidth,               0); i++;
  816. X  XtSetArg(arglist[i], XtNfromVert, listoptionsettings); i++;
  817. X  listoptionform2 = XtCreateManagedWidget("listoptionform2",
  818. X                      xedwFormWidgetClass,
  819. X                      listoptionform1,
  820. X                      arglist, i);
  821. X
  822. X  i = 0;
  823. X  XtSetArg(arglist[i], XtNborderWidth,               0); i++;
  824. X  XtSetArg(arglist[i], XtNfromVert, listoptionsettings); i++;
  825. X  XtSetArg(arglist[i], XtNfromHoriz,   listoptionform2); i++; 
  826. X  listoptionform3 = XtCreateManagedWidget("listoptionform3",
  827. X                      xedwFormWidgetClass,
  828. X                      listoptionform1,
  829. X                      arglist, i);
  830. X
  831. X  /* First bank of buttons */
  832. X
  833. X  /* Permissions */
  834. X  i = 0;
  835. X  listoptionpermsButton = XtCreateManagedWidget("listoptionpermsButton",
  836. X                        commandWidgetClass,
  837. X                        listoptionform2,
  838. X                        arglist, i);
  839. X
  840. X  i = 0;
  841. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  842. X  XtSetArg(arglist[i], XtNfromHoriz,  listoptionpermsButton); i++;
  843. X  XtSetArg(arglist[i], XtNlabel,              "Permissions"); i++;
  844. X  listoptionpermsLabel  = XtCreateManagedWidget("listoptionpermsLabel",
  845. X                        labelWidgetClass,
  846. X                        listoptionform2,
  847. X                        arglist, i);
  848. X
  849. X  XtAddCallback(listoptionpermsButton, XtNcallback, optionbutton_toggled, perms);
  850. X
  851. X  /* Nlinks */
  852. X
  853. X  i = 0;
  854. X  XtSetArg(arglist[i], XtNfromVert,    listoptionpermsButton); i++;
  855. X  listoptionlinksButton = XtCreateManagedWidget("listoptionlinksButton",
  856. X                        commandWidgetClass,
  857. X                        listoptionform2,
  858. X                        arglist, i);
  859. X  
  860. X  i = 1;
  861. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  862. X  XtSetArg(arglist[i], XtNfromHoriz, listoptionlinksButton); i++;
  863. X  XtSetArg(arglist[i], XtNlabel,         "Number of links"); i++;
  864. X  listoptionlinksLabel  = XtCreateManagedWidget("listoptionlinksLabel",
  865. X                        labelWidgetClass,
  866. X                        listoptionform2,
  867. X                        arglist, i);
  868. X
  869. X  XtAddCallback(listoptionlinksButton, XtNcallback, optionbutton_toggled, nlinks);
  870. X
  871. X  /* Owner */
  872. X
  873. X  i = 0;
  874. X  XtSetArg(arglist[i], XtNfromVert, listoptionlinksButton); i++; 
  875. X  listoptionownerButton = XtCreateManagedWidget("listoptionownerButton",
  876. X                        commandWidgetClass,
  877. X                        listoptionform2,
  878. X                        arglist, i);
  879. X
  880. X  i = 1;
  881. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  882. X  XtSetArg(arglist[i], XtNfromHoriz, listoptionownerButton); i++;
  883. X  XtSetArg(arglist[i], XtNlabel,           "Owner of file"); i++;
  884. X  listoptionownerLabel  = XtCreateManagedWidget("listoptionownerLabel",
  885. X                        labelWidgetClass,
  886. X                        listoptionform2,
  887. X                        arglist, i);
  888. X
  889. X  XtAddCallback(listoptionownerButton, XtNcallback, optionbutton_toggled, owner);
  890. X
  891. X  /* Second bank of buttons */
  892. X
  893. X  /* Group */
  894. X
  895. X  i = 0;
  896. X  listoptiongroupButton = XtCreateManagedWidget("listoptiongroupButton",
  897. X                        commandWidgetClass,
  898. X                        listoptionform3,
  899. X                        arglist, i);
  900. X
  901. X  i = 0;
  902. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  903. X  XtSetArg(arglist[i], XtNfromHoriz, listoptiongroupButton); i++;
  904. X  XtSetArg(arglist[i], XtNlabel,           "Group of file"); i++;
  905. X  listoptiongroupLabel = XtCreateManagedWidget("listoptiongroupLabel",
  906. X                           labelWidgetClass,
  907. X                           listoptionform3,
  908. X                           arglist, i);
  909. X
  910. X  XtAddCallback(listoptiongroupButton, XtNcallback, optionbutton_toggled, group);
  911. X
  912. X  /* Size */
  913. X
  914. X  i = 0;
  915. X  XtSetArg(arglist[i], XtNfromVert, listoptiongroupButton); i++;
  916. X  listoptionsizeButton = XtCreateManagedWidget("listoptionsizeButton",
  917. X                           commandWidgetClass,
  918. X                           listoptionform3,
  919. X                           arglist, i);
  920. X
  921. X  i = 1;
  922. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  923. X  XtSetArg(arglist[i], XtNfromHoriz, listoptionsizeButton); i++;
  924. X  XtSetArg(arglist[i], XtNlabel,           "Size of file"); i++;
  925. X  listoptionsizeLabel = XtCreateManagedWidget("listoptionsizeLabel",
  926. X                         labelWidgetClass,
  927. X                         listoptionform3,
  928. X                         arglist, i);
  929. X
  930. X  XtAddCallback(listoptionsizeButton, XtNcallback, optionbutton_toggled, size);
  931. X
  932. X  /* Modification Time */
  933. X
  934. X  i = 0;
  935. X  XtSetArg(arglist[i], XtNfromVert, listoptionsizeButton); i++;
  936. X  listoptionmodtmButton = XtCreateManagedWidget("listoptionmodtmButton",
  937. X                        commandWidgetClass,
  938. X                        listoptionform3,
  939. X                        arglist, i);
  940. X
  941. X  i = 1;
  942. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  943. X  XtSetArg(arglist[i], XtNfromHoriz, listoptionmodtmButton); i++;
  944. X  XtSetArg(arglist[i], XtNlabel,       "Modification time"); i++;
  945. X  listoptionmodtmLabel = XtCreateManagedWidget("listoptionmodtmLabel",
  946. X                          labelWidgetClass,
  947. X                          listoptionform3,
  948. X                          arglist, i);
  949. X
  950. X  XtAddCallback(listoptionmodtmButton, XtNcallback, optionbutton_toggled, modtm);
  951. X
  952. X  /* Access Time */  
  953. X
  954. X
  955. X  i = 0;
  956. X  XtSetArg(arglist[i], XtNfromVert, listoptionmodtmButton); i++;
  957. X  listoptionacctmButton = XtCreateManagedWidget("listoptionacctmButton",
  958. X                        commandWidgetClass,
  959. X                        listoptionform3,
  960. X                        arglist, i);
  961. X
  962. X  i = 1;
  963. X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
  964. X  XtSetArg(arglist[i], XtNfromHoriz, listoptionacctmButton); i++;
  965. X  XtSetArg(arglist[i], XtNlabel,             "Access time"); i++;
  966. X  listoptionacctmLabel = XtCreateManagedWidget("listoptionacctmLabel",
  967. X                           labelWidgetClass,
  968. X                           listoptionform3,
  969. X                           arglist, i);
  970. X  
  971. X  XtAddCallback(listoptionacctmButton, XtNcallback, optionbutton_toggled, acctm);
  972. X
  973. X  i = 0;
  974. X  XtSetArg(arglist[i], XtNfromVert, listoptionform2); i++;
  975. X  XtSetArg(arglist[i], XtNlabel,               "OK"); i++;
  976. X  listoptionquitButton = XtCreateManagedWidget("listoptionquitButton",
  977. X                           commandWidgetClass,
  978. X                           listoptionform1,
  979. X                           arglist, i);
  980. X
  981. X  XtAddCallback(listoptionquitButton, XtNcallback, destroy_listoption_dialog, 0);
  982. X}
  983. X
  984. X/*****************************************************************************
  985. X *                            listoption_dialog                              *
  986. X *****************************************************************************/
  987. Xpublic void listoption_dialog(void)
  988. X{
  989. X  /* popup the listoption dialog. */
  990. X
  991. X  private String makeoptionstring(void);
  992. X  String settings;
  993. X  Arg arglist[1];
  994. X
  995. X  /* set up initial button settings */
  996. X  ToggleButton(PERMS,  listoptionpermsButton);
  997. X  ToggleButton(NLINKS, listoptionlinksButton);
  998. X  ToggleButton(OWNER,  listoptionownerButton);
  999. X  ToggleButton(GROUP,  listoptiongroupButton);
  1000. X  ToggleButton(SIZE,   listoptionsizeButton);
  1001. X  ToggleButton(MODTM,  listoptionmodtmButton);
  1002. X  ToggleButton(ACCTM,  listoptionacctmButton);
  1003. X
  1004. X  settings = makeoptionstring();
  1005. X
  1006. X  XtSetArg(arglist[0], XtNlabel, settings);
  1007. X  XtSetValues(listoptionsettings, arglist, 1);
  1008. X  
  1009. X  XtFree(settings);
  1010. X
  1011. X  realize_dialog(listoptionpopup); /* Put the dialog on screen */
  1012. X}
  1013. X
  1014. X/*****************************************************************************
  1015. X *                            destroy_listoption_dialog                      *
  1016. X *****************************************************************************/
  1017. Xprivate void destroy_listoption_dialog(Widget w, caddr_t client_data,
  1018. X                       caddr_t call_data)
  1019. X{
  1020. X  /* Popdown the listoption dialog, if we are in long listing mode then 
  1021. X   * refresh the directory so we can see the changes.
  1022. X   */
  1023. X
  1024. X  extern directoryManagerNewDirectory(String);
  1025. X  extern String cwd;
  1026. X
  1027. X  XtPopdown(listoptionpopup);
  1028. X  if (current_mode.mode == Long)
  1029. X    directoryManagerNewDirectory(cwd);
  1030. X}
  1031. X
  1032. X/*****************************************************************************
  1033. X *                         optionbutton_toggled                              *
  1034. X *****************************************************************************/
  1035. Xprivate void optionbutton_toggled(Widget w, ListOption button, caddr_t call_data)
  1036. X{
  1037. X  /* One the option buttons has been pressed, the button id is contained within
  1038. X   * 'button'. Toggle the current mode options with that option.
  1039. X   */
  1040. X
  1041. X  private String makeoptionstring(void);
  1042. X  Arg arglist[1];
  1043. X  String settings;
  1044. X
  1045. X  switch (button) {
  1046. X  case perms:
  1047. X    if (current_mode.options & PERMS) {
  1048. X      current_mode.options &= ~PERMS;
  1049. X    } else {
  1050. X      current_mode.options |= PERMS;
  1051. X    }
  1052. X    ToggleButton(PERMS, listoptionpermsButton);
  1053. X    break;
  1054. X  case nlinks:
  1055. X    if (current_mode.options & NLINKS) {
  1056. X      current_mode.options &= ~NLINKS;
  1057. X    } else {
  1058. X      current_mode.options |= NLINKS;
  1059. X    }
  1060. X    ToggleButton(NLINKS, listoptionlinksButton);
  1061. X    break;
  1062. X  case owner:
  1063. X    if (current_mode.options & OWNER) {
  1064. X      current_mode.options &= ~OWNER;
  1065. X    } else {
  1066. X      current_mode.options |= OWNER;
  1067. X    }
  1068. X    ToggleButton(OWNER, listoptionownerButton);
  1069. X    break;
  1070. X  case group:
  1071. X    if (current_mode.options & GROUP) {
  1072. X      current_mode.options &= ~GROUP;
  1073. X    } else {
  1074. X      current_mode.options |= GROUP;
  1075. X    }
  1076. X    ToggleButton(GROUP, listoptiongroupButton);
  1077. X    break;
  1078. X  case size:
  1079. X    if (current_mode.options & SIZE) {
  1080. X      current_mode.options &= ~SIZE;
  1081. X    } else {
  1082. X      current_mode.options |= SIZE;
  1083. X    }
  1084. X    ToggleButton(SIZE, listoptionsizeButton);
  1085. X    break;
  1086. X  case modtm:
  1087. X    if (current_mode.options & MODTM) {
  1088. X      current_mode.options &= ~MODTM;
  1089. X    } else {
  1090. X      current_mode.options |= MODTM;
  1091. X    }
  1092. X    ToggleButton(MODTM, listoptionmodtmButton);
  1093. X    break;
  1094. X  case acctm:
  1095. X    if (current_mode.options & ACCTM) {
  1096. X      current_mode.options &= ~ACCTM;
  1097. X    } else {
  1098. X      current_mode.options |= ACCTM;
  1099. X    }
  1100. X    ToggleButton(ACCTM, listoptionacctmButton);
  1101. X    break;
  1102. X  default:
  1103. X    fprintf(stderr, "Error: Listoptions programmer error, option out"
  1104. X        " of range\n");
  1105. X    break;
  1106. X  }
  1107. X
  1108. X  /* Put current options in settings string */
  1109. X
  1110. X  settings = makeoptionstring();
  1111. X
  1112. X  /* Put new settings string in the settings label */
  1113. X
  1114. X  XtSetArg(arglist[0], XtNlabel, settings);
  1115. X  XtSetValues(listoptionsettings, arglist, 1);
  1116. X
  1117. X  XtFree(settings);
  1118. X}
  1119. X
  1120. X/*****************************************************************************
  1121. X *                                                                           *
  1122. X *****************************************************************************/
  1123. Xprivate String makeoptionstring(void)
  1124. X{
  1125. X  /* construct a string representing the current options,
  1126. X   * the user is responsible for free'ing it.
  1127. X   */
  1128. X  String permstring, nlinkstring, ownerstring, groupstring, sizestring;
  1129. X  String modtmstring, acctmstring, settings;
  1130. X
  1131. X  static String empty = "";
  1132. X  settings = (String) XtMalloc (sizeof(char) * 55);
  1133. X
  1134. X  if (current_mode.options & PERMS)
  1135. X    permstring = listoptions[perms];
  1136. X  else
  1137. X    permstring = empty;
  1138. X  if (current_mode.options & NLINKS)
  1139. X    nlinkstring = listoptions[nlinks];
  1140. X  else
  1141. X    nlinkstring = empty;
  1142. X  if (current_mode.options & OWNER)
  1143. X    ownerstring = listoptions[owner];
  1144. X  else
  1145. X    ownerstring = empty;
  1146. X  if (current_mode.options & GROUP)
  1147. X    groupstring = listoptions[group];
  1148. X  else
  1149. X    groupstring = empty;
  1150. X  if (current_mode.options & SIZE)
  1151. X    sizestring = listoptions[size];
  1152. X  else
  1153. X    sizestring = empty;
  1154. X  if (current_mode.options & MODTM)
  1155. X    modtmstring = listoptions[modtm];
  1156. X  else
  1157. X    modtmstring = empty;
  1158. X  if (current_mode.options & ACCTM)
  1159. X    acctmstring = listoptions[acctm];
  1160. X  else
  1161. X    acctmstring = empty;
  1162. X
  1163. X  /* Make display string for label of current settings*/
  1164. X
  1165. X  sprintf(settings, "%s%s%s%s%s%s%sfilename", 
  1166. X      permstring, 
  1167. X      nlinkstring,
  1168. X      ownerstring,
  1169. X      groupstring,
  1170. X      sizestring,
  1171. X      modtmstring,
  1172. X      acctmstring);
  1173. X
  1174. X  return(settings);
  1175. X}
  1176. SHAR_EOF
  1177. chmod 0644 xdtm/listoption.c ||
  1178. echo 'restore of xdtm/listoption.c failed'
  1179. Wc_c="`wc -c < 'xdtm/listoption.c'`"
  1180. test 15389 -eq "$Wc_c" ||
  1181.     echo 'xdtm/listoption.c: original size 15389, current size' "$Wc_c"
  1182. fi
  1183. true || echo 'restore of xdtm/main.c failed'
  1184. echo End of part 8, continue with part 9
  1185. exit 0
  1186.  
  1187. --
  1188. Dan Heller
  1189. O'Reilly && Associates       Z-Code Software    Comp-sources-x:
  1190. Senior Writer                President          comp-sources-x@uunet.uu.net
  1191. argv@ora.com                 argv@zipcode.com
  1192.