-#! /usr/bin/wish
-
-# --- Configuration ---
+#! @WISH@
+### -*-tcl-*-
+###
+### Graphical frontend for `anag'
+###
+### (c) 2002 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This file is part of Anag: a simple wordgame helper.
+###
+### Anag is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### Anag is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with Anag; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+###--------------------------------------------------------------------------
+### Configuration.
if {[info exists env(HOME)]} {
set home $env(HOME)
}
}
set conffile [list "/etc/anagrc" \
- [file join $home "anagrc"]]
+ [file join $home "anagrc"]]
if {[string compare "unix" $tcl_platform(platform)] == 0} {
lappend conffile [file join $home ".anagrc"]
}
break
}
-# --- Other setting up ---
+###--------------------------------------------------------------------------
+### Other setting up.
if {[string compare "windows" $tcl_platform(platform)] == 0} {
set exetypes {
set exetypes {}
}
-# --- Handy subroutines ---
+###--------------------------------------------------------------------------
+### Handy subroutines.
proc wordlist {args} {
set l {}
-title "Error from [wm title .]" -message $msg
}
-# --- Options ---
+###--------------------------------------------------------------------------
+### Options.
proc conf-copyout {} {
global C C_tags
pack .opt.b -anchor e
}
-# --- Run the command ---
+###--------------------------------------------------------------------------
+### Run the command.
proc run-search {args} { run-search-v $args }
proc run-search-v {v} {
foreach i $l { .list insert end $i }
}
-# --- Construct the main window ---
+###--------------------------------------------------------------------------
+### Construct the main window.
wm title . "Anagram solver"
frame .f-entry
focus .e-word
bind .e-word <Return> { tkButtonInvoke .b-anagram }
+###----- That's all, folks --------------------------------------------------