home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume17 / tcleditr / part12 < prev    next >
Encoding:
Text File  |  1992-03-17  |  33.0 KB  |  1,008 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!think.com!mips!msi!dcmartin
  3. From: crowley@chaco.cs.unm.edu (Charlie Crowley)
  4. Subject: v17i013: point text editor (TCL and TK), Part12/16
  5. Message-ID: <1992Mar18.141742.27468@msi.com>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. References: <csx-17i002-tcl-editor@uunet.UU.NET>
  10. Date: Wed, 18 Mar 1992 14:17:42 GMT
  11. Approved: dcmartin@msi.com
  12.  
  13. Submitted-by: crowley@chaco.cs.unm.edu (Charlie Crowley)
  14. Posting-number: Volume 17, Issue 13
  15. Archive-name: tcl-editor/part12
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 11 (of 15)."
  24. # Contents:  tclLib/makeBoxes.tcl
  25. # Wrapped by crowley@chaco.cs.unm.edu on Tue Mar 10 15:05:48 1992
  26. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  27. if test -f 'tclLib/makeBoxes.tcl' -a "${1}" != "-c" ; then 
  28.   echo shar: Will not clobber existing file \"'tclLib/makeBoxes.tcl'\"
  29. else
  30. echo shar: Extracting \"'tclLib/makeBoxes.tcl'\" \(30790 characters\)
  31. sed "s/^X//" >'tclLib/makeBoxes.tcl' <<'END_OF_FILE'
  32. X#
  33. X#
  34. X# Make various dialog boxes
  35. X#
  36. X#
  37. proc HelpWindow {keyword} {
  38. X    global HelpDirectory
  39. X    set name $HelpDirectory/index.help
  40. X    if [file exists $name] {
  41. X         set line [exec grep $keyword $name]
  42. X         set name $HelpDirectory/[lindex $line 0]
  43. X         if [file exists $name] {
  44. X            OpenWindow $name \
  45. X[lindex $line 1]x[lindex $line 2][lindex $line 3][lindex $line 4]
  46. X        } else {
  47. X            puts stderr "Cannot find help file $name"
  48. X        }
  49. X    } else {
  50. X        puts stderr "Cannot find help index file $name"
  51. X    }
  52. X}
  53. X
  54. proc GetSelectedKeyword {} {
  55. X    set sel [selection get]
  56. X    set kb [MakeKeywordBox]
  57. X    $kb.keyword insert 0 "$sel"
  58. X    FillKeywordBox $kb
  59. X}
  60. X
  61. proc MakeSearchOptionsBox {} {
  62. X    global raised
  63. X
  64. X    catch "destroy .sob"
  65. X
  66. X    toplevel .sob
  67. X    wm title .sob "Search Options"
  68. X    wm iconname .sob "Search Options"
  69. X
  70. X    label .sob.title -text "Change by typing a new value then Return" \
  71. X        -relief $raised
  72. X
  73. X    label .sob.l1 -text "Lines above a found string"
  74. X    entry .sob.lof -relief sunken
  75. X    .sob.lof insert 0 [Option get linesOverFind]
  76. X    bind .sob.lof <Any-Return> \
  77. X        "Option set linesOverFind \[.sob.lof get\]"
  78. X
  79. X    label .sob.l2 -text \
  80. X        "File pattern to use in looking for keywords in files"
  81. X    entry .sob.kp -relief sunken
  82. X    .sob.kp insert 0 "[Option get keywordPattern]"
  83. X    bind .sob.kp <Any-Return> \
  84. X        "Option set keywordPattern \[.sob.kp get\]"
  85. X    bind.entry .sob.lof .sob.kp
  86. X
  87. X    button .sob.close -text "Close" -relief raised \
  88. X        -command "destroy .sob"
  89. X
  90. X    pack append .sob \
  91. X        .sob.title {top fill} \
  92. X        .sob.l1 {top fill} \
  93. X        .sob.lof {top fill} \
  94. X        .sob.l2 {top fill} \
  95. X        .sob.kp {top fill} \
  96. X        .sob.close {top fill}
  97. X}
  98. X
  99. proc MakeOtherOptionsBox {} {
  100. X    global raised
  101. X
  102. X    catch "destroy .oob"
  103. X
  104. X    toplevel .oob
  105. X    wm title .oob "Other Point Options"
  106. X    wm iconname .oob "Other Point Options"
  107. X
  108. X    label .oob.title -text "Change by typing a new value then Return" \
  109. X        -relief $raised
  110. X
  111. X    label .oob.l1 -text "Format for the names of backup files"
  112. X    entry .oob.bnf -relief sunken
  113. X    .oob.bnf insert 0 "[Option get backupNameFormat]"
  114. X    bind .oob.bnf <Any-Return> "Option set backupNameFormat \[%W get\]"
  115. X
  116. X    label .oob.l2 -text "Default geometry for text windows"
  117. X    entry .oob.dtg -relief sunken
  118. X    .oob.dtg insert 0 "[Option get textGeometry]"
  119. X    bind .oob.dtg <Any-Return> "Option set textGeometry \[%W get\]"
  120. X
  121. X    label .oob.l3 -text "Default geometry for browser windows"
  122. X    entry .oob.bdg -relief sunken
  123. X    .oob.bdg insert 0 "[Option get browserGeometry]"
  124. X    bind .oob.bdg <Any-Return> "Option set browserGeometry \[%W get\]"
  125. X
  126. X    label .oob.l4 -text "Pattern for files in the file browser window"
  127. X    entry .oob.fp -relief sunken
  128. X    .oob.fp insert 0 "[Option get filePattern]"
  129. X    bind .oob.fp <Any-Return> "Option set filePattern \[%W get\]"
  130. X    bind.entry .oob.bnf .oob.dtg .oob.bdg .oob.fp
  131. X
  132. X    button .oob.close -text "Close" -relief raised -command "destroy .oob"
  133. X
  134. X    pack append .oob \
  135. X        .oob.title {top fill} \
  136. X        .oob.l1 {top fill} \
  137. X        .oob.bnf {top fill} \
  138. X        .oob.l2 {top fill} \
  139. X        .oob.dtg {top fill} \
  140. X        .oob.l3 {top fill} \
  141. X        .oob.bdg {top fill} \
  142. X        .oob.l4 {top fill} \
  143. X        .oob.fp {top fill} \
  144. X        .oob.close {top fill}
  145. X}
  146. X
  147. proc MakeVerifyBox {} {
  148. X    catch {destroy .VerifyBox}
  149. X    toplevel .VerifyBox -relief raised
  150. X    wm title .VerifyBox "Verify replacement"
  151. X    wm iconname .VerifyBox "Verify replacement"
  152. X    label .VerifyBox.label -text "Make this replacement?"
  153. X    button .VerifyBox.yes -text "Yes, replace" \
  154. X        -command {Option set returnString "y"}
  155. X    button .VerifyBox.no -text "No, do not replace" \
  156. X        -command {Option set returnString "n"}
  157. X    button .VerifyBox.noverify -text "Replace the rest with no verify" \
  158. X        -command {Option set returnString "v"}
  159. X    button .VerifyBox.cancel -text "Cancel replace" \
  160. X        -command {Option set returnString "c"}
  161. X    pack append .VerifyBox \
  162. X        .VerifyBox.label {top fill} \
  163. X        .VerifyBox.yes {top fill} \
  164. X        .VerifyBox.no {top fill} \
  165. X        .VerifyBox.noverify {top fill} \
  166. X        .VerifyBox.cancel {top fill}
  167. X}
  168. X
  169. X
  170. proc DoRegexReplace {name} {
  171. X    global verify inSelection doFast
  172. X
  173. X    set searchFor [$name.searchFor get]
  174. X    set replaceWith [$name.replaceWith get]
  175. X    set sel [Sel get]
  176. X    set begin [lindex $sel 0]
  177. X    set end [lindex $sel 1]
  178. X
  179. X    Undo begin
  180. X    if $verify {
  181. X        MakeVerifyBox
  182. X        set up "update"
  183. X    } else {
  184. X        if $doFast {
  185. X            RegexReplaceAll $searchFor $replaceWith $inSelection
  186. X            Undo end
  187. X            return
  188. X        } else {
  189. X            set up "noupdate"
  190. X        }
  191. X    }
  192. X    for {} {1} {} {
  193. X        set sucess [RegexSearch "$searchFor" forward {} $up]
  194. X        if {$sucess<0} break
  195. X        if {$inSelection && $sucess>$end} break
  196. X        if $verify {
  197. X            .VerifyBox.label configure \
  198. X                -text "Make this replacement?"
  199. X            WaitForReturnString
  200. X            set ret [Option get returnString]
  201. X            set doReplace [string compare $ret "n"]
  202. X            if {[string compare $ret "c"]==0}  break
  203. X            if {[string compare $ret "v"]==0} {
  204. X                set verify 0
  205. X                set up "noupdate"
  206. X            }
  207. X            .VerifyBox.label configure -text "Searching"
  208. X        } else {
  209. X            set doReplace 1
  210. X        }
  211. X        if $doReplace {
  212. X            set diffLengths \
  213. X                [RegexReplaceOne $searchFor $replaceWith]
  214. X            if $inSelection {
  215. X                set end [expr {$end + $diffLengths}]
  216. X            }
  217. X        }
  218. X    }
  219. X    Undo end
  220. X    catch {destroy .VerifyBox}
  221. X    Redraw
  222. X}
  223. X
  224. proc DoReplace {name} {
  225. X    global verify inSelection doFast
  226. X
  227. X    set searchFor [$name.searchFor get]
  228. X    set replaceWith [$name.replaceWith get]
  229. X    set sel [Sel get]
  230. X    set begin [lindex $sel 0]
  231. X    set end [lindex $sel 1]
  232. X    set diffLengths [expr {
  233. X        [string length $replaceWith] - [string length $searchFor]}]
  234. X
  235. X    Undo begin
  236. X    if $verify {
  237. X        MakeVerifyBox
  238. X        set up "update"
  239. X    } else {
  240. X        if $doFast {
  241. X            Replace $searchFor $replaceWith $inSelection
  242. X            Undo end
  243. X            return
  244. X        } else {
  245. X            set up "noupdate"
  246. X        }
  247. X    }
  248. X    for {} {1} {} {
  249. X        set sucess [Search "$searchFor" forward {} $up]
  250. X        if {$sucess<0} break
  251. X        if {$inSelection && $sucess>$end} break
  252. X        if $verify {
  253. X            .VerifyBox.label configure \
  254. X                -text "Make this replacement?"
  255. X            WaitForReturnString
  256. X            set ret [Option get returnString]
  257. X            set doReplace [string compare $ret "n"]
  258. X            if {[string compare $ret "c"]==0}  break
  259. X            if {[string compare $ret "v"]==0} {
  260. X                set verify 0
  261. X                set up "noupdate"
  262. X            }
  263. X            .VerifyBox.label configure -text "Searching"
  264. X        } else {
  265. X            set doReplace 1
  266. X        }
  267. X        if $doReplace {
  268. X            DeleteToScrap $up
  269. X            InsertString "$replaceWith" $up
  270. X            if $inSelection {
  271. X                set end [expr {$end + $diffLengths}]
  272. X            }
  273. X        }
  274. X    }
  275. X    Undo end
  276. X    catch {destroy .VerifyBox}
  277. X    Redraw
  278. X}
  279. X
  280. proc MakeRegexReplaceBox {} {
  281. X    global raised sunken verify inSelection doFast
  282. X
  283. X    toplevel .RegexReplaceBox -relief $raised
  284. X    wm title .RegexReplaceBox "Regex Search and Replace"
  285. X    wm iconname .RegexReplaceBox "Regex Search and Replace"
  286. X
  287. X    label .RegexReplaceBox.label1 -text "RE to search for:"
  288. X    label .RegexReplaceBox.label2 \
  289. X            -text "Special chars: . \[ \] \\\\ * + \\< \\> ^ $"
  290. X    entry .RegexReplaceBox.searchFor -relief $sunken
  291. X    bind.entry .RegexReplaceBox.searchFor
  292. X
  293. X    label .RegexReplaceBox.label3 -text "And replace it with:"
  294. X    label .RegexReplaceBox.label4 \
  295. X                -text "Special chars: & \\\\ \\1 \\2 ... \\9"
  296. X    entry .RegexReplaceBox.replaceWith -relief $sunken
  297. X    bind.entry .RegexReplaceBox.replaceWith
  298. X
  299. X    checkbutton .RegexReplaceBox.verify \
  300. X        -text "Verify each replacment                   "
  301. X    .RegexReplaceBox.verify select
  302. X
  303. X    checkbutton .RegexReplaceBox.doFast \
  304. X        -text "Use fast internal replace (if no verify)"
  305. X
  306. X    checkbutton .RegexReplaceBox.inSelection \
  307. X        -text "Replace within the selection only        "
  308. X
  309. X    button .RegexReplaceBox.begin -text "Begin replacing" \
  310. X                -command "DoRegexReplace .RegexReplaceBox"
  311. X
  312. X    button .RegexReplaceBox.close -text "Close" \
  313. X        -command {
  314. X            destroy .RegexReplaceBox
  315. X            catch {destroy .VerifyBox}
  316. X        }
  317. X
  318. X    pack append .RegexReplaceBox \
  319. X        .RegexReplaceBox.label1 { top fill } \
  320. X        .RegexReplaceBox.label2 { top fill } \
  321. X        .RegexReplaceBox.searchFor { top fill } \
  322. X        .RegexReplaceBox.label3 { top fill } \
  323. X        .RegexReplaceBox.label4 { top fill } \
  324. X        .RegexReplaceBox.replaceWith { top fill } \
  325. X        .RegexReplaceBox.verify { top fill } \
  326. X        .RegexReplaceBox.doFast { top fill } \
  327. X        .RegexReplaceBox.inSelection { top fill } \
  328. X        .RegexReplaceBox.begin { top fill } \
  329. X        .RegexReplaceBox.close { top fill }
  330. X}
  331. X
  332. proc MakeReplaceBox {} {
  333. X    global raised sunken verify inSelection doFast
  334. X
  335. X    toplevel .ReplaceBox -relief $raised
  336. X    wm title .ReplaceBox "Search and Replace"
  337. X    wm iconname .ReplaceBox "Search and Replace"
  338. X
  339. X    label .ReplaceBox.label1 -text "Search for:"
  340. X    entry .ReplaceBox.searchFor -relief $sunken
  341. X    bind.entry .ReplaceBox.searchFor
  342. X
  343. X    label .ReplaceBox.label2 -text "And replace it with:"
  344. X    entry .ReplaceBox.replaceWith -relief $sunken
  345. X    bind.entry .ReplaceBox.replaceWith
  346. X
  347. X    checkbutton .ReplaceBox.verify \
  348. X        -text "Verify each replacment                   "
  349. X    .ReplaceBox.verify select
  350. X
  351. X    checkbutton .ReplaceBox.doFast \
  352. X        -text "Use fast internal replace (if no verify)"
  353. X
  354. X    checkbutton .ReplaceBox.inSelection \
  355. X        -text "Replace within the selection only        "
  356. X
  357. X    button .ReplaceBox.begin -text "Begin replacing" \
  358. X                    -command "DoReplace .ReplaceBox"
  359. X
  360. X    button .ReplaceBox.close -text "Close" \
  361. X        -command {
  362. X            destroy .ReplaceBox
  363. X            catch {destroy .VerifyBox}
  364. X        }
  365. X
  366. X    pack append .ReplaceBox \
  367. X        .ReplaceBox.label1 { top fill } \
  368. X        .ReplaceBox.searchFor { top fill } \
  369. X        .ReplaceBox.label2 { top fill } \
  370. X        .ReplaceBox.replaceWith { top fill} \
  371. X        .ReplaceBox.verify { top fill } \
  372. X        .ReplaceBox.doFast { top fill } \
  373. X        .ReplaceBox.inSelection { top fill } \
  374. X        .ReplaceBox.begin { top fill } \
  375. X        .ReplaceBox.close { top fill }
  376. X}
  377. X
  378. proc MakeModalEntry {title prompt okay cancel} {
  379. X    catch {destroy .ModalEntry}
  380. X    toplevel .ModalEntry -relief raised
  381. X    wm title .ModalEntry $title
  382. X    wm iconname .ModalEntry $title
  383. X    label .ModalEntry.label -text $prompt -borderwidth 25
  384. X    entry .ModalEntry.entry -relief sunken
  385. X    bind.entry .ModalEntry.entry
  386. X    bind .ModalEntry.entry <Any-Return> \
  387. X        {Option set returnString [.ModalEntry.entry get]
  388. X         destroy .ModalEntry}
  389. X    frame .ModalEntry.buttons
  390. X    button .ModalEntry.buttons.okay -text $okay -pady 10 \
  391. X        -command {Option set returnString [.ModalEntry.entry get]
  392. X              destroy .ModalEntry}
  393. X    button .ModalEntry.buttons.cancel -text $cancel -pady 10 \
  394. X        -command {Option set returnString "XXXcancelXXX"
  395. X              destroy .ModalEntry}
  396. X    pack append .ModalEntry.buttons \
  397. X        .ModalEntry.buttons.okay {left expand fill} \
  398. X        .ModalEntry.buttons.cancel {right expand fill}
  399. X    pack append .ModalEntry \
  400. X        .ModalEntry.label {top fill} \
  401. X        .ModalEntry.entry {top fill} \
  402. X        .ModalEntry.buttons {top fill}
  403. X}
  404. X
  405. proc MakeModalYesNo {title prompt okay cancel} {
  406. X    global raised
  407. X    catch {destroy .ModalYesNo}
  408. X    toplevel .ModalYesNo -relief $raised
  409. X    wm title .ModalYesNo $title
  410. X    wm iconname .ModalYesNo $title
  411. X    label .ModalYesNo.label -text $prompt -borderwidth 35
  412. X    frame .ModalYesNo.buttons
  413. X    button .ModalYesNo.buttons.okay -text $okay -pady 10 \
  414. X        -command {Option set returnString "y"; destroy .ModalYesNo}
  415. X    button .ModalYesNo.buttons.cancel -text $cancel -pady 10 \
  416. X        -command {Option set returnString "n"; destroy .ModalYesNo}
  417. X    pack append .ModalYesNo.buttons \
  418. X        .ModalYesNo.buttons.okay {left expand fill} \
  419. X        .ModalYesNo.buttons.cancel {right expand fill}
  420. X    pack append .ModalYesNo \
  421. X        .ModalYesNo.label {top fill} \
  422. X        .ModalYesNo.buttons {top fill}
  423. X}
  424. X
  425. proc MakeMsgBox {msg} {
  426. X    global wcounter
  427. X
  428. X    set wcounter [expr $wcounter+1]
  429. X    set name [format ".mb%05d" $wcounter]
  430. X
  431. X    toplevel $name -class PtPopup -relief $raised -bd $bd
  432. X    wm title $name "Message"
  433. X    wm iconname $name "Message"
  434. X    message $name.msg -text "$msg"
  435. X    button $name.close -text "Close" -command "destroy $name"
  436. X
  437. X    pack append $name \
  438. X        $name.msg {top fill expand} \
  439. X        $name.close {bottom fill}
  440. X}
  441. X
  442. proc MakemmBox {} {
  443. X    catch {destroy .mmBox}
  444. X    toplevel .mmBox -relief raised
  445. X    wm title .mmBox "Mouse Menu Parameters"
  446. X    wm iconname .mmBox "Mouse Menu Parameters"
  447. X    label .mmBox.title -text "Set Mouse Menu Commands"
  448. X    frame .mmBox.frame -relief raised
  449. X    frame .mmBox.frame.dirs -relief raised
  450. X    label .mmBox.frame.dirs.no -text "No motion"
  451. X    label .mmBox.frame.dirs.n -text "North"
  452. X    label .mmBox.frame.dirs.e -text "East"
  453. X    label .mmBox.frame.dirs.s -text "South"
  454. X    label .mmBox.frame.dirs.w -text "West"
  455. X    pack append .mmBox.frame.dirs \
  456. X        .mmBox.frame.dirs.no {top fill} \
  457. X        .mmBox.frame.dirs.n {top fill} \
  458. X        .mmBox.frame.dirs.e {top fill} \
  459. X        .mmBox.frame.dirs.s {top fill} \
  460. X        .mmBox.frame.dirs.w {top fill}
  461. X    frame .mmBox.frame.titles -relief raised
  462. X    entry .mmBox.frame.titles.no -relief sunken
  463. X    .mmBox.frame.titles.no insert 0 "[Option get lmm1]"
  464. X    bind .mmBox.frame.titles.no <Any-Key-Return> \
  465. X        "Option set lmm1 \[.mmBox.frame.titles.no get\]"
  466. X    entry .mmBox.frame.titles.n -relief sunken
  467. X    bind .mmBox.frame.titles.n <Any-Key-Return> \
  468. X        "Option set lmm1n \[.mmBox.frame.titles.n get\]"
  469. X    entry .mmBox.frame.titles.e -relief sunken
  470. X    bind .mmBox.frame.titles.e <Any-Key-Return> \
  471. X        "Option set lmm1e \[.mmBox.frame.titles.e get\]"
  472. X    entry .mmBox.frame.titles.s -relief sunken
  473. X    bind .mmBox.frame.titles.s <Any-Key-Return> \
  474. X        "Option set lmm1s \[.mmBox.frame.titles.s get\]"
  475. X    entry .mmBox.frame.titles.w -relief sunken
  476. X    bind .mmBox.frame.titles.w <Any-Key-Return> \
  477. X        "Option set lmm1w \[.mmBox.frame.titles.e get\]"
  478. X    bind.entry .mmBox.frame.titles.no  .mmBox.frame.titles.no \
  479. X            .mmBox.frame.titles.no .mmBox.frame.titles.no
  480. X    pack append .mmBox.frame.titles \
  481. X        .mmBox.frame.titles.no {top fill} \
  482. X        .mmBox.frame.titles.n {top fill} \
  483. X        .mmBox.frame.titles.e {top fill} \
  484. X        .mmBox.frame.titles.s {top fill} \
  485. X        .mmBox.frame.titles.w {top fill}
  486. X    frame .mmBox.frame.cmds -relief raised
  487. X    entry .mmBox.frame.cmds.no -relief sunken
  488. X    bind .mmBox.frame.titles.no <Any-Key-Return> \
  489. X        {puts stdout "cmm1 str is [.mmBox.frame.titles.no get]"
  490. X        Option set cmm1 [.mmBox.frame.titles.no get]}
  491. X    entry .mmBox.frame.cmds.n -relief sunken
  492. X    bind .mmBox.frame.titles.n <Any-Key-Return> \
  493. X        "Option set cmm1n \[.mmBox.frame.titles.n get\]"
  494. X    entry .mmBox.frame.cmds.e -relief sunken
  495. X    bind .mmBox.frame.titles.e <Any-Key-Return> \
  496. X        "Option set cmm1e \[.mmBox.frame.titles.e get\]"
  497. X    entry .mmBox.frame.cmds.s -relief sunken
  498. X    bind .mmBox.frame.titles.s <Any-Key-Return> \
  499. X        "Option set cmm1s \[.mmBox.frame.titles.s get\]"
  500. X    entry .mmBox.frame.cmds.w -relief sunken
  501. X    bind .mmBox.frame.titles.w <Any-Key-Return> \
  502. X        "Option set cmm1w \[.mmBox.frame.titles.w get\]"
  503. X    bind.entry .mmBox.frame.titles.no  .mmBox.frame.titles.no \
  504. X            .mmBox.frame.titles.no .mmBox.frame.titles.no
  505. X    pack append .mmBox.frame.cmds \
  506. X        .mmBox.frame.cmds.no {top fill} \
  507. X        .mmBox.frame.cmds.n {top fill} \
  508. X        .mmBox.frame.cmds.e {top fill} \
  509. X        .mmBox.frame.cmds.s {top fill} \
  510. X        .mmBox.frame.cmds.w {top fill}
  511. X    pack append .mmBox.frame \
  512. X        .mmBox.frame.dirs {left fill} \
  513. X        .mmBox.frame.titles {left fill} \
  514. X        .mmBox.frame.cmds {right fill expand}
  515. X    button .mmBox.close -text "Close" -command {destroy .mmBox}
  516. X    pack append .mmBox \
  517. X        .mmBox.title {top fill } \
  518. X        .mmBox.frame {top fill} \
  519. X        .mmBox.close {bottom fill}
  520. X}
  521. X
  522. proc MakeUndoBox {} {
  523. X    catch {destroy .ub}
  524. X    toplevel .ub
  525. X    wm title .ub "Command History"
  526. X    wm iconname .ub "Command History"
  527. X    wm minsize .ub 0 0
  528. X    label .ub.title -text "Command History Box" -relief flat
  529. X    frame .ub.list -relief flat
  530. X    scrollbar .ub.list.scrollbar -relief sunken \
  531. X        -command ".ub.list.list view"
  532. X    listbox .ub.list.list -scroll ".ub.list.scrollbar set"  \
  533. X        -relief sunken -geometry 60x20
  534. X    pack append .ub.list \
  535. X        .ub.list.scrollbar {left fill} \
  536. X        .ub.list.list {right fill expand}
  537. X    frame .ub.buttons -relief raised
  538. X#I can't figure out what this was supposed to be for???
  539. X#    bind .ub.list.list <Any-Double-1> ".ub.list config -bg \[Sel escaped\]"
  540. X#
  541. X    button .ub.buttons.undo -text "Undo" -command "Undo 1"
  542. X    button .ub.buttons.redo -text "Redo" -command "Redo 1"
  543. X    button .ub.buttons.update -text "Update" -command "Undo update"
  544. X    button .ub.buttons.again -text "Again" -command "Again"
  545. X    button .ub.close -text "Close" -command "destroy .ub"
  546. X    pack append .ub.buttons \
  547. X        .ub.buttons.undo {left fill expand} \
  548. X        .ub.buttons.redo {left fill expand} \
  549. X        .ub.buttons.update {left fill expand} \
  550. X        .ub.buttons.again {right fill expand}
  551. X    pack append .ub \
  552. X        .ub.title {top fill} \
  553. X        .ub.list {top fill expand} \
  554. X        .ub.buttons {top fill} \
  555. X        .ub.close {bottom fill}
  556. X}
  557. X
  558. proc MakeColorBox {} {
  559. X    catch {destroy .cb}
  560. X    toplevel .cb
  561. X    wm title .cb "Select Text Colors"
  562. X    wm iconname .cb "Select Text Colors"
  563. X    wm minsize .cb 0 0
  564. X    label .cb.title -text "Color Selection Box" -relief flat \
  565. X        -borderwidth 5
  566. X    frame .cb.list -relief flat -borderwidth 40
  567. X    scrollbar .cb.list.scrollbar -relief sunken \
  568. X        -command ".cb.list.colors view"
  569. X    listbox .cb.list.colors -scroll ".cb.list.scrollbar set"  \
  570. X        -relief sunken -geometry 20x20
  571. X    .cb.list.colors insert 0 \
  572. aliceblue antiquewhite aquamarine aquamarine1 aquamarine2 \
  573. aquamarine3 aquamarine4 azure azure1 azure2 azure3 azure4 \
  574. beige bisque bisque1 bisque2 bisque3 bisque4 black \
  575. blanchedalmond blue blue1 blue2 blue3 blue4 \
  576. blueviolet brown brown1 brown2 brown3 brown4 burlywood \
  577. burlywood1 burlywood2 burlywood3 burlywood4 cadetblue cadetblue \
  578. chartreuse chartreuse1 chartreuse2 chartreuse3 chartreuse4 \
  579. chocolate chocolate1 chocolate2 chocolate3 chocolate4 coral \
  580. coral1 coral2 coral3 coral4 cornflowerblue cornsilk cornsilk1 \
  581. cornsilk2 cornsilk3 cornsilk4 cyan cyan1 cyan2 cyan3 cyan4 \
  582. darkgoldenrod darkgreen darkkhaki darkolivegreen darkorange \
  583. darkorchid darksalmon darkseagreen darkslateblue \
  584. darkslategray darkturquoise darkviolet darkgoldenrod \
  585. darkolivegreen3 darkolivegreen4 darkslategrey deeppink \
  586. deepskyblue dimgray dodgerblue firebrick firebrick1 \
  587. firebrick2 firebrick3 firebrick4 floralwhite forestgreen \
  588. gainsboro ghostwhite gold gold1 gold2 gold3 gold4 \
  589. goldenrod goldenrod1 goldenrod2 goldenrod3 goldenrod4 gray \
  590. gray0 gray1 gray10 gray100 gray11 gray12 gray13 gray14 \
  591. gray15 gray16 gray17 gray18 gray19 gray2 gray20 gray21 \
  592. gray22 gray23 gray24 gray25 gray26 gray27 gray28 gray29 \
  593. gray3 gray30 gray31 gray32 gray33 gray34 gray35 gray36 \
  594. gray37 gray38 gray39 gray4 gray40 gray41 gray42 gray43 \
  595. gray44 gray45 gray46 gray47 gray48 gray49 gray5 gray50 \
  596. gray51 gray52 gray53 gray54 gray55 gray56 gray57 gray58 \
  597. gray59 gray6 gray60 gray61 gray62 gray63 gray64 gray65 \
  598. gray66 gray67 gray68 gray69 gray7 gray70 gray71 gray72 \
  599. gray73 gray74 gray75 gray76 gray77 gray78 gray79 gray8 \
  600. gray80 gray81 gray82 gray83 gray84 gray85 gray86 gray87 \
  601. gray88 gray89 gray9 gray90 gray91 gray92 gray93 gray94 \
  602. gray95 gray96 gray97 gray98 gray99 greenyellow green green1 \
  603. green2 green3 green4 honeydew honeydew1 honeydew2 honeydew3 \
  604. honeydew4 hotpink indianred ivory ivory1 ivory2 ivory3 \
  605. ivory4 khaki khaki1 khaki2 khaki3 khaki4 lavenderblush \
  606. lavender lawngreen lemonchiffon lightblue lightcoral \
  607. lightcyan lightgoldenrodyellow lightgoldenrod lightgray \
  608. lightpink lightsalmon lightseagreen lightskyblue \
  609. lightslateblue lightslategray lightsteelblue lightyellow \
  610. lightyellow1 lightyellow2 lightyellow3 lightyellow4 \
  611. limegreen linen magenta magenta1 magenta2 magenta3 magenta4 \
  612. maroon maroon1 maroon2 maroon3 maroon4 mediumaquamarine \
  613. mediumblue mediumorchid mediumpurple mediumseagreen \
  614. mediumslateblue mediumspringgreen mediumturquoise \
  615. mediumvioletred midnightblue mintcream mistyrose moccasin \
  616. navajowhite navajowhite1 navajowhite2 navajowhite3 navajowhite4 \
  617. navyblue navy navyblue oldlace olivedrab orangered orange \
  618. orange1 orange2 orange3 orange4 orchid orchid1 orchid2 \
  619. orchid3 orchid4 palegoldenrod palegreen paleturquoise \
  620. palevioletred papayawhip peachpuff peru pink pink1 pink2 \
  621. pink3 pink4 plum plum1 plum2 plum3 plum4 powderblue purple \
  622. purple1 purple2 purple3 purple4 red red1 red2 red3 red4 \
  623. rosybrown royalblue saddlebrown salmon salmon1 salmon2 \
  624. salmon3 salmon4 sandybrown seagreen seashell seashell1 \
  625. seashell2 seashell3 seashell4 sienna sienna1 sienna2 sienna3 \
  626. sienna4 skyblue slateblue slategray slategrey slategrey \
  627. snow snow1 snow2 snow3 snow4 springgreen steelblue tan \
  628. tan1 tan2 tan3 tan4 thistle thistle1 thistle2 thistle3 \
  629. thistle4 tomato tomato1 tomato2 tomato3 tomato4 turquoise \
  630. turquoise1 turquoise2 turquoise3 turquoise4 violetred violet \
  631. wheat wheat1 wheat2 wheat3 wheat4 whitesmoke white \
  632. yellowgreen yellow yellow1 yellow2 yellow3 yellow4
  633. X    pack append .cb.list \
  634. X        .cb.list.scrollbar {left fill} \
  635. X        .cb.list.colors {right fill expand}
  636. X    frame .cb.buttons -relief raised
  637. X    bind .cb.list.colors <Any-Double-1> \
  638. X        ".cb.list config -bg \[selection get\]"
  639. X    button .cb.buttons.norfore -text "Set normal foreground color" \
  640. X        -command "SetTextColor \[selection get\]"
  641. X    button .cb.buttons.norback -text "Set normal background color" \
  642. X        -command "SetTextColor \[selection get\] normal background"
  643. X    button .cb.buttons.selfore -text "Set selected foreground color" \
  644. X        -command "SetTextColor \[selection get\] selected"
  645. X    button .cb.buttons.selback -text "Set selected background color" \
  646. X        -command "SetTextColor \[selection get\] selected background"
  647. X    button .cb.buttons.close -text "Close" \
  648. X        -command "destroy .cb"
  649. X    pack append .cb.buttons \
  650. X        .cb.buttons.norfore {top fill} \
  651. X        .cb.buttons.norback {top fill} \
  652. X        .cb.buttons.selfore {top fill} \
  653. X        .cb.buttons.selback {top fill} \
  654. X        .cb.buttons.close {top fill}
  655. X    pack append .cb \
  656. X        .cb.title {top fill} \
  657. X        .cb.list {top fill expand} \
  658. X        .cb.buttons {bottom fill}
  659. X}
  660. X
  661. proc MakeCtagBox {} {
  662. X    catch {destroy .CtagBox}
  663. X    toplevel .CtagBox -relief raised
  664. X    wm title .CtagBox "Find C Tag"
  665. X    wm iconname .CtagBox "Find C Tag"
  666. X    label .CtagBox.label -text "C tag to search for:"
  667. X    entry .CtagBox.entry -relief sunken
  668. X    bind.entry .CtagBox.entry
  669. X    bind .CtagBox.entry <Any-Return> {CTag [.CtagBox.entry get]}
  670. X    button .CtagBox.enter -text "Find C tag" \
  671. X        -command { CTag [.CtagBox.entry get] }
  672. X    button .CtagBox.close -text "Close" -command "destroy .CtagBox"
  673. X    pack append .CtagBox \
  674. X        .CtagBox.label {top fill} \
  675. X        .CtagBox.entry {top fill} \
  676. X        .CtagBox.enter {top fill} \
  677. X        .CtagBox.close {top fill}
  678. X}
  679. X
  680. proc FillKeywordBox {kb} {
  681. X    set keyword [$kb.keyword get]
  682. X    set infiles [glob -nocomplain *.c *.h]
  683. X    set cmd [concat exec grep -l $keyword $infiles]
  684. X    set ok [catch {eval $cmd} outfiles]
  685. X    if {$ok!=0} {set outfiles "***No_Matches***"}
  686. X    catch {$kb.slist.filenames delete 0 end}
  687. X    foreach file $outfiles {
  688. X        $kb.slist.filenames insert end $file
  689. X    }
  690. X}
  691. X
  692. proc MakeKeywordBox {} {
  693. X    global wcounter raised sunken location1
  694. X
  695. X    set wcounter [expr $wcounter+1]
  696. X    set name [format ".kb%05d" $wcounter]
  697. X
  698. X    toplevel $name -relief $raised
  699. X    wm title $name "Keyword Search"
  700. X    wm iconname $name "Keyword Search"
  701. X    wm minsize $name 0 0
  702. X    label $name.label1 -text "Keyword to search for:"
  703. X
  704. X    entry $name.keyword -relief $sunken
  705. X    bind $name.keyword <Any-Return> "FillKeywordBox $name"
  706. X    bind.entry $name.keyword
  707. X
  708. X    frame $name.slist
  709. X    scrollbar $name.slist.scrollbar -relief sunken \
  710. X        -command "$name.slist.filenames view"
  711. X    listbox $name.slist.filenames -scroll "$name.slist.scrollbar set"  \
  712. X        -relief sunken
  713. X    bind $name.slist.filenames <Any-1> "
  714. X        set index \[%W nearest %y\]
  715. X        set item \[%W get \$index\]
  716. X        OpenWindow \$item \$location1
  717. X        set star \"*\"
  718. X        set item \$star\$item
  719. X        %W delete \$index
  720. X        %W insert \$index \$item
  721. X        Search {\[$name.keyword get\]} forward
  722. X    "
  723. X    pack append $name.slist \
  724. X        $name.slist.scrollbar {left fill} \
  725. X        $name.slist.filenames {right fill expand}
  726. X
  727. X    button $name.find -text "Find keyword in files" \
  728. X        -command "FillKeywordBox $name"
  729. X
  730. X    button $name.close -text "Close" -command "destroy $name"
  731. X
  732. X    pack append $name \
  733. X        $name.label1 {top fill} \
  734. X        $name.keyword {top fill} \
  735. X        $name.slist {top fill} \
  736. X        $name.find {top fill} \
  737. X        $name.close {top fill}
  738. X    return $name
  739. X}
  740. X
  741. proc MakeGotoBox {} {
  742. X    catch {destroy .GotoBox}
  743. X    toplevel .GotoBox -relief raised
  744. X    wm title .GotoBox "Go To Line"
  745. X    wm iconname .GotoBox "Go To Line"
  746. X    label .GotoBox.label -text "Line number to go to:"
  747. X    entry .GotoBox.entry -relief sunken
  748. X    bind.entry .GotoBox.entry
  749. X    bind .GotoBox.entry <Any-Return> {GotoLine [.GotoBox.entry get] lof}
  750. X    button .GotoBox.enter -text "Go to line" \
  751. X        -command {GotoLine [.GotoBox.entry get] lof}
  752. X    button .GotoBox.close -text "Close" -command "destroy .GotoBox"
  753. X    pack append .GotoBox \
  754. X        .GotoBox.label {top fill} \
  755. X        .GotoBox.entry {top fill} \
  756. X        .GotoBox.enter {top fill} \
  757. X        .GotoBox.close {top fill}
  758. X}
  759. X
  760. proc MakeDebugBox {} {
  761. X    catch {destroy .DebugBox}
  762. X    toplevel .DebugBox -relief raised
  763. X    wm title .DebugBox "Set Debug Variable"
  764. X    wm iconname .DebugBox "Set Debug Variable"
  765. X    label .DebugBox.label -text "Set value of `debug' to:"
  766. X    entry .DebugBox.entry -relief sunken
  767. X    bind.entry .DebugBox.entry
  768. X    bind .DebugBox.entry <Any-Return> \
  769. X        {Option set debug [.DebugBox.entry get]}
  770. X    button .DebugBox.enter -text "Set debug" \
  771. X        -command {Option set debug [.DebugBox.entry get]}
  772. X    button .DebugBox.close -text "Close" \
  773. X        -command "destroy .DebugBox"
  774. X    pack append .DebugBox \
  775. X        .DebugBox.label {top fill} \
  776. X        .DebugBox.entry {top fill} \
  777. X        .DebugBox.enter {top fill} \
  778. X        .DebugBox.close {top fill}
  779. X}
  780. X
  781. proc MakeAsciiBox {} {
  782. X    catch {destroy .AsciiBox}
  783. X    toplevel .AsciiBox -relief raised
  784. X    wm title .AsciiBox "Insert ASCII"
  785. X    wm iconname .AsciiBox "Insert ASCII"
  786. X    label .AsciiBox.label -text "Enter decimal ASCII character"
  787. X    entry .AsciiBox.entry -relief sunken
  788. X    bind.entry .AsciiBox.entry
  789. X    bind .AsciiBox.entry <Any-Return> {
  790. X        set ch [format "%c"  [.AsciiBox.entry get]]
  791. X        InsertString $ch
  792. X    }
  793. X    button .AsciiBox.enter -text "Enter character" \
  794. X        -command {InsertAscii [.AsciiBox.entry get]}
  795. X    button .AsciiBox.close -text "Close" \
  796. X        -command "destroy .AsciiBox"
  797. X    bind.entry .AsciiBox.entry
  798. X    pack append .AsciiBox \
  799. X        .AsciiBox.label {top fill} \
  800. X        .AsciiBox.entry {top fill} \
  801. X        .AsciiBox.enter {top fill} \
  802. X        .AsciiBox.close {top fill}
  803. X}
  804. X
  805. proc MakeAboutBox {} {
  806. X    catch {destroy .AboutBox}
  807. X    toplevel .AboutBox -relief raised
  808. X    wm title .AboutBox "About Point"
  809. X    wm iconname .AboutBox "About Point"
  810. X    message .AboutBox.msg -text "\
  811. Point -- An X Windows Text Editor \n\
  812. X             Version 1.3 \n\
  813. X            11 October 1991 \n\
  814. X\n\
  815. X                 by \n\
  816. X\n\
  817. Charles Crowley \n\
  818. Computer Science Department \n\
  819. University of New Mexico \n\
  820. Albuquerque, NM 87131 \n\
  821. X505-277-5446 \n\
  822. crowley@unmvax.cs.unm.edu"
  823. X    bind .AboutBox.msg <Any-Button> "destroy .AboutBox"
  824. X    bind .AboutBox.msg <Any-Key> "destroy .AboutBox"
  825. X    pack append .AboutBox .AboutBox.msg {top fill expand}
  826. X}
  827. X
  828. proc MakeQuitBox {} {
  829. X    catch {destroy .QuitBox}
  830. X    toplevel .QuitBox -relief raised
  831. X    wm title .QuitBox "Quit Point"
  832. X    wm iconname .QuitBox "Quit Point"
  833. X    label .QuitBox.label -text "*** There are unsaved files ***"
  834. X    button .QuitBox.SaveAndQuit \
  835. X        -text "Save unsaved files and quit Point" \
  836. X        -command "QuitPoint save"
  837. X    button .QuitBox.AskAndQuit \
  838. X        -text "Ask about each unsaved file and quit Point" \
  839. X        -command "QuitPoint ask"
  840. X    button .QuitBox.DiscardAndQuit \
  841. X        -text "Discard unsaved edits and quit Point" \
  842. X        -command "QuitPoint discard"
  843. X    button .QuitBox.CancelQuit -text "Do not quit Point" \
  844. X        -command "destroy .QuitBox"
  845. X    pack append .QuitBox \
  846. X        .QuitBox.label {top fill} \
  847. X        .QuitBox.SaveAndQuit {top fill} \
  848. X        .QuitBox.AskAndQuit {top fill} \
  849. X        .QuitBox.DiscardAndQuit {top fill} \
  850. X        .QuitBox.CancelQuit {top fill}
  851. X}
  852. X
  853. proc SearchBoxProc {} {
  854. X    global searchDirection reSearch
  855. X    set str [.Search.string get]
  856. X    if {$reSearch==1} {
  857. X        RegexSearch $str $searchDirection
  858. X    } else {
  859. X        Search $str $searchDirection
  860. X    }
  861. X}
  862. X
  863. proc MakeSearchBox {{regex normal}} {
  864. X    global searchDirection reSearch
  865. X    catch {destroy .Search}
  866. X    toplevel .Search -class "SearchWindow" -relief raised
  867. X    wm title .Search "String Search"
  868. X    wm iconname .Search "String Search"
  869. X    label .Search.label -text "Search string:"
  870. X    entry .Search.string -relief sunken
  871. X    bind.entry .Search.string
  872. X    bind .Search.string <Any-Return> {Search "[.Search.string get]" forward}
  873. X    checkbutton .Search.reSearch \
  874. X        -text "Regular expression search        " \
  875. X        -variable reSearch \
  876. X        -command { Option set ignoreCase $ignoreCase }
  877. X    label .Search.reExplain -text "(^,$,.,*,+,\[,\],\\ are special in REs)"
  878. X    if ![string compare $regex normal] {
  879. X        .Search.reSearch deselect
  880. X    } else {
  881. X        .Search.reSearch select
  882. X    }
  883. X    checkbutton .Search.ignoreCase \
  884. X        -text "Ignore case in search            " \
  885. X        -variable ignoreCase \
  886. X        -command { Option set ignoreCase $ignoreCase }
  887. X    set xx [Option get ignoreCase]
  888. X    if {$xx==1} {
  889. X        .Search.ignoreCase select
  890. X    } else {
  891. X        .Search.ignoreCase deselect
  892. X    }
  893. X    checkbutton .Search.findWholeWords \
  894. X        -text "Find whole words only            " \
  895. X        -variable findWholeWords \
  896. X        -command { Option set findWholeWords $findWholeWords }
  897. X    set xx [Option get findWholeWords]
  898. X    if {$xx==1} {
  899. X        .Search.findWholeWords select
  900. X    } else {
  901. X        .Search.findWholeWords deselect
  902. X    }
  903. X    checkbutton .Search.searchDirection \
  904. X        -text "Search backwards                 " \
  905. X        -variable searchDirection \
  906. X        -offvalue "forward" -onvalue "backward"
  907. X    frame .Search.buttons
  908. X    button .Search.buttons.search -text "Search" \
  909. X        -command SearchBoxProc
  910. X    button .Search.buttons.close -text "Close" \
  911. X        -command "destroy .Search"
  912. X    pack append .Search.buttons \
  913. X        .Search.buttons.search { left fill expand } \
  914. X        .Search.buttons.close { left fill expand }
  915. X    pack append .Search \
  916. X        .Search.label { top fill } \
  917. X        .Search.string { top fill } \
  918. X        .Search.reSearch { top fill } \
  919. X        .Search.reExplain { top fill } \
  920. X        .Search.ignoreCase { top fill } \
  921. X        .Search.findWholeWords { top fill } \
  922. X        .Search.searchDirection { top fill } \
  923. X        .Search.buttons { bottom fill }
  924. X}
  925. X
  926. proc MakeRebindWindow {} {
  927. X    global CmdName
  928. X    catch {destroy .rebind}
  929. X    toplevel .rebind
  930. X    wm title .rebind "Rebind Commands"
  931. X    wm iconname .rebind "Rebind Commands"
  932. X    # allow this box to be resized (to see more commands or jeys)
  933. X    wm minsize .rebind 0 0
  934. X    frame .rebind.upper
  935. X    frame .rebind.lower
  936. X    pack append .rebind \
  937. X        .rebind.upper {top fill}
  938. X        .rebind.lower {bottom fill}
  939. X    if ![info exists CmdInfo] {
  940. X        CreateCmdInfo
  941. X    }
  942. X    # set up the upper half of the window
  943. X    frame .rebind.upper.cmds
  944. X    message .rebind.upper.help -aspect 150 -justification left
  945. X    pack append .rebind.upper \
  946. X        .rebind.upper.cmds {left fill} \
  947. X        .rebind.upper.help {right fill}
  948. X    scrollbar .rebind.upper.cmds.scroll -orient vertical -width 15 \
  949. X        -command ".rebind.upper.cmds.list"
  950. X    colbox .rebind.upper.cmds.list \
  951. X                -scrollCommand ".rebind.upper.cmds.scroll set"
  952. X    foreach cmd $CmdName {
  953. X        .rebind.upper.cmds.list insert end $cmd
  954. X    }
  955. X    bind .rebind.upper.cmds.help <Button> UpdateRebindHelp
  956. X    # set up the lower half of the window
  957. X    frame .rebind.lower.keys
  958. X    frame .rebind.lower.buttons
  959. X    pack append .rebind.lowe \
  960. X        .rebind.lower.keys {left fill} \
  961. X        .rebind.lower.buttons {right fill}
  962. X    scrollbar .rebind.lower.keys.scroll -orient vertical -width 15 \
  963. X        -command ".rebind.lower.keys.list"
  964. X    colbox .rebind.lower.keys.list \
  965. X                -scrollCommand ".rebind.lower.keys.scroll set"
  966. X    .rebind.lower.keys.list insert end F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 \
  967. X        Home End PageUp PageDown
  968. X    button .rebind.lower.buttons.bind -command {
  969. X        set key [.rebind.lower.keys.list get \
  970. X                [lindex [.rebind.lower.keys.list sellimits] 0]]
  971. X        Rebind $key $command
  972. X    }
  973. X}
  974. X
  975. proc UpdateRebindHelp {} {
  976. X    set n [lindex "[.rebind.upper.cmds.list sellimits]" 0]
  977. X    .rebind.upper.cmds.help configure -text [lindex CmdInfo $n]
  978. X}
  979. X
  980. END_OF_FILE
  981. if test 30790 -ne `wc -c <'tclLib/makeBoxes.tcl'`; then
  982.     echo shar: \"'tclLib/makeBoxes.tcl'\" unpacked with wrong size!
  983. fi
  984. # end of 'tclLib/makeBoxes.tcl'
  985. fi
  986. echo shar: End of archive 11 \(of 15\).
  987. cp /dev/null ark11isdone
  988. MISSING=""
  989. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  990.     if test ! -f ark${I}isdone ; then
  991.     MISSING="${MISSING} ${I}"
  992.     fi
  993. done
  994. if test "${MISSING}" = "" ; then
  995.     echo You have unpacked all 15 archives.
  996.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  997. else
  998.     echo You still need to unpack the following archives:
  999.     echo "        " ${MISSING}
  1000. fi
  1001. ##  End of shell archive.
  1002. exit 0
  1003. -- 
  1004. --
  1005. Molecular Simulations, Inc.            mail: dcmartin@msi.com
  1006. 796 N. Pastoria Avenue                uucp: uunet!dcmartin
  1007. Sunnyvale, California 94086            at&t: 408/522-9236
  1008.