Quick lick of paint before we really get started.
[anag] / anag-gui.in
index 3f30753..45da707 100644 (file)
@@ -1,6 +1,31 @@
-#! /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)
@@ -13,7 +38,7 @@ if {[info exists 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"]
 }
@@ -38,7 +63,8 @@ foreach f $conffile {
   break
 }
 
-# --- Other setting up ---
+###--------------------------------------------------------------------------
+### Other setting up.
 
 if {[string compare "windows" $tcl_platform(platform)] == 0} {
   set exetypes {
@@ -49,7 +75,8 @@ if {[string compare "windows" $tcl_platform(platform)] == 0} {
   set exetypes {}
 }
 
-# --- Handy subroutines ---
+###--------------------------------------------------------------------------
+### Handy subroutines.
 
 proc wordlist {args} {
   set l {}
@@ -67,7 +94,8 @@ proc report {msg} {
       -title "Error from [wm title .]" -message $msg
 }
 
-# --- Options ---
+###--------------------------------------------------------------------------
+### Options.
 
 proc conf-copyout {} {
   global C C_tags
@@ -155,7 +183,8 @@ proc options {} {
   pack .opt.b -anchor e
 }
 
-# --- Run the command ---
+###--------------------------------------------------------------------------
+### Run the command.
 
 proc run-search {args} { run-search-v $args }
 proc run-search-v {v} {
@@ -169,7 +198,8 @@ 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
@@ -227,3 +257,4 @@ menu .menu.file
 focus .e-word
 bind .e-word <Return> { tkButtonInvoke .b-anagram }
 
+###----- That's all, folks --------------------------------------------------