home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / bibview / part09 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  50.2 KB

  1. Path: uunet!dtix!darwin.sura.net!mips!msi!dcmartin
  2. From: liebla@informatik.tu-muenchen.de (Armin Liebl)
  3. Newsgroups: comp.sources.x
  4. Subject: v18i107: bibview - BibTeX GUI, Part09/20
  5. Message-ID: <1992Aug27.161536.25585@msi.com>
  6. Date: 27 Aug 92 16:15:36 GMT
  7. References: <csx-18i099-bibview@uunet.UU.NET>
  8. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  9. Organization: Molecular Simulations, Inc.
  10. Lines: 1253
  11. Approved: dcmartin@msi.com
  12. Originator: dcmartin@fascet
  13.  
  14. Submitted-by: Armin Liebl <liebla@informatik.tu-muenchen.de>
  15. Posting-number: Volume 18, Issue 107
  16. Archive-name: bibview/part09
  17.  
  18. #!/bin/sh
  19. # this is part.09 (part 9 of a multipart archive)
  20. # do not concatenate these parts, unpack them in order with /bin/sh
  21. # file bitmaps/proggerm.xbm continued
  22. #
  23. if test ! -r _shar_seq_.tmp; then
  24.     echo 'Please unpack part 1 first!'
  25.     exit 1
  26. fi
  27. (read Scheck
  28.  if test "$Scheck" != 9; then
  29.     echo Please unpack part "$Scheck" next!
  30.     exit 1
  31.  else
  32.     exit 0
  33.  fi
  34. ) < _shar_seq_.tmp || exit 1
  35. if test ! -f _shar_wnt_.tmp; then
  36.     echo 'x - still skipping bitmaps/proggerm.xbm'
  37. else
  38. echo 'x - continuing file bitmaps/proggerm.xbm'
  39. sed 's/^X//' << 'SHAR_EOF' >> 'bitmaps/proggerm.xbm' &&
  40. X   0x69, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  41. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00,
  42. X   0x9f, 0x49, 0x02, 0x04, 0x19, 0x40, 0x00, 0x47, 0x4a, 0x92, 0x94, 0x44,
  43. X   0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  44. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00,
  45. X   0x81, 0x48, 0x02, 0x04, 0x09, 0x40, 0x00, 0x4c, 0x48, 0x92, 0x90, 0xc4,
  46. X   0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  47. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00,
  48. X   0x81, 0x48, 0x02, 0x84, 0x08, 0x40, 0x40, 0x48, 0x48, 0x92, 0x90, 0x44,
  49. X   0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  50. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x00,
  51. X   0x81, 0x48, 0x02, 0xc4, 0x08, 0x50, 0xc0, 0x4c, 0x4a, 0x92, 0x94, 0xc4,
  52. X   0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  53. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x84,
  54. X   0xc3, 0x31, 0x12, 0x7e, 0x9c, 0x30, 0x42, 0x87, 0xdd, 0x3f, 0xbb, 0x99,
  55. X   0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  56. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  57. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  58. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  59. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  60. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  61. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  62. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  63. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  64. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  65. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  66. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  67. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  68. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  69. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  70. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  71. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  72. X   0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 0x0e, 0x02, 0x86, 0x01, 0x00, 0x00,
  73. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  74. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  75. X   0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x00,
  76. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  77. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  78. X   0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x00,
  79. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  80. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  81. X   0x00, 0x00, 0x14, 0xdd, 0x66, 0x0d, 0x04, 0x63, 0x1c, 0x01, 0x00, 0x00,
  82. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  83. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  84. X   0x00, 0x00, 0x22, 0x26, 0x49, 0x12, 0x04, 0x92, 0x24, 0x01, 0x00, 0x00,
  85. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  86. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  87. X   0x00, 0x00, 0x3e, 0x22, 0x49, 0x12, 0x04, 0xf2, 0x24, 0x01, 0x00, 0x00,
  88. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  89. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  90. X   0x00, 0x00, 0x22, 0x22, 0x49, 0x12, 0x04, 0x12, 0x24, 0x01, 0x00, 0x00,
  91. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  92. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  93. X   0x00, 0x00, 0x41, 0x22, 0x49, 0x12, 0x44, 0x32, 0x25, 0x01, 0x00, 0x00,
  94. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  95. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  96. X   0x00, 0x80, 0xe3, 0x77, 0xfb, 0x37, 0x7e, 0xe7, 0x9c, 0x03, 0x00, 0x00,
  97. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  98. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  99. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  100. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  101. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  102. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  103. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  104. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  105. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  106. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  107. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  108. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  109. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  110. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  111. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  112. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  113. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  114. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  115. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  116. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  117. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  118. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  119. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  120. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  121. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  122. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  123. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  124. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  125. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  126. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  127. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  128. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  129. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  130. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  131. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  132. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  133. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  134. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  135. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  136. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  137. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  138. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  139. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  140. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  141. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  142. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  143. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  144. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  145. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  146. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  147. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  148. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  149. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  150. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  151. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  152. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  153. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  154. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  155. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  156. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  157. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  158. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  159. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  160. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  161. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  162. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  163. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  164. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  165. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  166. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  167. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  168. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  169. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  170. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  171. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  172. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  173. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  174. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  175. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  176. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  177. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  178. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  179. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  180. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  181. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  182. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  183. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  184. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  185. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  186. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  187. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  188. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  189. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  190. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  191. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  192. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  196. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  197. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  198. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  199. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  200. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00, 0x00,
  204. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  205. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  206. X   0x00, 0x00, 0x00, 0x80, 0xc3, 0x01, 0x20, 0x00, 0x00, 0x00, 0x0e, 0x38,
  207. X   0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x1f, 0x00, 0x00, 0x00, 0xe0,
  208. X   0x80, 0x03, 0x70, 0x38, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  209. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x30, 0x00, 0x00, 0x00, 0x0c, 0x18,
  210. X   0x00, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x01, 0x00, 0xc0,
  211. X   0x80, 0x01, 0x20, 0x10, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  212. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x20, 0x00, 0x00, 0x00, 0x14, 0x14,
  213. X   0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x01, 0x00, 0x40,
  214. X   0x41, 0x01, 0x20, 0x10, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  215. X   0x00, 0x00, 0x00, 0x00, 0x81, 0xe0, 0x20, 0x6c, 0x1c, 0x0d, 0x14, 0x14,
  216. X   0x1c, 0xed, 0x11, 0x1d, 0x00, 0x00, 0x00, 0x41, 0x9c, 0xc7, 0xd1, 0x40,
  217. X   0x41, 0x01, 0x20, 0x10, 0x9a, 0x0e, 0x47, 0x07, 0x00, 0x00, 0x00, 0x00,
  218. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x10, 0x21, 0x32, 0xa2, 0x0b, 0x24, 0x12,
  219. X   0xa2, 0x4b, 0x98, 0x33, 0x00, 0x00, 0x00, 0x21, 0x22, 0x21, 0xba, 0x40,
  220. X   0x22, 0x01, 0x20, 0x10, 0x97, 0x89, 0xe8, 0x0c, 0x00, 0x00, 0x00, 0x00,
  221. X   0x00, 0x00, 0x00, 0x00, 0xff, 0x08, 0x22, 0x21, 0x21, 0x01, 0x24, 0x12,
  222. X   0x22, 0x41, 0x10, 0x21, 0x00, 0x00, 0x00, 0x1f, 0x21, 0x11, 0x12, 0x40,
  223. X   0x22, 0x01, 0x20, 0x10, 0x82, 0x90, 0x48, 0x08, 0x00, 0x00, 0x00, 0x00,
  224. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x08, 0x22, 0x21, 0x3f, 0x01, 0x24, 0x12,
  225. X   0x38, 0x41, 0x10, 0x21, 0x00, 0x00, 0x00, 0x01, 0x3f, 0xf1, 0x13, 0x40,
  226. X   0x22, 0x01, 0x20, 0x10, 0x82, 0x10, 0x4e, 0x08, 0x00, 0x00, 0x00, 0x00,
  227. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x08, 0x22, 0x12, 0x01, 0x01, 0x44, 0x11,
  228. X   0x26, 0x41, 0x10, 0x21, 0x00, 0x00, 0x00, 0x01, 0x01, 0x11, 0x10, 0x40,
  229. X   0x14, 0x01, 0x20, 0x10, 0x82, 0x90, 0x49, 0x08, 0x00, 0x00, 0x00, 0x00,
  230. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x08, 0x22, 0x0e, 0x01, 0x01, 0x44, 0x11,
  231. X   0x22, 0x41, 0x10, 0x21, 0x00, 0x00, 0x00, 0x01, 0x01, 0x11, 0x10, 0x40,
  232. X   0x14, 0x01, 0x20, 0x10, 0x82, 0x90, 0x48, 0x08, 0x00, 0x00, 0x00, 0x00,
  233. X   0x00, 0x00, 0x00, 0x00, 0x81, 0x10, 0x21, 0x01, 0x22, 0x01, 0x84, 0x10,
  234. X   0xb2, 0x41, 0x11, 0x21, 0x00, 0x00, 0x00, 0x01, 0x22, 0x25, 0x12, 0x40,
  235. X   0x08, 0x21, 0x40, 0x08, 0x82, 0x89, 0x6c, 0x08, 0x00, 0x00, 0x00, 0x00,
  236. X   0x00, 0x00, 0x00, 0x80, 0xc3, 0xe1, 0x70, 0x3e, 0x9c, 0x03, 0x8e, 0x38,
  237. X   0xec, 0x83, 0xb8, 0x73, 0x00, 0x00, 0x80, 0x03, 0x1c, 0xc2, 0x39, 0xe0,
  238. X   0x88, 0x23, 0x80, 0x07, 0x07, 0x07, 0xfb, 0x1c, 0x00, 0x00, 0x00, 0x00,
  239. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00,
  240. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  241. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  242. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00,
  243. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  244. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  245. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x00,
  246. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  247. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  248. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00,
  249. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  250. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  251. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  252. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  253. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  254. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  255. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  256. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  257. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  258. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  259. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  260. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  261. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  262. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  263. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  264. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  265. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  266. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  267. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  268. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  269. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  270. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  271. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  272. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  273. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  274. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  275. SHAR_EOF
  276. echo 'File bitmaps/proggerm.xbm is complete' &&
  277. chmod 0640 bitmaps/proggerm.xbm ||
  278. echo 'restore of bitmaps/proggerm.xbm failed'
  279. Wc_c="`wc -c < 'bitmaps/proggerm.xbm'`"
  280. test 61288 -eq "$Wc_c" ||
  281.     echo 'bitmaps/proggerm.xbm: original size 61288, current size' "$Wc_c"
  282. rm -f _shar_wnt_.tmp
  283. fi
  284. # ============= ctl_card.c ==============
  285. if test -f 'ctl_card.c' -a X"$1" != X"-c"; then
  286.     echo 'x - skipping ctl_card.c (File already exists)'
  287.     rm -f _shar_wnt_.tmp
  288. else
  289. > _shar_wnt_.tmp
  290. echo 'x - extracting ctl_card.c (Text)'
  291. sed 's/^X//' << 'SHAR_EOF' > 'ctl_card.c' &&
  292. /*********************************************************************/
  293. /*  bibView: Administration of bibTex-Databases                      */
  294. /*           (Verwaltung von bibTeX-Literaturdatenbanken)            */
  295. /*                                                                   */
  296. /*  Module:  ctl_card.c                                              */
  297. /*                                                                   */
  298. /*             Card Window Commands Control                          */
  299. /*             - New      Open empty card window                     */
  300. /*             - Change   Register changes done in card window       */
  301. /*             - Copy     Copy card to other bibTeX file             */
  302. /*                                                                   */
  303. /*  Author:  Holger Martin,  martinh@informatik.tu-muenchen.de       */
  304. /*           Peter M. Urban, urban@informatik.tu-muenchen.de         */
  305. /*                                                                   */
  306. /*  History:                                                         */
  307. /*    01.25.92  PMU  created                                         */
  308. /*    05.26.92       Version 1.0 released                            */
  309. /*                                                                   */
  310. /*  Copyright 1992 TU MUENCHEN                                       */
  311. /*    See ./Copyright for complete rights and liability information. */
  312. /*                                                                   */
  313. /*********************************************************************/
  314. X
  315. #include <stdio.h>
  316. #include <X11/Intrinsic.h>
  317. #include <X11/StringDefs.h>
  318. #include <X11/Xaw/Paned.h>
  319. #include <X11/Xaw/Form.h>
  320. #include <X11/Xaw/Box.h>
  321. #include <X11/Xaw/Command.h>
  322. #include <X11/Xaw/Dialog.h>
  323. #include <X11/Xaw/MenuButton.h>
  324. #include <X11/Xaw/SimpleMenu.h>
  325. #include <X11/Xaw/SmeBSB.h>
  326. #include <X11/Xaw/SmeLine.h>
  327. #include <X11/Xaw/Text.h>
  328. #include <X11/Xaw/AsciiText.h>
  329. #include "bibview.h"
  330. X
  331. X
  332. /* imported global variables */
  333. /* ------------------------- */
  334. extern Widget topLevel, mainMenu, desktop;
  335. extern Pixmap questPixmap, annoteIconPixmap;
  336. X
  337. X
  338. /* macros and definitions */
  339. /* ---------------------- */
  340. X
  341. X
  342. /* local function prototypes */
  343. /* ------------------------- */
  344. static void confirmCloseCard (CardPtr cp);
  345. static void cancelQuitCmd (Widget w, XtPointer clientData, XtPointer callData);
  346. static void cardQuitOkCmd (Widget w, XtPointer clientData, XtPointer callData);
  347. static Errcode annoteSave (CardPtr cp); 
  348. static Errcode annoteClose (CardPtr cp); 
  349. static void annoteSaveCmd (Widget w, XtPointer clientData, XtPointer callData);
  350. static void annoteCloseCmd (Widget w, XtPointer clientData, XtPointer callData);
  351. X
  352. X
  353. /* exported variables */
  354. /* ------------------ */
  355. X
  356. X
  357. /* local global variables */
  358. /* ---------------------- */
  359. CardPtr gcp;
  360. X
  361. X
  362. /*********************************************************************/
  363. /* ccdNewCardCmd:                                                    */
  364. /*    Callback function for command "New" in bib window              */
  365. /*********************************************************************/
  366. void 
  367. ccdNewCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  368. {
  369. BibPtr bp = (BibPtr)clientData;
  370. Errcode status;
  371. CardType type;
  372. CardDataPtr cd;
  373. CardPtr cp;
  374. X
  375. X   sscanf(XtName(w), "item%d", &type);
  376. X   type -= 1;
  377. X
  378. X   /* create new internal data for a card window */
  379. X   if ((status = dbtMakeCard(&cd)) != DBT_OK) {
  380. X      guwError(status);
  381. X      return;
  382. X   }
  383. X   cd->cardtype = type;
  384. X   if ((cd->cardtypestr = glbNewString(glbTypeToName(type))) == NULL) {
  385. X      guwError(ERR_NOMALLOC);
  386. X      dbtDeleteCard(&cd);
  387. X      return;
  388. X   }
  389. X   if ((status = glbNewCardListEl(bp, &cp, cd)) != OK) {
  390. X      guwError(status);
  391. X      dbtDeleteCard(&cd);
  392. X      return;
  393. X   }
  394. X
  395. X   /* open the window */
  396. X   if ((status = gucOpenCardWin(bp, cp, TRUE)) != OK)
  397. X      guwError(status);
  398. }
  399. X
  400. X
  401. /*********************************************************************/
  402. /* ccdSaveCardCmd:                                                   */
  403. /*    Callback function for command "Save" in card window            */
  404. /*********************************************************************/
  405. void 
  406. ccdSaveCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  407. {
  408. CardPtr cp = (CardPtr)clientData;
  409. BibPtr bp = (BibPtr)cp->bp;
  410. Errcode status;
  411. X
  412. X   if (cp->cd->annoteDisplayed == TRUE)
  413. X      annoteClose(cp);
  414. X
  415. X   /* save data from text widgets to card */
  416. X   if ((status = gucSaveCardData(cp)) != OK) {
  417. X      guwError(status);
  418. X      gulCloseListWin(bp);
  419. X      return;
  420. X   }
  421. X
  422. X   /* Check if data in card is OK */
  423. X   if ((status = dbtTestCard(cp->cd)) != DBT_OK) {
  424. X      if (cotRequiredFields()) {
  425. X         guwWarning(status);
  426. X         return;
  427. X      }
  428. X      guwWarning(ERR_REQFIELDS);
  429. X   }
  430. X
  431. X   /* insert new card in data tree, possibly new mainkey */
  432. X   if ((status = dbtInsert(bp->treeIdx, cp->cd)) != DBT_OK) {
  433. X      guwError(status);
  434. X      gulCloseListWin(bp);
  435. X      return;
  436. X   }
  437. X   cp->changed = FALSE;
  438. X   bp->changed = TRUE;
  439. X
  440. X   /* Change callback to change */
  441. X   XtRemoveAllCallbacks(cp->cw->change, XtNcallback);
  442. X   XtAddCallback(cp->cw->change, XtNcallback, ccdChangeCardCmd, (XtPointer)cp);
  443. }
  444. X
  445. X
  446. /*********************************************************************/
  447. /* ccdUserdataCmd:                                                   */
  448. /*    Callback function for command "Userdata" in card window        */
  449. /*********************************************************************/
  450. void 
  451. ccdUserdataCmd (Widget w, XtPointer clientData, XtPointer callData)
  452. {
  453. CardPtr cp = (CardPtr)clientData;
  454. Errcode status;
  455. X
  456. X   if (cp->extended)
  457. X      status = gucCloseUserFields(cp);
  458. X   else
  459. X      status = gucOpenUserFields(cp);
  460. X
  461. X   if (status != OK)
  462. X      guwError(status);
  463. }
  464. X
  465. /*********************************************************************/
  466. /* annoteSave:                                                       */
  467. /*    Save "annote"                               */
  468. /*********************************************************************/
  469. static Errcode 
  470. annoteSave (CardPtr cp)
  471. {
  472. String str;
  473. CardWidgetsPtr cwp = &cp->cw->ct.cw;
  474. X   
  475. X   free(cp->cd->annote);
  476. X   XtVaGetValues(cwp->annote, XtNstring, &str, NULL);
  477. X   if ((cp->cd->annote = glbNewString(str)) == NULL)
  478. X      return(ERR_NOMALLOC);
  479. X   cp->cd->annoteChanged = TRUE;
  480. X   return(OK);
  481. }
  482. X
  483. /*********************************************************************/
  484. /* annoteSaveCmd:                                                    */
  485. /*    Callback function for command "Save" in annote window          */
  486. /*********************************************************************/
  487. static void 
  488. annoteSaveCmd (Widget w, XtPointer clientData, XtPointer callData)
  489. {
  490. Errcode status;
  491. CardPtr cp = (CardPtr)clientData;
  492. X   if ((status=annoteSave(cp))!=OK)
  493. X      guwError(status);
  494. X   return;
  495. }
  496. X
  497. /*********************************************************************/
  498. /* annoteClose:                                                      */
  499. /*    Close  annote window                                           */
  500. /*********************************************************************/
  501. static Errcode 
  502. annoteClose(CardPtr cp)
  503. {
  504. CardWidgetsPtr cwp = &cp->cw->ct.cw;
  505. String str;
  506. X   
  507. X   cp->cd->annoteDisplayed = FALSE;
  508. X   XtPopdown(cwp->annoteShell);
  509. X   return(OK);
  510. }
  511. X
  512. /*********************************************************************/
  513. /* annoteCloseCmd:                                                   */
  514. /*    Callback function for command "Close" in annote window         */
  515. /*********************************************************************/
  516. static void 
  517. annoteCloseCmd (Widget w, XtPointer clientData, XtPointer callData)
  518. {
  519. CardPtr cp = (CardPtr)clientData;
  520. X
  521. X   annoteClose(cp);
  522. }
  523. X
  524. /*********************************************************************/
  525. /* ccdAnnoteCardCmd:                                                 */
  526. /*    Callback function for command "Annote" in card window          */
  527. /*********************************************************************/
  528. void 
  529. ccdAnnoteCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  530. {
  531. CardPtr cp = (CardPtr)clientData;
  532. BibPtr bp = (BibPtr)cp->bp;
  533. CardWidgetsPtr cwp = &cp->cw->ct.cw;
  534. Widget annoteWin, cmdBox, save, close;
  535. Errcode status;
  536. String hlpstring;
  537. X   
  538. X   if (cp->cd->mainkey==NULL)
  539. X       hlpstring = (String) calloc(15,sizeof(char));
  540. X   else
  541. X       hlpstring = (String) calloc(strlen(cp->cd->mainkey)+10,
  542. X        sizeof(char));
  543. X   if (hlpstring == NULL)
  544. X      {guwError(ERR_NOMALLOC);
  545. X       return;
  546. X       }
  547. X   if (cp->cd->mainkey==NULL)
  548. X      sprintf(hlpstring, "Annote: NEW");
  549. X   else
  550. X      sprintf(hlpstring, "Annote: %s", cp->cd->mainkey);
  551. X   if (cp->cd->annoteDisplayed == TRUE)
  552. X      {if (XtIsRealized(cwp->annoteShell))
  553. X      XRaiseWindow(XtDisplay(cwp->annoteShell),
  554. X                    XtWindow(cwp->annoteShell));
  555. X       return;
  556. X       }
  557. X   cwp->annoteShell = XtVaCreatePopupShell("AnnoteShell",
  558. X           topLevelShellWidgetClass, topLevel,
  559. X           XtNtitle, hlpstring,
  560. X           XtNiconName, cp->cd->mainkey,
  561. X           XtNiconPixmap, annoteIconPixmap, NULL);
  562. X   free(hlpstring);
  563. X   if (cp->cd->annote != NULL)
  564. X      {hlpstring = (String)calloc(strlen(cp->cd->annote)+1, sizeof(char));
  565. X       strcpy(hlpstring, cp->cd->annote);
  566. X       }
  567. X   else 
  568. X      hlpstring = NULL;
  569. X   annoteWin = XtVaCreateManagedWidget("annoteWin",
  570. X            panedWidgetClass, cwp->annoteShell, NULL);
  571. X   cmdBox    = XtVaCreateManagedWidget("commandBox",
  572. X                    boxWidgetClass, annoteWin, NULL);
  573. X   save      = XtVaCreateManagedWidget("save",
  574. X                    commandWidgetClass, cmdBox, NULL);
  575. X   close     = XtVaCreateManagedWidget("close",
  576. X                    commandWidgetClass, cmdBox, NULL);
  577. X   cwp->annote = XtVaCreateManagedWidget("AnnoteText",
  578. X            asciiTextWidgetClass, annoteWin,
  579. X            XtNtype, XawAsciiString,
  580. X            XtNeditType, XawtextEdit, 
  581. X            XtNstring, hlpstring,
  582. X            XtNscrollHorizontal, XawtextScrollWhenNeeded,
  583. X            XtNscrollVertical, XawtextScrollWhenNeeded, NULL);
  584. X   cp->cd->annoteDisplayed = TRUE;
  585. X   free(hlpstring);
  586. X   XtAddCallback(close, XtNcallback, annoteCloseCmd, (XtPointer)cp);
  587. X   XtAddCallback(save, XtNcallback, annoteSaveCmd, (XtPointer)cp);
  588. X   XtPopup(cwp->annoteShell, XtGrabNone);
  589. X   return;
  590. }
  591. X
  592. X
  593. /*********************************************************************/
  594. /* ccdDeleteCardCmd:                                                 */
  595. /*    Callback function for command "Delete" in card window          */
  596. /*********************************************************************/
  597. void 
  598. ccdDeleteCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  599. {
  600. CardPtr cp = (CardPtr)clientData;
  601. BibPtr bp = (BibPtr)cp->bp;
  602. CardDataList cl, clp;
  603. Errcode status;
  604. X
  605. X   /* remove card from list of cards for list window */
  606. X   if (gulListWinExists(bp)) {
  607. X      cl = clp = bp->lw->cardLst;
  608. X      if (strcmp(cp->cd->mainkey, clp->data->mainkey) == 0) {
  609. X     bp->lw->cardLst = clp->next;
  610. X     cl = clp->next;
  611. X     dbtDeleteCard(&clp->data); 
  612. X      }
  613. X      else {
  614. X     while (clp->next != NULL) {
  615. X        if (strcmp(cp->cd->mainkey, clp->next->data->mainkey) == 0) {
  616. X               dbtDeleteCard(&clp->next->data); 
  617. X           clp->next = clp->next->next;
  618. X           break;
  619. X        }
  620. X        clp = clp->next;
  621. X     } /* endwhile */
  622. X      }
  623. X
  624. X      /* Update list window */
  625. X      if (cl != NULL) {
  626. X     bp->lw->cardLst = NULL;
  627. X     if ((status = gulReplaceListData(bp, cl)) != OK) {
  628. X        guwError(status);
  629. X        gulCloseListWin(bp);
  630. X     }
  631. X      }
  632. X      else {
  633. X     if ((status = gulCloseListWin(bp)) != OK)
  634. X        guwError(status);
  635. X      }
  636. X   }
  637. X
  638. X   /* remove window */
  639. X   if ((status = gucCloseCardWin(cp)) != OK) 
  640. X      guwError(status);
  641. X   
  642. X   /* delete card from data tree */
  643. X   if ((status = dbtDelete(bp->treeIdx, cp->cd)) != DBT_OK) {
  644. X      guwError(status);
  645. X      return;
  646. X   }
  647. X   bp->changed = TRUE;
  648. X   
  649. X
  650. }
  651. X
  652. X
  653. /*********************************************************************/
  654. /* ccdChangeCardCmd:                                                 */
  655. /*    Callback function for command "Change" in card window          */
  656. /*********************************************************************/
  657. void 
  658. ccdChangeCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  659. {
  660. CardPtr cp = (CardPtr)clientData;
  661. BibPtr bp = (BibPtr)cp->bp;
  662. CardDataList cl, clp;
  663. Errcode status;
  664. X
  665. X   /* delete old card from data tree */
  666. X   if ((status = dbtDelete(bp->treeIdx, cp->cd)) != DBT_OK) {
  667. X      guwError(status);
  668. X      return;
  669. X   }
  670. X
  671. X   if (cp->cd->annoteDisplayed == TRUE)
  672. X      annoteClose(cp);
  673. X
  674. X   /* remove old card from list of cards for list window, keep node */
  675. X   if (gulListWinExists(bp)) {
  676. X      cl = clp = bp->lw->cardLst;
  677. X      if (strcmp(cp->cd->mainkey, clp->data->mainkey) == 0) {
  678. X     dbtDeleteCard(&clp->data);
  679. X      }
  680. X      else {
  681. X     while (clp->next != NULL) {
  682. X        if (strcmp(cp->cd->mainkey, clp->next->data->mainkey) == 0) {
  683. X               dbtDeleteCard(&clp->next->data);
  684. X           clp = clp->next;
  685. X           break;
  686. X        }
  687. X        clp = clp->next;
  688. X     } /* endwhile */
  689. X      } /* endelse */
  690. X   } /* endif */
  691. X
  692. X   /* save data from text widgets to card */
  693. X   if ((status = gucSaveCardData(cp)) != OK) {
  694. X      guwError(status);
  695. X      gulCloseListWin(bp);
  696. X      return;
  697. X   }
  698. X
  699. X   /* insert new card in data tree, possibly new mainkey */
  700. X   if ((status = dbtInsert(bp->treeIdx, cp->cd)) != DBT_OK) {
  701. X      guwError(status);
  702. X      gulCloseListWin(bp);
  703. X      return;
  704. X   }
  705. X   cp->changed = FALSE;
  706. X   bp->changed = TRUE;
  707. X
  708. X   /* update node in list window with new card */
  709. X   if (gulListWinExists(bp)) {
  710. X      if ((status = CopyCard(&clp->data, cp->cd)) != DBT_OK) /* HOLGER */
  711. X     guwError(status);
  712. X      /* replace "new" list with not existent old */
  713. X      bp->lw->cardLst = NULL;
  714. X      if ((status = gulReplaceListData(bp, cl)) != OK) {
  715. X     guwError(status);
  716. X     gulCloseListWin(bp);
  717. X      }
  718. X   } /* endif */
  719. X
  720. X   /* Check if data in card is OK */
  721. X   if ((status = dbtTestCard(cp->cd)) != DBT_OK) {
  722. X      if (cotRequiredFields()) {
  723. X         guwWarning(status);
  724. X         return;
  725. X      }
  726. X      guwWarning(ERR_REQFIELDS);
  727. X   }
  728. X
  729. X
  730. }
  731. X
  732. X
  733. /*********************************************************************/
  734. /* ccdCopyCardCmd:                                                   */
  735. /*    Callback function for command "Copy" in card window            */
  736. /*********************************************************************/
  737. void 
  738. ccdCopyCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  739. {
  740. CardPtr cp = (CardPtr)clientData;
  741. BibPtr bp = (BibPtr)cp->bp;
  742. Errcode status;
  743. X
  744. X   gcp = cp;
  745. X   if ((status = guwSelectBib("copyHead", ccdCopyCard1)) != OK)
  746. X      guwError(status);
  747. }
  748. X
  749. X
  750. /*********************************************************************/
  751. /* ccdCopyCard1:                                                     */
  752. /*    intermediate function for copy card                            */
  753. /*********************************************************************/
  754. Errcode
  755. ccdCopyCard1 (BibPtr bp)
  756. {
  757. BibPtr p = gcp->bp;
  758. X
  759. X   /* check bibs: can't be equal */
  760. X   if (bp->treeIdx == p->treeIdx) {
  761. X      return(ERR_COPY_SAME_BIB);
  762. X   }
  763. X
  764. X   return(ccdCopyCard(bp, gcp));
  765. }
  766. X
  767. X
  768. /*********************************************************************/
  769. /* ccdCopyCard:                                                      */
  770. /*    copy card from one bib to another bib                          */
  771. /*********************************************************************/
  772. Errcode
  773. ccdCopyCard (BibPtr bp, CardPtr cp)
  774. {
  775. Errcode status;
  776. X
  777. X   /* insert new card in data tree, possibly new mainkey */
  778. X   if ((status = dbtInsert(bp->treeIdx, cp->cd)) != DBT_OK) {
  779. X      guwError(status);
  780. X      return(status);
  781. X   }
  782. X   bp->changed = TRUE;
  783. X
  784. X   return(OK);
  785. }
  786. X
  787. X
  788. /*********************************************************************/
  789. /* ccdSetChangeFlag:                                                 */
  790. /*    Set flag that card fields have changed                         */
  791. /*********************************************************************/
  792. void
  793. ccdSetChangeFlag (Widget w, XtPointer clientData, XtPointer callData)
  794. {
  795. CardPtr cp = (CardPtr)clientData;
  796. X
  797. X   cp->changed = TRUE;
  798. }
  799. X
  800. X
  801. /*********************************************************************/
  802. /* ccdCloseCardCmd:                                                  */
  803. /*    Callback for close card command in card window                 */
  804. /*********************************************************************/
  805. void
  806. ccdCloseCardCmd (Widget w, XtPointer clientData, XtPointer callData)
  807. {
  808. CardPtr cp = (CardPtr)clientData;
  809. X
  810. X   ccdCloseCard(cp->bp, cp);
  811. }
  812. X
  813. X
  814. /*********************************************************************/
  815. /* ccdCloseCard:                                                     */
  816. /*    close card window, check for changes                           */
  817. /*********************************************************************/
  818. Errcode
  819. ccdCloseCard (BibPtr bp, CardPtr cp)
  820. {
  821. Errcode status;
  822. CardDataList cl, clp;
  823. X
  824. X   if (cp->cd->annoteDisplayed == TRUE)
  825. X      annoteClose(cp);
  826. X   /* check for unsaved changes */
  827. X   if (cp->changed || gucStdFldsChanged(cp)) {
  828. X      cp->changed = TRUE;
  829. X      confirmCloseCard(cp);
  830. X      return(OK);
  831. X   }
  832. X   
  833. X   /* Check if data in card is OK */
  834. X   if ((status = dbtTestCard(cp->cd)) != DBT_OK) {
  835. X      if (cotRequiredFields()) {
  836. X         /* delete card from data tree */
  837. X         if ((status = dbtDelete(bp->treeIdx, cp->cd)) != DBT_OK) {
  838. X            guwError(status);
  839. X            return;
  840. X         }
  841. X         bp->changed = TRUE;
  842. X
  843. X         /* remove card from list of cards for list window */
  844. X         if (gulListWinExists(bp)) {
  845. X            cl = clp = bp->lw->cardLst;
  846. X            if (strcmp(cp->cd->mainkey, clp->data->mainkey) == 0) {
  847. X               bp->lw->cardLst = clp->next;
  848. X           cl = clp->next;
  849. X           dbtDeleteCard(&clp->data);
  850. X            }
  851. X            else {
  852. X           while (clp->next != NULL) {
  853. X              if (strcmp(cp->cd->mainkey, clp->next->data->mainkey) == 0) {
  854. X                     dbtDeleteCard(&clp->next->data);
  855. X                 clp->next = clp->next->next;
  856. X                 break;
  857. X              }
  858. X              clp = clp->next;
  859. X           } /* endwhile */
  860. X            }
  861. X
  862. X            /* Update list window */
  863. X            if (cl != NULL) {
  864. X           bp->lw->cardLst = NULL;
  865. X           if ((status = gulReplaceListData(bp, cl)) != OK) {
  866. X              guwError(status);
  867. X              gulCloseListWin(bp);
  868. X           }
  869. X            }
  870. X            else {
  871. X           if ((status = gulCloseListWin(bp)) != OK)
  872. X              guwError(status);
  873. X            }
  874. X         }
  875. X      }
  876. X   }
  877. X   /* close card window */
  878. X   if ((status = gucCloseCardWin(cp)) != OK) {
  879. X      guwError(status);
  880. X      return(status);
  881. X   }
  882. X
  883. X   return(OK);
  884. }
  885. X
  886. X
  887. /*********************************************************************/
  888. /* LOCAL FUNCTIONS                                                   */
  889. /*********************************************************************/
  890. X
  891. /*********************************************************************/
  892. /* confirmCloseCard:                                                 */
  893. /*    Opens dialogbox for user to confirm closing without saving     */
  894. /*********************************************************************/
  895. static void
  896. confirmCloseCard (CardPtr cp)
  897. {
  898. static Widget conShell, conDialog, conOkButton, conQuitButton;
  899. Position dx, dy, x, y;
  900. int status;
  901. X
  902. X   XtVaGetValues(desktop,
  903. X                 XtNx, &dx,
  904. X                 XtNy, &dy, NULL);
  905. X   XtTranslateCoords(cp->cw->cardDesk,
  906. X                     (Position)dx + SUBWIN_MARGIN,
  907. X                     (Position)dy + SUBWIN_MARGIN,
  908. X                     &x, &y);
  909. X   conShell = XtVaCreatePopupShell("confirmQuitCardShell",
  910. X            transientShellWidgetClass, topLevel, 
  911. X        XtNx, x, XtNy, y, NULL);
  912. X   conDialog = XtVaCreateManagedWidget("confirmQuitCardBox",
  913. X             dialogWidgetClass, conShell, 
  914. X         XtNicon, questPixmap, NULL);
  915. X   conOkButton = XtVaCreateManagedWidget("ok",
  916. X               commandWidgetClass, conDialog, NULL);
  917. X   conQuitButton = XtVaCreateManagedWidget("cancel",
  918. X                 commandWidgetClass, conDialog, NULL);
  919. X   XtAddCallback(conOkButton, XtNcallback, cardQuitOkCmd, conShell);
  920. X   XtAddCallback(conQuitButton, XtNcallback, cancelQuitCmd, conShell);
  921. X
  922. X   XtSetSensitive(mainMenu, FALSE);
  923. X   gubSetSensitive(NULL, FALSE);
  924. X   gcp = cp;
  925. X   XtPopup(conShell, XtGrabNonexclusive);
  926. }
  927. X
  928. X
  929. /*********************************************************************/
  930. /* cancelQuitCmd:                                                    */
  931. /*    Callback function for QUIT button in confirm box               */
  932. /*********************************************************************/
  933. static void
  934. cancelQuitCmd (Widget w, XtPointer clientData, XtPointer callData)
  935. {
  936. Widget shell = (Widget)clientData;
  937. Errcode status;
  938. X
  939. X   /* remove confirm shell */
  940. X   XtPopdown(shell);
  941. X   gcp = NULL;
  942. X   XtSetSensitive(mainMenu, TRUE);
  943. X   gubSetSensitive(NULL, TRUE);
  944. }
  945. X
  946. X
  947. /*********************************************************************/
  948. /* CardQuitOkCmd:                                                    */
  949. /*    Callback function for OK button in confirm box                 */
  950. /*********************************************************************/
  951. static void
  952. cardQuitOkCmd (Widget w, XtPointer clientData, XtPointer callData)
  953. {
  954. Widget shell = (Widget)clientData;
  955. Errcode status;
  956. X
  957. X   /* remove confirm shell */
  958. X   XtPopdown(shell);
  959. X
  960. X   /* close card window */
  961. X   if ((status = gucCloseCardWin(gcp)) != OK) {
  962. X      guwError(status);
  963. X      return;
  964. X   }
  965. X   gcp = NULL;
  966. X
  967. X   /* enable menus */
  968. X   XtSetSensitive(mainMenu, TRUE);
  969. X   gubSetSensitive(NULL, TRUE);
  970. }
  971. X
  972. X
  973. X
  974. SHAR_EOF
  975. chmod 0644 ctl_card.c ||
  976. echo 'restore of ctl_card.c failed'
  977. Wc_c="`wc -c < 'ctl_card.c'`"
  978. test 21466 -eq "$Wc_c" ||
  979.     echo 'ctl_card.c: original size 21466, current size' "$Wc_c"
  980. rm -f _shar_wnt_.tmp
  981. fi
  982. # ============= ctl_open.c ==============
  983. if test -f 'ctl_open.c' -a X"$1" != X"-c"; then
  984.     echo 'x - skipping ctl_open.c (File already exists)'
  985.     rm -f _shar_wnt_.tmp
  986. else
  987. > _shar_wnt_.tmp
  988. echo 'x - extracting ctl_open.c (Text)'
  989. sed 's/^X//' << 'SHAR_EOF' > 'ctl_open.c' &&
  990. /*********************************************************************/
  991. /*  bibView: Administration of bibTex-Databases                      */
  992. /*           (Verwaltung von bibTeX-Literaturdatenbanken)            */
  993. /*                                                                   */
  994. /*  Module:  ctl_open.c                                              */
  995. /*                                                                   */
  996. /*             Open Control                                          */
  997. /*             - Menu function New                                   */
  998. /*             - Menu function Open                                  */
  999. /*                                                                   */
  1000. /*  Author:  Holger Martin,  martinh@informatik.tu-muenchen.de       */
  1001. /*           Peter M. Urban, urban@informatik.tu-muenchen.de         */
  1002. /*                                                                   */
  1003. /*  History:                                                         */
  1004. /*    12.05.91  PMU  created                                         */
  1005. /*    05.26.92       Version 1.0 released                            */
  1006. /*                                                                   */
  1007. /*  Copyright 1992 TU MUENCHEN                                       */
  1008. /*    See ./Copyright for complete rights and liability information. */
  1009. /*                                                                   */
  1010. /*********************************************************************/
  1011. X
  1012. #include <stdio.h>
  1013. /* #include <stdlib.h> */
  1014. #include <X11/Intrinsic.h>
  1015. #include <X11/StringDefs.h>
  1016. #include <X11/Shell.h>
  1017. #include <X11/Xaw/Cardinals.h>
  1018. #include <X11/Xaw/Command.h>
  1019. #include <X11/Xaw/Dialog.h>
  1020. #include <X11/Xaw/Label.h>
  1021. #include <X11/Xaw/Box.h>
  1022. #include "FileNom.h"
  1023. #include "bibview.h"
  1024. X
  1025. X
  1026. /* macros and definitions */
  1027. /* ---------------------- */
  1028. #define NN_FILENAME    "noname"
  1029. #define NN_FILEEXT    ".bib"
  1030. #define NN_FILENAMELEN  14
  1031. X
  1032. X
  1033. /* imported global variables */
  1034. /* ------------------------- */
  1035. extern XtAppContext app_context;
  1036. extern Widget topLevel, mainMenu, desktop;
  1037. extern Pixmap questPixmap;
  1038. X
  1039. X
  1040. /* exported global variables */
  1041. /* ------------------------- */
  1042. X
  1043. X
  1044. /* local function prototypes */
  1045. /* ------------------------- */
  1046. static void LoadBibFile (Widget w, XtPointer clientData, XtPointer callData);
  1047. static void CancelLoad (Widget w, XtPointer clientData, XtPointer callData);
  1048. static void confirmLoad (BibPtr bp);
  1049. static void cancelLoadCmd (Widget w, XtPointer clientData, XtPointer callData);
  1050. static void loadCmdOk (Widget w, XtPointer clientData, XtPointer callData);
  1051. X
  1052. X
  1053. /* local global variables */
  1054. /* ---------------------- */
  1055. static int nnCnt = 0;
  1056. static BibPtr gbp = NULL;
  1057. X
  1058. X
  1059. /*********************************************************************/
  1060. /* copNewCmd:                                                        */
  1061. /*    Callback function for option new in main window file menu      */
  1062. /*********************************************************************/
  1063. void
  1064. copNewCmd (Widget w, XtPointer clientData, XtPointer callData)
  1065. {
  1066. BibPtr bp;
  1067. FILE *tempFile;
  1068. int status;
  1069. X
  1070. X   /* make new global data struct for bib file */
  1071. X   if ((status = glbNewBibListEl(&bp)) != OK) {
  1072. X      guwError(status);
  1073. X      return;
  1074. X   }
  1075. X
  1076. X   /* build new noname filename */
  1077. X   sprintf(bp->filename, "%s%d%s", NN_FILENAME, nnCnt+1, NN_FILEEXT);
  1078. X   getcwd(bp->filepath, MAX_FILEPATHLEN);
  1079. X   strcat(bp->filepath, "/");
  1080. X   strcat(bp->filepath, bp->filename);
  1081. X
  1082. X   /* create temp file */
  1083. X   bp->tempfile = (char *)tempnam(NULL, NULL);
  1084. X   tempFile = fopen(bp->tempfile, "w" );
  1085. X   fclose(tempFile);
  1086. X
  1087. X   /* display window for bib */
  1088. X   if ((status = gubOpenBibWin(bp)) != OK) {
  1089. X      guwError(status); 
  1090. X      return;
  1091. X   }
  1092. X   nnCnt++;
  1093. }
  1094. X
  1095. X
  1096. /*********************************************************************/
  1097. /* copOpenCmd:                                                       */
  1098. /*    Callback function for option open in main window file menu     */
  1099. /*********************************************************************/
  1100. void
  1101. copOpenCmd (Widget w, XtPointer clientData, XtPointer callData)
  1102. {
  1103. static Widget fsbShell, fsbBox, fsbLabel, fsbDialog;
  1104. char fname[MAX_FILEPATHLEN];
  1105. Position dx, dy, x, y;
  1106. int status;
  1107. X
  1108. X   XtVaGetValues(desktop,
  1109. X                 XtNx, &dx,
  1110. X                 XtNy, &dy, NULL);
  1111. X   XtTranslateCoords(desktop,
  1112. X                     (Position)dx + SUBWIN_MARGIN,
  1113. X                     (Position)dy + SUBWIN_MARGIN,
  1114. X                     &x, &y);
  1115. X   fsbShell  = XtVaCreatePopupShell("fileSelectBoxShell",
  1116. X             topLevelShellWidgetClass, desktop, 
  1117. X          XtNx, x, XtNy, y, NULL);
  1118. X   fsbBox    = XtVaCreateManagedWidget("fileSelectBox",
  1119. X                 boxWidgetClass, fsbShell, NULL);
  1120. X   fsbLabel  = XtVaCreateManagedWidget("fileLoadHead",
  1121. X                 labelWidgetClass, fsbBox,
  1122. X                 XtNborderWidth, 0, NULL);
  1123. X   fsbDialog = XtVaCreateManagedWidget("loadFileBoxShell",
  1124. X                fileNominatorWidgetClass, fsbBox,
  1125. X                XtNborderWidth, 0, NULL);
  1126. X
  1127. X   XtAddCallback(fsbDialog, XtNcancelCallback, CancelLoad, fsbShell);
  1128. X   XtAddCallback(fsbDialog, XtNselectCallback, LoadBibFile, fsbDialog);
  1129. X
  1130. X   XtSetSensitive(mainMenu, FALSE);
  1131. X   gubSetSensitive(NULL, FALSE);
  1132. X   XtPopup(fsbShell, XtGrabNonexclusive);
  1133. }
  1134. X
  1135. X
  1136. X
  1137. /*********************************************************************/
  1138. /* LOCAL FUNCTIONS                                                   */
  1139. /*********************************************************************/
  1140. X
  1141. /*********************************************************************/
  1142. /* CancelLoad:                                                       */
  1143. /*    Callback function for CANCEL button in file select box         */
  1144. /*********************************************************************/
  1145. static void
  1146. CancelLoad (Widget w, XtPointer clientData, XtPointer callData)
  1147. {
  1148. Widget dialog = (Widget)clientData;
  1149. X
  1150. X   XtSetSensitive(mainMenu, TRUE);
  1151. X   gubSetSensitive(NULL, TRUE);
  1152. X   XtPopdown(dialog);
  1153. X
  1154. }
  1155. X
  1156. X
  1157. /*********************************************************************/
  1158. /* LoadBibFile:                                                      */
  1159. /*    Callback function for OK button in file select box             */
  1160. /*********************************************************************/
  1161. static void
  1162. LoadBibFile (Widget w, XtPointer clientData, XtPointer callData)
  1163. {
  1164. Widget dialog = (Widget)clientData;
  1165. String filepath;
  1166. BibPtr p, bp;
  1167. int status;
  1168. X
  1169. X   /* get and keep filename */
  1170. X   filepath = (String)FileNominatorGetFullFileName(dialog);
  1171. X
  1172. X   /* check if opened already */
  1173. X   p = glbFirstBibListEl();
  1174. X   while (p != NULL) {
  1175. X      if (strcmp(p->filepath, filepath) == 0) {
  1176. X     if (p->ew != NULL)
  1177. X        {guwError(ERR_IS_CORRECTED);
  1178. X             XtSetSensitive(mainMenu, TRUE);
  1179. X             gubSetSensitive(NULL, TRUE);
  1180. X             XtPopdown(XtParent(XtParent(dialog)));
  1181. X         return;
  1182. X         }
  1183. X       
  1184. X     XtSetSensitive(mainMenu, TRUE);
  1185. X     gubSetSensitive(NULL, TRUE);
  1186. X     XtPopdown(XtParent(XtParent(dialog)));
  1187. X     confirmLoad(p);
  1188. X     return;
  1189. X      }
  1190. X      p = glbNextBibListEl(p);
  1191. X   }
  1192. X
  1193. X   /* make new global data struct for bib file */
  1194. X   if ((status = glbNewBibListEl(&bp)) != OK) {
  1195. X      guwError(status);
  1196. X      XtSetSensitive(mainMenu, TRUE);
  1197. X      gubSetSensitive(NULL, TRUE);
  1198. X      XtPopdown(XtParent(XtParent(dialog)));
  1199. X      return;
  1200. X   }
  1201. X   strcpy(bp->filepath, filepath);
  1202. X   strcpy(bp->filename, (String)FileNominatorGetFileName(dialog));
  1203. X   bp->mw=NULL;
  1204. X   bp->ew=NULL;
  1205. X
  1206. X   /* remove file select box */
  1207. X   XtSetSensitive(mainMenu, TRUE);
  1208. X   gubSetSensitive(NULL, TRUE);
  1209. X   XtPopdown(XtParent(XtParent(dialog))); 
  1210. X
  1211. X   /* read file into tree and open bib window */
  1212. X   if ((status = bifFileRead(bp)) == BIF_EOPEN) {
  1213. X      glbDelBibListEl(bp); 
  1214. X      guwError(status);
  1215. X      return;
  1216. X   }
  1217. X   if (status != BIF_OK) {
  1218. X      status = gueOpenBibErrWin(bp, (int)status);   
  1219. X      if (status == ERR_NOBIB)
  1220. X         glbDelBibListEl(bp); 
  1221. X      return;
  1222. X   }
  1223. X   if ((status = gubOpenBibWin(bp)) != OK) {
  1224. X  /*    glbDelBibListEl(bp);  */
  1225. X      guwError(status);
  1226. X      return;
  1227. X   }
  1228. X   
  1229. X   /* check cards, if option is on */
  1230. X   if (cotAutoCheckBib()) 
  1231. X      cseCheckBib(bp, False);      
  1232. }
  1233. X
  1234. X
  1235. /*********************************************************************/
  1236. /* confirmLoad:                                                      */
  1237. /*    Opens dialogbox for user to confirm loading from disk          */
  1238. /*********************************************************************/
  1239. static void
  1240. confirmLoad (BibPtr bp)
  1241. {
  1242. static Widget conShell, conDialog, conOKButton, conQuitButton;
  1243. Position dx, dy, x, y;
  1244. int status;
  1245. X
  1246. X   XtVaGetValues(desktop,
  1247. X                 XtNx, &dx,
  1248. X                 XtNy, &dy, NULL);
  1249. X   XtTranslateCoords(desktop,
  1250. X                     (Position)dx + SUBWIN_MARGIN,
  1251. X                     (Position)dy + SUBWIN_MARGIN,
  1252. X                     &x, &y);
  1253. X   conShell = XtVaCreatePopupShell("confirmLoadShell",
  1254. X            transientShellWidgetClass, topLevel, 
  1255. SHAR_EOF
  1256. true || echo 'restore of ctl_open.c failed'
  1257. fi
  1258. echo 'End of  part 9'
  1259. echo 'File ctl_open.c is continued in part 10'
  1260. echo 10 > _shar_seq_.tmp
  1261. exit 0
  1262. -- 
  1263. Senior Systems Scientist        mail: dcmartin@msi.com
  1264. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  1265. 796 North Pastoria Avenue        at&t: 408/522-9236
  1266. Sunnyvale, California 94086        fax: 408/732-0831
  1267.