README: changed URL format to <URL:...>; added section on Tk.
Makefile.in: run config.status in "make recheck".
configure.in: add test for hypot().
config.h.in, configure: since configure.in changed.
rest: the usual boring stuff.
diff --git a/BUGS b/BUGS
index d24517d..5ef848a 100644
--- a/BUGS
+++ b/BUGS
@@ -3,12 +3,44 @@
 nother to make an entry in this file, unless it was a serious bug
 (core dump or infinite loop).
 
-==> Status indicators: (-) not fixed; (*) fixed; (?) don't know what to do.
+==> Status indicators: (-) not fixed; (*) fixed; (?) not sure.
 
 ======================================================================
 Known BUGS in 1.1.1 and 1.2
 ---------------------------
 
+(-) C-level coerce() doesn't call __coerce__ when it should (and
+similar for __cmp__)
+
+(-) tkinter seems to leave an exception around sometime which breaks
+unmarshalling code objects [hard to reproduce, have added a trap to
+catch it]
+
+(-) destroying all modules may destroy __builtin__ (or other modules)
+while destructors of other modules may still need it [hard to fix --
+could maintain a list of all modules in order of importation so we can
+destroy them in reverse order???  really hopeless -- would have to
+destroy objects in a module in reverse order too...]
+
+(-) [X]DECREF can cause the interpreter to be called recursively (for
+__del__ disciplines) -- so list and dict implementation calls doing
+DECREF can cause recursive calls to methods of the object being
+modified.  Other files too.  [Only partially fixed -- listobject.c is
+still suspect.]
+
+(-) struct module aligns doubles wrongly when compiled with -DDEBUG on
+sparc
+
+(-) if __getattr__ prints something, calling repr(x) from cmd line
+forgets a newline
+
+(-) doneimport() should be called *before* the Py_AtExit code is called
+
+Environmental bugs
+------------------
+
+(-) tkinter doesn't seem to see any declaration of malloc on sunos 4.1.3
+
 (-) arraymodule doesn't compile under Ultrix (FPROTO macro)
 
 (-) Linux uses GNU getopt by default which is broken
@@ -17,54 +49,36 @@
 
 (-) "make depend" assumes mkdep exists -- not portable
 
-(-) threadmodule.c leaks LOTS of memory at thread exit
-
-(-) tkinter seems to leave an exception around sometime which breaks
-unmarshalling code objects
-
-(-) memory leak (namebuf) in initmodule2
-
 (-) regen calls h2py which isn't defined by default
 
-(-) shared install in Modules still doesn't work for empty list
-
 (-) make libinstall (or similar) references to machdep directory but
 doesn't create it
 
-(-) destroying all modules may destroy __builtin__ while destructors
-of other modules may still need it
-
-(-) hash() of float values returns suspect values
-
-(-) sockets aren't thread safe (address of static struct returned,
-some calls aren't thread safe)
-
-(-) Everything else that uses err_get() should probably use err_get_tb()
-
-(-) struct module aligns doubles wrongly when compiled with -DDEBUG on sparc
-
-(-) pow(int, int, long) (etc.) dumps core on Linux (and other Intel machines?)
-
-(-) C-level coerce() doesn't call __coerce__ when it should (and
-similar for __cmp__)
-
-(-) DECREF can cause the interpreter to be called recursively (for
-__del__ disciplines) -- so list and dict implementation calls doing
-DECREF can cause recursive calls to methods of the object being
-modified.  Other files too.  (Only partially fixed.)
-
 (-) HP doesn't compile out of the box (needs LIBS=-ldld or
 LIBS=/usr/lib/libdld.sl)
 
-(-) something fishy with softspace and print_error (flushline clears
-the error)
-
-(-) tkinter doesn't seem to see any declaration of malloc on sunos 4.1.3
-
 ======================================================================
 BUGS present in 1.1.1 and fixed in 1.2
 --------------------------------------
 
+(*) memory leak (namebuf) in initmodule2
+
+(*) hash() of float values returns bogus values
+
+(*) pow(int, int, long) does wrong series of DECREF() calls.
+
+(*) flushline() may clear the exception condition so shouldn't be
+called before print_error()
+
+(*) Everything else that uses err_get() should use err_fetch()
+
+(*) sockets aren't thread safe (address of static struct returned,
+some calls aren't thread safe)
+
+(*) threadmodule.c leaks LOTS of memory at thread exit
+
+(*) shared install in Modules still doesn't work for empty list
+
 (*) threadmodule.c leaks 'res' in t_bootstrap
 
 (*) errors.c shouldn't declare strerror() on NT
diff --git a/ChangeLog b/ChangeLog
index ebe9c70..5321f4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,66 @@
+Wed Jan  4 18:23:09 1995  Guido van Rossum  <guido@voorn.cwi.nl>
+
+	* Python/modsupport.c (initmodule2), Include/methodobject.h,
+	Objects/methodobject.c: introduced METH_FREENAME bit passed to
+	newmethodobject to indicate that if the object is freed the name
+	pointer must also be freed (this saves a long standing memory leak
+	in initmodule2)
+
+	* Modules/structmodule.c (struct_pack, struct_unpack): use memcpy
+	instead of double precision assignment (since a string isn't
+	always double-aligned, e.g. when debug fields are present in the
+	object header)
+
+	* Objects/floatobject.c (float_hash): changed a constant to avoid
+	float->long conversion overflow
+
+	* Python/bltinmodule.c (builtin_pow): fix coerce() ref count
+	nightmare (core dumps on Linux)
+
+	* Python/pythonrun.c: call flushline() in print_error(), after
+	fetching the exception info, since flushline() can mask an
+	exception; move flushline() calls around so they are not between
+	the detection and printing of the exception
+
+Tue Jan  3 12:55:28 1995  Guido van Rossum  <guido@voorn.cwi.nl>
+
+	* Modules/config.c.in (getcopyright): Change copyright to include
+	1995
+
+Mon Jan  2 20:15:39 1995  Guido van Rossum  <guido@voorn.cwi.nl>
+
+	* Objects/mappingobject.c (mappingremove): don't call
+	lookmapping() for empty dictionary
+
+	* Doc/libsocket.tex (section{Built-in Module \sectcode{socket}}):
+	documented gethostbyaddr()
+
+	* Modules/mpzmodule.c (mpz_power): made it ternary
+
+	* Modules/mathmodule.c: only use hypot() if it exists
+
+	* Modules/Makefile.pre.in (sharedinstall): fix bug (sh can't loop
+	over empty list) when $(SHAREDMODS) is empty
+
+sMon Jan  2 19:35:49 1995  Guido van Rossum  <guido@voorn.cwi.nl>
+
+	* Python/errors.c: added hook for better mac error messages
+
+	* Python/pythonrun.c (run_script): removed extraneous fclose() in
+        case of .pyc file argument
+
+	* Include/{object.h,stringobject.h}: changed refcnt and sizes from
+        unsigned to int (i.e. signed)
+
+	* Objects/fileobject.c (newfileobject): use HAVE_FOPENRF instead
+	of USE_FOPENRF
+
+	* Lib/test/test_b1.py: test eval() and execfile() with globals,
+	locals arguments
+
+	* Lib/mhlib.py: added movemessage(), copymessage(), added copy
+	fallback for refilemessages(), and updated the docs
+
 Fri Dec 30 16:19:17 1994  Guido van Rossum  <guido@voorn.cwi.nl>
 
 	* Parser/tokenizer.c (tok_nextc): zap tok->buf after freeing
@@ -58,7 +121,7 @@
 	instead of going through ceval.c:printtraceback()
 
 	* Python/modsupport.c: fix vmkvalue() for systems where va_list is
-	an array; add support for creating lists and dcitionaries; added
+	an array; add support for creating lists and dictionaries; added
 	convenience functions for calling functions/methods with format
 	and argument list
 
@@ -123,7 +186,7 @@
 	(for QNX); use gethostbyname_r if it exists (since it is
 	re-entrant); use h_error and hstrerror when they exist; other
 	changes for re-entrancy; make printable representation more
-	useful; cosmetic changes in argument lists
+	useful; cosmetic changes in argument lists; add gethostbyaddr()
 
 	* Modules/signalmodule.c: if NSIG undefined, use _SIGMAX + 1
 
diff --git a/Makefile.in b/Makefile.in
index cb726df..e64345d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,17 +1,17 @@
 ########################################################################
-# Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-# Amsterdam, The Netherlands.
-# 
+# Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+# The Netherlands.
+#
 #                         All Rights Reserved
-# 
-# Permission to use, copy, modify, and distribute this software and its 
-# documentation for any purpose and without fee is hereby granted, 
+#
+# Permission to use, copy, modify, and distribute this software and its
+# documentation for any purpose and without fee is hereby granted,
 # provided that the above copyright notice appear in all copies and that
-# both that copyright notice and this permission notice appear in 
+# both that copyright notice and this permission notice appear in
 # supporting documentation, and that the names of Stichting Mathematisch
 # Centrum or CWI not be used in advertising or publicity pertaining to
 # distribution of the software without specific, written prior permission.
-# 
+#
 # STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 # FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
@@ -183,6 +183,7 @@
 # provided the config.status script exists
 recheck:
 		$(SHELL) config.status --recheck
+		$(SHELL) config.status
 
 # Rebuild the configure script from configure.in; also rebuild config.h.in
 autoconf:
diff --git a/README b/README
index 67e1880..a4f97ff 100644
--- a/README
+++ b/README
@@ -159,12 +159,12 @@
 readline library before running the configure script.  Its sources are
 not distributed with Python; you can ftp them from any GNU mirror
 site, or from its home site:
-ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz (or a higher
-version number -- using version 1.x is not recommended).
+<URL:ftp://slc2.ins.cwru.edu/pub/dist/readline-2.0.tar.gz> (or a
+higher version number -- using version 1.x is not recommended).
 
 A GPL-free version was posted to comp.sources.misc in volume 31 and is
-widely available from FTP archive sites.  One URL for it is:
-ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/volume31/editline/part01.Z
+widely available from FTP archive sites, e.g.
+<URL:ftp://gatekeeper.dec.com/.b/usenet/comp.sources.misc/volume31/editline/part01.Z>
 
 Pass the Python configure script the option --with-readline=DIRECTORY
 where DIRECTORY is the absolute pathname of the directory where you've
@@ -209,8 +209,8 @@
 
 - On SGI IRIX 4, dynamic loading of extension modules is supported by
 the "dl" library by Jack Jansen, which is ftp'able from
-ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.  This is enabled (after
-you've ftp'ed and compiled the dl library!) by passing
+<URL:ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z>.  This is enabled
+(after you've ftp'ed and compiled the dl library!) by passing
 --with-sgi-dl=DIRECTORY where DIRECTORY is the absolute pathname of
 the dl library.  (Don't bother on IRIX 5, it already has dynamic
 linking using SunOS style shared libraries.)  Support for this feature
@@ -219,9 +219,9 @@
 - Dynamic loading of modules is rumoured to be supported on some other
 systems: VAX (Ultrix), Sun3 (SunOS 3.4), Sequent Symmetry (Dynix), and
 Atari ST.  This is done using a combination of the GNU dynamic loading
-package (ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z) and an
+package (<URL:ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z>) and an
 emulation of the SGI dl library mentioned above (the emulation can be
-found at ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z).  To enable
+found at <URL:ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z>).  To enable
 this, ftp and compile both libraries, then call the configure passing
 it the option --with-dl-dld=DL_DIRECTORY,DLD_DIRECTORY where
 DL_DIRECTORY is the absolute pathname of the dl emulation library and
@@ -242,6 +242,44 @@
 there.
 
 
+The Tk extension
+----------------
+
+Tk (the user interface component of John Ousterhout's Tcl language) is
+also usable from Python.  Since this requires that you first build and
+install Tcl/Tk, the Tk interface is not enabled by default.  It
+requires Tcl 7.3 and Tk 3.6.  For more info about Tk, including
+pointers to the source, see John Ousterhout's home page at
+<URL:http://playground.sun.com/~ouster/>.
+
+To enable the Python/Tk interface, once you've built and installed
+Tcl/Tk, all you need to do is edit two lines in Modules/Setup; search
+for the string "Tk".  Un-comment one (normally the first) of the lines
+beginning with "#tkinter" and un-comment the line beginning with
+"#TKPATH".  (If you have installed Tcl/Tk in unusual places you will
+have to edit the first line as well to fix the -I and -L options.)
+See the Build Instructions above for more details.
+
+There is little documentation.  Begin with fetching the "Tk Lifesaver"
+document, e.g. <URL:ftp://ftp.cwi.nl/pub/python/tkinter-doc.tar.gz> (a
+gzipped tar file containing a PostScript file).  There are demos in
+the Demo/tkinter directory, in the subdirectories guido, matt and www.
+
+Note that there's a Python module called "Tkinter" (capital T) which
+lives in Lib/tkinter/Tkinter.py, and a C module called "tkinter"
+(lower case t) which lives in Modules/tkintermodule.c.  Demos and
+normal Tk applications only import the Python Tkinter module -- only
+the latter uses the C tkinter module directly.  In order to find the C
+tkinter module, it must be compiled and linked into the Python
+interpreter -- the tkinter line in the Setup file does this.  In order
+to find the Python Tkinter module, sys.path must be set correctly --
+the TKPATH assignment in the Setup file takes care of this, but only
+if you install Python properly ("make install libinstall").  (You can
+also use dynamic loading for the C tkinter module, in which case you
+must manually fix up sys.path or set $PYTHONPATH for the Python
+Tkinter module.)
+
+
 Building for multiple architectures (using the VPATH feature)
 -------------------------------------------------------------
 
@@ -351,11 +389,11 @@
 ----------
 
 The latest Python source distribution can be ftp'ed from
-ftp://ftp.cwi.nl/pub/python/python<version>.tar.gz.  You can also find
-PostScript of the main Python documentation there, Macintosh and PC
-binaries, and the latest STDWIN source distribution (in directory
-/pub/stdwin).  oFr mirror sites, see the list in the FAQ (Misc/FAQ
-this directory).
+<URL:ftp://ftp.cwi.nl/pub/python/>.  See the INDEX or index.html file
+for more information.  You can also find PostScript of the main Python
+documentation there, Macintosh and PC binaries, and the latest STDWIN
+source distribution (in directory /pub/stdwin).  oFr mirror sites, see
+the list in the FAQ (Misc/FAQ this directory).
 
 
 Mailing list and Newsgroup
@@ -386,8 +424,8 @@
 The Python source is copyrighted, but you can freely use and copy it
 as long as you don't change or remove the copyright:
 
-Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
-Amsterdam, The Netherlands.
+Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
+The Netherlands.
 
                         All Rights Reserved
 
diff --git a/TODO b/TODO
index a329df8..f147d3d 100644
--- a/TODO
+++ b/TODO
@@ -1,24 +1,26 @@
+(-) interface to getdtablesize() in posix
+
 (-) reentrancy with global variables vs. decref in
 ./Modules/cdmodule.c ./Modules/flmodule.c ./Objects/accessobject.c
 ./Objects/frameobject.c ./Python/traceback.c
 
 (-) speed up regsub.gsub
 
-(-) change md5.md5() to md5.new()
+(*) change md5.md5() to md5.new()
 
 (-) try posixenviron.c and merge back into posixmodule.c?
 
-(-) document chown()
+(*) document chown()
 
 (-) add and document chroot() ?
 
-(-) use add gethostname_r and release thread lock when it exists
+(*) use add gethostname_r and release thread lock when it exists
 
 (-) Add `@CFLAGS@', `@CPPFLAGS@', and `@LDFLAGS@' to `Makefile.in'
 
 (-) modules should be able to define a module destructor hook
 
-(-) goaway() / cleanup() call AtExit funcs *after* donimport()
+(-) goaway() / cleanup() should call AtExit funcs *after* doneimport()
 
 (-) destroy modules in reverse order of importation
 
@@ -26,9 +28,7 @@
 
 (-) makesetup should accept .o files without corresponding .c file
 
-(-) use autoconf 2.0
-
-(-) configure(.in ?) contains a line beginning with '+'
+(*) use autoconf 2.0
 
 ======================================================================
 Release 1.1.1 (10 Nov 1994)
@@ -36,7 +36,7 @@
 
 (-) try Boehm/Dehmers/Weiser conservative garbage collector
 
-(-) implement new 'flatten' module
+(*) implement new 'flatten' module
 
 (-) document new Python/C API
 
@@ -47,7 +47,7 @@
 
 (-) pass dict of builtins to exec / execfile / eval ???
 
-(-) stack frame correspondence problem (Jim Roskind)
+(?) stack frame correspondence problem (Jim Roskind)
 (probably solved by err_setval_tb)
 
 (-) make lots of places use newgetargs
@@ -60,15 +60,12 @@
 like 'cd')
 
 (-) need to add truncate() and ftruncate() to posixmodule.c (Windows:
-chsize(fd, size)
+chsize(fd, size) (solution: added to file objects instead)
 
 ======================================================================
 Release 1.1 (11 Oct 1994)
 ======================================================================
 
-(-) if __getattr__ prints something, calling repr(x) from cmd line
-forgets a newline
-
 (-) improve performance of list.append/insert etc. by keeping high/low
 watermark instead of realloc'ing each time?
 
@@ -85,7 +82,7 @@
 
 (-) whrandom doc needs update
 
-(-) mpz power is still binary insterad of ternary
+(*) mpz power is still binary insterad of ternary
 
 (*) design interface to call arbitrary asynchronous routines
 
@@ -93,7 +90,7 @@
 
 (*) Lance's latest curses additions
 
-(-) Jack's new code:
+(*) Jack's new code:
 	(*) new xxmodule.c
 	(*) mac has type for .pyc files
 	(*) should run .pyc files when passed as command line argument
@@ -104,7 +101,7 @@
 
 (-) fix signalmodule.c to re-establish SIGC[H]LD handler
 
-(-) try out Kees Blom's railroad diagram generator
+(*) try out Kees Blom's railroad diagram generator
 
 (-) redesign error handling (cf. Donald's mail)
 
@@ -173,11 +170,11 @@
 
 (-) The Great Renaming!
 
-(-) redo __xxx__ operators for class instances
+(*) redo __xxx__ operators for class instances
 
 (-) document __getattr__, __setattr__
 
-(-) add __delattr__ to class instances
+(*) add __delattr__ to class instances
 
 (-) many things that take strings should also take arrays of chars
 
diff --git a/config.h.in b/config.h.in
index 012863a..83f0c65 100644
--- a/config.h.in
+++ b/config.h.in
@@ -164,6 +164,9 @@
 /* Define if you have the getwd function.  */
 #undef HAVE_GETWD
 
+/* Define if you have the hypot function.  */
+#undef HAVE_HYPOT
+
 /* Define if you have the link function.  */
 #undef HAVE_LINK
 
diff --git a/configure b/configure
index a64f1a1..7b74350 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# From configure.in Revision: 1.9 
+# From configure.in Revision: 1.12 
 
 # Guess values for system-dependent variables and create Makefiles.
 # Generated automatically using autoconf version 2.0 
@@ -2536,6 +2536,58 @@
 fi
 
 
+# check for hypot() in math library
+LIBS_SAVE=$LIBS
+LIBS="$LIBS $LIBM"
+for ac_func in hypot
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
+if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&4
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2550 "configure"
+#include "confdefs.h"
+#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+int main() { return 0; }
+int t() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+/* Override any gcc2 internal prototype to avoid an error.  */
+char $ac_func(); $ac_func();
+#endif
+
+; return 0; }
+EOF
+if eval $ac_link; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+fi
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&4
+    ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&4
+fi
+done
+
+LIBS=$LIBS_SAVE
+
 # generate output files
 trap '' 1 2 15
 if test -w $cache_file; then
diff --git a/configure.in b/configure.in
index ae7431d..34af46f 100644
--- a/configure.in
+++ b/configure.in
@@ -295,5 +295,11 @@
 else AC_ERROR(proper usage is --with-libc=STRING)
 fi])
 
+# check for hypot() in math library
+LIBS_SAVE=$LIBS
+LIBS="$LIBS $LIBM"
+AC_CHECK_FUNCS(hypot)
+LIBS=$LIBS_SAVE
+
 # generate output files
 AC_OUTPUT(Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre)